:root {
    --bg-color: #0f0f0f;
    --text-color: #f1f1f1;
    --text-secondary: #aaaaaa;
    --search-bg: #121212;
    --search-border: #303030;
    --hover-bg: #272727;
    --accent: #3ea6ff;
    --scroll-thumb: #717171;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    /* Allow regular body scrolling for better mobile behavior */
    overflow-y: scroll; 
    overflow-x: hidden;
    padding-top: 56px; 
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    height: 56px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-color);
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.material-icons {
    cursor: pointer;
    color: var(--text-color);
    padding: 8px;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.material-icons:hover {
    background-color: var(--hover-bg);
}

.logo {
    display: flex;
    align-items: center;
}

.yt-logo {
    height: 20px;
    cursor: pointer;
    filter: invert(1);
}

.header-center {
    display: flex;
    align-items: center;
    flex: 0 1 728px;
    gap: 12px;
    margin: 0 20px;
}

.search-bar {
    display: flex;
    flex: 1;
    border: 1px solid var(--search-border);
    border-radius: 40px;
    overflow: hidden;
    background-color: var(--search-bg);
    height: 40px;
}

.search-bar:focus-within {
    border-color: #1c62b9;
    /* Removed negative margin to prevent overlapping the menu icon on mobile */
}

.search-bar:focus-within::before {
    content: '\e8b6'; /* Search icon */
    font-family: 'Material Icons';
    padding-left: 16px;
    padding-top: 8px;
    color: var(--text-color);
    font-size: 20px;
    display: none; /* Hide the extra left search icon on focus to keep it clean */
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 0 16px;
    font-size: 16px;
    outline: none;
}

.search-btn {
    background-color: rgba(255, 255, 255, 0.08);
    border: none;
    border-left: 1px solid var(--search-border);
    padding: 0 20px;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.mic-icon {
    background-color: #181818;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.mic-icon:hover {
    background-color: #303030;
}

.user-avatar {
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 50%;
    overflow: hidden;
}

/* Layout */
.main-container {
    display: flex;
    min-height: calc(100vh - 56px);
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: var(--bg-color);
    padding: 12px 0;
    flex-shrink: 0;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin: 0 12px;
    gap: 20px;
    cursor: pointer;
    border-radius: 10px;
}

.nav-item:hover, .nav-item.active {
    background-color: var(--hover-bg);
}

.nav-item span:last-child {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

hr {
    border: 0;
    border-top: 1px solid var(--search-border);
    margin: 12px 0;
}

#sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 2400;
}
#sidebar-overlay.visible {
    display: block;
}
@media (min-width: 769px) {
    #sidebar-overlay { display: none !important; }
}

/* Main Content */
.content {
    flex: 1;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevent flex overflow */
}

.category-chips {
    display: flex;
    gap: 12px;
    padding: 12px 24px;
    position: sticky;
    top: 56px; /* Stick exactly below the header */
    background-color: rgba(15, 15, 15, 0.98);
    z-index: 900;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    overflow-x: auto;
}

.category-chips::-webkit-scrollbar {
    display: none;
}

.chip {
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.chip:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.chip.active {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.video-grid {
    padding: 0 24px 24px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    row-gap: 40px;
}

.video-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
}

.thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #333;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: border-radius 0.2s ease-in-out;
}

.thumbnail:hover {
    border-radius: 0;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-time-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Roboto', 'Inter', sans-serif;
    letter-spacing: 0.5px;
    pointer-events: none;
    z-index: 10;
}

.video-info {
    display: flex;
    gap: 12px;
    padding-right: 24px;
}

.channel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.video-details {
    display: flex;
    flex-direction: column;
}

.video-details h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 22px;
}

.video-details p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.video-details p:hover {
    color: var(--text-color);
}

/* Chat Overlay */
#chat-container {
    position: fixed;
    top: 56px;
    right: 0;
    width: 380px;
    height: calc(100vh - 56px);
    background-color: #0a0a0a;
    border-left: 1px solid var(--search-border);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
}

#chat-container.chat-visible {
    transform: translateX(0);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--search-border);
    background-color: #121212;
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-image: url('https://www.transparenttextures.com/patterns/dark-matter.png');
}

.message {
    max-width: 85%;
    padding: 8px 12px 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    position: relative;
}

.message-content {
    word-break: break-word;
}

.reaction-bubble {
    position: absolute;
    bottom: -8px;
    right: 10px;
    background: #333;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 2px 5px;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    z-index: 2;
}

.reaction-picker {
    position: absolute;
    bottom: 100%;
    background: #222;
    border: 1px solid #444;
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    gap: 12px;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 10;
    transform: translateY(10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.message.sent .reaction-picker {
    right: 0;
}

.message.received .reaction-picker {
    left: 0;
}

.reaction-picker.visible {
    transform: translateY(-5px);
    opacity: 1;
    pointer-events: auto;
}

.reaction-picker span {
    cursor: pointer;
    transition: transform 0.2s;
}

.reaction-picker span:hover {
    transform: scale(1.3);
}

.quote-reply {
    background-color: rgba(0, 0, 0, 0.2);
    border-left: 4px solid var(--accent);
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
}

.quote-author {
    color: var(--accent);
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 3px;
}

.quote-text {
    color: rgba(255, 255, 255, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.message-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 10px;
    margin-top: 3px;
    opacity: 0.8;
    user-select: none;
}

.message.sent .message-meta {
    color: rgba(255, 255, 255, 0.85);
}

.message.received .message-meta {
    color: #aaaaaa;
}

.message-time {
    font-size: 10px;
    letter-spacing: 0.2px;
}

.message-status {
    font-size: 11px;
    font-weight: bold;
    letter-spacing: -1.5px;
    margin-left: 2px;
    display: inline-block;
    transition: color 0.3s ease;
}

.message-status.sent {
    color: rgba(255, 255, 255, 0.6);
}

.message-status.delivered {
    color: rgba(255, 255, 255, 0.75);
}

.message-status.read {
    color: #34b7f1; /* WhatsApp blue double check */
    text-shadow: 0 0 3px rgba(52, 183, 241, 0.5);
}

.message.received {
    background-color: #202020;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.sent {
    background-color: #055a8c;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-top: 1px solid var(--search-border);
    gap: 10px;
    background-color: #121212;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.chat-actions-toggle-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background-color: #202020;
    border: 1px solid #333;
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.chat-actions-toggle-btn:hover {
    background-color: #2b2b2b;
    border-color: var(--accent);
    color: #fff;
    transform: scale(1.05);
}

.chat-actions-toggle-btn.active {
    transform: rotate(45deg);
    background-color: #2a1515;
    border-color: #ff4a4a;
    color: #ff4a4a;
}

.chat-input-wrapper {
    flex: 1;
    min-width: 0; /* CRITICAL: Prevents input from overflowing flex container */
    display: flex;
}

.chat-input-wrapper input {
    width: 100%;
    min-width: 0;
    background-color: #1f1f1f;
    border: 1px solid #333;
    border-radius: 22px;
    padding: 10px 16px;
    color: var(--text-color);
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s, background-color 0.2s;
    box-sizing: border-box;
}

.chat-input-wrapper input:focus {
    border-color: var(--accent);
    background-color: #242424;
}

.chat-send-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background-color: var(--accent);
    border: none;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* CRITICAL: Never gets pushed off-screen */
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(62, 166, 255, 0.35);
    padding: 0;
}

.chat-send-btn .material-icons {
    font-size: 19px;
    margin-left: 2px;
}

.chat-send-btn:hover {
    background-color: #63b8ff;
    transform: scale(1.06);
    box-shadow: 0 4px 14px rgba(62, 166, 255, 0.55);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding-top: 56px;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 2500;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 0 10px rgba(0,0,0,0.5);
    }
    .sidebar.sidebar-visible {
        transform: translateX(0);
    }
    
    .header {
        padding: 0 12px;
    }

    .header-center {
        flex: 1;
        margin: 0 8px;
    }
    
    /* Make the search bar compact on mobile */
    .search-bar {
        border: none;
        background-color: rgba(255,255,255,0.1);
    }
    
    .search-btn {
        background: transparent;
        border: none;
    }

    .mic-icon {
        display: none;
    }

    .yt-logo {
        display: none;
    }

    .header-left {
        gap: 0;
    }
    
    /* Hide some header-right icons */
    .header-right .material-icons:not(:last-child) {
        display: none;
    }
    
    .category-chips {
        padding: 10px 12px;
        top: 56px; /* Match header height */
    }
    
    .video-grid {
        padding: 12px;
        grid-template-columns: 1fr;
        row-gap: 24px;
        margin-top: 4px; /* Ensure space below chips */
    }
    
    .thumbnail {
        border-radius: 0;
    }
    
    .video-card {
        gap: 8px;
    }
    
    .video-info {
        padding-right: 0;
        padding-left: 12px;
    }

    #chat-container {
        width: 100%;
        top: 0;
        bottom: 0;
        height: 100%; /* Fallback */
        height: 100dvh; /* Dynamic viewport height to prevent OS taskbars from hiding the input */
        border-left: none;
        z-index: 3000;
        position: fixed;
    }
    
    .chat-header {
        padding-top: max(16px, env(safe-area-inset-top));
    }
    
    .chat-input-area {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
}

/* ==========================================================================
   Chat Tabs Bar (Messages vs Gallery)
   ========================================================================== */
.chat-tabs-bar {
    display: flex;
    background-color: #121212;
    border-bottom: 1px solid var(--search-border);
    position: relative;
    z-index: 5;
}

.chat-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-tab-btn .material-icons {
    font-size: 18px;
}

.chat-tab-btn:hover {
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.04);
}

.chat-tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background-color: rgba(62, 166, 255, 0.06);
}

.gallery-badge {
    background-color: var(--accent);
    color: #000;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 12px;
    line-height: 1.2;
}

/* ==========================================================================
   Chat Gallery View
   ========================================================================== */
.chat-gallery-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #0b0b0b;
    position: relative;
}

.gallery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background-color: #141414;
    border-bottom: 1px solid #222;
}

.gallery-toolbar-left {
    display: flex;
    flex-direction: column;
}

.gallery-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.gallery-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
}

.gallery-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-icon-btn {
    background: transparent;
    border: 1px solid #333;
    border-radius: 50%;
    color: #bbb;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-icon-btn:hover {
    color: #fff;
    background-color: #242424;
    border-color: #555;
}

.gallery-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #272727;
    border: 1px solid #3f3f3f;
    color: #fff;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-action-btn .material-icons {
    font-size: 16px;
}

.gallery-action-btn:hover {
    background-color: #383838;
    border-color: var(--accent);
}

.gallery-grid {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: 8px;
    align-content: start;
}

.gallery-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: 100px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background-color: #1a1a1a;
    border: 1px solid #282828;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
    background-color: #181818;
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 6px 4px 6px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
    color: #eee;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
    text-align: center;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    padding: 30px 20px;
    text-align: center;
    gap: 10px;
}

.gallery-empty .material-icons {
    font-size: 56px;
    color: #444;
}

.gallery-empty h4 {
    color: #ddd;
    font-size: 16px;
    font-weight: 500;
}

.gallery-empty p {
    font-size: 13px;
    max-width: 240px;
    line-height: 1.4;
}

/* Chat Image inside messages enhancement */
.chat-image {
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.chat-image:hover {
    opacity: 0.92;
    transform: scale(1.01);
}

/* ==========================================================================
   Full-Screen Lightbox Modal
   ========================================================================== */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeInModal 0.2s ease;
}

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

.lightbox-content {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
    box-sizing: border-box;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85);
    user-select: none;
    transition: transform 0.2s ease;
}

.lightbox-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.2s ease;
}

.lightbox-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.06);
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.2s ease;
}

.lightbox-nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav-btn.prev {
    left: 20px;
}

.lightbox-nav-btn.next {
    right: 20px;
}

.lightbox-footer {
    position: absolute;
    bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: calc(100% - 60px);
    max-width: 600px;
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 18px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10002;
}

.lightbox-info {
    color: #eee;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lightbox-date {
    color: var(--text-secondary);
    font-size: 12px;
}

.lightbox-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lightbox-action-btn {
    color: #ccc;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.lightbox-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: scale(1.08);
}

@media (max-width: 768px) {
    .lightbox-content {
        padding: 40px 16px;
    }
    .lightbox-nav-btn {
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.5);
    }
    .lightbox-nav-btn.prev {
        left: 10px;
    }
    .lightbox-nav-btn.next {
        right: 10px;
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 1fr;
    }
}

/* ==========================================================================
   Live Location Card & Banner
   ========================================================================== */
.live-location-banner {
    background: linear-gradient(135deg, rgba(34, 76, 45, 0.95), rgba(16, 44, 25, 0.95));
    border-bottom: 1px solid rgba(46, 160, 67, 0.4);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #e6f4ea;
    z-index: 4;
    animation: fadeInBanner 0.3s ease;
}

@keyframes fadeInBanner {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.live-banner-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-banner-link {
    color: #56d364;
    text-decoration: none;
    font-weight: 600;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(86, 211, 100, 0.3);
    transition: all 0.2s;
}

.live-banner-link:hover {
    background: rgba(86, 211, 100, 0.2);
    color: #fff;
}

.location-card {
    background: #181818;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    margin: 4px 0;
    max-width: 290px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.location-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #202020;
    font-size: 13px;
    color: #fff;
    border-bottom: 1px solid #2a2a2a;
}

.location-coord {
    font-size: 11px;
    color: #888;
    margin-left: auto;
}

.live-badge-dot {
    width: 8px;
    height: 8px;
    background-color: #2ea043;
    border-radius: 50%;
    display: inline-block;
}

.live-badge-dot.live-pulse {
    box-shadow: 0 0 0 0 rgba(46, 160, 67, 0.7);
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 160, 67, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(46, 160, 67, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 160, 67, 0);
    }
}

.location-map-wrap {
    width: 100%;
    height: 160px;
    position: relative;
    background: #111;
}

.location-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    pointer-events: none;
}

.location-card-footer {
    padding: 8px 10px;
    background: #1c1c1c;
    border-top: 1px solid #282828;
    text-align: center;
}

.location-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #238636;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 16px;
    width: 100%;
    box-sizing: border-box;
    transition: background 0.2s;
}

.location-btn:hover {
    background: #2ea043;
    color: #fff;
}

/* ==========================================================================
   Unified Actions Popover & Menu
   ========================================================================== */
.chat-actions-popover {
    position: absolute;
    bottom: 60px;
    left: 12px;
    background: #1c1c1c;
    border: 1px solid #383838;
    border-radius: 16px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85);
    z-index: 1000;
    min-width: 230px;
    animation: popoverSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

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

.chat-action-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    color: #ddd;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    width: 100%;
}

.chat-action-menu-item:hover {
    background-color: #272727;
    color: #fff;
}

.chat-action-menu-item .material-icons {
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-icon-photo {
    background: rgba(62, 166, 255, 0.15);
    color: #3ea6ff;
}

.action-icon-location {
    background: rgba(46, 160, 67, 0.15);
    color: #3fb950;
}

.action-icon-snap {
    background: rgba(235, 115, 29, 0.15);
    color: #f0883e;
}

.action-item-text {
    display: flex;
    flex-direction: column;
}

.action-item-text strong {
    font-size: 13px;
    font-weight: 500;
    color: #f1f1f1;
}

.action-item-text small {
    font-size: 11px;
    color: #888;
}

.action-menu-divider {
    height: 1px;
    background: #2b2b2b;
    margin: 4px 6px;
}

.action-menu-label {
    font-size: 10px;
    font-weight: 700;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px 1px 8px;
}

.request-snap-bubble {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #ccc;
    padding: 2px 0;
}

/* ==========================================================================
   PiP Video Call & Stealth Peek Mode
   ========================================================================== */
#call-container.call-container {
    position: relative;
    width: 100%;
    height: 210px;
    background: #000;
    border-bottom: 2px solid #222;
    display: none;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
    transition: height 0.3s ease;
    z-index: 50;
}

#call-container.call-container.full-screen {
    position: absolute;
    top: 96px;
    left: 0;
    height: calc(100% - 96px);
    z-index: 1000;
}

#jitsi-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #000;
}

.call-black-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #aaa;
    z-index: 10;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.15s ease;
}

.call-black-mask.unmasked {
    opacity: 0 !important;
    pointer-events: none !important;
}

.call-black-mask .mask-icon {
    font-size: 32px;
    color: #555;
}

.call-black-mask .mask-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.call-black-mask .mask-text strong {
    font-size: 13px;
    color: #ddd;
}

.call-black-mask .mask-text small {
    font-size: 11px;
    color: #888;
}

.call-black-mask .mask-text b {
    color: var(--accent);
}

.call-floating-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 25;
}

.call-control-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
}

.call-control-icon .material-icons {
    font-size: 17px;
}

.call-control-icon:hover {
    background: rgba(60, 60, 60, 0.95);
    transform: scale(1.06);
}

.call-control-icon.end {
    background: #cc0000;
    border-color: #ff3333;
}

.call-control-icon.end:hover {
    background: #e60000;
}

/* ==========================================================================
   Milestone & Countdown View Styles
   ========================================================================== */
.chat-milestone-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: linear-gradient(180deg, #120e17 0%, #0a0a0c 100%);
    padding: 24px 18px;
    box-sizing: border-box;
    animation: fadeInMilestone 0.3s ease;
}

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

.milestone-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 340px;
    margin: 0 auto;
    width: 100%;
}

.milestone-header-art {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.milestone-glow-circle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 75, 110, 0.25) 0%, rgba(255, 75, 110, 0) 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    box-shadow: 0 0 25px rgba(255, 75, 110, 0.3);
}

.milestone-pulse-heart {
    font-size: 34px !important;
    color: #ff3366 !important;
    animation: pulseHeart 1.4s ease-in-out infinite;
}

@keyframes pulseHeart {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px #ff3366); }
    50% { transform: scale(1.18); filter: drop-shadow(0 0 12px #ff4d80); }
}

.milestone-title {
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}

.milestone-subtitle {
    font-size: 12px;
    color: #999;
}

/* Timeline Card */
.milestone-progress-card {
    width: 100%;
    background: rgba(25, 20, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px 14px;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.timeline-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.timeline-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    color: #bbb;
}

.timeline-percentage {
    font-size: 13px;
    font-weight: 700;
    color: #ff4d80;
}

.timeline-track {
    position: relative;
    width: 100%;
    height: 8px;
    background: #25222b;
    border-radius: 8px;
    overflow: visible;
    margin-bottom: 14px;
}

.timeline-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff3366, #ff758c, #3ea6ff);
    border-radius: 8px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(255, 75, 110, 0.6);
}

.timeline-runner {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    color: #ff3366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    transition: left 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-runner .material-icons {
    font-size: 14px;
}

.timeline-endpoints {
    display: flex;
    justify-content: space-between;
}

.endpoint {
    display: flex;
    flex-direction: column;
}

.endpoint.text-center {
    align-items: center;
}

.endpoint.text-right {
    align-items: flex-end;
}

.endpoint-date {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.endpoint-title {
    font-size: 10px;
    color: #888;
}

/* Countdown Grid */
.countdown-section-label {
    font-size: 10px;
    font-weight: 700;
    color: #777;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
}

.countdown-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, border-color 0.2s;
}

.countdown-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 75, 110, 0.4);
}

.countdown-number {
    font-size: 22px;
    font-weight: 700;
    color: #ff4d80;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    font-family: 'Roboto', monospace;
}

.countdown-tag {
    font-size: 9px;
    font-weight: 600;
    color: #888;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

/* Days Apart Badge */
.days-apart-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    font-size: 12px;
    color: #aaa;
}

.days-apart-badge .material-icons {
    font-size: 16px;
    color: #3ea6ff;
}

/* ==========================================================================
   Love Heart Explosion & Screen Glow Animations
   ========================================================================== */
.love-hearts-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 9999;
}

.floating-heart {
    position: absolute;
    bottom: -40px;
    user-select: none;
    pointer-events: none;
    animation: floatUpAndFade linear forwards;
    filter: drop-shadow(0 0 10px rgba(255, 51, 102, 0.7));
}

@keyframes floatUpAndFade {
    0% {
        transform: translateY(0) scale(0.6) rotate(0deg);
        opacity: 0;
    }
    15% {
        opacity: 1;
        transform: translateY(-50px) scale(1.15) rotate(var(--rot, 15deg));
    }
    80% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(-520px) scale(1.4) rotate(var(--rot-end, -25deg));
        opacity: 0;
    }
}

.chat-love-glow {
    animation: romanticGlow 1.8s ease-out;
}

@keyframes romanticGlow {
    0% { box-shadow: inset 0 0 0px rgba(255, 51, 102, 0); }
    30% { box-shadow: inset 0 0 70px rgba(255, 51, 102, 0.35); }
    100% { box-shadow: inset 0 0 0px rgba(255, 51, 102, 0); }
}

/* ==========================================================================
   1. "Miss You" Shooting Stars & Night Glow
   ========================================================================== */
.chat-night-glow {
    animation: nightSkyGlow 2.8s ease-in-out;
}

@keyframes nightSkyGlow {
    0% { box-shadow: inset 0 0 0px rgba(70, 130, 255, 0); }
    35% { box-shadow: inset 0 0 80px rgba(70, 110, 250, 0.45); }
    100% { box-shadow: inset 0 0 0px rgba(70, 130, 255, 0); }
}

.shooting-star {
    position: absolute;
    width: 90px;
    height: 2px;
    background: linear-gradient(90deg, #fff, rgba(140, 200, 255, 0.8), transparent);
    border-radius: 999px;
    filter: drop-shadow(0 0 6px #66b3ff);
    transform: rotate(-35deg);
    pointer-events: none;
    animation: shootStar 1.1s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes shootStar {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(-35deg) scaleX(0.2);
    }
    20% {
        opacity: 1;
        transform: translate(40px, 30px) rotate(-35deg) scaleX(1);
    }
    100% {
        opacity: 0;
        transform: translate(260px, 190px) rotate(-35deg) scaleX(0.4);
    }
}

.star-twinkle {
    position: absolute;
    color: #ffd700;
    pointer-events: none;
    user-select: none;
    animation: twinklePop 1.6s ease forwards;
    filter: drop-shadow(0 0 8px #ffd700);
}

@keyframes twinklePop {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    50% { transform: scale(1.3) rotate(90deg); opacity: 1; }
    100% { transform: scale(0.2) rotate(180deg); opacity: 0; }
}

/* ==========================================================================
   2. "Hug" Screen Squeeze & Cuddle Icons
   ========================================================================== */
.chat-hug-squeeze {
    animation: hugSqueeze 2.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes hugSqueeze {
    0% { transform: scale(1); }
    25% { transform: scaleX(0.94) scaleY(1.02); }
    50% { transform: scaleX(1.03) scaleY(0.98); }
    75% { transform: scaleX(0.98) scaleY(1.01); }
    100% { transform: scale(1); }
}

.hug-meet-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    pointer-events: none;
    z-index: 10000;
}

.hug-left-arm {
    font-size: 52px;
    animation: hugMeetLeft 2.8s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

.hug-right-arm {
    font-size: 52px;
    animation: hugMeetRight 2.8s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

@keyframes hugMeetLeft {
    0% { transform: translateX(-160px) scale(0.4); opacity: 0; }
    35% { transform: translateX(8px) scale(1.25); opacity: 1; }
    75% { transform: translateX(4px) scale(1.15); opacity: 1; }
    100% { transform: translateX(0) scale(1.4); opacity: 0; }
}

@keyframes hugMeetRight {
    0% { transform: translateX(160px) scale(0.4); opacity: 0; }
    35% { transform: translateX(-8px) scale(1.25); opacity: 1; }
    75% { transform: translateX(-4px) scale(1.15); opacity: 1; }
    100% { transform: translateX(0) scale(1.4); opacity: 0; }
}

/* ==========================================================================
   3. "Kiss" Floating Lip Prints & Sparkles
   ========================================================================== */
.kiss-pop {
    position: absolute;
    font-size: 34px;
    user-select: none;
    pointer-events: none;
    animation: kissPopAnimation 3.2s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    filter: drop-shadow(0 0 12px rgba(255, 30, 80, 0.8));
}

@keyframes kissPopAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(var(--rot, -10deg));
        opacity: 0;
    }
    25% {
        transform: translate(-50%, -50%) scale(1.3) rotate(var(--rot, -10deg));
        opacity: 1;
    }
    65% {
        transform: translate(-50%, -60px) scale(1.15) rotate(var(--rot, -10deg));
        opacity: 0.95;
    }
    100% {
        transform: translate(-50%, -140px) scale(1.4) rotate(var(--rot, -10deg));
        opacity: 0;
    }
}

/* ==========================================================================
   4. "Good Morning" Sunrise Glow & Sun Rays
   ========================================================================== */
.chat-morning-glow {
    animation: morningSunriseGlow 3s ease-in-out;
}

@keyframes morningSunriseGlow {
    0% { box-shadow: inset 0 0 0px rgba(255, 170, 40, 0); }
    35% { box-shadow: inset 0 0 85px rgba(255, 160, 20, 0.4); }
    100% { box-shadow: inset 0 0 0px rgba(255, 170, 40, 0); }
}

.morning-rising-sun {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 64px;
    pointer-events: none;
    user-select: none;
    animation: sunRiseUp 2.8s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
    filter: drop-shadow(0 0 25px rgba(255, 180, 50, 0.9));
    z-index: 10001;
}

@keyframes sunRiseUp {
    0% {
        transform: translate(-50%, 40px) scale(0.6);
        opacity: 0;
    }
    40% {
        transform: translate(-50%, -180px) scale(1.3);
        opacity: 1;
    }
    75% {
        transform: translate(-50%, -240px) scale(1.15);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -320px) scale(1.4);
        opacity: 0;
    }
}

.sunbeam-particle {
    position: absolute;
    bottom: 0;
    pointer-events: none;
    user-select: none;
    animation: floatSunbeam 2.4s ease-out forwards;
    filter: drop-shadow(0 0 8px rgba(255, 200, 50, 0.8));
}

@keyframes floatSunbeam {
    0% { transform: translateY(0) scale(0.4); opacity: 0; }
    20% { opacity: 1; transform: translateY(-60px) scale(1.1); }
    100% { transform: translateY(-380px) scale(0.8); opacity: 0; }
}

/* ==========================================================================
   5. "Good Night" Deep Twilight & Crescent Moon
   ========================================================================== */
.chat-night-deep-glow {
    animation: deepNightGlow 3.2s ease-in-out;
}

@keyframes deepNightGlow {
    0% { box-shadow: inset 0 0 0px rgba(40, 50, 110, 0); }
    40% { box-shadow: inset 0 0 90px rgba(45, 60, 140, 0.55); }
    100% { box-shadow: inset 0 0 0px rgba(40, 50, 110, 0); }
}

.goodnight-moon {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 58px;
    pointer-events: none;
    user-select: none;
    animation: moonFloat 3s ease-in-out forwards;
    filter: drop-shadow(0 0 20px rgba(220, 230, 255, 0.85));
    z-index: 10001;
}

@keyframes moonFloat {
    0% { transform: translate(-50%, -20%) scale(0.5); opacity: 0; }
    35% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    70% { transform: translate(-50%, -55%) scale(1.1); opacity: 0.95; }
    100% { transform: translate(-50%, -80%) scale(1.3); opacity: 0; }
}

.zzz-particle {
    position: absolute;
    font-size: 20px;
    font-weight: 700;
    color: #aaccff;
    pointer-events: none;
    user-select: none;
    animation: zzzDrift 2.5s ease-out forwards;
    filter: drop-shadow(0 0 6px #6699ff);
}

@keyframes zzzDrift {
    0% { transform: translate(0, 0) scale(0.6); opacity: 0; }
    30% { opacity: 1; transform: translate(15px, -40px) scale(1.1); }
    100% { transform: translate(35px, -140px) scale(1.4); opacity: 0; }
}

/* ==========================================================================
   6. "Sweet Dreams" Dreamy Clouds & Lavender Glow
   ========================================================================== */
.chat-sweetdreams-glow {
    animation: sweetDreamsGlow 3s ease-in-out;
}

@keyframes sweetDreamsGlow {
    0% { box-shadow: inset 0 0 0px rgba(180, 80, 255, 0); }
    35% { box-shadow: inset 0 0 85px rgba(170, 70, 255, 0.4); }
    100% { box-shadow: inset 0 0 0px rgba(180, 80, 255, 0); }
}

.dream-particle {
    position: absolute;
    bottom: -20px;
    pointer-events: none;
    user-select: none;
    animation: dreamFloat 2.8s cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
    filter: drop-shadow(0 0 10px rgba(200, 140, 255, 0.7));
}

@keyframes dreamFloat {
    0% {
        transform: translateY(0) scale(0.5) rotate(0deg);
        opacity: 0;
    }
    25% {
        opacity: 1;
        transform: translateY(-80px) scale(1.2) rotate(var(--rot, 10deg));
    }
    75% {
        opacity: 0.9;
        transform: translateY(-240px) scale(1.1) rotate(var(--rot, -10deg));
    }
    100% {
        transform: translateY(-400px) scale(1.4) rotate(0deg);
        opacity: 0;
    }
}

/* ==========================================================================
   AI Daily Question Game & Reveal Styles
   ========================================================================== */

/* Pinned Banner at top of chat */
.daily-question-banner {
    background: linear-gradient(135deg, #1f1426, #161a29);
    border-bottom: 1px solid rgba(255, 64, 129, 0.35);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    animation: fadeInSlide 0.25s ease-out;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.dq-banner-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dq-banner-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #ff80ab;
}

.dq-banner-title .material-icons {
    font-size: 18px;
    color: #ff4081;
}

.dq-badge {
    font-size: 10px;
    background: rgba(255, 64, 129, 0.2);
    border: 1px solid rgba(255, 64, 129, 0.4);
    color: #ff80ab;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 500;
}

.dq-tiny-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ccc;
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.dq-tiny-btn:hover {
    background: rgba(255, 64, 129, 0.25);
    color: #fff;
    border-color: #ff4081;
}

.dq-banner-question {
    font-size: 13.5px;
    color: #f1f1f1;
    line-height: 1.4;
    font-weight: 500;
    padding: 4px 0;
}

.dq-answer-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dq-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12.5px;
    color: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.dq-input:focus {
    border-color: #ff4081;
}

.dq-submit-btn {
    background: linear-gradient(135deg, #e91e63, #9c27b0);
    border: none;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.2s;
    white-space: nowrap;
}

.dq-submit-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.dq-status-indicator {
    font-size: 12px;
    color: #81c784;
    padding: 4px 6px;
    border-radius: 6px;
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.25);
}

/* Chat bubble card when Daily Question is posted */
.daily-question-card {
    background: linear-gradient(135deg, #221429, #171c2f);
    border: 1px solid rgba(255, 64, 129, 0.4);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 4px 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    max-width: 320px;
}

.daily-question-card .dq-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #ff80ab;
    margin-bottom: 8px;
}

.daily-question-card .dq-question-text {
    font-size: 13.5px;
    color: #fff;
    line-height: 1.45;
    font-weight: 500;
    margin-bottom: 8px;
}

.daily-question-card .dq-status-bar {
    font-size: 11.5px;
    color: #b0bec5;
    font-style: italic;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    padding-top: 6px;
}

/* Status Notice Bubble */
.dq-notice-bubble {
    font-size: 12px;
    color: #ffb74d;
    background: rgba(255, 152, 0, 0.15);
    border: 1px solid rgba(255, 152, 0, 0.35);
    border-radius: 8px;
    padding: 6px 10px;
    display: inline-block;
}

/* Reveal Card (Both Have Answered!) */
.daily-reveal-card {
    background: linear-gradient(135deg, #24142a, #161e31);
    border: 1px solid rgba(255, 64, 129, 0.5);
    border-radius: 14px;
    padding: 14px;
    margin: 6px 0;
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.2);
    max-width: 330px;
    animation: revealPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes revealPop {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.dq-reveal-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #ff4081;
    font-weight: 700;
    margin-bottom: 8px;
}

.dq-reveal-question {
    font-size: 13px;
    color: #e0e0e0;
    line-height: 1.4;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dq-reveal-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dq-answer-box {
    border-radius: 10px;
    padding: 8px 12px;
}

.dq-answer-box.bf-answer {
    background: rgba(62, 166, 255, 0.12);
    border: 1px solid rgba(62, 166, 255, 0.35);
}

.dq-answer-box.gf-answer {
    background: rgba(255, 64, 129, 0.12);
    border: 1px solid rgba(255, 64, 129, 0.35);
}

.dq-user-label {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
}

.dq-answer-box.bf-answer .dq-user-label {
    color: #90caf9;
}

.dq-answer-box.gf-answer .dq-user-label {
    color: #f48fb1;
}

.dq-user-text {
    font-size: 13px;
    color: #ffffff;
    line-height: 1.35;
    word-break: break-word;
}

/* Mode Selector Pills */
.dq-mode-selector {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0 6px 0;
}

.dq-pill-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ddd;
    font-size: 11px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.dq-pill-btn:hover {
    background: rgba(255, 64, 129, 0.2);
    border-color: #ff4081;
    color: #fff;
}

.dq-pill-btn.active {
    background: linear-gradient(135deg, #e91e63, #9c27b0);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

/* 1-Tap Option Buttons for Poll & Quiz */
.dq-tap-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dq-choice-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    padding: 9px 12px;
    color: #fff;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.dq-choice-btn:hover {
    background: rgba(233, 30, 99, 0.2);
    border-color: #ff4081;
    transform: translateX(2px);
}

.dq-choice-btn .choice-prefix {
    font-size: 14px;
}

.dq-choice-btn .choice-text {
    font-size: 12.5px;
    font-weight: 500;
    color: #f5f5f5;
}

.dq-poll-options-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.dq-poll-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    color: #e0e0e0;
}

/* Sync Badges */
.sync-badge {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
}

.sync-badge.synced {
    background: rgba(233, 30, 99, 0.18);
    border: 1px solid rgba(255, 64, 129, 0.5);
    color: #ff80ab;
}

.sync-badge.split {
    background: rgba(156, 39, 176, 0.18);
    border: 1px solid rgba(186, 104, 200, 0.5);
    color: #ce93d8;
}

.quote-actual-box {
    background: rgba(156, 39, 176, 0.15);
    border: 1px solid rgba(186, 104, 200, 0.4);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    color: #e1bee7;
    margin-bottom: 10px;
    text-align: center;
}






