:root {
    --bg-color: #0f172a; /* Slate 900 */
    --surface-color: #1e293b; /* Slate 800 */
    --primary-color: #10b981; /* Emerald 500 */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --ai-bubble: #334155; /* Slate 700 */
    --user-bubble: #059669; /* Emerald 600 */
    --feedback-bg: rgba(245, 158, 11, 0.1);
    --feedback-border: #f59e0b; /* Amber 500 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Mobile Simulator Container */
.mobile-container {
    width: 375px;
    height: 812px; /* iPhone X dimensions */
    background-color: var(--bg-color);
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 8px solid #000;
}

/* Header */
.app-header {
    background-color: var(--surface-color);
    padding: 40px 20px 15px; /* Extra top padding for mobile notch simulation */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-container {
    position: relative;
}

.ai-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
    border: 2px solid var(--surface-color);
}

.header-info h1 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.header-info p {
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 400;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Chat Area */
.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-behavior: smooth;
}

/* Hide scrollbar */
.chat-area::-webkit-scrollbar {
    width: 0px;
}

.message {
    display: flex;
    align-items: flex-end;
    max-width: 85%;
}

.ai-message {
    align-self: flex-start;
    gap: 8px;
}

.user-message {
    align-self: flex-end;
}

.bubble {
    padding: 14px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.ai-message .bubble {
    background-color: var(--ai-bubble);
    border-bottom-left-radius: 4px;
}

.user-message .bubble {
    background-color: var(--user-bubble);
    border-bottom-right-radius: 4px;
}

.play-audio-btn {
    background: var(--surface-color);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.play-audio-btn:hover {
    background: var(--primary-color);
}

/* Feedback Box */
.feedback-message {
    align-self: center;
    max-width: 95%;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.feedback-icon {
    background-color: var(--feedback-border);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 5px;
}

.feedback-bubble {
    background-color: var(--feedback-bg);
    border: 1px solid var(--feedback-border);
    border-radius: 12px;
    padding: 12px 16px;
}

.feedback-bubble h4 {
    color: var(--feedback-border);
    font-size: 0.85rem;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feedback-bubble p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.feedback-bubble strong {
    color: var(--text-primary);
}

/* Input Area */
.input-area {
    background-color: var(--surface-color);
    padding: 15px 20px 25px; /* Extra bottom padding */
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mic-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
    transition: transform 0.2s;
}

.mic-btn:active {
    transform: scale(0.9);
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    background-color: var(--bg-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 45px 12px 16px;
    border-radius: 24px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--text-secondary);
}

.input-wrapper input:focus {
    border-color: var(--primary-color);
}

.send-btn {
    position: absolute;
    right: 6px;
    background: none;
    border: none;
    color: var(--primary-color);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
}

.send-btn:hover {
    background-color: rgba(16, 185, 129, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-up {
    opacity: 0;
    animation: slideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.delay-1 { animation-delay: 0.8s; }
.delay-2 { animation-delay: 1.6s; }
.delay-3 { animation-delay: 2.8s; }

/* Pulse animation for mic when active */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.mic-active {
    animation: pulse 1.5s infinite;
}
