/* style.css - Premium Space-Cyberpunk Theme for StrangerChat */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #07050f;
    --bg-card: rgba(18, 14, 38, 0.6);
    --border-color: rgba(255, 255, 255, 0.07);
    --primary-glow: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    --neon-cyan: #06b6d4;
    --neon-pink: #ec4899;
    --neon-green: #10b981;
    --neon-yellow: #f59e0b;
    --text-primary: #f3f4f6;
    --text-muted: #9ca3af;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(20px);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background animated mesh glow orbs */
.bg-glow-orb-1, .bg-glow-orb-2 {
    position: fixed;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
    animation: orb-float 25s infinite alternate ease-in-out;
}

.bg-glow-orb-1 {
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
    top: -20%;
    left: -10%;
}

.bg-glow-orb-2 {
    background: radial-gradient(circle, #db2777 0%, transparent 70%);
    bottom: -20%;
    right: -10%;
    animation-delay: -10s;
}

@keyframes orb-float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(8%, 10%) scale(1.15); }
}

/* Typography & Layout Utility classes */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Landing Page Wrapper */
.landing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1.5rem;
}

.landing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    max-width: 600px;
    width: 100%;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--card-shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Floating neon border effect */
.landing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--neon-cyan), #a855f7, var(--neon-pink));
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.logo-icon {
    font-size: 2.25rem;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse-glow 2s infinite alternate;
}

.brand-name {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.landing-tagline {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* Mode Selection Cards */
.mode-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.mode-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 2rem 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.mode-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 10px 25px -5px rgba(168, 85, 247, 0.15);
}

.mode-card.active {
    background: rgba(168, 85, 247, 0.08);
    border-color: #a855f7;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
}

.mode-icon {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
    transition: var(--transition-smooth);
}

.mode-card:hover .mode-icon {
    transform: scale(1.1);
}

.mode-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.mode-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Start Button */
.btn-start {
    width: 100%;
    padding: 1.15rem;
    border: none;
    border-radius: 14px;
    background: var(--primary-glow);
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-start:active {
    transform: translateY(0);
}

/* Footer / Stats */
.online-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 30px;
    font-size: 0.85rem;
    color: var(--neon-green);
    font-weight: 600;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--neon-green);
    animation: pulse-glow 1.5s infinite alternate;
}

/* ---------------------------------- */
/* Chat Page Interface                */
/* ---------------------------------- */
.chat-container {
    display: none; /* Controlled by JS */
    height: 100vh;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    padding: 1.5rem;
    gap: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .chat-container {
        grid-template-columns: 550px 1fr;
        grid-template-rows: 1fr;
        height: 100vh;
    }
}

/* Left Panel - Videos */
.video-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: 100%;
}

.video-wrapper {
    flex: 1;
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    min-height: 200px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: rotateY(180deg); /* Mirror local video */
}

/* Avoid mirroring for remote video */
#remoteVideo {
    transform: none;
}

.video-label {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    padding: 0.4rem 0.8rem;
    background: rgba(10, 8, 20, 0.75);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
}

.video-placeholder {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    pointer-events: none;
    z-index: 5;
}

.video-placeholder-icon {
    font-size: 3rem;
    opacity: 0.3;
}

/* Right Panel - Text Chat */
.chat-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

/* Chat Header actions */
.chat-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
}

.partner-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.searching {
    background: rgba(245, 158, 11, 0.1);
    color: var(--neon-yellow);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.connected {
    background: rgba(16, 185, 129, 0.1);
    color: var(--neon-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.disconnected {
    background: rgba(236, 72, 153, 0.1);
    color: var(--neon-pink);
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-action {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-next {
    background: var(--primary-glow);
    color: #ffffff;
}

.btn-next:hover {
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
    transform: translateY(-1px);
}

.btn-stop {
    background: rgba(236, 72, 153, 0.1);
    border: 1px solid rgba(236, 72, 153, 0.3);
    color: var(--neon-pink);
}

.btn-stop:hover {
    background: rgba(236, 72, 153, 0.2);
    transform: translateY(-1px);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

/* Custom Scrollbars */
.chat-messages::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.message {
    max-width: 80%;
    padding: 0.85rem 1.15rem;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.45;
    position: relative;
    animation: message-slide 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes message-slide {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message.me {
    align-self: flex-end;
    background: var(--primary-glow);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.message.stranger {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

/* System Notifications */
.message-system {
    align-self: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    max-width: 90%;
}

.message-system span.status {
    color: var(--neon-cyan);
}

.message-system.error span.status {
    color: var(--neon-pink);
}

/* Chat Input Footer */
.chat-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.1);
}

.chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.9rem 1.25rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

.chat-input:focus {
    border-color: #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.15);
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.btn-send {
    padding: 0 1.5rem;
    border: none;
    border-radius: 14px;
    background: var(--primary-glow);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-send:hover {
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
    transform: scale(1.02);
}

.btn-send:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Animations */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 5px rgba(16, 185, 129, 0.2);
    }
    100% {
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
    }
}

/* Match search overlay loading details */
.search-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: auto;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(168, 85, 247, 0.1);
    border-top: 3px solid #a855f7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile responsive fixes */
@media (max-width: 991px) {
    .chat-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: 100dvh;
        padding: 0.5rem;
        gap: 0.75rem;
    }
    .video-panel {
        flex-direction: row;
        height: 25dvh;
        min-height: 140px;
        max-height: 220px;
    }
    .video-wrapper {
        min-height: auto;
        height: 100%;
        overflow: visible; /* Allow filters/masks popovers to show without clipping */
    }
    .video-wrapper video {
        border-radius: 20px; /* Ensure video respects the border radius */
    }
}

@media (max-width: 768px) {
    .mode-selection {
        grid-template-columns: 1fr;
    }
    .landing-card {
        padding: 2rem 1.5rem;
    }
    .chat-header {
        padding: 0.75rem 1rem;
    }
    .chat-footer {
        padding: 0.75rem;
    }
    .btn-action {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    .btn-interact-text {
        display: none;
    }
    .btn-interaction {
        padding: 0.4rem 0.6rem;
        font-size: 1rem;
    }
    .interaction-bar {
        padding: 0.25rem;
        gap: 0.25rem;
    }
}

/* Local Video media controls overlay */
.video-controls {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 20;
}

.btn-control {
    background: rgba(10, 8, 20, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: var(--transition-smooth);
    font-size: 1rem;
}

.btn-control:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.btn-control:not(.active) {
    background: rgba(236, 72, 153, 0.25);
    border-color: var(--neon-pink);
    color: var(--neon-pink);
}

/* Typing Indicator bar */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.5rem;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid var(--border-color);
    gap: 0.25rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--neon-cyan);
    border-radius: 50%;
    display: inline-block;
    animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
    0%, 80%, 100% { transform: scale(0.3); opacity: 0.5; }
    40% { transform: scale(1) translateY(-4px); opacity: 1; }
}

/* Modal Dialog Overlay & Content */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 5, 15, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: #110d24;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.25rem;
    max-width: 460px;
    width: 90%;
    box-shadow: var(--card-shadow);
    text-align: center;
    position: relative;
    animation: modal-zoom 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-zoom {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ---------------------------------- */
/* Premium Gamification Styles        */
/* ---------------------------------- */

.landing-container {
    padding-top: 90px;
}
.chat-container {
    padding-top: 90px;
}

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 8, 20, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo-icon-mini {
    font-size: 1.5rem;
}
.brand-name-mini {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.header-profile {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.profile-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
}
.level-label {
    font-weight: 700;
    color: var(--neon-cyan);
}
.xp-bar-outer {
    width: 80px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}
.xp-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
    width: 0%;
    transition: width 0.4s ease;
}
.xp-ratio {
    color: var(--text-muted);
    font-size: 0.75rem;
}
.streak-badge {
    font-weight: 700;
    color: var(--neon-yellow);
}
.btn-header-shop, .btn-header-friends {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.btn-header-groups {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: var(--neon-cyan);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.btn-header-shop:hover, .btn-header-friends:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}
.btn-header-groups:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--neon-cyan);
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}
.unread-badge {
    background: var(--neon-pink);
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ---------------------------------- */
/* Friends Drawer                     */
/* ---------------------------------- */

.friends-drawer {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 100%;
    max-width: 350px;
    height: calc(100vh - 70px);
    background: rgba(13, 10, 28, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    display: flex;
    flex-direction: column;
}
.friends-drawer.open {
    right: 0;
}
.drawer-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-close-drawer {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}
.drawer-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.friends-list {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.5rem;
}
.friend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-smooth);
}
.friend-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(168, 85, 247, 0.3);
}
.friend-item-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.friend-avatar {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
}
.friend-status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #0d0a1c;
}
.friend-status-indicator.online {
    background-color: var(--neon-green);
}
.friend-status-indicator.offline {
    background-color: var(--text-muted);
}
.friend-info-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.friend-name {
    font-size: 0.85rem;
    font-weight: 700;
}
.friend-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.friend-level {
    color: var(--neon-cyan);
}
.friend-streak {
    color: var(--neon-yellow);
}
.friend-item-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.friend-unread-badge {
    background: var(--neon-pink);
    color: white;
    border-radius: 10px;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.chat-back-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.btn-back-friends {
    background: transparent;
    border: none;
    color: var(--neon-cyan);
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
}
.chat-friend-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
}
.friend-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.friend-status-dot.online { background-color: var(--neon-green); }
.friend-status-dot.offline { background-color: var(--text-muted); }
.drawer-chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.drawer-msg {
    max-width: 85%;
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
}
.drawer-msg.me {
    align-self: flex-end;
    background: var(--primary-glow);
    color: white;
    border-bottom-right-radius: 2px;
}
.drawer-msg.friend {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
}
.drawer-chat-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}
.drawer-chat-footer input {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: white;
    outline: none;
    font-size: 0.85rem;
}
.drawer-chat-footer button {
    background: var(--neon-cyan);
    border: none;
    color: white;
    padding: 0 1rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}
.drawer-chat-footer button:hover {
    opacity: 0.9;
}

/* ---------------------------------- */
/* Theme Shop Panel                   */
/* ---------------------------------- */

.shop-modal-content {
    max-width: 600px;
}
.shop-themes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}
@media (max-width: 480px) {
    .shop-themes-grid {
        grid-template-columns: 1fr;
    }
}
.shop-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}
.shop-card:hover {
    border-color: rgba(168, 85, 247, 0.4);
    transform: translateY(-3px);
}
.shop-card-preview {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}
.synthwave-preview {
    background: linear-gradient(180deg, #1a0826 0%, #ff71ce 100%);
    color: #01cdfe;
    text-shadow: 0 0 5px #ff71ce;
}
.matrix-preview {
    background: linear-gradient(180deg, #020804 0%, #00ff41 100%);
    color: #00ff41;
    text-shadow: 0 0 5px #00ff41;
}
.solar-preview {
    background: linear-gradient(180deg, #120300 0%, #ff3c00 100%);
    color: #ffb700;
    text-shadow: 0 0 5px #ff3c00;
}
.space-preview {
    background: linear-gradient(180deg, #01020a 0%, #8b5cf6 100%);
    color: #3b82f6;
    text-shadow: 0 0 5px #8b5cf6;
}
.shop-card-info {
    padding: 0.75rem;
    text-align: left;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.shop-card-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.shop-card-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}
.btn-buy-theme {
    width: 100%;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #ffffff;
    padding: 0.4rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
}
.btn-buy-theme:hover {
    background: #a855f7;
    border-color: #a855f7;
    box-shadow: 0 0 10px rgba(168,85,247,0.4);
}
.btn-buy-theme.unlocked {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: var(--neon-green) !important;
    cursor: pointer;
}
.btn-buy-theme.unlocked:hover {
    background: var(--neon-green) !important;
    color: white !important;
}
.btn-buy-theme.active-theme {
    background: var(--neon-green) !important;
    border-color: var(--neon-green) !important;
    color: white !important;
    cursor: default;
}

/* ---------------------------------- */
/* Video Chat Interaction Controls   */
/* ---------------------------------- */

.interaction-bar {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 8, 20, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.35rem;
    display: flex;
    gap: 0.4rem;
    z-index: 15;
}
.btn-interaction {
    background: transparent;
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.btn-interaction:hover {
    background: rgba(255,255,255,0.08);
}
.btn-super-match {
    background: rgba(168, 85, 247, 0.15);
    color: var(--neon-cyan);
    border: 1px solid rgba(168, 85, 247, 0.3);
}
.btn-super-match:hover {
    background: var(--primary-glow);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 10px rgba(168,85,247,0.4);
}
.btn-super-match.pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--neon-yellow);
    border-color: var(--neon-yellow);
}
.btn-super-match.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--neon-green);
    border-color: var(--neon-green);
}

.interaction-popover {
    position: absolute;
    top: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(13, 10, 28, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    z-index: 25;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.interaction-popover button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: white;
    font-size: 1.25rem;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}
.interaction-popover button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}
.soundboard-popover {
    flex-wrap: wrap;
    max-width: 250px;
    justify-content: center;
}
.soundboard-popover button {
    width: auto;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    height: 30px;
    font-weight: 700;
}

/* ---------------------------------- */
/* Floating Emoji Stream              */
/* ---------------------------------- */

.emoji-stream-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80%;
    pointer-events: none;
    overflow: hidden;
    z-index: 12;
}
.floating-emoji {
    position: absolute;
    bottom: -50px;
    font-size: 2.5rem;
    animation: floatUp 3s linear forwards;
    pointer-events: none;
}
@keyframes floatUp {
    0% {
        transform: translateY(0) translateX(0) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(-10%) translateX(var(--drift)) scale(1.2);
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-110%) translateX(calc(var(--drift) * 2)) scale(0.8);
        opacity: 0;
    }
}

/* ---------------------------------- */
/* Icebreaker Games Overlay           */
/* ---------------------------------- */

.icebreaker-game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 5, 15, 0.75);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    padding: 1rem;
}
.icebreaker-card {
    background: #15112c;
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
    border-radius: 16px;
    width: 100%;
    max-width: 320px;
    padding: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: modal-zoom 0.25s ease-out;
}
.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}
.game-card-header span {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--neon-cyan);
    letter-spacing: 0.05em;
}
.btn-close-game {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
}
.game-card-content {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
}
#gameCardText {
    font-size: 0.85rem;
    line-height: 1.4;
    font-weight: 500;
}
.game-card-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.btn-game-action {
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.btn-game-action.truth {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
}
.btn-game-action.truth:hover { background: var(--neon-cyan); color: black; }

.btn-game-action.dare {
    background: rgba(236, 72, 153, 0.15);
    border: 1px solid var(--neon-pink);
    color: var(--neon-pink);
}
.btn-game-action.dare:hover { background: var(--neon-pink); color: white; }

.btn-game-action.wyr {
    grid-column: span 2;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--neon-yellow);
    color: var(--neon-yellow);
}
.btn-game-action.wyr:hover { background: var(--neon-yellow); color: black; }

/* ---------------------------------- */
/* Neon Custom Theme Color Schemes     */
/* ---------------------------------- */

.theme-synthwave {
    --bg-dark: #120520;
    --bg-card: rgba(28, 10, 48, 0.65);
    --border-color: rgba(255, 113, 206, 0.2);
    --neon-cyan: #ff71ce;
    --neon-pink: #01cdfe;
    --primary-glow: linear-gradient(135deg, #ff71ce 0%, #05ffa1 100%);
    --text-primary: #fff2fc;
}

.theme-matrix {
    --bg-dark: #020803;
    --bg-card: rgba(6, 24, 10, 0.65);
    --border-color: rgba(0, 255, 65, 0.2);
    --neon-cyan: #00ff41;
    --neon-pink: #008f11;
    --primary-glow: linear-gradient(135deg, #00ff41 0%, #004b00 100%);
    --text-primary: #e6ffe6;
}

.theme-solar {
    --bg-dark: #140500;
    --bg-card: rgba(38, 12, 2, 0.65);
    --border-color: rgba(255, 90, 0, 0.2);
    --neon-cyan: #ff5100;
    --neon-pink: #ffb700;
    --primary-glow: linear-gradient(135deg, #ff5100 0%, #ffb700 100%);
    --text-primary: #fff5eb;
}

.theme-space {
    --bg-dark: #02020d;
    --bg-card: rgba(10, 12, 38, 0.65);
    --border-color: rgba(139, 92, 246, 0.2);
    --neon-cyan: #3b82f6;
    --neon-pink: #a855f7;
    --primary-glow: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --text-primary: #f0f5ff;
}

/* Video Popover Panel for Filters & Masks */
.video-popover {
    position: absolute;
    bottom: 4.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(13, 10, 28, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    z-index: 30;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    width: 200px;
}

.video-popover .panel-header {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--neon-cyan);
    margin-bottom: 0.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.25rem;
    text-align: center;
}

.video-popover button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
}

.video-popover button:hover, 
.video-popover button.active {
    background: var(--neon-cyan);
    color: black;
    font-weight: 700;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* Responsive utility classes and grid overrides */
.chat-container.mode-text {
    grid-template-columns: 1fr !important;
}

.chat-container.mode-video {
    grid-template-columns: 1fr;
}

@media (min-width: 992px) {
    .chat-container.mode-video {
        grid-template-columns: 550px 1fr;
    }
}

@media (max-width: 600px) {
    .btn-text {
        display: none;
    }
    .nickname-container span:first-child {
        display: none; /* Hide "Name:" */
    }
    .app-header {
        padding: 0 0.75rem;
    }
    .header-profile {
        gap: 0.5rem;
    }
    .brand-name-mini {
        display: none; /* Hide "StrangerChat" text to save space */
    }
}


