body {
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    background: white;
}

.font-playfair {
    font-family: 'Playfair Display', serif;
}

.hidden {
    display: none !important;
}

/* ELEGANT ANIMATED BACKGROUND */
.app-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, 
        #ffffff 0%,           /* Pure white start */
        #ffffff 40%,          /* White continues */
        #faf8f8 60%,         /* Very subtle transition */
        #f5e6e8 75%,         /* Light burgundy tint begins */
        #f0d5d9 90%,         /* Soft burgundy */
        #e8c5ca 100%         /* Light burgundy end */
    );
    background-size: 300% 300%;
    animation: gradientShift 20s ease infinite;
    overflow: hidden;
}

/* Remove the ::before and ::after elements */
.app-container::before,
.app-container::after {
    display: none;
}

/* Smooth gradient animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 25%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 75%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Alternative: More subtle version */
/* Uncomment if you want even lighter burgundy
.app-container {
    background: linear-gradient(135deg, 
        #ffffff 0%,
        #ffffff 50%,
        #fffafa 70%,
        #fdf5f6 85%,
        #f9e8ea 100%
    );
    background-size: 300% 300%;
    animation: gradientShift 25s ease infinite;
}
*/

.content-wrapper {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: transparent;
}

#chat-container {
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 20px 0;
    transition: all 0.4s ease;
    margin-top: 140px;
}

#chat-container::-webkit-scrollbar {
    display: none;
}

.chat-bubble {
    line-height: 1.6;
    transition: all 0.3s ease;
}

.user-bubble {
    background-color: #722F37 !important;  /* Wine red */
    color: #ffffff !important;  /* White text */
    max-width: 600px;
}

.ai-bubble {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    max-width: 800px;
    font-size: 1rem;
    line-height: 1.7;
}

.chat-bubble strong {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    display: block;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}

.logo .logo-ai {
    color: #9ca3af;
    font-weight: 600;
}

/* Floating Character Menu */
.character-menu {
    position: fixed;
    bottom: 120px;
    left: 30px;
    z-index: 1000;
}

.character-toggle {
    width: 80px;
    height: 80px;
    background-color: #1f2937;
    color: white;
    border-radius: 50%;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.character-toggle:hover {
    transform: scale(1.1);
}

.character-toggle .toggle-text {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.character-toggle .toggle-icon {
    margin-top: 4px;
}

.character-options {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 80px;
    pointer-events: none;
}

.character-option {
    position: absolute;
    bottom: 0;
    left: 0;
    width: auto;
    min-width: 180px;  /* NEW - wider buttons */
    white-space: nowrap;
    padding: 14px 28px;  /* CHANGED - more padding */
    background-color: #1f2937;
    color: white;
    border: none;
    border-radius: 30px;  /* CHANGED - more rounded */
    cursor: pointer;
    transition: all 0.4s ease;
    opacity: 0;
    transform-origin: bottom left;
    transform: translate(0, 0) scale(0);
    text-align: center;  /* NEW - center text */
    font-size: 14px;  /* NEW - bigger text */
}

.character-menu.open .character-option {
    opacity: 1;
    pointer-events: auto;
    transform: translate(calc(200px * cos(var(--i) * 11deg - 90deg)), calc(200px * sin(var(--i) * 11deg - 90deg))) scale(1);
}

.character-option:hover {
    background-color: #f08e80;
    color: #1f2937;
}

/* Container for personality buttons in chat */
.chat-personalities {
    display: flex;
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 8px;
    border-radius: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    z-index: 100;
}

/* Individual personality buttons */
.chat-personality-btn {
    padding: 6px 14px;
    margin: 0 3px;
    border: none;
    background: #f3f4f6;
    color: #374151;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

/* Hover effect */
.chat-personality-btn:hover {
    background: #722f37;
    color: white;
    transform: translateY(-2px);
}

/* Active personality */
.chat-personality-btn.active {
    background: #1f2937;
    color: white;
}

/* Animation when switching */
.chat-personality-btn:active {
    transform: scale(0.95);
}

/* COMPLETE MOBILE EXPERIENCE - All-in-one solution */
@media (max-width: 767px) {
    /* 1. Clean header/footer spacing */
    header {
        padding: 1rem !important;
    }
    
    /* 2. Mobile-optimized title */
    #initial-view h2 {
        font-size: 2.5rem !important;
        line-height: 2.8rem !important;
        font-weight: 800 !important;
    }
    
    #initial-view p {
        font-size: 0.875rem !important;
    }
    
    /* 3. Personality bar - scrollable at top */
    .chat-personalities {
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        transform: none !important;
        background: white !important;
        border-radius: 0 !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
        padding: 8px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        display: flex !important;
        gap: 8px !important;
        z-index: 1000 !important;
    }
    
    .chat-personalities::-webkit-scrollbar {
        display: none !important;
    }
    
    .chat-personality-btn {
        flex: 0 0 auto !important;
        padding: 10px 18px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
    }
    
    /* 4. Hide desktop elements */
    .personality-indicator,
    .character-menu,
    .horizontal-personality-bar {
        display: none !important;
    }
    
    /* 5. Chat area optimization */
    main {
        padding-top: 120px !important;
    }
    
    #chat-container {
        padding: 10px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        min-height: calc(100vh - 200px) !important;
    }
    
    .chat-bubble {
        max-width: 85% !important;
        font-size: 16px !important;
        padding: 1rem !important;
    }
    
    #chat-form {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 10px !important;
    }
    
    #chat-input {
        width: 100% !important;
        font-size: 16px !important;
        padding: 12px 50px 12px 16px !important;
        box-sizing: border-box !important;
    }
    
    #chat-form button[type="submit"] {
        width: 40px !important;
        height: 40px !important;
        right: 15px !important;
    }
}

/* COMPLETE MOBILE FIX - User Experience First */
@media (max-width: 767px) {
    /* Hide that ugly "Currently:" text */
    .personality-indicator {
        display: none !important;
    }
    
    /* Fix personality bar to be fully scrollable */
    .chat-personalities {
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0 !important;
        transform: none !important;
        padding: 8px 5px !important;
        overflow-x: scroll !important;
        overflow-y: hidden !important;
    }
    
    /* Fix empty space - push content down */
    #chat-container {
        min-height: 70vh !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        padding-bottom: 20px !important;
    }
}

/* Mobile home page improvements */
@media (max-width: 767px) {
    /* 1. Add header with home link on mobile */
    header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 1rem !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        z-index: 2000 !important;
    }
    
    /* 2. Center title and make it smaller */
    #initial-view {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        height: 100vh !important;
        padding: 0 20px !important;
    }
    
    #initial-view h2 {
        font-size: 2rem !important;
        text-align: center !important;
        margin: 0 auto !important;
    }
    
    /* 3. Move greeting message higher */
    .ai-bubble {
        position: relative !important;
        bottom: auto !important;
        margin-bottom: 0 !important;
    }
    
    /* 4. Adjust personality bar position with header */
    .chat-personalities {
        top: 70px !important;
    }
}

/* Fix message overlap on mobile */
@media (max-width: 767px) {
    /* Push chat container below personality bar */
    #chat-container {
        margin-top: 140px !important;
        padding-top: 20px !important;
    }
    
    .ai-bubble,
    .user-bubble {
        position: relative !important;
        margin-top: 10px !important;
    }
}

/* HIDE HOME PAGE CONTENT WHEN CHAT STARTS */
.chat-active #initial-view {
    display: none !important;
}

/* DESKTOP CHAT AREA */
#chat-container {
    padding-top: 60px !important;    
    padding-bottom: 20px !important;  
    margin-top: 0 !important;
}

/* DESKTOP - Move greeting down */
#chat-container > div:first-child {
    margin-top: 40px !important;
}
/* Override mobile footer white background */
@media (max-width: 767px) {
    footer {
        background: linear-gradient(to top, 
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 0.9) 30%,
            rgba(255, 255, 255, 0.7) 60%,
            rgba(255, 255, 255, 0.06) 100%
        ) !important;
        border-top: none !important;
    }
}
/* ORGANIZED FOOTER STYLES - ALL IN ONE PLACE */
footer {
    /* Positioning */
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    
    /* Ultra transparent gradient */
    background: linear-gradient(to top, 
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.5) 20%,
        rgba(255, 255, 255, 0.2) 40%,
        rgba(255, 255, 255, 0.05) 60%,
        rgba(255, 255, 255, 0) 80%,
        rgba(255, 255, 255, 0) 100%
    ) !important;
    
    /* Styling */
    border-top: none !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px !important;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px) !important;
}

/* Mobile footer adjustments */
@media (max-width: 767px) {
    footer {
        background: linear-gradient(to top, 
            rgba(255, 255, 255, 0.8) 0%,
            rgba(255, 255, 255, 0.4) 30%,
            rgba(255, 255, 255, 0.1) 60%,
            rgba(255, 255, 255, 0) 100%
        ) !important;
    }
}
/* Hide the circular character menu completely */
.character-menu {
    display: none !important;
}
