.hero {
    background: linear-gradient(135deg, #667eea 0%, #ff6b6b 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.container h2 {
    color: #333;
    margin-bottom: 0.5rem;
    text-align: center;
}

.container p {
    margin-bottom: 2rem;
    text-align: center;
    color: #555;
}

.chat-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-window {
    min-height: 420px;
    max-height: 65vh;
    overflow-y: auto;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-start {
    display: flex;
    justify-content: center;
}

.message {
    max-width: 85%;
    padding: 1rem 1.2rem;
    border-radius: 20px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea 0%, #6b8cff 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.assistant {
    align-self: flex-start;
    background: white;
    color: #111827;
    border-bottom-left-radius: 4px;
    border: 1px solid #e2e8f0;
}

.message strong {
    display: inline-block;
    margin-bottom: 0.35rem;
}

form {
    display: grid;
    gap: 1rem;
}

textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #dde4ef;
    border-radius: 16px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #ff6b6b 100%);
    color: white;
    border: none;
    padding: 0.95rem 1.75rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 22px rgba(102, 126, 234, 0.14);
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn.btn-secondary {
    background: #f1f5f9;
    color: #111827;
    box-shadow: none;
    border: 1px solid #cbd5e1;
}

.error-box {
    background: #fff1f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .container {
        margin: 1rem;
        padding: 1.25rem;
    }

    .btn, .btn.btn-secondary {
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .message {
        max-width: 100%;
    }
}
