/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Hachi+Maru+Pop&display=swap');

/* CSS Variables for Light/Dark Theme */
:root {
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --chat-bg: #1a1a1a;
    --chat-container-bg: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --border-color: #444444;
    --shadow-light: rgba(0, 0, 0, 0.2);
    --shadow-medium: rgba(0, 0, 0, 0.25);
    --shadow-heavy: rgba(0, 0, 0, 0.3);
    --zuno-bubble-bg: #3a3a3a;
    --user-bubble-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --input-bg: #2d2d2d;
    --input-border: #444444;
    --input-focus: #667eea;
    --header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --emoji-picker-bg: #3a3a3a;
    --emoji-hover: #4a4a4a;
}

[data-theme="light"] {
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --chat-bg: #f8f9fa;
    --chat-container-bg: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #e9ecef;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --shadow-heavy: rgba(0, 0, 0, 0.15);
    --zuno-bubble-bg: #ffffff;
    --input-bg: #ffffff;
    --input-border: #e9ecef;
    --emoji-picker-bg: #ffffff;
    --emoji-hover: #f8f9fa;
}

/* Custom Theme Variations */
[data-theme="sunset"] {
    --bg-gradient: linear-gradient(135deg, #e85d75 0%, #f3a683 100%);
    --gradient-bg: linear-gradient(135deg, #e85d75 0%, #f3a683 100%);
    --chat-bg: rgba(232, 93, 117, 0.1);
    --chat-container-bg: rgba(0, 0, 0, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #f0f0f0;
    --text-muted: #e0e0e0;
    --border-color: rgba(255, 255, 255, 0.25);
    --shadow-light: rgba(0, 0, 0, 0.15);
    --shadow-medium: rgba(0, 0, 0, 0.2);
    --shadow-heavy: rgba(0, 0, 0, 0.25);
    --zuno-bubble-bg: rgba(0, 0, 0, 0.2);
    --user-bubble-bg: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    --input-bg: rgba(0, 0, 0, 0.15);
    --input-border: rgba(255, 255, 255, 0.25);
    --input-focus: #ff6b6b;
    --header-bg: linear-gradient(135deg, #e85d75 0%, #f3a683 100%);
    --emoji-picker-bg: rgba(0, 0, 0, 0.2);
    --emoji-hover: rgba(255, 255, 255, 0.15);
}

[data-theme="ocean"] {
    --bg-gradient: linear-gradient(135deg, #0077be 0%, #00a8cc 50%, #0072ce 100%);
    --gradient-bg: linear-gradient(135deg, #0077be 0%, #00a8cc 100%);
    --chat-bg: rgba(0, 119, 190, 0.15);
    --chat-container-bg: rgba(0, 40, 85, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #e6f3ff;
    --text-muted: #b3d9ff;
    --border-color: rgba(0, 168, 204, 0.3);
    --shadow-light: rgba(0, 60, 120, 0.2);
    --shadow-medium: rgba(0, 60, 120, 0.3);
    --shadow-heavy: rgba(0, 40, 80, 0.4);
    --zuno-bubble-bg: rgba(0, 119, 190, 0.25);
    --user-bubble-bg: linear-gradient(135deg, #0099d6 0%, #006bb3 100%);
    --input-bg: rgba(0, 60, 120, 0.2);
    --input-border: rgba(0, 168, 204, 0.4);
    --input-focus: #00a8cc;
    --header-bg: linear-gradient(135deg, #0077be 0%, #00a8cc 100%);
    --emoji-picker-bg: rgba(0, 60, 120, 0.3);
    --emoji-hover: rgba(0, 168, 204, 0.2);
}

[data-theme="forest"] {
    --bg-gradient: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
    --gradient-bg: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
    --chat-bg: rgba(19, 78, 94, 0.1);
    --chat-container-bg: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #f0f0f0;
    --text-muted: #e0e0e0;
    --border-color: rgba(255, 255, 255, 0.2);
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.2);
    --zuno-bubble-bg: rgba(255, 255, 255, 0.15);
    --user-bubble-bg: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    --input-bg: rgba(255, 255, 255, 0.1);
    --input-border: rgba(255, 255, 255, 0.2);
    --input-focus: #56ab2f;
    --header-bg: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
    --emoji-picker-bg: rgba(255, 255, 255, 0.15);
    --emoji-hover: rgba(255, 255, 255, 0.2);
}

[data-theme="lavender"] {
    --bg-gradient: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    --gradient-bg: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    --chat-bg: rgba(139, 92, 246, 0.1);
    --chat-container-bg: rgba(0, 0, 0, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #f0f0f0;
    --text-muted: #e0e0e0;
    --border-color: rgba(255, 255, 255, 0.3);
    --shadow-light: rgba(0, 0, 0, 0.2);
    --shadow-medium: rgba(0, 0, 0, 0.25);
    --shadow-heavy: rgba(0, 0, 0, 0.3);
    --zuno-bubble-bg: rgba(0, 0, 0, 0.25);
    --user-bubble-bg: linear-gradient(135deg, #c084fc 0%, #e879f9 100%);
    --input-bg: rgba(0, 0, 0, 0.2);
    --input-border: rgba(255, 255, 255, 0.3);
    --input-focus: #c084fc;
    --header-bg: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    --emoji-picker-bg: rgba(0, 0, 0, 0.25);
    --emoji-hover: rgba(255, 255, 255, 0.15);
}

[data-theme="cherry"] {
    --bg-gradient: linear-gradient(135deg, #f472b6 0%, #fb7185 100%);
    --gradient-bg: linear-gradient(135deg, #f472b6 0%, #fb7185 100%);
    --chat-bg: rgba(244, 114, 182, 0.1);
    --chat-container-bg: rgba(0, 0, 0, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #f0f0f0;
    --text-muted: #e0e0e0;
    --border-color: rgba(255, 255, 255, 0.3);
    --shadow-light: rgba(0, 0, 0, 0.2);
    --shadow-medium: rgba(0, 0, 0, 0.25);
    --shadow-heavy: rgba(0, 0, 0, 0.3);
    --zuno-bubble-bg: rgba(0, 0, 0, 0.25);
    --user-bubble-bg: linear-gradient(135deg, #ff6b9d 0%, #ff8e9b 100%);
    --input-bg: rgba(0, 0, 0, 0.2);
    --input-border: rgba(255, 255, 255, 0.3);
    --input-focus: #ff6b9d;
    --header-bg: linear-gradient(135deg, #f472b6 0%, #fb7185 100%);
    --emoji-picker-bg: rgba(0, 0, 0, 0.25);
    --emoji-hover: rgba(255, 255, 255, 0.15);
}

[data-theme="midnight"] {
    --bg-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --gradient-bg: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --chat-bg: rgba(44, 62, 80, 0.1);
    --chat-container-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #f0f0f0;
    --text-muted: #e0e0e0;
    --border-color: rgba(255, 255, 255, 0.2);
    --shadow-light: rgba(0, 0, 0, 0.2);
    --shadow-medium: rgba(0, 0, 0, 0.25);
    --shadow-heavy: rgba(0, 0, 0, 0.3);
    --zuno-bubble-bg: rgba(255, 255, 255, 0.1);
    --user-bubble-bg: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --input-bg: rgba(255, 255, 255, 0.1);
    --input-border: rgba(255, 255, 255, 0.2);
    --input-focus: #34495e;
    --header-bg: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --emoji-picker-bg: rgba(255, 255, 255, 0.1);
    --emoji-hover: rgba(255, 255, 255, 0.15);
}

[data-theme="aurora"] {
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ff9a9e 80%, #fecfef 100%);
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #ff9a9e 100%);
    --chat-bg: rgba(102, 126, 234, 0.1);
    --chat-container-bg: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #f0f0f0;
    --text-muted: #e0e0e0;
    --border-color: rgba(255, 255, 255, 0.25);
    --shadow-light: rgba(102, 126, 234, 0.2);
    --shadow-medium: rgba(102, 126, 234, 0.25);
    --shadow-heavy: rgba(102, 126, 234, 0.3);
    --zuno-bubble-bg: rgba(255, 255, 255, 0.2);
    --user-bubble-bg: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    --input-bg: rgba(255, 255, 255, 0.15);
    --input-border: rgba(255, 255, 255, 0.3);
    --input-focus: #ff9a9e;
    --header-bg: linear-gradient(135deg, #667eea 0%, #ff9a9e 100%);
    --emoji-picker-bg: rgba(255, 255, 255, 0.2);
    --emoji-hover: rgba(255, 255, 255, 0.3);
}

/* New Beautiful Themes */
[data-theme="cosmic"] {
    --bg-gradient: linear-gradient(135deg, #240046 0%, #3c096c 30%, #5a189a 60%, #7b2cbf 100%);
    --gradient-bg: linear-gradient(135deg, #240046 0%, #7b2cbf 100%);
    --chat-bg: rgba(36, 0, 70, 0.15);
    --chat-container-bg: rgba(20, 0, 40, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #e0aaff;
    --text-muted: #c77dff;
    --border-color: rgba(196, 125, 255, 0.3);
    --shadow-light: rgba(36, 0, 70, 0.2);
    --shadow-medium: rgba(36, 0, 70, 0.35);
    --shadow-heavy: rgba(20, 0, 40, 0.5);
    --zuno-bubble-bg: rgba(91, 24, 154, 0.3);
    --user-bubble-bg: linear-gradient(135deg, #7b2cbf 0%, #9d4edd 100%);
    --input-bg: rgba(20, 0, 40, 0.4);
    --input-border: rgba(196, 125, 255, 0.4);
    --input-focus: #c77dff;
    --header-bg: linear-gradient(135deg, #240046 0%, #5a189a 100%);
    --emoji-picker-bg: rgba(20, 0, 40, 0.4);
    --emoji-hover: rgba(196, 125, 255, 0.2);
}

[data-theme="golden"] {
    --bg-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 30%, #f39c12 60%, #f1c40f 100%);
    --gradient-bg: linear-gradient(135deg, #f093fb 0%, #f39c12 100%);
    --chat-bg: rgba(240, 147, 251, 0.1);
    --chat-container-bg: rgba(40, 30, 20, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #ffeaa7;
    --text-muted: #fdcb6e;
    --border-color: rgba(241, 196, 15, 0.4);
    --shadow-light: rgba(241, 196, 15, 0.2);
    --shadow-medium: rgba(241, 196, 15, 0.3);
    --shadow-heavy: rgba(243, 156, 18, 0.4);
    --zuno-bubble-bg: rgba(40, 30, 20, 0.3);
    --user-bubble-bg: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
    --input-bg: rgba(40, 30, 20, 0.3);
    --input-border: rgba(241, 196, 15, 0.5);
    --input-focus: #f1c40f;
    --header-bg: linear-gradient(135deg, #f093fb 0%, #f39c12 100%);
    --emoji-picker-bg: rgba(40, 30, 20, 0.4);
    --emoji-hover: rgba(241, 196, 15, 0.3);
}

[data-theme="sky"] {
    --bg-gradient: linear-gradient(135deg, #87ceeb 0%, #98d8e8 30%, #a8e6cf 60%, #c1ffc1 100%);
    --gradient-bg: linear-gradient(135deg, #87ceeb 0%, #a8e6cf 100%);
    --chat-bg: rgba(135, 206, 235, 0.1);
    --chat-container-bg: rgba(255, 255, 255, 0.2);
    --text-primary: #2c3e50;
    --text-secondary: #34495e;
    --text-muted: #7f8c8d;
    --border-color: rgba(135, 206, 235, 0.4);
    --shadow-light: rgba(135, 206, 235, 0.2);
    --shadow-medium: rgba(135, 206, 235, 0.25);
    --shadow-heavy: rgba(135, 206, 235, 0.3);
    --zuno-bubble-bg: rgba(255, 255, 255, 0.8);
    --user-bubble-bg: linear-gradient(135deg, #87ceeb 0%, #98d8e8 100%);
    --input-bg: rgba(255, 255, 255, 0.8);
    --input-border: rgba(135, 206, 235, 0.5);
    --input-focus: #87ceeb;
    --header-bg: linear-gradient(135deg, #87ceeb 0%, #a8e6cf 100%);
    --emoji-picker-bg: rgba(255, 255, 255, 0.9);
    --emoji-hover: rgba(135, 206, 235, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Remove blue highlight on mobile tap */
    -webkit-tap-highlight-color: transparent;
    -webkit-focus-ring-color: transparent;
    outline: none;
}

/* Remove mobile tap highlights globally */
*, *:before, *:after {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection for input fields and content areas */
input, textarea, .message-content, .feedback-comment {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Follow-up suggestions styling */
.follow-up-suggestions {
    margin: 10px 0 15px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInSuggestions 0.6s ease forwards;
    animation-delay: 0.3s;
}

@keyframes fadeInSuggestions {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-button {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(168, 85, 247, 0.1));
    border: 1.5px solid rgba(124, 58, 237, 0.3);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.suggestion-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.suggestion-button:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(168, 85, 247, 0.2));
    border-color: rgba(124, 58, 237, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.suggestion-button:hover::before {
    left: 100%;
}

.suggestion-button:active {
    transform: translateY(0);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(168, 85, 247, 0.3));
}

/* Light theme adjustments for suggestions */
.light-theme .suggestion-button {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(168, 85, 247, 0.08));
    border-color: rgba(124, 58, 237, 0.25);
    color: var(--text-color);
}

.light-theme .suggestion-button:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(168, 85, 247, 0.15));
    border-color: rgba(124, 58, 237, 0.4);
}

/* Remove focus outlines on mobile while keeping accessibility */
button, input, textarea, select, a, .btn, .clickable, .mood-btn, .emoji-btn, .theme-option {
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    outline: none;
    border: none;
}

button:focus, input:focus, textarea:focus, select:focus, .btn:focus, .mood-btn:focus, .emoji-btn:focus, .theme-option:focus {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-gradient);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    color: var(--text-primary);
    /* Handle safe areas on mobile */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

.app-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    padding: 20px;
    min-height: 100vh;
}

.chat-container {
    width: 100%;
    max-width: 480px;
    height: 90vh;
    background: var(--chat-container-bg);
    border-radius: 20px;
    box-shadow: 0 20px 40px var(--shadow-heavy);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Desktop/Laptop Full Screen Layout */
@media (min-width: 768px) {
    .app-container {
        padding: 0;
        align-items: stretch;
    }
    
    .chat-container {
        max-width: 100%;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
        box-shadow: none;
    }
}

/* Header */
.chat-header {
    background: var(--header-bg);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px var(--shadow-light);
    flex-shrink: 0;
}

/* Desktop Header Adjustments */
@media (min-width: 768px) {
    .chat-header {
        padding: 30px 40px;
    }
    
    .header-content h1 {
        font-size: 32px;
    }
    
    .header-content p {
        font-size: 16px;
    }
}

.header-content h1 {
    font-family: 'Hachi Maru Pop', cursive;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.header-content p {
    font-size: 14px;
    opacity: 0.9;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Mode Toggle Styles */
.mode-toggle-container {
    margin-right: 0.5rem;
}

.mode-toggle-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 25px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 85px;
    height: 40px;
}

.mode-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mode-toggle-slider {
    position: relative;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mode-toggle-icon {
    color: white;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.mode-labels {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
}

.mode-label {
    opacity: 0.6;
    transition: all 0.3s ease;
    color: white;
}

.mode-label.active {
    opacity: 1;
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* Study Mode Styles */
.mode-toggle-btn.study-mode {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

.mode-toggle-btn.study-mode .mode-toggle-slider {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(3px);
}

.mode-toggle-btn.study-mode .mode-toggle-icon {
    color: #ffd700;
}

/* Beautiful Colorful Header Icons */
.theme-selector-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.theme-selector-btn:hover {
    background: linear-gradient(135deg, #7b94f0 0%, #8a64b8 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.theme-selector-btn:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.theme-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none;
    color: white;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: linear-gradient(135deg, #7b94f0 0%, #8a64b8 100%) !important;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

.theme-toggle:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3) !important;
}

/* Theme Icon Color Enhancement - Force overrides */
[data-theme='light'] .theme-toggle {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 234, 167, 0.4) !important;
}

[data-theme='light'] .theme-toggle:hover {
    background: linear-gradient(135deg, #fff3c4 0%, #fdd085 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 234, 167, 0.5) !important;
}

[data-theme='light'] .theme-toggle:active {
    background: linear-gradient(135deg, #ffe68a 0%, #fdc65b 100%) !important;
    box-shadow: 0 2px 10px rgba(255, 234, 167, 0.4) !important;
}

[data-theme='dark'] .theme-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
}

[data-theme='dark'] .theme-toggle:hover {
    background: linear-gradient(135deg, #7b94f0 0%, #8a64b8 100%) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5) !important;
}

[data-theme='dark'] .theme-toggle:active {
    background: linear-gradient(135deg, #5a82e6 0%, #6b4398 100%) !important;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4) !important;
}

/* Icon color for better contrast */
#themeIcon {
    color: white !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5) !important;
    transition: all 0.3s ease !important;
}

[data-theme='light'] #themeIcon {
    color: #f39c12 !important;
    text-shadow: 0 0 8px rgba(243, 156, 18, 0.5) !important;
}

[data-theme='dark'] #themeIcon {
    color: #74b9ff !important;
    text-shadow: 0 0 8px rgba(116, 185, 255, 0.5) !important;
}

.clear-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 100%);
    border: none;
    color: white;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.clear-btn:hover {
    background: linear-gradient(135deg, #ff8787 0%, #ffe066 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.clear-btn:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--chat-bg);
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Desktop Messages Layout */
@media (min-width: 768px) {
    .chat-messages {
        padding: 30px 40px;
        gap: 20px;
    }
    
    .message-content {
        max-width: 70%;
        padding: 16px 20px;
        font-size: 16px;
    }
}

.message {
    animation: fadeInUp 0.4s ease-out;
    display: flex;
    flex-direction: column;
}

.message-content {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 20px;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 2px 10px var(--shadow-light);
    transition: all 0.3s ease;
}

.message-content:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--shadow-heavy);
}

.zuno-message {
    align-items: flex-start;
}

.zuno-message .message-content {
    background: var(--zuno-bubble-bg);
    color: var(--text-primary);
    border-bottom-left-radius: 8px;
    margin-right: auto;
}

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

.user-message .message-content {
    background: var(--user-bubble-bg);
    color: white;
    border-bottom-right-radius: 8px;
    margin-left: auto;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
    font-size: 15px;
}

.message-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    padding: 0 6px;
}

.user-message .message-time {
    text-align: right;
}

.zuno-message .message-time {
    text-align: left;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    padding: 0 20px;
    margin-bottom: 16px;
    animation: fadeInUp 0.3s ease-out;
}

.typing-indicator.show {
    display: block;
}

.typing-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    padding-left: 6px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Mood Tracker */
.mood-tracker {
    background: var(--chat-container-bg);
    border-top: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
    position: relative;
    z-index: 100; /* Lower than feedback modal */
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease-out;
    max-height: 200px;
    overflow: hidden;
}

.mood-prompt {
    margin-bottom: 15px;
}

.mood-prompt p {
    font-size: 16px;
    color: var(--text-primary);
    margin: 0;
    font-weight: 500;
}

.mood-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: auto;
    padding: 5px 0;
}

.mood-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 10px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 50px;
    font-size: 12px;
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.mood-btn:hover {
    background: var(--emoji-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.mood-btn.selected {
    background: var(--user-bubble-bg);
    border-color: var(--input-focus);
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px var(--shadow-heavy);
    animation: moodSelected 0.4s ease-out;
}

@keyframes moodSelected {
    0% {
        transform: translateY(-2px) scale(1.05);
    }
    50% {
        transform: translateY(-4px) scale(1.15);
        box-shadow: 0 8px 25px var(--shadow-heavy);
    }
    100% {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 6px 20px var(--shadow-heavy);
    }
}

.mood-number {
    font-size: 12px;
    font-weight: 600;
}

.mood-emoji {
    font-size: 18px;
    line-height: 1;
}

.mood-tracker.hidden {
    opacity: 0;
    transform: translateY(-20px);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.mood-tracker.fade-out {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
}

/* Mobile-specific safe area adjustments */
@media (max-width: 767px) {
    .mood-tracker {
        padding: 20px 20px calc(35px + env(safe-area-inset-bottom)) 20px;
        max-height: calc(240px + env(safe-area-inset-bottom));
        margin-bottom: 0;
    }
    
    .mood-buttons {
        padding: 5px 0 25px 0;
    }
}

/* Desktop Mood Tracker */
@media (min-width: 768px) {
    .mood-tracker {
        padding: 25px 40px;
    }
    
    .mood-prompt p {
        font-size: 18px;
    }
    
    .mood-buttons {
        gap: 12px;
    }
    
    .mood-btn {
        min-width: 60px;
        padding: 12px 10px;
    }
    
    .mood-number {
        font-size: 14px;
    }
    
    .mood-emoji {
        font-size: 20px;
    }
}

/* Input Area */
.chat-input-container {
    padding: 20px;
    background: var(--chat-container-bg);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
}

/* Desktop Input Area */
@media (min-width: 768px) {
    .chat-input-container {
        padding: 30px 40px;
    }
    
    .chat-input-wrapper {
        padding: 10px 16px;
    }
    
    #messageInput {
        font-size: 16px;
        padding: 10px 16px;
    }
    
    #sendBtn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

.chat-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 25px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.chat-input-wrapper:focus-within {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#messageInput {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    font-size: 15px;
    outline: none;
    color: var(--text-primary);
    resize: none;
    max-height: 100px;
    overflow-y: auto;
}

#messageInput::placeholder {
    color: var(--text-muted);
}

.emoji-btn {
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(67, 206, 162, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.emoji-btn:hover {
    background: linear-gradient(135deg, #5fd4b8 0%, #2a6fb3 100%);
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 6px 20px rgba(67, 206, 162, 0.4);
}

.emoji-btn:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 2px 10px rgba(67, 206, 162, 0.3);
}

#sendBtn {
    background: var(--user-bubble-bg);
    border: none;
    color: white;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#sendBtn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#sendBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Emoji Picker */
.emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 20px;
    right: 20px;
    background: var(--emoji-picker-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 10px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 10px 30px var(--shadow-heavy);
    display: none;
    z-index: 200;
}

.emoji-picker.show {
    display: block;
    animation: fadeInUp 0.2s ease-out;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 8px;
}

.emoji-grid span {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emoji-grid span:hover {
    background: var(--emoji-hover);
    transform: scale(1.2);
}

/* Cute Animated Error Toast with Gen Z Design */
.error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b9d, #ff8e9b);
    color: white;
    padding: 16px 20px;
    border-radius: 20px;
    display: none; /* Hidden by default */
    align-items: center;
    gap: 12px;
    transform: translateX(120%) scale(0.8);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(255, 107, 157, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 280px;
    max-width: 350px;
}

.error-toast.show {
    display: flex; /* Show when .show class is added */
    transform: translateX(0) scale(1);
    animation: errorToastBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.error-toast::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b9d, #ff8e9b, #ffb3ba, #ff6b9d);
    border-radius: 22px;
    z-index: -1;
    opacity: 0.7;
    animation: errorToastGlow 2s ease-in-out infinite alternate;
}

.error-toast-icon {
    font-size: 18px;
    animation: errorToastShake 0.8s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.error-toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.error-toast-title {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.error-toast-message {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

.error-toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

@keyframes errorToastBounce {
    0% {
        transform: translateX(120%) scale(0.8) rotate(5deg);
    }
    50% {
        transform: translateX(-10px) scale(1.05) rotate(-2deg);
    }
    100% {
        transform: translateX(0) scale(1) rotate(0deg);
    }
}

@keyframes errorToastGlow {
    0% {
        opacity: 0.7;
        transform: scale(1);
    }
    100% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

@keyframes errorToastShake {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    25% {
        transform: translateX(-2px) rotate(-2deg);
    }
    75% {
        transform: translateX(2px) rotate(2deg);
    }
}

/* Mobile responsive error toast */
@media (max-width: 768px) {
    .error-toast {
        top: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        min-width: none;
        transform: translateY(-120%) scale(0.8);
    }
    
    .error-toast.show {
        transform: translateY(0) scale(1);
    }
    
    @keyframes errorToastBounce {
        0% {
            transform: translateY(-120%) scale(0.8) rotate(5deg);
        }
        50% {
            transform: translateY(-10px) scale(1.05) rotate(-2deg);
        }
        100% {
            transform: translateY(0) scale(1) rotate(0deg);
        }
    }
}

/* Theme Selector Modal */
.theme-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.theme-selector-overlay.show {
    display: flex;
}

.theme-selector-modal {
    background: var(--chat-container-bg);
    border-radius: 20px;
    padding: 24px;
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s ease;
}

.theme-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.theme-selector-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.theme-selector-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.theme-selector-close:hover {
    background: var(--emoji-hover);
    color: var(--text-primary);
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.theme-option:hover {
    background: var(--emoji-hover);
    transform: translateY(-2px);
}

.theme-option.active {
    border-color: var(--input-focus);
    background: var(--emoji-hover);
}

.theme-preview {
    width: 60px;
    height: 40px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.theme-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
}

.default-preview::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sunset-preview::before {
    background: linear-gradient(135deg, #e85d75 0%, #f3a683 100%);
}

.ocean-preview::before {
    background: linear-gradient(135deg, #0077be 0%, #00a8cc 50%, #0072ce 100%);
}

.forest-preview::before {
    background: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
}

.lavender-preview::before {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
}

.cherry-preview::before {
    background: linear-gradient(135deg, #f472b6 0%, #fb7185 100%);
}

.midnight-preview::before {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.aurora-preview::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ff9a9e 80%, #fecfef 100%);
}

.cosmic-preview::before {
    background: linear-gradient(135deg, #240046 0%, #3c096c 30%, #5a189a 60%, #7b2cbf 100%);
}

.golden-preview::before {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 30%, #f39c12 60%, #f1c40f 100%);
}

.sky-preview::before {
    background: linear-gradient(135deg, #87ceeb 0%, #98d8e8 30%, #a8e6cf 60%, #c1ffc1 100%);
}

.theme-option span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
}

.theme-selector-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.theme-selector-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Zuno Card Styles */
.zuno-card {
    background: var(--gradient-bg, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    border-radius: 20px;
    padding: 25px;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    font-family: 'Inter', sans-serif;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    animation: cardSlideIn 0.6s ease-out;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.zuno-card::before {
    content: var(--background-stickers, '🌟✨💫⭐🌙');
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 24px;
    opacity: 0.1;
    pointer-events: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    padding: 10px;
    z-index: 0;
    animation: floatStickers 6s ease-in-out infinite;
}

@keyframes floatStickers {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.zuno-card-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.zuno-card-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.zuno-card-line {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
}

.zuno-card-line strong {
    color: rgba(255, 255, 255, 1);
    font-weight: 600;
}

.zuno-card-divider {
    margin: 12px 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    letter-spacing: 2px;
}

.zuno-card-signature {
    margin-top: 15px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

/* Download card button */
.download-card-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
}

.download-card-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.download-card-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

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

/* Mobile responsive theme selector */
@media (max-width: 768px) {
    .theme-selector-modal {
        width: 95%;
        padding: 20px;
        max-height: 85vh;
    }
    
    .theme-options {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .theme-preview {
        width: 50px;
        height: 35px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Emotion GIF styling */
.emotion-gif-container {
    display: flex;
    justify-content: center;
    margin-top: 8px;
    animation: gifFadeIn 0.5s ease-in-out;
}

.emotion-gif {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.emotion-gif:hover {
    transform: scale(1.1);
}

@keyframes gifFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar,
.emoji-picker::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track,
.emoji-picker::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb,
.emoji-picker::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.emoji-picker::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .app-container {
        padding: 8px;
        align-items: stretch;
    }
    
    .chat-container {
        height: calc(100vh - 16px);
        max-width: 100%;
        border-radius: 15px;
        margin: 0;
        min-height: 0; /* Allow shrinking */
    }
    
    .chat-header {
        padding: 16px;
    }
    
    .header-content h1 {
        font-family: 'Hachi Maru Pop', cursive;
        font-size: 20px;
    }
    
    .header-content p {
        font-size: 13px;
    }
    
    .chat-messages {
        padding: 16px;
    }
    
    .message-content {
        max-width: 85%;
        padding: 12px 16px;
    }
    
    .chat-input-container {
        padding: 16px;
    }
    
    #messageInput {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .emoji-picker {
        left: 16px;
        right: 16px;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 0;
        align-items: stretch;
    }
    
    .chat-container {
        height: 100vh;
        height: 100dvh; /* Keep dynamic height for proper mobile layout */
        border-radius: 0;
        margin: 0;
        max-height: 100vh;
        max-height: 100dvh;
        display: flex;
        flex-direction: column;
    }
    
    .chat-header {
        padding: max(12px, env(safe-area-inset-top) + 12px) 16px 12px 16px;
        flex-shrink: 0; /* Prevent header from shrinking */
    }
    
    .chat-messages {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
    }
    
    .chat-input-container {
        padding: 12px 16px max(12px, env(safe-area-inset-bottom) + 12px) 16px;
        flex-shrink: 0; /* Prevent input from shrinking */
        background: var(--chat-container-bg);
        border-top: 1px solid var(--border-color);
    }
    
    .mood-tracker {
        position: relative;
        background: var(--chat-container-bg);
        padding: 16px;
        border-top: 1px solid var(--border-color);
        flex-shrink: 0;
    }
    
    .message-content {
        max-width: 90%;
        font-size: 14px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .theme-toggle, .clear-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
button:focus-visible {
    outline: 2px solid var(--input-focus);
    outline-offset: 2px;
}

#messageInput:focus {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .message-content {
        border: 1px solid var(--text-secondary);
    }
}

/* Custom Confirmation Modal */
.confirmation-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.confirmation-modal-overlay.show {
    display: flex;
}

.confirmation-modal {
    background: var(--chat-container-bg);
    border-radius: 24px;
    padding: 32px 28px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    animation: modalBounceIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

@keyframes modalBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(50px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.confirmation-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: iconPulse 2s infinite;
}

.confirmation-icon i {
    font-size: 28px;
    color: white;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
    }
}

.confirmation-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-family: 'Hachi Maru Pop', cursive;
}

.confirmation-message {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 28px 0;
    line-height: 1.5;
}

.confirmation-sub {
    font-size: 14px;
    color: var(--text-tertiary);
    font-style: italic;
}

.confirmation-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-btn-cancel,
.confirm-btn-delete {
    padding: 12px 20px;
    border: none;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.confirm-btn-cancel {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.confirm-btn-cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.confirm-btn-delete {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.confirm-btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.confirm-btn-cancel:active,
.confirm-btn-delete:active {
    transform: translateY(0);
}

/* Mobile adjustments for confirmation modal */
@media (max-width: 480px) {
    .confirmation-modal {
        margin: 20px;
        padding: 28px 24px;
        max-width: none;
        width: calc(100% - 40px);
    }
    
    .confirmation-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .confirm-btn-cancel,
    .confirm-btn-delete {
        width: 100%;
        min-width: auto;
    }
}

/* Sparkle Animation for Special Messages */
.sparkle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    pointer-events: none;
    z-index: 1001;
    animation: sparkleAnimation 6s ease-out forwards;
}

.star-sparkle {
    font-size: 20px;
    animation: starSparkle 6s ease-out forwards;
}

.heart-sparkle {
    font-size: 18px;
    animation: heartSparkle 6s ease-out forwards;
}

@keyframes sparkleAnimation {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    10% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(360deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) rotate(720deg) translateY(-100px);
    }
}

@keyframes starSparkle {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg) translateY(0);
    }
    10% {
        opacity: 1;
        transform: scale(1.5) rotate(180deg) translateY(-10px);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(360deg) translateY(-50px);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) rotate(720deg) translateY(-150px);
    }
}

@keyframes heartSparkle {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg) translateX(0);
    }
    15% {
        opacity: 1;
        transform: scale(1.3) rotate(15deg) translateX(10px);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(-15deg) translateX(-10px);
    }
    80% {
        opacity: 0.7;
        transform: scale(0.8) rotate(10deg) translateX(15px);
    }
    100% {
        opacity: 0;
        transform: scale(0.2) rotate(0deg) translateX(-20px) translateY(-120px);
    }
}

/* Sparkle burst effect */
.sparkle-burst {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 999;
}

.burst-sparkle {
    position: absolute;
    font-size: 24px;
    animation: burstSparkle 5s ease-out forwards;
}

@keyframes burstSparkle {
    0% {
        opacity: 0;
        transform: scale(0) translate(-50%, -50%);
    }
    20% {
        opacity: 1;
        transform: scale(1.5) translate(-50%, -50%);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) translate(var(--random-x), var(--random-y));
    }
}

/* Special Mahi Card Animation */
.mahi-special-card {
    position: relative;
    background: linear-gradient(45deg, #8e44ad, #c71585, #ff6b9d, #f368e0, #9b59b6);
    background-size: 300% 300%;
    animation: gradientShift 8s ease-in-out infinite;
    border-radius: 25px;
    padding: 30px;
    margin: 15px 0;
    box-shadow: 
        0 8px 25px rgba(142, 68, 173, 0.5),
        0 2px 8px rgba(255, 107, 157, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    overflow: hidden;
    max-width: 100%;
    will-change: background-position;
    transform: translateZ(0);
}

.mahi-special-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 40%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 60%);
    animation: shimmer 4s infinite;
    pointer-events: none;
    will-change: transform;
}



.mahi-card-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.mahi-secret-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
    margin-bottom: 10px;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

.mahi-card-content {
    position: relative;
    z-index: 2;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.6;
    font-size: 15px;
}

.mahi-card-content p {
    margin-bottom: 12px;
    animation: textFadeIn 0.8s ease-out forwards;
    opacity: 0;
}

.mahi-card-content p:nth-child(1) { animation-delay: 0.2s; }
.mahi-card-content p:nth-child(2) { animation-delay: 0.4s; }
.mahi-card-content p:nth-child(3) { animation-delay: 0.6s; }
.mahi-card-content p:nth-child(4) { animation-delay: 0.8s; }
.mahi-card-content p:nth-child(5) { animation-delay: 1.0s; }
.mahi-card-content p:nth-child(6) { animation-delay: 1.2s; }

.mahi-signature {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    font-style: italic;
    font-weight: 500;
    animation: signatureGlow 3s ease-in-out infinite;
}

.mahi-floating-hearts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.mahi-heart {
    position: absolute;
    font-size: 14px;
    animation: floatingHeart 6s ease-in-out infinite;
    opacity: 0.7;
    will-change: transform, opacity;
    transform: translateZ(0);
}

@keyframes gradientShift {
    0% { background-position: 0% 0%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 0%; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes titleGlow {
    0%, 100% { 
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 255, 255, 0.4);
    }
    50% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 182, 193, 0.6);
    }
}

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

@keyframes signatureGlow {
    0%, 100% { 
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 12px rgba(255, 255, 255, 0.4); 
    }
    50% { 
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 18px rgba(255, 182, 193, 0.6); 
    }
}

@keyframes floatingHeart {
    0% { 
        transform: translateY(0) rotate(0deg) scale(1); 
        opacity: 0.7;
    }
    25% {
        transform: translateY(-4px) rotate(90deg) scale(1.02);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-8px) rotate(180deg) scale(1.05); 
        opacity: 0.9;
    }
    75% {
        transform: translateY(-4px) rotate(270deg) scale(1.02);
        opacity: 0.8;
    }
    100% { 
        transform: translateY(0) rotate(360deg) scale(1); 
        opacity: 0.7;
    }
}

/* Mobile adjustments for Mahi card */
@media (max-width: 480px) {
    .mahi-special-card {
        padding: 20px;
        margin: 10px 0;
        border-radius: 15px;
    }
    
    .mahi-secret-title {
        font-size: 16px;
    }
    
    .mahi-card-content {
        font-size: 14px;
    }
}

/* Study Mode Theme Variables */
[data-study-mode="true"] {
    --bg-gradient: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    --chat-bg: #0f172a;
    --chat-container-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-heavy: rgba(0, 0, 0, 0.5);
    --zuno-bubble-bg: #334155;
    --user-bubble-bg: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --input-bg: #1e293b;
    --input-border: #334155;
    --input-focus: #4f46e5;
    --header-bg: linear-gradient(135deg, #1e293b 0%, #4f46e5 50%, #7c3aed 100%);
    --emoji-picker-bg: #334155;
    --emoji-hover: #475569;
}

/* Hide mood tracker in study mode */
[data-study-mode="true"] .mood-tracker {
    display: none !important;
}

/* Study Mode Header Text Change */
[data-study-mode="true"] .header-content h1::after {
    content: " 📚";
    animation: fadeIn 0.5s ease-in-out;
}

[data-study-mode="true"] .header-content p {
    position: relative;
}

[data-study-mode="true"] .header-content p::before {
    content: "Your Study Companion";
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
    color: #cbd5e1;
    font-weight: 500;
    animation: fadeIn 0.5s ease-in-out;
}

[data-study-mode="true"] .header-content p {
    color: transparent;
}

/* Study Mode Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===========================
   FEEDBACK SYSTEM STYLES
   =========================== */

/* Feedback Button in Header */
.feedback-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #333;
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #ffed4e 0%, #ffc947 100%);
}

.feedback-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.feedback-btn i {
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Feedback Modal Overlay */
.feedback-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feedback-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Hide background elements when feedback modal is open */
.feedback-modal-overlay.show ~ .app-container {
    filter: blur(8px);
    pointer-events: none;
}

.feedback-modal-overlay.show ~ .app-container .mood-tracker {
    z-index: -1 !important;
}

.feedback-success-overlay.show ~ .app-container {
    filter: blur(8px);
    pointer-events: none;
}

.feedback-success-overlay.show ~ .app-container .mood-tracker {
    z-index: -1 !important;
}

/* Fallback for when modals are shown */
.modal-blur-background {
    filter: blur(8px);
    pointer-events: none;
}

.modal-hide-mood-tracker {
    z-index: -1 !important;
}

/* Feedback Modal */
.feedback-modal {
    background: var(--chat-container-bg);
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feedback-modal-overlay.show .feedback-modal {
    transform: scale(1) translateY(0);
}

/* Feedback Header */
.feedback-header {
    background: var(--gradient-bg);
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.feedback-title {
    color: white;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.feedback-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.feedback-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Feedback Content */
.feedback-content {
    padding: 25px;
}

/* Rating Section */
.rating-section {
    text-align: center;
    margin-bottom: 25px;
}

.rating-label {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.star-rating i {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: scale(1);
}

.star-rating i:hover,
.star-rating i.active {
    color: #ffd700;
    transform: scale(1.2);
}

.star-rating i.active {
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rating-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
    font-style: italic;
}

/* Comment Section */
.comment-section {
    margin-bottom: 25px;
}

.comment-label {
    display: block;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
}

#feedbackComment {
    width: 100%;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 12px;
    padding: 15px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#feedbackComment:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px var(--shadow-light);
}

#feedbackComment::placeholder {
    color: var(--text-muted);
}

.word-count {
    text-align: right;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

/* Feedback Buttons */
.feedback-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.feedback-btn-cancel,
.feedback-btn-submit {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feedback-btn-cancel {
    background: var(--input-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.feedback-btn-cancel:hover {
    background: var(--emoji-hover);
    transform: translateY(-1px);
}

.feedback-btn-submit {
    background: var(--user-bubble-bg);
    color: white;
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.feedback-btn-submit:enabled:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-heavy);
}

.feedback-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Feedback Success Modal */
.feedback-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feedback-success-overlay.show {
    opacity: 1;
    visibility: visible;
}

.feedback-success-modal {
    background: var(--chat-container-bg);
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feedback-success-overlay.show .feedback-success-modal {
    transform: scale(1) translateY(0);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8e8e 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    animation: heartBeat 2s infinite;
}

.success-icon i {
    font-size: 36px;
    color: white;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.05); }
}

.success-title {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
}

.success-message {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 25px;
}

.success-sub {
    color: var(--text-muted);
    font-size: 14px;
}

.success-btn {
    background: var(--user-bubble-bg);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.success-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-heavy);
}

/* Mobile Responsiveness for Feedback */
@media (max-width: 768px) {
    .feedback-modal {
        width: 95%;
        margin: 20px;
    }
    
    .feedback-header {
        padding: 18px 20px;
    }
    
    .feedback-title {
        font-size: 18px;
    }
    
    .feedback-content {
        padding: 20px;
    }
    
    .star-rating i {
        font-size: 28px;
    }
    
    .feedback-buttons {
        flex-direction: column-reverse;
    }
    
    .feedback-btn-cancel,
    .feedback-btn-submit {
        width: 100%;
        justify-content: center;
    }
    
    .feedback-success-modal {
        width: 95%;
        padding: 30px 25px;
    }
}

/* ========================================
   STREAK SYSTEM STYLES
========================================= */

/* Streak Notification */
.streak-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-50px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 15px 25px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    z-index: 9999;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.streak-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.streak-notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.streak-icon {
    font-size: 24px;
    animation: pulse 2s infinite;
}

.streak-message {
    font-size: 14px;
    line-height: 1.4;
}

/* Chat Slot Selector */
.chat-slot-selector {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 15px 20px;
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
}

.chat-slot-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chat-slot-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.chat-slot-btn:hover::before {
    left: 100%;
}

.chat-slot-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.chat-slot-btn.active {
    background: var(--user-bubble-bg);
    color: white;
    border-color: var(--user-bubble-bg);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.chat-slot-btn.active:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Glow Animation for Active Elements */
@keyframes glow {
    0%, 100% { 
        box-shadow: 0 0 5px var(--user-bubble-bg), 
                    0 0 10px var(--user-bubble-bg), 
                    0 0 15px var(--user-bubble-bg);
    }
    50% { 
        box-shadow: 0 0 10px var(--user-bubble-bg), 
                    0 0 20px var(--user-bubble-bg), 
                    0 0 30px var(--user-bubble-bg);
    }
}

/* Mobile Responsive Styles for Streak System */
@media (max-width: 768px) {
    .streak-notification {
        top: 60px;
        left: 10px;
        right: 10px;
        width: calc(100% - 20px);
        transform: translateX(0) translateY(-50px);
        padding: 12px 20px;
    }
    
    .streak-notification.show {
        transform: translateX(0) translateY(0);
    }
    
    .chat-slot-selector {
        padding: 10px 15px;
        gap: 6px;
    }
    
    .chat-slot-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .streak-notification-content {
        gap: 10px;
    }
    
    .streak-icon {
        font-size: 20px;
    }
    
    .streak-message {
        font-size: 13px;
    }
}

/* Dark Theme Adjustments for Streak System */
.dark-theme .chat-slot-selector {
    border-bottom-color: var(--border-color);
}

.dark-theme .chat-slot-btn {
    background: var(--zuno-bubble-bg);
    border-color: var(--border-color);
}

.dark-theme .chat-slot-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Smart Follow-Up Questions Styling */
.follow-up-questions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0 10px 0;
    padding: 0 20px;
    animation: slideInUp 0.6s ease-out;
}

.question-btn {
    background: var(--user-bubble-bg);
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 25px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    animation: popIn 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(15px) scale(0.95);
    text-align: left;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.question-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.question-btn:hover::before {
    left: 100%;
}

.question-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    filter: brightness(1.1) saturate(1.1);
}

.question-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

/* Question Thinking Animation */
.question-thinking {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    padding: 8px 16px;
    animation: fadeIn 0.3s ease-in;
}

.thinking-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.thinking-dots .dots {
    display: flex;
    gap: 2px;
}

.thinking-dots .dots span {
    animation: thinkingBounce 1.4s infinite ease-in-out;
    opacity: 0.4;
}

.thinking-dots .dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dots .dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Animations */
@keyframes popIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@keyframes thinkingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

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

/* Theme-specific question button styling - now matches user bubble colors exactly */

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .follow-up-questions {
        margin: 12px 0 8px 0;
        padding: 0 15px;
        gap: 6px;
    }
    
    .question-btn {
        padding: 10px 16px;
        font-size: 13px;
        border-radius: 20px;
    }
    
    .question-btn:hover {
        transform: translateY(-2px) scale(1.01);
    }
    
    .thinking-dots {
        font-size: 12px;
    }
}

/* EXIT INTENT POPUP STYLES - REMOVED */

/* All exit intent styles - REMOVED */

/* ========================================
   LOCATION CONSENT MODAL STYLES
========================================= */

.location-consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.consent-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 0;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.consent-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 25px;
    text-align: center;
}

.consent-header h3 {
    color: white;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.consent-body {
    padding: 25px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.consent-body p {
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.5;
}

.consent-body ul {
    margin: 15px 0;
    padding-left: 20px;
}

.consent-body li {
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.consent-buttons {
    display: flex;
    gap: 12px;
    padding: 0 25px 25px 25px;
}

.consent-deny,
.consent-allow {
    flex: 1;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.consent-deny {
    background: var(--background);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.consent-deny:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.consent-allow {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.consent-allow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    filter: brightness(1.05);
}

.consent-allow:active,
.consent-deny:active {
    transform: translateY(0);
}

/* Animation keyframes */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .consent-content {
        width: 95%;
        max-width: none;
        margin: 20px;
    }
    
    .consent-header {
        padding: 18px 20px;
    }
    
    .consent-header h3 {
        font-size: 16px;
    }
    
    .consent-body {
        padding: 20px;
    }
    
    .consent-buttons {
        flex-direction: column-reverse;
        padding: 0 20px 20px 20px;
    }
    
    .consent-deny,
    .consent-allow {
        width: 100%;
    }
}

/* Dark theme adjustments */
.dark-theme .consent-content {
    background: var(--zuno-bubble-bg);
    border-color: var(--border-color);
}

.dark-theme .consent-deny {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.dark-theme .consent-deny:hover {
    background: rgba(255, 255, 255, 0.15);
}

