body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #1a1a2e;
    color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px 0;
    box-sizing: border-box;
}

.container {
    background-color: #242f40;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 700px;
    border: 1px solid #3a3a5a;
}

header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #3a3a5a;
    padding-bottom: 15px;
}

header h1 {
    color: #e0e0e0;
    margin: 0 0 5px 0;
    font-size: 1.8em;
}
header p {
    font-size: 0.9em;
    color: #b0b0c0;
}

.iteration-selector {
    margin-bottom: 20px;
    text-align: center;
    padding: 10px 0;
    background-color: #1e2738;
    border-radius: 8px;
    border: 1px solid #3a3a5a;
}

.iteration-selector label {
    margin-right: 10px;
    font-weight: bold;
    color: #c0c0d0;
}

#iteration-choice {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #4a4a6a;
    background-color: #2c3e50;
    color: #e0e0e0;
    font-size: 0.95em;
}
#iteration-choice option {
    background-color: #2c3e50;
    color: #e0e0e0;
}


.chat-container {
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
}

.chat-log {
    height: 400px;
    overflow-y: auto;
    padding: 15px;
    background-color: #1e2738;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-log::-webkit-scrollbar {
    width: 8px;
}
.chat-log::-webkit-scrollbar-track {
    background: #242f40;
}
.chat-log::-webkit-scrollbar-thumb {
    background-color: #4a5568;
    border-radius: 4px;
    border: 2px solid #242f40;
}


.message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.5;
    word-wrap: break-word;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.user-message {
    background-color: #4a90e2;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background-color: #3a4a5f;
    color: #e0e0e0;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.bot-message.error-message {
    background-color: #c0392b;
    color: #f0f0f0;
    border: 1px solid #e74c3c;
}
.bot-message.thinking-message {
    font-style: italic;
    color: #a0a0b0;
}


.chat-input {
    display: flex;
    padding: 12px;
    border-top: 1px solid #3a3a5a;
    background-color: #242f40;
}

#user-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #4a4a6a;
    border-radius: 22px;
    margin-right: 10px;
    outline: none;
    font-size: 1em;
    background-color: #2c3e50;
    color: #e0e0e0;
}
#user-input::placeholder {
    color: #808090;
}
#user-input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.3);
}

#send-button {
    padding: 12px 20px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 22px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    font-size: 1em;
}

#send-button:hover {
    background-color: #357ABD;
}
#send-button:active {
    background-color: #2a5f92;
}
#user-input:disabled, #send-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}


.iteration-info {
    margin-top: 20px;
    padding: 20px;
    background-color: #1e2738;
    border-radius: 8px;
    border: 1px solid #3a3a5a;
}

.iteration-info h2 {
    margin-top: 0;
    color: #e0e0e0;
    border-bottom: 1px solid #4a4a6a;
    padding-bottom: 8px;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.iteration-info h3 {
    color: #5dade2;
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 1.2em;
}
.iteration-info h4 {
    color: #c0c0d0;
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 1.05em;
    font-weight: 600;
}

.iteration-info ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 15px;
}
.iteration-info li {
    margin-bottom: 6px;
    line-height: 1.6;
    color: #b0b0c0;
}