* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, #f5e9ff 0%, transparent 35%),
        radial-gradient(circle at bottom right, #e5f8f4 0%, transparent 35%),
        #f8f9fc;
    color: #202124;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.app {
    width: 100%;
    max-width: 900px;
}

.assistant-card {
    width: 100%;
    height: 720px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 28px;
    box-shadow: 0 25px 70px rgba(40, 40, 80, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.assistant-header {
    min-height: 90px;
    padding: 20px 26px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #eeeeee;
    background: rgba(255, 255, 255, 0.95);
}

.ai-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
}

.assistant-header h1 {
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -0.3px;
}

.assistant-header p {
    margin-top: 4px;
    font-size: 13px;
    color: #777;
}

.status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #555;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.10);
}

.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.welcome {
    margin: auto;
    max-width: 430px;
    text-align: center;
}

.welcome-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #7c3aed;
    background: #f3e8ff;
}

.welcome h2 {
    font-size: 28px;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.welcome p {
    color: #777;
    font-size: 15px;
    line-height: 1.6;
}

.message {
    max-width: 78%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.user-message {
    align-self: flex-end;
    color: white;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border-bottom-right-radius: 5px;
}

.ai-message {
    align-self: flex-start;
    color: #303030;
    background: #f3f3f6;
    border-bottom-left-radius: 5px;
}

.typing {
    opacity: 0.65;
    font-style: italic;
}

.input-area {
    display: flex;
    gap: 10px;
    padding: 18px 22px;
    border-top: 1px solid #eeeeee;
    background: #ffffff;
}

.input-area input {
    flex: 1;
    height: 52px;
    border: 1px solid #e1e1e5;
    border-radius: 16px;
    padding: 0 18px;
    font-size: 15px;
    outline: none;
    background: #fafafa;
    transition: 0.2s ease;
}

.input-area input:focus {
    border-color: #a855f7;
    background: white;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.08);
}

.input-area input::placeholder {
    color: #999;
}

.input-area button {
    height: 52px;
    padding: 0 20px;
    border: none;
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s ease;
}

.input-area button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
}

.input-area button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.send-icon {
    font-size: 15px;
}

.footer-text {
    text-align: center;
    font-size: 11px;
    color: #aaa;
    padding-bottom: 12px;
}

@media (max-width: 650px) {
    body {
        padding: 10px;
    }

    .assistant-card {
        height: calc(100vh - 20px);
        border-radius: 20px;
    }

    .assistant-header {
        padding: 16px;
    }

    .assistant-header h1 {
        font-size: 16px;
    }

    .assistant-header p {
        font-size: 11px;
    }

    .ai-icon {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .status {
        display: none;
    }

    .chat-area {
        padding: 20px 14px;
    }

    .welcome h2 {
        font-size: 24px;
    }

    .message {
        max-width: 88%;
    }

    .input-area {
        padding: 12px;
    }

    .input-area input {
        min-width: 0;
    }

    .input-area button {
        padding: 0 16px;
    }

    .input-area button span:first-child {
        display: none;
    }
}
