/* Global Styles */
:root {
    --primary-color: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #2563eb;
    --secondary-color: #2563eb;
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-hover: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    --background-color: #0a0a0a;
    --background-secondary: #111111;
    --background-tertiary: #1a1a1a;
    --text-color: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #666666;
    --error-color: #ef4444;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --border-color: #1e293b;
    --border-light: #334155;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-primary: rgba(59, 130, 246, 0.3);
    --modal-background: #111111;
    --input-background: var(--background-tertiary);
    --card-background: #111111;
    --hover-background: #1e293b;
}

/* Light Mode Theme */
[data-theme="light"] {
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary-color: #1d4ed8;
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-hover: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    --background-color: #f8fafc;
    --background-secondary: #ffffff;
    --background-tertiary: #f1f5f9;
    --text-color: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --error-color: #dc2626;
    --success-color: #16a34a;
    --warning-color: #d97706;
    --info-color: #2563eb;
    --border-color: #e2e8f0;
    --border-light: #cbd5e1;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-primary: rgba(37, 99, 235, 0.2);
    --modal-background: #ffffff;
    --input-background: #f1f5f9;
    --card-background: #ffffff;
    --hover-background: #f1f5f9;
}

/* System preference detection */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --primary-color: #2563eb;
        --primary-light: #3b82f6;
        --primary-dark: #1d4ed8;
        --secondary-color: #1d4ed8;
        --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        --gradient-hover: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
        --background-color: #f8fafc;
        --background-secondary: #ffffff;
        --background-tertiary: #f1f5f9;
        --text-color: #1e293b;
        --text-secondary: #475569;
        --text-muted: #94a3b8;
        --error-color: #dc2626;
        --success-color: #16a34a;
        --warning-color: #d97706;
        --info-color: #2563eb;
        --border-color: #e2e8f0;
        --border-light: #cbd5e1;
        --shadow-color: rgba(0, 0, 0, 0.1);
        --shadow-primary: rgba(37, 99, 235, 0.2);
        --modal-background: #ffffff;
        --input-background: #f1f5f9;
        --card-background: #ffffff;
        --hover-background: #f1f5f9;
    }
}

/* Light Mode Element Overrides */
[data-theme="light"] .site-footer,
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .site-footer {
        background-color: #f1f5f9;
        border-top: 1px solid #e2e8f0;
    }
}

[data-theme="light"] .site-footer {
    background-color: #f1f5f9;
    border-top: 1px solid #e2e8f0;
}

[data-theme="light"] .footer-links a {
    color: #64748b;
}

[data-theme="light"] .footer-copyright {
    color: #94a3b8;
}

[data-theme="light"] .video-box {
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .chat-panel {
    border: 1px solid #e2e8f0;
}

[data-theme="light"] .chat-input-container {
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
}

[data-theme="light"] .chat-input-container input::placeholder {
    color: #94a3b8;
}

[data-theme="light"] .logo {
    filter: brightness(0) saturate(100%) invert(23%) sepia(89%) saturate(1636%) hue-rotate(213deg) brightness(96%) contrast(91%);
}

[data-theme="light"] #overlayText {
    color: #64748b;
}

[data-theme="light"] .legal-modal .legal-content {
    background: #ffffff;
}

[data-theme="light"] header {
    border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .settings-btn {
    color: #64748b;
}

[data-theme="light"] .settings-btn:hover {
    color: var(--primary-color);
    background: #f1f5f9;
}

[data-theme="light"] .user-count {
    border-color: #cbd5e1;
    background: #ffffff;
}

/* Settings Modal - Light Theme */
[data-theme="light"] .settings-modal {
    background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
    border-color: #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .settings-header {
    border-bottom-color: #e2e8f0;
}

[data-theme="light"] .settings-header p {
    color: #64748b;
}

[data-theme="light"] .settings-close-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #64748b;
}

[data-theme="light"] .settings-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

[data-theme="light"] .settings-option-box {
    background: rgba(0, 0, 0, 0.03);
    border-color: #e2e8f0;
}

[data-theme="light"] .settings-option:hover .settings-option-box {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(37, 99, 235, 0.3);
}

[data-theme="light"] .settings-option input:checked + .settings-option-box {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary-color);
}

[data-theme="light"] .settings-option-label {
    color: #475569;
}

[data-theme="light"] .settings-section-title {
    color: #1e293b;
}

[data-theme="light"] .settings-privacy-section {
    background: rgba(0, 0, 0, 0.02);
    border-color: #e2e8f0;
}

[data-theme="light"] .settings-privacy-section p {
    color: #64748b;
}

[data-theme="light"] .settings-delete-btn {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
}

[data-theme="light"] .settings-delete-btn:hover {
    background: #dc2626;
    color: #ffffff;
}

/* System preference light mode overrides */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .footer-links a {
        color: #64748b;
    }
    :root:not([data-theme="dark"]) .footer-copyright {
        color: #94a3b8;
    }
    :root:not([data-theme="dark"]) .video-box {
        border: 1px solid #e2e8f0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }
    :root:not([data-theme="dark"]) .chat-panel {
        border: 1px solid #e2e8f0;
    }
    :root:not([data-theme="dark"]) .chat-input-container {
        background: #f1f5f9;
        border-top: 1px solid #e2e8f0;
    }
    :root:not([data-theme="dark"]) .chat-input-container input::placeholder {
        color: #94a3b8;
    }
    :root:not([data-theme="dark"]) .logo {
        filter: brightness(0) saturate(100%) invert(23%) sepia(89%) saturate(1636%) hue-rotate(213deg) brightness(96%) contrast(91%);
    }
    :root:not([data-theme="dark"]) #overlayText {
        color: #64748b;
    }
    :root:not([data-theme="dark"]) .legal-modal .legal-content {
        background: #ffffff;
    }
    :root:not([data-theme="dark"]) header {
        border-bottom: 1px solid #e2e8f0;
    }
    :root:not([data-theme="dark"]) .settings-btn {
        color: #64748b;
    }
    :root:not([data-theme="dark"]) .settings-btn:hover {
        color: var(--primary-color);
        background: #f1f5f9;
    }
    :root:not([data-theme="dark"]) .user-count {
        border-color: #cbd5e1;
        background: #ffffff;
    }
    /* Settings Modal */
    :root:not([data-theme="dark"]) .settings-modal {
        background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
        border-color: #e2e8f0;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    }
    :root:not([data-theme="dark"]) .settings-header {
        border-bottom-color: #e2e8f0;
    }
    :root:not([data-theme="dark"]) .settings-header p {
        color: #64748b;
    }
    :root:not([data-theme="dark"]) .settings-close-btn {
        background: rgba(0, 0, 0, 0.05);
        color: #64748b;
    }
    :root:not([data-theme="dark"]) .settings-close-btn:hover {
        background: rgba(0, 0, 0, 0.1);
        color: #1e293b;
    }
    :root:not([data-theme="dark"]) .settings-option-box {
        background: rgba(0, 0, 0, 0.03);
        border-color: #e2e8f0;
    }
    :root:not([data-theme="dark"]) .settings-option:hover .settings-option-box {
        background: rgba(0, 0, 0, 0.05);
        border-color: rgba(37, 99, 235, 0.3);
    }
    :root:not([data-theme="dark"]) .settings-option input:checked + .settings-option-box {
        background: rgba(37, 99, 235, 0.1);
        border-color: var(--primary-color);
    }
    :root:not([data-theme="dark"]) .settings-option-label {
        color: #475569;
    }
    :root:not([data-theme="dark"]) .settings-section-title {
        color: #1e293b;
    }
    :root:not([data-theme="dark"]) .settings-privacy-section {
        background: rgba(0, 0, 0, 0.02);
        border-color: #e2e8f0;
    }
    :root:not([data-theme="dark"]) .settings-privacy-section p {
        color: #64748b;
    }
    :root:not([data-theme="dark"]) .settings-delete-btn {
        background: rgba(220, 38, 38, 0.1);
        color: #dc2626;
        border-color: rgba(220, 38, 38, 0.2);
    }
    :root:not([data-theme="dark"]) .settings-delete-btn:hover {
        background: #dc2626;
        color: #ffffff;
    }
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

html {
    height: 100%;
    height: 100dvh;
    height: -webkit-fill-available;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    height: 100%;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    touch-action: manipulation;
}

/* Container Styles */
.container {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Header Styles */
header {
    background-color: var(--background-color);
    padding: 0.75rem 1rem;
    border-bottom: none;
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
}

.nav-items {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-right: 1rem;
}

.user-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    transition: all 0.2s ease;
}

.user-count::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 6px #22c55e;
}

.user-count:hover {
    border-color: var(--primary-color);
}

#onlineUsers {
    color: var(--primary-color);
    font-weight: 600;
}

/* User Coins Display */
.user-coins {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #ffc107;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 20px;
    transition: all 0.2s ease;
    font-weight: 600;
}

.user-coins i {
    font-size: 0.9rem;
}

.user-coins:hover {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.15);
}

/* Points earned animation - pulse effect on coins container */
@keyframes coinsPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

.user-coins.coins-pulse {
    animation: coinsPulse 0.6s ease;
}

/* Floating +amount indicator */
.coins-earned-floater {
    position: fixed;
    color: #4caf50;
    font-weight: 700;
    font-size: 1rem;
    pointer-events: none;
    z-index: 10002;
    opacity: 0;
    transform: translateX(-50%) translateY(0);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: opacity 0.2s ease, transform 1.2s ease;
}

.coins-earned-floater.animate {
    opacity: 1;
    transform: translateX(-50%) translateY(-40px);
}

/* Daily bonus toast */
.daily-bonus-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #000;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.4);
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.daily-bonus-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.daily-bonus-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.daily-bonus-toast i {
    font-size: 1.5rem;
    color: #000;
}

.daily-bonus-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.daily-bonus-text strong {
    font-size: 0.9rem;
}

.daily-bonus-text span {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Admin Alert Toast (similar to daily bonus but with button) */
.admin-alert-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #000;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.4);
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.admin-alert-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.admin-alert-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.admin-alert-toast i {
    font-size: 1.5rem;
    color: #000;
    margin-top: 2px;
}

.admin-alert-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-alert-text strong {
    font-size: 1rem;
    font-weight: 700;
}

.admin-alert-text span {
    font-size: 0.9rem;
    opacity: 0.9;
}

.admin-alert-btn {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: #000;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s ease;
    align-self: flex-end;
}

.admin-alert-btn:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Header Upgrade Button */
.upgrade-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.upgrade-btn:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.upgrade-btn i {
    font-size: 0.9rem;
}

.upgrade-btn.hidden {
    display: none;
}

.settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: #888;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.settings-btn:hover {
    color: var(--primary-color);
}

/* Mobile Upgrade Button - Only visible on mobile */
.mobile-upgrade-btn {
    display: none;
    position: fixed;
    top: 12px;
    right: 64px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

.mobile-upgrade-btn:hover,
.mobile-upgrade-btn:active {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: scale(1.05);
}

.mobile-upgrade-btn.hidden {
    display: none !important;
}

/* Mobile Settings Button - Only visible on mobile */
.mobile-settings-btn {
    display: none;
    position: fixed;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.mobile-settings-btn:hover,
.mobile-settings-btn:active {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .mobile-upgrade-btn {
        display: flex;
    }
    .mobile-upgrade-btn.hidden {
        display: none !important;
    }
    .mobile-settings-btn {
        display: flex;
    }
}

/* Pull to Refresh - Mobile only */
.pull-to-refresh {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.9) 0%, rgba(59, 130, 246, 0.7) 100%);
    z-index: 100;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    font-size: 14px;
    transition: height 0.2s ease-out;
    border-radius: 0 0 12px 12px;
}

.pull-to-refresh.active {
    display: flex;
}

.pull-to-refresh.pulling {
    height: var(--pull-height, 0px);
}

.pull-to-refresh.refreshing {
    height: 50px;
}

.ptr-spinner {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.pull-to-refresh.pulling .ptr-spinner {
    transform: rotate(calc(var(--pull-progress, 0) * 180deg));
}

.pull-to-refresh.refreshing .ptr-spinner {
    animation: ptr-spin 0.8s linear infinite;
}

.ptr-text {
    font-weight: 500;
}

.pull-to-refresh.refreshing .ptr-text::after {
    content: "Finding new match...";
}

.pull-to-refresh.refreshing .ptr-text {
    font-size: 0;
}

.pull-to-refresh.refreshing .ptr-text::after {
    font-size: 14px;
}

@keyframes ptr-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .pull-to-refresh {
        display: none;
    }
    .pull-to-refresh.active {
        display: flex;
    }
}

/* Like Animation Overlay */
.like-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.like-animation-overlay.active {
    opacity: 1;
}

.like-heart {
    font-size: 120px;
    color: #ff4757;
    text-shadow: 0 0 40px rgba(255, 71, 87, 0.6);
    transform: scale(0);
    animation: none;
}

.like-animation-overlay.active .like-heart {
    animation: heartBeat 0.8s ease-out forwards;
}

@keyframes heartBeat {
    0% {
        transform: scale(0) rotate(-10deg);
        opacity: 0;
    }
    30% {
        transform: scale(1.3) rotate(5deg);
        opacity: 1;
    }
    50% {
        transform: scale(0.9) rotate(-5deg);
    }
    70% {
        transform: scale(1.1) rotate(2deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0;
    }
}

/* Mutual Like Modal */
.mutual-like-modal {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #ff4757;
    max-width: 400px;
}

.mutual-like-hearts {
    font-size: 48px;
    color: #ff4757;
    margin-bottom: 20px;
    position: relative;
    height: 60px;
}

.mutual-like-hearts .heart-left,
.mutual-like-hearts .heart-right {
    position: absolute;
    animation: heartPulse 1.2s ease-in-out infinite;
}

.mutual-like-hearts .heart-left {
    left: calc(50% - 50px);
    animation-delay: 0s;
}

.mutual-like-hearts .heart-right {
    right: calc(50% - 50px);
    animation-delay: 0.3s;
}

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

.mutual-like-modal h2 {
    font-size: 28px;
    color: #ff4757;
    margin-bottom: 12px;
    text-shadow: 0 0 20px rgba(255, 71, 87, 0.4);
}

.mutual-like-modal p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 24px;
}

.mutual-like-modal .modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mutual-like-modal .primary-btn {
    background: linear-gradient(135deg, #ff4757 0%, #ff6b7a 100%);
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.mutual-like-modal .primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 71, 87, 0.4);
}

.mutual-like-modal .secondary-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    font-size: 14px;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.mutual-like-modal .secondary-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-color);
}

/* Swipe hint badge (shown to premium users) */
.swipe-like-hint {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 71, 87, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: none;
    gap: 6px;
    align-items: center;
    z-index: 10;
    animation: fadeInOut 3s ease-in-out;
}

.swipe-like-hint.visible {
    display: flex;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    15% { opacity: 1; transform: translateY(0); }
    85% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* Peer liked indicator */
.peer-liked-indicator {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 71, 87, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    gap: 8px;
    align-items: center;
    z-index: 10;
    animation: slideUp 0.3s ease-out;
}

.peer-liked-indicator.visible {
    display: flex;
}

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

/* Premium toast for like feature */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.premium-toast button {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: #1a1a1a;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 8px;
    transition: background 0.2s;
}

.premium-toast button:hover {
    background: rgba(0, 0, 0, 0.3);
}

.settings-icon {
    font-size: 1.25rem;
}

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

.logo {
    height: 80px;
    width: auto;
}

/* Main Container */
.main-container {
    width: 100%;
    height: calc(100vh - 64px);
    margin: 0;
    padding: 0 0 2rem 0;
    overflow: hidden;
}

.chat-container {
    display: flex;
    flex-direction: row;
    height: calc(100% - 1rem);
    width: 100%;
    background: var(--background-color);
    padding: 1rem;
    gap: 1rem;
    overflow: hidden;
}

.video-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    gap: 0.5rem;
}

.video-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    background: transparent;
    padding: 0;
    overflow: hidden;
}

.video-box {
    position: relative;
    background: var(--background-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: none;
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.video-box video {
    outline: none;
    border: none;
}


/* Remote video takes full space */
#remoteVideoContainer {
    flex: 1;
    min-height: 0;
}

/* Local video as picture-in-picture overlay */
#localVideoContainer {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 200px;
    height: 150px;
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

#localVideoContainer:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

/* Side-by-side mode - both videos full size next to each other */
.video-wrapper.stacked {
    flex-direction: row;
    gap: 0.75rem;
}

.video-wrapper.stacked #remoteVideoContainer {
    flex: 1;
}

.video-wrapper.stacked #localVideoContainer {
    position: relative;
    bottom: auto;
    right: auto;
    width: auto;
    height: 100%;
    flex: 1;
    cursor: pointer;
}

.video-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--background-secondary);
    transform: scaleX(-1); /* Mirror the video */
}

.watermark {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    opacity: 0.5;
    z-index: 5;
    pointer-events: none; /* Prevent watermark from blocking video interactions */
    transition: opacity 0.3s ease;
}

.watermark img {
    height: auto;
    width: 200px;
    transition: width 0.3s ease;
}

/* Report Button */
.report-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(220, 53, 69, 0.8);
    border: none;
    color: white;
    cursor: pointer;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

/* Show report button only during active chat */
.chat-active .report-btn {
    display: flex;
}

.report-btn:hover {
    background-color: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.report-btn i {
    font-size: 1.2rem;
}


/* Report button reporting state */
.report-btn.reporting {
    background-color: rgba(255, 193, 7, 0.9);
    pointer-events: none;
    animation: pulse-report 1s infinite;
}

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

/* Report Modal Styles */
#reportModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

#reportModal.active {
    display: flex;
}

#reportModal .report-modal {
    background-color: var(--background-secondary);
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid #1e293b;
}

#reportModal .report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-radius: 12px 12px 0 0;
}

#reportModal .report-header h2 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

#reportModal .report-header h2 i {
    font-size: 1.1rem;
}

#reportModal .close-modal-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#reportModal .close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

#reportModal .modal-body {
    padding: 20px 24px;
}

.report-intro {
    color: #888;
    font-size: 0.9rem;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* Report Screenshots */
.report-screenshots {
    margin-bottom: 20px;
}

.report-screenshots.compact {
    margin-bottom: 16px;
}

.screenshot-pair {
    display: flex;
    gap: 12px;
}

.screenshot-box {
    flex: 1;
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
}

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

.screenshot-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--text-color);
    font-size: 0.75rem;
    font-weight: 500;
}

.screenshot-box.local {
    border: 2px solid var(--primary-color);
}

.report-screenshots.compact .screenshot-box {
    aspect-ratio: 4/3;
    max-height: 80px;
}

.report-screenshots.compact .screenshot-label {
    display: none;
}

.screenshots-label {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    margin-top: 8px;
}

.screenshots-label i {
    margin-right: 4px;
}

/* Report User Info */
.report-user-info {
    display: flex;
    gap: 20px;
    padding: 16px;
    background: #0f172a;
    border-radius: 8px;
    margin-bottom: 16px;
}

.user-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 0.9rem;
}

.user-info-item i {
    color: #666;
}

/* Switch to Advanced Button */
.text-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}

.text-btn:hover {
    opacity: 0.8;
}

/* Submit & Skip Button */
.submit-skip {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

.submit-skip:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71d2a 100%) !important;
}

/* Report Categories */
.report-categories {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.report-category-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-label.severe {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.category-label.moderate {
    background: rgba(255, 149, 0, 0.15);
    color: #ff9500;
}

.category-label.minor {
    background: rgba(90, 200, 250, 0.15);
    color: #5ac8fa;
}

/* Report Options */
#reportModal .report-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 2px solid #1e293b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #0f172a;
}

#reportModal .report-option:hover {
    background-color: #1e293b;
    border-color: #444;
}

#reportModal .report-option.selected,
#reportModal .report-option:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

#reportModal .report-option.severe:has(input:checked) {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

#reportModal .report-option.moderate:has(input:checked) {
    border-color: #ff9500;
    background: rgba(255, 149, 0, 0.1);
}

#reportModal .report-option input[type="radio"] {
    display: none;
}

#reportModal .report-option label {
    margin: 0;
    cursor: pointer;
    flex: 1;
    color: var(--text-color);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

#reportModal .report-option label > i {
    font-size: 1.1rem;
    color: #666;
    width: 20px;
    text-align: center;
    margin-top: 2px;
}

#reportModal .report-option:has(input:checked) label > i {
    color: var(--primary-color);
}

#reportModal .report-option.severe:has(input:checked) label > i {
    color: #dc3545;
}

#reportModal .report-option.moderate:has(input:checked) label > i {
    color: #ff9500;
}

.option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.option-text strong {
    font-size: 0.95rem;
    font-weight: 600;
}

.option-text small {
    font-size: 0.8rem;
    color: #888;
    font-weight: normal;
}

/* Report Details Section */
.report-details-section {
    margin-top: 20px;
}

.report-details-section label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 8px;
}

.report-details-section label i {
    color: #666;
}

.optional {
    font-size: 0.8rem;
    color: #666;
    font-weight: normal;
}

#reportModal #reportDetails {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #1e293b;
    border-radius: 8px;
    resize: vertical;
    background: #0f172a;
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.5;
    box-sizing: border-box;
}

#reportModal #reportDetails::placeholder {
    color: #555;
}

#reportModal #reportDetails:focus {
    outline: none;
    border-color: var(--primary-color);
}

.report-details-section .char-count {
    text-align: right;
    font-size: 0.75rem;
    color: #555;
    margin-top: 4px;
}

/* Evidence Section */
.report-evidence-section {
    margin-top: 20px;
    padding: 16px;
    background: #0f172a;
    border-radius: 8px;
    border: 1px solid #1e293b;
}

.evidence-header {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.evidence-header i {
    color: #666;
}

.evidence-actions {
    display: flex;
    gap: 10px;
}

.evidence-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.evidence-btn:hover {
    background: #1e293b;
    border-color: var(--primary-color);
}

.evidence-btn i {
    font-size: 0.9rem;
}

.screenshot-preview {
    position: relative;
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #334155;
}

.screenshot-preview img {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    display: block;
}

.remove-screenshot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(220, 53, 69, 0.9);
    border: none;
    border-radius: 50%;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.remove-screenshot:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* Modal Actions */
#reportModal .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 24px;
    border-top: 1px solid #1e293b;
}

#reportModal .modal-actions button {
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

#reportModal .modal-actions button.cancel {
    background-color: transparent;
    border: 1px solid #334155;
    color: #888;
}

#reportModal .modal-actions button.cancel:hover {
    border-color: #555;
    color: var(--text-color);
}

#reportModal .modal-actions button.submit {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    color: white;
}

#reportModal .modal-actions button.submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

#reportModal .modal-actions button.submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Report Success View */
.report-success {
    padding: 40px 24px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(52, 199, 89, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-icon i {
    font-size: 2.5rem;
    color: #34c759;
}

.report-success h3 {
    margin: 0 0 12px 0;
    color: var(--text-color);
    font-size: 1.5rem;
}

.report-success p {
    color: #888;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.report-note {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.85rem !important;
    color: #ccc !important;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
}

.report-note i {
    color: var(--primary-color);
    margin-top: 2px;
}

.report-success .primary-btn {
    margin-top: 24px;
    padding: 12px 32px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px var(--shadow-primary);
}

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

.success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.report-success .secondary-btn {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #888;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-success .secondary-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--text-color);
}

/* Report Modal Responsive */
@media (max-width: 480px) {
    #reportModal .report-modal {
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
        margin-top: auto;
    }

    #reportModal .modal-body {
        padding: 16px 20px;
    }

    #reportModal .modal-actions {
        padding: 12px 20px 20px;
        flex-direction: column-reverse;
    }

    #reportModal .modal-actions button {
        width: 100%;
        justify-content: center;
    }

    .report-option label {
        flex-direction: column;
        gap: 4px;
    }

    .report-option label > i {
        display: none;
    }
}

/* Hover effect to make watermark less visible */
#remoteVideoContainer:hover .watermark {
    opacity: 0.3;
}

.video-controls {
    flex: none; /* Prevent flex growth */
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--background-secondary);
    border-top: 1px solid var(--border-color);
}

/* On desktop, show Snap + Rewind only (newChatBtn handles Start/Skip) */
@media (min-width: 769px) {
    .video-controls {
        align-items: center;
        justify-content: center;
        padding: 0.5rem 1rem;
        background: transparent;
        border-top: none;
    }
    .video-controls > .action-btn {
        display: none;
    }
    .video-controls .snap-mode-container {
        margin-left: 0;
    }
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.action-btn {
    flex: 1;
    height: 40px;
    border-radius: 20px;
    background: var(--gradient-primary);
    border: none;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--shadow-primary);
}

.action-btn:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-primary);
}

.action-btn.stop-btn {
    background: #e74c3c;
    color: var(--text-color);
}

.action-btn.stop-btn:hover {
    background: #c0392b;
}

.chat-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--background-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Hide the chat header on desktop */
.chat-header {
    display: none;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
    background: var(--background-secondary);
}

.chat-input-container {
    position: relative;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.chat-input-container:not(.active) {
    background: rgba(0, 0, 0, 0.5);
}

.chat-input-container:not(.active) input {
    background: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
    color: rgba(255, 255, 255, 0.5);
}

.chat-input-container:not(.active) input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Only grey out the send button when not active, keep action buttons visible */
.chat-input-container:not(.active) .send-btn {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-input-container input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.chat-input-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
}

.chat-input-container button {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-input-container button:hover:not(:disabled) {
    background: var(--secondary-color);
}

.chat-input-container button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.shortcut {
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: normal;
}

@media (max-width: 1400px) {
    .watermark {
        bottom: 0.75rem;
        left: 0.75rem;
    }

    .watermark img {
        width: 120px;
    }
}

@media (max-width: 1100px) {
    .watermark img {
        width: 100px;
    }
}

@media (max-width: 768px) {
    /* Hide header on tablet/mobile */
    header {
        display: none !important;
    }

    .main-container {
        height: 100vh;
        height: 100dvh;
        padding: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .chat-container {
        height: 100%;
        flex-direction: column;
        padding: 0;
        gap: 0;
        overflow: hidden;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .video-section {
        width: 100%;
        min-width: 0;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
        background: #000;
    }

    .video-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 0;
        gap: 0;
        display: flex;
        flex-direction: column;
    }

    /* Remote video - top 55% */
    #remoteVideoContainer {
        position: relative;
        width: 100%;
        height: 55% !important;
        min-height: 0;
        border-radius: 0;
        flex-shrink: 0;
        border: none;
        margin: 0;
    }

    /* Local video - bottom 45% */
    #localVideoContainer {
        position: relative;
        width: 100%;
        height: 45% !important;
        min-height: 0;
        border-radius: 0;
        flex-shrink: 0;
        border: none;
        margin: 0;
        z-index: 10;
    }

    .video-box {
        min-height: 0;
        border-radius: 0;
        border: none;
    }

    .video-box video {
        border: none;
        outline: none;
    }

    /* Swipe to skip hint */
    #remoteVideoContainer {
        will-change: transform, opacity;
    }

    .swipe-hint {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(0, 0, 0, 0.8);
        color: #fff;
        padding: 12px 20px;
        border-radius: 24px;
        font-size: 14px;
        display: flex;
        align-items: center;
        gap: 8px;
        opacity: 0;
        pointer-events: none;
        z-index: 100;
        animation: swipeHintFade 3s ease-out forwards;
    }

    .swipe-hint i {
        animation: swipeArrow 1s ease-in-out infinite;
    }

    .swipe-hint-row {
        display: flex;
        align-items: center;
        gap: 24px;
    }

    .swipe-hint .swipe-left,
    .swipe-hint .swipe-right {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .swipe-hint .swipe-left {
        color: #94a3b8;
    }

    .swipe-hint .swipe-left i {
        animation: swipeArrowLeft 1s ease-in-out infinite;
    }

    .swipe-hint .swipe-right {
        color: #ff6b7a;
    }

    .swipe-hint .swipe-right .fa-heart {
        animation: heartPulse 1s ease-in-out infinite;
    }

    .swipe-hint .swipe-right .fa-arrow-right {
        animation: swipeArrowRight 1s ease-in-out infinite;
    }

    @keyframes swipeHintFade {
        0% { opacity: 0; }
        10% { opacity: 1; }
        80% { opacity: 1; }
        100% { opacity: 0; }
    }

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

    @keyframes swipeArrowLeft {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(-4px); }
    }

    @keyframes swipeArrowRight {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(4px); }
    }

    /* Chat section overlays on local video */
    .chat-section {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        top: 55%;
        height: auto;
        min-height: 0;
        background: transparent;
        border-radius: 0;
        z-index: 20;
        display: flex;
        flex-direction: column;
        pointer-events: none;
    }

    .chat-header {
        display: none !important;
    }

    .chat-messages {
        flex: 1;
        background: transparent;
        pointer-events: none;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding: 0.75rem;
        padding-bottom: 0.5rem;
    }

    .chat-messages .message {
        pointer-events: auto;
    }

    /* Chat input at bottom with high z-index */
    .chat-input-container {
        background: rgba(0, 0, 0, 0.95);
        pointer-events: auto;
        padding: 0.5rem 1rem;
        z-index: 100;
        position: relative;
    }

    .chat-input {
        border-radius: 25px;
        border: none;
        background: rgba(255, 255, 255, 0.12);
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }

    .chat-input:focus {
        background: rgba(255, 255, 255, 0.18);
    }

    /* Video controls - centered between remote and local videos */
    .video-controls {
        position: fixed;
        top: 55%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        justify-content: center;
        padding: 0;
        background: transparent;
        border: none;
        z-index: 30;
    }

    .action-btn {
        padding: 0.75rem 2rem;
        font-size: 0.9rem;
        font-weight: 600;
        border-radius: 25px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
        min-width: 100px;
        width: auto;
        backdrop-filter: blur(4px);
    }

    .chat-empty {
        display: none !important;
    }

    .watermark {
        top: 0.5rem;
        left: 0.5rem;
        bottom: auto;
    }

    .watermark img {
        width: 80px;
        opacity: 0.7;
    }

    .logo {
        height: 60px;
    }

    footer {
        display: none !important;
    }
}

@media (max-width: 480px) {
    /* Hide header on mobile */
    header {
        display: none !important;
    }

    /* Full screen main container */
    .main-container {
        height: 100vh;
        height: 100dvh;
        padding: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .chat-container {
        height: 100%;
        padding: 0;
        gap: 0;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .video-section {
        height: 100%;
        width: 100%;
        min-height: 0;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
        background: #000;
    }

    .video-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 0;
        gap: 0;
        display: flex;
        flex-direction: column;
    }

    /* Remote video - top 55% */
    #remoteVideoContainer {
        position: relative;
        width: 100%;
        height: 55% !important;
        min-height: 0;
        border-radius: 0;
        flex-shrink: 0;
        border: none;
        margin: 0;
    }

    /* Local video - bottom 45% */
    #localVideoContainer {
        position: relative;
        width: 100%;
        height: 45% !important;
        min-height: 0;
        border-radius: 0;
        flex-shrink: 0;
        border: none;
        margin: 0;
        z-index: 10;
    }

    .video-box {
        border-radius: 0;
        border: none;
    }

    .video-box video {
        border: none;
        outline: none;
    }

    /* Local video controls - vertical stack on left side, ABOVE chat overlay */
    #localVideoContainer .local-controls {
        left: 0.5rem !important;
        top: 50% !important;
        bottom: auto !important;
        right: auto !important;
        transform: translateY(-50%) !important;
        flex-direction: column !important;
        z-index: 200 !important;
        pointer-events: auto !important;
        background: rgba(0, 0, 0, 0.5) !important;
        padding: 0.4rem !important;
        border-radius: 20px !important;
        gap: 0.4rem !important;
        position: fixed !important;
        left: 0.5rem !important;
        top: calc(55% + ((45% - 50px) / 2)) !important;
    }

    #localVideoContainer .local-controls .control-btn {
        width: 34px !important;
        height: 34px !important;
        pointer-events: auto !important;
        cursor: pointer;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent;
    }

    #localVideoContainer .local-controls .control-btn i {
        font-size: 0.85rem !important;
        pointer-events: none;
    }

    /* Prevent zoom on local video container */
    #localVideoContainer {
        touch-action: manipulation !important;
    }

    #localVideoContainer video {
        touch-action: manipulation !important;
    }

    /* Ensure local video is full width */
    #localVideoContainer {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }

    /* Chat section overlays on local video */
    .chat-section {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        top: 55%;
        height: auto;
        min-height: 0;
        background: transparent;
        border-radius: 0;
        z-index: 20;
        display: flex;
        flex-direction: column;
        pointer-events: none;
    }

    /* Hide chat header on mobile */
    .chat-header {
        display: none !important;
    }

    /* Messages overlay with transparent background */
    .chat-messages {
        flex: 1;
        padding: 0.75rem;
        padding-bottom: 0.5rem;
        overflow-y: auto;
        background: transparent;
        pointer-events: none;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }

    .chat-messages .message {
        pointer-events: auto;
    }

    /* Compact text-only messages for mobile */
    .chat-messages .message {
        background: none;
        backdrop-filter: none;
        max-width: 100%;
        margin-bottom: 0.15rem;
        padding: 0;
        border-radius: 0;
        align-self: flex-start;
    }

    .chat-messages .message.sent {
        background: none;
        align-self: flex-start;
    }

    .chat-messages .message .message-text {
        background: none;
        padding: 0;
        border-radius: 0;
        color: rgba(200, 200, 200, 0.9);
        font-size: 0.85rem;
        line-height: 1.3;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    }

    /* White message text for both You and Stranger on mobile */
    .chat-messages .message.sent .message-text {
        background: none;
        color: var(--text-color);
    }

    .chat-messages .message.received .message-text {
        color: var(--text-color);
    }

    /* You: label is grey, Stranger: label is orange */
    .chat-messages .message.sent .message-text::before {
        color: rgba(200, 200, 200, 0.9);
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    }

    .chat-messages .message.received .message-text::before {
        color: var(--primary-color);
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    }

    .chat-messages .message .message-time {
        display: none;
    }

    .chat-messages .message.system {
        align-self: flex-start;
    }

    .chat-messages .message.system .message-text {
        background: none;
        color: rgba(150, 150, 150, 0.8);
        font-size: 0.75rem;
        padding: 0;
    }

    /* Chat input at bottom with high z-index */
    .chat-input-container {
        padding: 0.5rem 1rem;
        background: rgba(0, 0, 0, 0.95);
        pointer-events: auto;
        border-top: none;
        z-index: 100;
        position: relative;
        flex-wrap: nowrap !important;
        overflow: visible !important;
    }

    .chat-input {
        padding: 0.65rem 1rem;
        font-size: 16px;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        border-radius: 20px;
        flex: 1;
        min-width: 0;
    }

    .chat-input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    /* Show send button on mobile */
    .send-btn {
        display: flex !important;
        flex-shrink: 0 !important;
        min-width: auto !important;
        width: auto !important;
        height: 36px !important;
        padding: 4px 14px !important;
        border-radius: 18px !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .send-btn .btn-shortcut {
        display: none !important;
    }

    .send-btn .btn-label {
        font-size: 0.9rem !important;
    }

    /* Hide new button on mobile */
    .new-btn {
        display: none !important;
    }

    /* Position report button at same level as Start/Skip/Stop buttons */
    .report-btn {
        position: fixed !important;
        top: calc(55% - 45px) !important;
        bottom: auto !important;
        right: 12px !important;
        z-index: 35 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
        border-radius: 50%;
    }

    /* Show report button when chat is active on mobile */
    .chat-active .report-btn {
        display: flex !important;
    }


    /* Video controls - glassmorphic floating dock */
    .video-controls {
        position: fixed;
        top: 55%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.625rem;
        padding: 0.5rem 0.75rem;
        background: rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 28px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
        z-index: 30;
    }

    .action-btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.8rem;
        border-radius: 18px;
        height: 38px;
        font-weight: 700;
        box-shadow: 0 2px 12px rgba(59, 130, 246, 0.4);
        min-width: auto;
        width: auto;
    }

    .snap-mode-container {
        margin-left: 0;
        border-left: 1px solid rgba(255, 255, 255, 0.15);
        padding-left: 0.5rem;
    }

    .snap-toggle-slider {
        width: 30px;
        height: 16px;
        border-radius: 8px;
    }

    .snap-toggle-slider::after {
        width: 12px;
        height: 12px;
    }

    .snap-toggle input:checked + .snap-toggle-slider::after {
        transform: translateX(14px);
    }

    .snap-toggle-label {
        font-size: 0.7rem;
    }

    .rewind-btn {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
        background: linear-gradient(135deg, rgba(124, 58, 237, 0.7), rgba(168, 85, 247, 0.7));
    }

    /* Hide empty chat state on mobile */
    .chat-empty {
        display: none !important;
    }

    /* Watermark on remote video */
    .watermark {
        bottom: 0.5rem;
        left: 0.5rem;
        top: auto;
        z-index: 10;
    }

    .watermark img {
        width: 100px;
    }

    .logo {
        height: 50px;
    }

    /* Hide footer on mobile */
    footer {
        display: none !important;
    }
}

/* Action Button States */
.loading-btn {
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    border: none;
    color: var(--text-color);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    min-width: 140px;
    justify-content: center;
}

.loading-btn.finding {
    background-color: var(--background-color);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.loading-btn.finding .btn-text::after {
    content: '';
    display: inline-block;
    width: 12px;
    margin-left: 4px;
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

.loading-btn.next {
    background-color: var(--secondary-color);
}

.key-hint {
    padding: 0.2rem 0.5rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Gender Preferences Box */
.gender-preferences-box {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--primary-color);
    min-width: 300px;
}

.gender-preferences-box .form-group {
    margin-bottom: 1rem;
}

.gender-preferences-box label {
    display: block;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.gender-preferences-box .gender-options {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.gender-preferences-box .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.9rem;
}

.gender-preferences-box .btn.active {
    background-color: var(--primary-color);
    color: var(--background-color);
}

.gender-preferences-box #startChat {
    width: 100%;
    margin-top: 1rem;
}

/* Status Messages */
.status-message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
}

.error-message {
    background-color: var(--error-color);
    color: white;
}

.success-message {
    background-color: var(--success-color);
    color: white;
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

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

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--background-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    max-width: 400px;
    width: 90%;
    position: relative;
    margin: auto;
    overflow: hidden;
}

.modal-content.age-verify {
    background-color: #000;
    text-align: center;
}

.age-verify .modal-header {
    background-color: #000;
    padding: 2rem;
    border-bottom: none;
    margin-bottom: 0;
}

.age-verify .modal-logo {
    height: 60px;
    width: auto;
}

.age-verify .modal-body {
    padding: 0 2rem 2rem;
}

.age-verify h2 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
    color: var(--primary-color);
}

.age-verify p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.age-verify .date-selection {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.age-verify .year-select {
    width: 100px;
}

.age-verify #currentYearFields {
    display: flex;
    gap: 0.5rem;
}

.age-verify #currentYearFields.hidden {
    display: none;
}

.age-verify .form-control {
    background-color: var(--background-secondary);
    border: 1px solid #334155;
    padding: 0.75rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100px;
}

.age-verify .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

.age-verify .primary-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    background: var(--gradient-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px var(--shadow-primary);
}

.age-verify .primary-btn:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-primary);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.ml-1 { margin-left: 1rem; }
.mr-1 { margin-right: 1rem; }

/* Date Selection Styles */
.date-selection {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.date-selection select {
    flex: 1;
    min-width: 100px;
}

.date-selection .year-select {
    flex: 0 0 auto;
    width: auto;
    min-width: 80px;
}

.date-selection #currentYearFields {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.date-selection #currentYearFields.hidden {
    display: none;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Age Confirmation Checkbox */
.age-confirmation {
    margin: 2rem 0;
    text-align: left;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    position: relative;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    flex-shrink: 0;
    height: 24px;
    width: 24px;
    background-color: var(--background-secondary);
    border: 2px solid #334155;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox-container:hover .checkmark {
    border-color: var(--primary-color);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid black;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.terms-text {
    font-size: 0.9rem;
    color: #999;
    line-height: 1.4;
}

.terms-link {
    color: var(--primary-color);
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}

/* Preferences Modal */
.modal-content.preferences {
    background-color: var(--background-secondary);
    max-width: 500px;
}

.preferences .modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.preferences .modal-header h2 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.5rem;
}

.preferences .modal-body {
    padding: 1.5rem;
}

.preference-section {
    margin-bottom: 1.5rem;
    text-align: left;
}

.preference-section:last-child {
    margin-bottom: 0.75rem;
}

.preference-section h3 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preference-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: #0f172a;
    padding: 1rem;
    border-radius: 8px;
}

/* Radio Buttons */
.radio-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.radio-container:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-custom {
    height: 20px;
    width: 20px;
    background-color: var(--background-secondary);
    border: 2px solid #334155;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: relative;
}

.radio-container:hover .radio-custom {
    border-color: var(--primary-color);
}

.radio-container input:checked ~ .radio-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.radio-custom:after {
    content: "";
    position: absolute;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #000;
}

.radio-container input:checked ~ .radio-custom:after {
    display: block;
}

/* Disabled Button State */
.btn.primary-btn:disabled {
    background-color: #334155;
    cursor: not-allowed;
    opacity: 0.7;
}

.preferences #startChatBtn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.75rem;
}

.preferences #startChatBtn:hover {
    background-color: var(--secondary-color);
}

.preferences #startChatBtn:disabled {
    background-color: #334155;
    cursor: not-allowed;
    opacity: 0.7;
}

.local-controls {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.local-controls .control-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.local-controls .control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.local-controls .control-btn.active {
    background: var(--primary-color);
    color: var(--text-color);
}

.local-controls .control-btn.muted {
    background: #ff4444;
    color: var(--text-color);
}

/* Update icon sizes */
.local-controls .control-btn i {
    font-size: 1rem;
}

/* Compact local controls in PIP mode (small overlay) */
.video-wrapper:not(.stacked) #localVideoContainer .local-controls {
    top: 4px;
    left: 4px;
    transform: none;
    padding: 4px;
    gap: 4px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 12px;
}

.video-wrapper:not(.stacked) #localVideoContainer .local-controls .control-btn {
    width: 28px;
    height: 28px;
}

.video-wrapper:not(.stacked) #localVideoContainer .local-controls .control-btn i {
    font-size: 0.75rem;
}

/* Normal controls in side-by-side mode */
.video-wrapper.stacked #localVideoContainer .local-controls {
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
}

/* Mobile local-controls styling moved to main 480px media query */

.device-select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.device-select:hover {
    background: rgba(255, 255, 255, 0.15);
}

.device-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.preview-container {
    width: 100%;
    height: 200px;
    background: var(--background-secondary);
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.preview-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--background-secondary);
}

#deviceSelectionModal .modal-content {
    max-width: 500px;
    background: var(--background-secondary);
}

#deviceSelectionModal .modal-body {
    padding: 1.5rem;
}

#deviceSelectionModal .form-group {
    margin-bottom: 1rem;
}

#deviceSelectionModal label {
    display: block;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

#deviceSelectionModal .primary-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#deviceSelectionModal .primary-btn:hover {
    background: var(--secondary-color);
}

/* Settings Modal */
.settings-modal {
    background: linear-gradient(145deg, #0f172a 0%, #020617 100%);
    max-width: 340px;
    width: 90%;
    max-height: 90vh;
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
}

.settings-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    font-size: 0.8rem;
}

.settings-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    transform: rotate(90deg);
}

.settings-header {
    text-align: center;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.settings-icon-large {
    font-size: 28px;
    margin-bottom: 6px;
    filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.3));
}

.settings-header h2 {
    margin: 0 0 4px 0;
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.settings-header p {
    margin: 0;
    color: #888;
    font-size: 0.75rem;
}

.settings-body {
    padding: 12px 16px 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.settings-section {
    margin-bottom: 12px;
}

.settings-section:last-of-type {
    margin-bottom: 16px;
}

.settings-section-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.settings-section-icon {
    font-size: 0.9rem;
}

.settings-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
}

.settings-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.settings-option {
    cursor: pointer;
}

.settings-option input {
    display: none;
}

.settings-option-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.settings-option:hover .settings-option-box {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.settings-option input:checked + .settings-option-box {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary-color);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}

.settings-option-icon {
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.settings-option-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #ccc;
}

.settings-option input:checked + .settings-option-box .settings-option-label {
    color: var(--primary-color);
}

/* ==================== */
/* Interest Tags Styles */
/* ==================== */
.interests-section {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.interests-section .settings-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.free-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.interests-description {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.interest-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.interest-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.interest-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.interest-tag.selected {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    color: #fff;
}

.interest-tag.selected .interest-tag-icon {
    opacity: 1;
}

.interest-tag-icon {
    font-size: 0.85rem;
    opacity: 0.7;
}

.interest-tag-name {
    font-weight: 500;
}

.interest-tag-check {
    display: none;
    font-size: 0.7rem;
    color: #10b981;
}

.interest-tag.selected .interest-tag-check {
    display: inline;
}

.selected-interests-count {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: right;
}

.selected-interests-count.at-limit {
    color: #f59e0b;
}

/* Shared interests display in chat */
.shared-interests-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    margin-bottom: 8px;
}

.shared-interests-label {
    width: 100%;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.shared-interest-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    font-size: 0.7rem;
    color: #10b981;
}

.shared-interest-tag i {
    font-size: 0.65rem;
}

/* Light theme adjustments */
[data-theme="light"] .interests-section {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.2);
}

[data-theme="light"] .interests-description {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .interest-tag {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .interest-tag:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .interest-tag.selected {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.4);
    color: #1e40af;
}

[data-theme="light"] .selected-interests-count {
    color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .shared-interests-container {
    background: rgba(16, 185, 129, 0.08);
}

[data-theme="light"] .shared-interests-label {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .shared-interest-tag {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.settings-save-btn {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-color);
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

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

/* Premium Filters Section */
.premium-filters-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.premium-filters-section .settings-section-header {
    margin-bottom: 12px;
}

.premium-filters-section .premium-icon-small {
    color: #f59e0b;
    font-size: 0.85rem;
}

.premium-filters-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.filter-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
}

.filter-description {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-switch input:focus-visible + .toggle-slider {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Filter Select */
.filter-select {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.75rem;
    min-width: 140px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:hover {
    border-color: rgba(59, 130, 246, 0.4);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.filter-select option {
    background: var(--background-secondary);
    color: var(--text-color);
}

/* Age Filter */
.age-filter-group {
    flex-wrap: wrap;
}

.age-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.age-select {
    min-width: 70px;
    width: 70px;
}

.age-separator {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Premium Filters Upsell */
.premium-filters-upsell {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.premium-filters-upsell .settings-section-header .fa-crown {
    color: #f59e0b;
}

.upsell-content {
    text-align: center;
}

.upsell-content p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.upsell-features {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
    text-align: left;
}

.upsell-features li {
    font-size: 0.7rem;
    color: var(--text-secondary);
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upsell-features li i {
    color: #22c55e;
    font-size: 0.65rem;
}

.upsell-upgrade-btn {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upsell-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.upsell-upgrade-btn i {
    font-size: 0.85rem;
}

/* Light Theme Support for Premium Filters */
[data-theme="light"] .premium-filters-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.25);
}

[data-theme="light"] .filter-group {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .toggle-slider {
    background-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .filter-select {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .premium-filters-upsell {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Site Footer */
.site-footer {
    background-color: #0a0a0a;
    border-top: 1px solid #1a1a1a;
    padding: 10px 20px;
    text-align: center;
    flex-shrink: 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 6px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-copyright {
    color: #444;
    font-size: 0.7rem;
    margin: 0;
}

/* Legal Modals */
.legal-modal .legal-content {
    max-width: 700px;
    max-height: 85vh;
    background: #0f172a;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.legal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.legal-close-btn:hover {
    color: var(--text-color);
}

.legal-body {
    padding: 30px 40px;
    overflow-y: auto;
    flex: 1;
}

.legal-body h1 {
    color: var(--text-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.legal-body .last-updated {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.legal-body h2 {
    color: var(--primary-color);
    font-size: 1.15rem;
    margin-top: 25px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #334155;
}

.legal-body h3 {
    color: #ccc;
    font-size: 1rem;
    margin-top: 15px;
    margin-bottom: 8px;
}

.legal-body p {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.legal-body ul {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 15px;
    padding-left: 20px;
}

.legal-body li {
    margin-bottom: 6px;
}

.legal-warning {
    background: rgba(239, 68, 68, 0.15);
    border-left: 3px solid #ef4444;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    color: #fca5a5;
    font-size: 0.9rem;
}

.legal-warning strong {
    color: #f87171;
}

.legal-highlight {
    background: rgba(16, 185, 129, 0.15);
    border-left: 3px solid #10b981;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    color: #6ee7b7;
    font-size: 0.9rem;
}

.legal-highlight strong {
    color: #34d399;
}

.rule-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    color: #aaa;
    font-size: 0.9rem;
}

.rule-item strong {
    color: var(--text-color);
}

/* Scrollbar styling for legal modals */
.legal-body::-webkit-scrollbar {
    width: 8px;
}

.legal-body::-webkit-scrollbar-track {
    background: #1e293b;
}

.legal-body::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.legal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (max-width: 768px) {
    .legal-modal .legal-content {
        max-height: 90vh;
        margin: 10px;
        border-radius: 12px;
    }

    .legal-body {
        padding: 20px;
    }

    .legal-body h1 {
        font-size: 1.5rem;
    }

    .footer-links {
        gap: 16px;
    }
}

/* Age Verification Improvements */
.age-prompt {
    color: #aaa;
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.date-selection {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.date-selection .form-control {
    flex: 1;
    max-width: 140px;
}

.age-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .date-selection {
        flex-direction: column;
        align-items: center;
    }

    .date-selection .form-control {
        max-width: 200px;
        width: 100%;
    }
}

/* Mobile age verification - reduce vertical spacing */
@media (max-height: 750px) {
    .age-verify .modal-header {
        padding: 1rem 1.5rem;
    }

    .age-verify .modal-body {
        padding: 0 1.5rem 1.5rem;
    }

    .age-verify p {
        margin-bottom: 1rem;
    }

    .age-verify .date-selection {
        margin-bottom: 1rem;
    }

    .age-verify .age-confirmation {
        margin: 1rem 0;
    }

    .age-verify .primary-btn {
        padding: 0.75rem;
    }

    .age-verify .auth-divider {
        margin: 1rem 0;
    }

    .age-verify .auth-prompt {
        margin: 0.5rem 0;
    }
}

/* ==================== */
/* Chat Message Styling */
/* ==================== */

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    animation: messageSlide 0.2s ease-out;
}

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

.message.sent {
    align-self: flex-start;
}

.message.received {
    align-self: flex-start;
}

.message-text {
    padding: 4px 0;
    border-radius: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
    background: none;
}

.message.sent .message-text {
    background: none;
    color: var(--text-color);
}

.message.sent .message-text::before {
    content: 'You: ';
    color: #888;
    font-weight: 600;
}

.message.received .message-text {
    background: none;
    color: var(--text-color);
}

.message.received .message-text::before {
    content: 'Stranger: ';
    color: var(--primary-color);
    font-weight: 600;
}

.message-time {
    display: none; /* Hidden for cleaner look */
    font-size: 0.7rem;
    color: #666;
    margin-top: 4px;
    padding: 0 4px;
}

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

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

/* System messages */
.message.system {
    align-self: flex-start;
    max-width: 100%;
}

.message.system .message-text {
    background: none;
    color: var(--text-color);
    font-size: 0.9rem;
    padding: 2px 0;
    border-radius: 0;
}

/* Typing indicator */
.typing-indicator {
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
    padding: 4px 0;
}

.typing-indicator span {
    display: none;
}

.typing-indicator::before {
    content: 'Stranger is typing...';
}

/* Empty chat state */
/* Hide empty chat state on desktop */
.chat-empty {
    display: none;
}

.chat-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.chat-empty-text {
    font-size: 0.9rem;
}

/* Video overlay with progress ring */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.progress-ring {
    position: relative;
    width: 80px;
    height: 80px;
}

.progress-ring-svg {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: #333;
    stroke-width: 4;
}

.progress-ring-circle {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 213.6;
    stroke-dashoffset: 213.6;
    transition: stroke-dashoffset 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

#overlayText {
    color: #888;
    font-size: 0.9rem;
    margin: 0;
}

/* No video state - when peer has no camera */
.video-overlay.no-video .progress-ring {
    display: none;
}

.no-video-icon {
    font-size: 3rem;
    color: #555;
    margin-bottom: 0.5rem;
}

/* Improved input area - desktop layout with buttons on sides */
.chat-input-container {
    padding: 12px;
    background: var(--background-color);
    border-top: none;
    gap: 10px;
}

.chat-input-container input {
    padding: 14px 18px;
    background: var(--background-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-color);
}

.chat-input-container input:focus {
    border-color: var(--primary-color);
    box-shadow: none;
    outline: none;
}

.chat-input-container input::placeholder {
    color: #666;
}

/* Chat action buttons - New and Send */
.chat-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 44px;
    padding: 4px 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-action-btn .btn-label {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
}

.chat-action-btn .btn-shortcut {
    font-size: 0.7rem;
    color: rgba(0, 0, 0, 0.5);
    margin-top: 1px;
}

.new-btn {
    background: var(--gradient-primary);
    box-shadow: 0 2px 10px var(--shadow-primary);
}

.new-btn:hover:not(:disabled) {
    background: var(--gradient-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--shadow-primary);
}

.send-btn {
    background: var(--gradient-primary);
    box-shadow: 0 2px 10px var(--shadow-primary);
}

.send-btn:hover:not(:disabled) {
    background: var(--gradient-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--shadow-primary);
}

.chat-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Compact buttons on mobile/tablet */
@media (max-width: 768px) {
    .chat-input-container {
        flex-wrap: nowrap !important;
        overflow: visible !important;
    }

    /* Show send button on mobile */
    .send-btn {
        display: flex !important;
        flex-shrink: 0 !important;
    }

    .send-btn .btn-shortcut {
        display: none !important;
    }

    /* Hide new button on mobile */
    .new-btn {
        display: none !important;
    }

    /* Position report button at same level as Skip/Stop buttons on tablet */
    .report-btn {
        position: fixed !important;
        top: calc(55% - 45px) !important;
        bottom: auto !important;
        right: 12px !important;
        z-index: 35 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    }

    /* Show report button when chat is active on tablet */
    .chat-active .report-btn {
        display: flex !important;
    }
}

/* Scrollbar for chat */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

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

.chat-messages::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Chat section header (optional) */
/* Chat header - hidden on desktop */
.chat-header {
    display: none;
}

.chat-header-title {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
}

.chat-header-status {
    font-size: 0.75rem;
    color: var(--primary-color);
}

/* ==================== */
/* Auth Modal Styling   */
/* ==================== */

.auth-modal {
    background: var(--background-secondary);
    max-width: 400px;
}

.auth-modal .modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: none;
}

.auth-modal .modal-header h2 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.5rem;
    text-align: center;
}

.auth-modal .modal-body {
    padding: 1rem 2rem 2rem;
}

.auth-modal .form-group {
    margin-bottom: 1rem;
}

.auth-modal .form-group label {
    display: block;
    color: #aaa;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.auth-modal .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.auth-modal .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.auth-modal .form-control::placeholder {
    color: #555;
}

.auth-modal .form-hint {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

.auth-modal .required-star {
    color: #ef4444;
    font-weight: bold;
}

.auth-modal .optional-label {
    color: #888;
    font-size: 0.8rem;
    font-weight: normal;
}

.auth-modal .primary-btn {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #334155;
}

.auth-divider span {
    color: #666;
    font-size: 0.85rem;
    padding: 0 1rem;
}

.auth-prompt {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin: 0.75rem 0;
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.auth-link-subtle {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.auth-link-subtle:hover {
    color: #999;
}

.auth-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

.auth-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid #22c55e;
    color: #86efac;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

.forgot-password-link {
    text-align: center;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.forgot-password-intro {
    text-align: center;
    color: #a0a0a0;
    margin-bottom: 1.5rem;
}

.verification-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1rem;
}

.verification-message {
    text-align: center;
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.verification-hint {
    text-align: center;
    color: #a0a0a0;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

#emailVerificationModal .secondary-btn {
    width: 100%;
    margin-bottom: 0.75rem;
}

#emailVerificationModal .primary-btn {
    width: 100%;
}

.auth-modal .date-selection {
    display: flex;
    gap: 8px;
}

.auth-modal .date-selection .form-control {
    flex: 1;
    padding: 0.65rem 0.5rem;
    font-size: 0.9rem;
}

.auth-modal .age-confirmation {
    margin: 1rem 0;
}

/* User Status in Header */
.user-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.user-email {
    color: var(--primary-color);
    font-size: 0.85rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==================== */
/* Premium Badge Styles */
/* ==================== */
.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
}

.premium-badge i {
    font-size: 0.65rem;
}

.premium-badge.basic {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.premium-badge.premium {
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(168, 85, 247, 0.3);
}

.premium-badge.vip {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
}

/* Peer Premium Badge (on remote video) */
.peer-premium-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 15;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
}

.peer-premium-badge i {
    font-size: 0.7rem;
}

.peer-premium-badge.basic {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: #fff;
}

.peer-premium-badge.premium {
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
    color: #fff;
}

.peer-premium-badge.vip {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
    }
}

/* Peer Verified Badge (on remote video) */
.peer-verified-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 14;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: #fff;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

.peer-verified-badge i {
    font-size: 0.7rem;
}

/* Offset verified badge when premium badge is also showing */
.peer-premium-badge[style*="inline-flex"] ~ .peer-verified-badge {
    top: 44px;
}

/* Verified Status in Settings */
.verified-status-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    color: #3B82F6;
    font-weight: 600;
    font-size: 0.9rem;
}

.verified-status-section .verified-icon {
    font-size: 1.1rem;
    color: #3B82F6;
}

/* Light theme overrides for verified badge */
[data-theme="light"] .verified-status-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.03) 100%);
    border-color: rgba(59, 130, 246, 0.25);
}

/* Mobile adjustments for verified badge */
@media (max-width: 768px) {
    .peer-verified-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
        top: 8px;
        left: 8px;
    }

    .peer-premium-badge[style*="inline-flex"] ~ .peer-verified-badge {
        top: 38px;
    }
}

/* Premium Status in Settings */
.premium-status-section {
    margin: 16px 0;
    padding: 16px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
}

.premium-status-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.premium-status-header .premium-icon {
    color: #f59e0b;
    font-size: 1.2rem;
}

.premium-tier-name {
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.premium-tier-name.basic {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.premium-tier-name.premium {
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.premium-features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.premium-feature-tag {
    font-size: 0.7rem;
    padding: 3px 8px;
    background: rgba(52, 199, 89, 0.15);
    color: #34c759;
    border-radius: 6px;
}

.premium-expires {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Upgrade Premium Section */
.upgrade-premium-section {
    margin: 16px 0;
    padding: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    text-align: center;
}

.upgrade-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--text-color);
}

.upgrade-prompt i {
    color: #f59e0b;
}

.upgrade-premium-btn {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.upgrade-premium-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

/* Premium Icon Color */
.premium-icon {
    color: #f59e0b;
}

/* Account Section in Settings */
.account-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.account-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 10px;
}

.account-label {
    color: #888;
    font-size: 0.7rem;
}

.account-email {
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 500;
}

.logout-btn {
    width: 100%;
    padding: 8px 16px;
    background: transparent;
    color: #888;
    border: 1px solid #334155;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

/* Privacy & Data Section */
.privacy-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.privacy-description {
    font-size: 0.7rem;
    color: #888;
    margin: 0.5rem 0 0.75rem;
    line-height: 1.4;
}

.delete-data-btn {
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    color: #f87171;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.delete-data-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.delete-data-btn.deletion-pending {
    border-color: rgba(251, 191, 36, 0.4);
    color: #fbbf24;
}

.delete-data-btn.deletion-pending:hover {
    background: rgba(251, 191, 36, 0.1);
    border-color: #f59e0b;
}

/* Delete Data Confirmation Modal */
.delete-data-modal {
    max-width: 420px;
    background: #1a1a2e;
    border-radius: 16px;
    overflow: hidden;
}

.delete-data-header {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    padding: 1.5rem;
    text-align: center;
}

.delete-data-header i {
    font-size: 2.5rem;
    color: #fecaca;
    margin-bottom: 0.5rem;
}

.delete-data-header h2 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
}

.delete-data-body {
    padding: 1.5rem;
}

.delete-data-body p {
    color: #ccc;
    margin: 0 0 1rem;
    line-height: 1.5;
}

.delete-data-body ul {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
    color: #aaa;
}

.delete-data-body li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.delete-info {
    color: #60a5fa !important;
    padding: 0.75rem;
    background: rgba(96, 165, 250, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 0.75rem !important;
}

.delete-warning {
    color: #f87171 !important;
    font-weight: 500;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
}

.delete-data-actions {
    display: flex;
    gap: 1rem;
    padding: 0 1.5rem 1.5rem;
}

.cancel-delete-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid #444;
    border-radius: 8px;
    color: #ccc;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-delete-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #666;
}

.confirm-delete-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #dc2626;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.confirm-delete-btn:hover {
    background: #b91c1c;
}

.confirm-delete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .auth-modal {
        margin: 10px;
        width: calc(100% - 20px);
    }

    .auth-modal .modal-body {
        padding: 1rem 1.5rem 1.5rem;
    }

    .user-status {
        display: none;
    }
}

/* ==================== */
/* Mobile Chat Override - Must be at end for specificity */
/* ==================== */
@media (max-width: 768px) {
    .chat-messages {
        gap: 2px !important;
        padding: 8px !important;
        padding-right: 12px !important;
        align-items: flex-end !important;
    }

    .chat-messages .message {
        background: none !important;
        backdrop-filter: none !important;
        max-width: 100% !important;
        margin-bottom: 2px !important;
        padding: 0 !important;
        border-radius: 0 !important;
        align-self: flex-end !important;
        text-align: right !important;
    }

    .chat-messages .message.sent {
        background: none !important;
        align-self: flex-end !important;
    }

    .chat-messages .message.received {
        align-self: flex-end !important;
    }

    .chat-messages .message .message-text {
        background: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
        color: rgba(200, 200, 200, 0.9) !important;
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    }

    .chat-messages .message.sent .message-text {
        background: none !important;
        color: rgba(59, 130, 246, 0.95) !important;
    }

    .chat-messages .message .message-time {
        display: none !important;
    }

    .chat-messages .message.system {
        align-self: flex-end !important;
    }

    .chat-messages .message.system .message-text {
        background: none !important;
        color: rgba(150, 150, 150, 0.8) !important;
        font-size: 0.75rem !important;
        padding: 0 !important;
    }
}

/* ==================== */
/* Mobile Viewport Lock - Prevent scrolling and ensure single screen */
/* ==================== */
@media (max-width: 768px) {
    /* Lock the entire app to viewport */
    html {
        position: fixed;
        width: 100%;
        height: 100%;
        height: 100dvh;
        height: -webkit-fill-available;
        overflow: hidden;
    }

    body {
        position: fixed;
        width: 100%;
        height: 100%;
        height: 100dvh;
        height: -webkit-fill-available;
        overflow: hidden;
        overscroll-behavior: none;
        -webkit-overflow-scrolling: none;
        touch-action: manipulation;
    }

    /* Prevent pull-to-refresh and bounce */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        pointer-events: none;
    }

    /* Safe area handling for notched devices */
    .main-container {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        box-sizing: border-box;
    }

    /* Ensure chat input respects safe area */
    .chat-input-container {
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom)) !important;
    }

    /* Prevent any scrollable containers from causing page scroll */
    .chat-container,
    .video-section,
    .chat-section {
        overscroll-behavior: contain;
    }

    /* Only allow scroll in chat messages */
    .chat-messages {
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
}

/* ==================== */
/* Moderation Modals    */
/* ==================== */

/* Warning Modal */
.warning-modal {
    max-width: 450px;
}

.warning-header {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    padding: 1.5rem 2rem;
    text-align: center;
}

.warning-header h2 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.warning-header i {
    font-size: 1.75rem;
}

.warning-content {
    padding: 1rem 0;
}

.warning-reason {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.warning-details {
    color: #aaa;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.warning-date {
    color: #666;
    font-size: 0.85rem;
}

.warning-notice {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    color: #ffb74d;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Ban Modal */
.ban-modal {
    max-width: 500px;
}

.ban-header {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    padding: 1.5rem 2rem;
    text-align: center;
}

.ban-header h2 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.ban-header i {
    font-size: 1.75rem;
}

.ban-content {
    padding: 1rem 0;
}

.ban-reason {
    font-size: 1.05rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.ban-reason strong {
    color: #f44336;
}

.ban-duration {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 8px;
    padding: 1rem;
    color: #ef9a9a;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.ban-level {
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
}

.ban-appeal-section {
    border-top: 1px solid #334155;
    padding-top: 1.5rem;
    margin-top: 1rem;
    text-align: center;
}

.ban-appeal-section p {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Modal Overlay Base (for dynamically created modals) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-overlay.active {
    display: flex;
}

/* Admin Alert Modal */
.alert-modal-overlay {
    z-index: 10000;
}

.alert-modal {
    max-width: 450px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.alert-modal-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    padding: 1.5rem 2rem;
    text-align: center;
}

.alert-modal-header h2 {
    color: #fff;
    margin: 0;
    font-size: 1.4rem;
}

.alert-modal-header i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
    color: #fff;
}

.alert-modal-body {
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
}

.alert-modal-body p {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

.alert-modal-footer {
    padding: 1rem 2rem 1.5rem;
    background: var(--bg-secondary);
    text-align: center;
}

.alert-modal-footer .btn {
    min-width: 150px;
    padding: 12px 24px;
    font-size: 1rem;
}

/* Appeal Form Modal */
#appealModal .modal-content {
    max-width: 500px;
}

#appealModal .modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #334155;
}

#appealModal .modal-header h2 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.3rem;
}

#appealModal .close-modal-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

#appealModal .close-modal-btn:hover {
    color: var(--text-color);
}

.appeal-info {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

#appealModal .form-group {
    margin-bottom: 0.5rem;
}

#appealModal textarea {
    width: 100%;
    padding: 1rem;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.95rem;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s;
}

#appealModal textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

#appealModal textarea::placeholder {
    color: #555;
}

#appealModal .char-count {
    text-align: right;
    color: #666;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

#appealModal .modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem 2rem;
    border-top: 1px solid #334155;
}

#appealModal .modal-actions button {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

#appealModal .modal-actions button.cancel {
    background: transparent;
    border: 1px solid #444;
    color: #aaa;
}

#appealModal .modal-actions button.cancel:hover {
    border-color: #666;
    color: var(--text-color);
}

#appealModal .modal-actions button.submit {
    background: var(--primary-color);
    border: none;
    color: var(--text-color);
    font-weight: 600;
}

#appealModal .modal-actions button.submit:hover {
    background: #2563eb;
}

#appealModal .modal-actions button.submit:disabled {
    background: #444;
    color: #666;
    cursor: not-allowed;
}

/* Appeal Status Modal */
#appealStatusModal .modal-content {
    max-width: 450px;
}

#appealStatusModal .modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #334155;
}

#appealStatusModal .modal-header h2 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.3rem;
}

.appeal-status-content {
    padding: 1rem 0;
}

.appeal-status {
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.appeal-outcome {
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.appeal-outcome.outcome-approved {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #81c784;
}

.appeal-outcome.outcome-denied {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: #ef9a9a;
}

.appeal-outcome.outcome-reduced {
    background: rgba(255, 152, 0, 0.15);
    border: 1px solid rgba(255, 152, 0, 0.4);
    color: #ffb74d;
}

.appeal-notes {
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
    padding-top: 0.5rem;
    border-top: 1px solid #334155;
}

#appealStatusModal .modal-footer {
    padding: 1rem 2rem 1.5rem;
    text-align: center;
}

#appealStatusModal .modal-footer .btn {
    min-width: 120px;
}

/* Permissions Modal */
.permissions-modal {
    background-color: #000;
    text-align: center;
    max-width: 420px;
}

.permissions-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2563eb 100%);
    padding: 1.5rem 2rem;
    border-bottom: none;
}

.permissions-modal .modal-header h2 {
    font-size: 1.4rem;
    margin: 0;
    color: var(--text-color);
    font-weight: 700;
}

.permissions-modal .modal-header i {
    margin-right: 0.5rem;
}

.permissions-modal .modal-body {
    padding: 1.5rem 2rem 2rem;
}

.permissions-intro {
    color: #aaa;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.permission-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--background-secondary);
    padding: 1rem;
    border-radius: 10px;
    text-align: left;
    border: 1px solid #1e293b;
}

.permission-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2563eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.permission-icon i {
    font-size: 1.3rem;
    color: var(--text-color);
}

.permission-info {
    display: flex;
    flex-direction: column;
}

.permission-info strong {
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.permission-info span {
    color: #888;
    font-size: 0.85rem;
}

.permissions-note {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: #020617;
    border-radius: 8px;
    border: 1px solid #1e293b;
}

.permissions-note i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.permissions-modal .primary-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2563eb 100%);
    color: var(--text-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.permissions-modal .primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.permissions-modal .primary-btn i {
    margin-right: 0.5rem;
}

/* Mobile responsive permissions modal */
@media (max-height: 700px), (max-width: 480px) {
    .permissions-modal {
        max-height: 90vh;
        overflow-y: auto;
    }

    .permissions-modal .modal-header {
        padding: 1rem 1.5rem;
    }

    .permissions-modal .modal-header h2 {
        font-size: 1.2rem;
    }

    .permissions-modal .modal-body {
        padding: 1rem 1.5rem 1.5rem;
    }

    .permissions-intro {
        margin-bottom: 1rem;
        font-size: 0.9rem;
    }

    .permission-items {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .permission-item {
        padding: 0.75rem;
    }

    .permission-icon {
        width: 40px;
        height: 40px;
    }

    .permission-icon i {
        font-size: 1.1rem;
    }

    .permission-info strong {
        font-size: 0.95rem;
    }

    .permission-info span {
        font-size: 0.8rem;
    }

    .permissions-note {
        margin-bottom: 1rem;
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    .permissions-modal .primary-btn {
        padding: 0.85rem;
        font-size: 1rem;
    }
}

/* Feature Request Modal */
.feature-request-modal {
    max-width: 500px;
    background: #0f172a;
}

.feature-request-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
}

.feature-request-modal .modal-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-color);
}

.feature-request-modal .modal-header h2 i {
    color: #f59e0b;
    font-size: 1.1rem;
}

.feature-request-modal .close-modal-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #888;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.feature-request-modal .close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-color);
}

.feature-request-modal .modal-body {
    padding: 1.5rem;
}

.feature-intro {
    color: #94a3b8;
    margin: 0 0 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.feature-request-modal .form-group {
    margin-bottom: 1.25rem;
}

.feature-request-modal .form-group:last-of-type {
    margin-bottom: 0;
}

.feature-request-modal label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
    font-size: 0.875rem;
    font-weight: 500;
}

.feature-request-modal label .required {
    color: #ef4444;
    margin-left: 2px;
}

.feature-request-modal label .optional {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 400;
}

.feature-request-modal .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.feature-request-modal .form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.feature-request-modal .form-control::placeholder {
    color: #475569;
}

.feature-request-modal select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.feature-request-modal textarea.form-control {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.feature-request-modal .char-count {
    text-align: right;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 6px;
}

.feature-request-modal .form-hint {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 6px;
}

.feature-request-modal .auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.feature-request-modal .modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.feature-request-modal .modal-actions .cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.feature-request-modal .modal-actions .cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-color);
}

.feature-request-modal .modal-actions .submit {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: var(--text-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.feature-request-modal .modal-actions .submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.feature-request-modal .modal-actions .submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Feature Success View */
.feature-success {
    text-align: center;
    padding: 40px 20px;
}

.feature-success .success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-success .success-icon i {
    font-size: 2.5rem;
    color: #22c55e;
}

.feature-success h3 {
    margin: 0 0 12px;
    font-size: 1.5rem;
    color: var(--text-color);
}

.feature-success p {
    color: #888;
    margin: 0 0 12px;
}

.feature-request-number {
    font-family: monospace;
    font-size: 1.1rem;
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.1);
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-block;
    margin: 8px 0 16px !important;
}

.feature-success .feature-note {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin: 20px 0 !important;
}

.feature-success .feature-note i {
    color: #3b82f6;
    margin-right: 6px;
}

.feature-success .primary-btn {
    margin-top: 16px;
}

/* Footer suggest feature link */
#suggestFeatureLink {
    color: #f59e0b;
}

#suggestFeatureLink:hover {
    color: #fbbf24;
}

/* ==========================================
   Custom Dialog System (replaces browser alerts)
   ========================================== */

.custom-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.custom-dialog-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-dialog {
    background: #1e293b;
    border-radius: 12px;
    min-width: 320px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.2s ease;
    overflow: hidden;
}

.custom-dialog-overlay.active .custom-dialog {
    transform: scale(1) translateY(0);
}

.custom-dialog-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: #0f172a;
    border-bottom: 1px solid #334155;
    font-weight: 600;
    font-size: 16px;
}

.custom-dialog-header i {
    font-size: 20px;
}

.custom-dialog.info .custom-dialog-header i { color: #3b82f6; }
.custom-dialog.warning .custom-dialog-header i { color: #f59e0b; }
.custom-dialog.error .custom-dialog-header i { color: #ef4444; }
.custom-dialog.success .custom-dialog-header i { color: #22c55e; }
.custom-dialog.confirm .custom-dialog-header i { color: #8b5cf6; }
.custom-dialog.prompt .custom-dialog-header i { color: #06b6d4; }

.custom-dialog-body {
    padding: 20px;
}

.custom-dialog-body p {
    margin: 0 0 12px 0;
    color: #e2e8f0;
    line-height: 1.6;
}

.custom-dialog-body p:last-child {
    margin-bottom: 0;
}

.custom-dialog-input {
    width: 100%;
    padding: 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 14px;
    margin-top: 12px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.custom-dialog-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.custom-dialog-input::placeholder {
    color: #64748b;
}

textarea.custom-dialog-input {
    resize: vertical;
    min-height: 80px;
}

.custom-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    background: #0f172a;
    border-top: 1px solid #334155;
}

.custom-dialog-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-dialog-btn.primary {
    background: #3b82f6;
    color: white;
}

.custom-dialog-btn.primary:hover {
    background: #2563eb;
}

.custom-dialog-btn.primary.danger {
    background: #ef4444;
}

.custom-dialog-btn.primary.danger:hover {
    background: #dc2626;
}

.custom-dialog-btn.secondary {
    background: #334155;
    color: #e2e8f0;
}

.custom-dialog-btn.secondary:hover {
    background: #475569;
}

/* Version Display - Discrete build version indicator */
.version-indicator {
    position: fixed;
    top: 8px;
    left: 8px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.25);
    font-family: monospace;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    transition: color 0.3s ease;
}

.version-indicator:hover {
    color: rgba(255, 255, 255, 0.5);
    pointer-events: auto;
    cursor: default;
}

.version-indicator.update-available {
    color: rgba(59, 130, 246, 0.6);
    pointer-events: auto;
    cursor: pointer;
}

.version-indicator.update-available:hover {
    color: rgba(59, 130, 246, 0.9);
}

.version-indicator .update-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
    margin-left: 4px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ==================== */
/* ACCESSIBILITY STYLES */
/* ==================== */

/* Skip to content link - visible on focus */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    z-index: 10000;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Enhanced focus styles for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Remove default focus for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Button and interactive element focus */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.3);
}

/* Settings option focus */
.settings-option input:focus-visible + .settings-option-box {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.3);
}

/* Modal focus trap indicator */
.modal:focus-visible {
    outline: none;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Visible on focus for skip links and similar */
.sr-only-focusable:focus,
.sr-only-focusable:active {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .typing-indicator span {
        animation: none;
    }
    
    .progress-ring-circle {
        animation: none;
    }
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    :root {
        --border-color: #ffffff;
        --border-light: #ffffff;
    }
    
    button, a, input, select, textarea {
        border: 2px solid currentColor;
    }
}

/* Improved text selection */
::selection {
    background: var(--primary-color);
    color: #000;
}

/* Better link visibility */
a:not([class]) {
    color: var(--primary-color);
    text-decoration: underline;
}

a:not([class]):hover {
    text-decoration: none;
}

/* Ensure minimum touch target size */
@media (pointer: coarse) {
    button,
    a,
    input[type="checkbox"],
    input[type="radio"],
    .control-btn,
    .settings-option {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ===============================================
   Pricing Modal Styles
   =============================================== */

.pricing-modal {
    max-width: 900px;
    width: 95%;
    background: var(--modal-background);
    border-radius: 16px;
    overflow: hidden;
}

.pricing-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.pricing-close-btn:hover {
    background: var(--hover-background);
    color: var(--text-color);
}

.pricing-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
}

.pricing-header h2 {
    font-size: 1.75rem;
    margin: 0 0 0.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pricing-header h2 i {
    color: #fbbf24;
}

.pricing-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.pricing-body {
    padding: 1rem 2rem 2rem;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .pricing-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .pricing-modal {
        max-width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .pricing-body {
        padding: 1rem;
    }

    .pricing-header {
        padding: 1.5rem 1rem 0.75rem;
    }

    .pricing-card {
        padding: 1rem;
    }
}

.pricing-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--shadow-primary);
}

.pricing-card.featured {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(37, 99, 235, 0.1) 100%);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.pricing-card-header {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.pricing-card-header h3 {
    font-size: 1.25rem;
    margin: 0 0 0.75rem;
    color: var(--text-color);
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.pricing-price .currency {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.pricing-price .amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.pricing-price .period {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pricing-features ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-color);
    font-size: 0.9rem;
}

.pricing-features li i {
    width: 18px;
    text-align: center;
}

.pricing-features li .fa-check {
    color: var(--success-color);
}

.pricing-features li.disabled {
    color: var(--text-muted);
}

.pricing-features li.disabled .fa-times {
    color: var(--text-muted);
}

.pricing-select-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.pricing-select-btn:hover {
    background: var(--hover-background);
    border-color: var(--primary-color);
}

.pricing-select-btn.featured {
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: 0 4px 15px var(--shadow-primary);
}

.pricing-select-btn.featured:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-primary);
}

.pricing-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.pricing-footer p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pricing-footer i {
    color: var(--success-color);
}

/* Upgrade Premium Section in Settings */
.upgrade-premium-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.15) 100%);
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.upgrade-prompt {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.upgrade-prompt i {
    color: #fbbf24;
    font-size: 1.25rem;
}

.upgrade-premium-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: 0 4px 15px var(--shadow-primary);
}

.upgrade-premium-btn:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-primary);
}

/* Premium Status Section in Settings */
.premium-status-section {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.15) 100%);
    border: 1px solid #fbbf24;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.premium-status-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.premium-status-header .premium-icon {
    color: #fbbf24;
    font-size: 1.5rem;
}

.premium-tier-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.premium-features-list {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.premium-expires {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Manage Subscription Button */
.manage-subscription-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    margin-top: 0.75rem;
}

.manage-subscription-btn:hover {
    background: var(--hover-background);
    border-color: var(--primary-color);
}

/* ============================================
   White-Label Checkout & Billing Portal Styles
   ============================================ */

/* Checkout Modal */
.checkout-modal {
    max-width: 420px;
    width: 95%;
    background: linear-gradient(145deg, #0f172a 0%, #020617 100%);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    overflow: hidden;
    position: relative;
}

.checkout-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    font-size: 1.2rem;
}

.checkout-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

.checkout-header {
    text-align: center;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.checkout-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.checkout-header h2 i {
    color: var(--success-color);
    margin-right: 8px;
}

.checkout-body {
    padding: 20px;
}

/* Order Summary */
.order-summary {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.order-tier {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.order-tier .tier-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.order-tier .tier-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-radius: 10px;
    font-weight: 600;
}

.order-price {
    margin-bottom: 12px;
}

.order-price .price-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.order-price .price-period {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.order-features {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.order-features .feature-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.order-features .feature-item i {
    color: var(--success-color);
    margin-right: 8px;
    width: 14px;
}

/* Payment Form */
.payment-form {
    margin-bottom: 20px;
}

.payment-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

/* Stripe Element Styling */
.stripe-element {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 14px;
    transition: all 0.2s ease;
}

.stripe-element:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.stripe-element.StripeElement--invalid {
    border-color: var(--error-color);
}

.card-errors {
    color: var(--error-color);
    font-size: 0.8rem;
    margin-top: 8px;
    min-height: 20px;
}

/* Promo Code Section */
.promo-code-section {
    margin-bottom: 20px;
}

.promo-code-input-group {
    display: flex;
    gap: 8px;
}

.promo-code-input-group input {
    flex: 1;
    padding: 10px 14px;
    background-color: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.promo-code-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.promo-code-input-group input::placeholder {
    color: var(--text-muted);
}

.promo-apply-btn {
    padding: 10px 16px;
    background-color: var(--background-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.promo-apply-btn:hover:not(:disabled) {
    background-color: var(--hover-background);
    border-color: var(--primary-color);
}

.promo-apply-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.promo-apply-btn.loading {
    color: transparent;
    position: relative;
}

.promo-apply-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid var(--text-muted);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.promo-code-status {
    margin-top: 8px;
    font-size: 0.85rem;
    min-height: 20px;
}

.promo-code-status.success {
    color: var(--success-color);
}

.promo-code-status.error {
    color: var(--error-color);
}

.promo-code-status .promo-remove-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    margin-left: 8px;
    font-size: 0.8rem;
    text-decoration: underline;
}

.promo-code-status .promo-remove-btn:hover {
    color: var(--text-color);
}

/* Price Summary */
.price-summary {
    padding: 16px;
    background-color: var(--input-background);
    border-radius: 10px;
    margin-bottom: 20px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.price-row.discount-row {
    color: var(--success-color);
}

.price-row.total-row {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--border-color);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Checkout Submit Button */
.checkout-submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.checkout-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.checkout-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkout-terms {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 12px;
}

.checkout-terms a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Checkout Processing */
.checkout-processing {
    text-align: center;
    padding: 40px 20px;
}

.checkout-processing .processing-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.checkout-processing h3 {
    color: var(--text-color);
    margin: 0 0 8px;
}

.checkout-processing p {
    color: var(--text-secondary);
    margin: 0;
}

/* Checkout Success */
.checkout-success {
    text-align: center;
    padding: 40px 20px;
}

.checkout-success .success-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 20px;
}

.checkout-success h3 {
    color: var(--text-color);
    margin: 0 0 8px;
    font-size: 1.5rem;
}

.checkout-success p {
    color: var(--text-secondary);
    margin: 0 0 24px;
}

.checkout-success-btn {
    padding: 12px 32px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkout-success-btn:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

/* Checkout Error */
.checkout-error {
    text-align: center;
    padding: 40px 20px;
}

.checkout-error .error-icon {
    font-size: 4rem;
    color: var(--error-color);
    margin-bottom: 20px;
}

.checkout-error h3 {
    color: var(--text-color);
    margin: 0 0 8px;
}

.checkout-error p {
    color: var(--text-secondary);
    margin: 0 0 24px;
}

.checkout-retry-btn {
    padding: 12px 32px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkout-retry-btn:hover {
    background: var(--primary-dark);
}

/* Billing Portal Modal */
.billing-portal-modal {
    max-width: 500px;
    width: 95%;
    max-height: 85vh;
    background: linear-gradient(145deg, #0f172a 0%, #020617 100%);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.billing-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    font-size: 1.2rem;
}

.billing-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

.billing-header {
    text-align: center;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.billing-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.billing-header h2 i {
    color: var(--primary-color);
    margin-right: 8px;
}

.billing-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

/* Billing Loading */
.billing-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.billing-loading i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.billing-loading p {
    margin: 0;
}

/* Billing Content */
.billing-content {
    padding: 16px;
}

/* Billing Section */
.billing-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.billing-section:last-child {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.section-icon {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Current Plan */
.current-plan {
    text-align: left;
}

.plan-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.plan-status {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.plan-status.active {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success-color);
}

.plan-status.cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error-color);
}

.plan-status.past_due {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.plan-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.plan-price .price-period {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.plan-renewal {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.plan-renewal strong {
    color: var(--text-color);
}

.plan-cancellation {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--error-color);
}

.plan-cancellation i {
    margin-right: 6px;
}

/* Payment Method */
.payment-method {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-brand {
    font-size: 1.5rem;
    color: var(--text-color);
}

.card-number {
    font-size: 0.9rem;
    color: var(--text-color);
    font-family: monospace;
}

.card-expiry {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.billing-action-btn {
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.billing-action-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary-color);
}

/* Update Payment Section */
.update-payment-section {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.2);
}

.update-payment-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.billing-cancel-btn {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.billing-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.billing-save-btn {
    flex: 1;
    padding: 10px 16px;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.billing-save-btn:hover:not(:disabled) {
    background: var(--primary-dark);
}

.billing-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Plan Options */
.plan-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plan-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.plan-option.current {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

.plan-option-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.plan-option-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.plan-option-price {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.plan-option-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-option-btn.upgrade {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: white;
}

.plan-option-btn.upgrade:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}

.plan-option-btn.downgrade {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
}

.plan-option-btn.downgrade:hover {
    background: rgba(255, 255, 255, 0.05);
}

.plan-option-btn.current-badge {
    background: rgba(59, 130, 246, 0.2);
    border: none;
    color: var(--primary-color);
    cursor: default;
}

/* Invoice List */
.invoice-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.invoice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.invoice-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.invoice-date {
    font-size: 0.85rem;
    color: var(--text-color);
}

.invoice-amount {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.invoice-status {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
}

.invoice-status.paid {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success-color);
}

.invoice-status.open {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.invoice-link {
    color: var(--primary-color);
    font-size: 0.85rem;
    text-decoration: none;
}

.invoice-link:hover {
    text-decoration: underline;
}

.no-invoices {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 20px;
}

/* Cancel Section */
.cancel-section {
    background: transparent;
    border: none;
    padding: 8px 0;
    text-align: center;
}

.billing-danger-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: var(--error-color);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.billing-danger-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error-color);
}

.billing-success-btn {
    padding: 10px 20px;
    background: var(--success-color);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.billing-success-btn:hover {
    background: #16a34a;
}

/* Cancel Confirmation Modal */
.cancel-confirm-modal {
    max-width: 420px;
    width: 95%;
    background: linear-gradient(145deg, #0f172a 0%, #020617 100%);
    border-radius: 16px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    overflow: hidden;
}

.cancel-confirm-header {
    text-align: center;
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cancel-confirm-header i {
    font-size: 2.5rem;
    color: var(--warning-color);
    margin-bottom: 12px;
}

.cancel-confirm-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.cancel-confirm-body {
    padding: 20px;
}

.cancel-confirm-body > p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0 0 16px;
    text-align: center;
}

.cancel-confirm-body > p strong {
    color: var(--text-color);
}

.cancel-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.cancel-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.cancel-option input {
    margin-top: 3px;
}

.cancel-option input:checked + .option-content strong {
    color: var(--primary-color);
}

.option-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.option-content strong {
    font-size: 0.9rem;
    color: var(--text-color);
}

.option-content small {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.cancel-note {
    padding: 12px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.cancel-note i {
    color: var(--primary-color);
    margin-right: 6px;
}

.cancel-confirm-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cancel-back-btn {
    flex: 1;
    padding: 12px 16px;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-back-btn:hover {
    background: var(--primary-dark);
}

.cancel-confirm-btn {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: var(--error-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cancel-confirm-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error-color);
}

/* Light Mode Overrides for Checkout/Billing */
[data-theme="light"] .checkout-modal,
[data-theme="light"] .billing-portal-modal,
[data-theme="light"] .cancel-confirm-modal {
    background: var(--modal-background);
    border-color: var(--border-color);
}

[data-theme="light"] .order-summary,
[data-theme="light"] .billing-section {
    background: var(--background-tertiary);
    border-color: var(--border-color);
}

[data-theme="light"] .stripe-element {
    background: var(--input-background);
    border-color: var(--border-color);
}

[data-theme="light"] .plan-option {
    background: var(--background-tertiary);
    border-color: var(--border-color);
}

[data-theme="light"] .invoice-item {
    background: var(--background-tertiary);
}

[data-theme="light"] .cancel-option {
    background: var(--background-tertiary);
    border-color: var(--border-color);
}

/* Responsive */
@media (max-width: 480px) {
    .checkout-modal,
    .billing-portal-modal,
    .cancel-confirm-modal {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
        max-height: 90vh;
    }

    .payment-method {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .billing-action-btn {
        width: 100%;
        justify-content: center;
    }

    .cancel-confirm-actions {
        flex-direction: column;
    }

    .cancel-back-btn,
    .cancel-confirm-btn {
        width: 100%;
    }
}

/* ======================== */
/* Referral Program Styles  */
/* ======================== */
.referral-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.referral-section .settings-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.referral-section .settings-section-header i {
    color: #8b5cf6;
    font-size: 1.1rem;
}

.referral-section .settings-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.referral-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(139, 92, 246, 0.4);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.referral-code {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #a78bfa;
}

.referral-code-box button {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 8px;
    padding: 8px 12px;
    color: #a78bfa;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.referral-code-box button:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.6);
}

.referral-code-box button.copied {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
    color: #22c55e;
}

.referral-share-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.referral-share-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #fff;
}

.referral-share-btn.twitter {
    background: #1da1f2;
}

.referral-share-btn.twitter:hover {
    background: #0c8de0;
}

.referral-share-btn.whatsapp {
    background: #25d366;
}

.referral-share-btn.whatsapp:hover {
    background: #1da851;
}

.referral-share-btn.telegram {
    background: #0088cc;
}

.referral-share-btn.telegram:hover {
    background: #006699;
}

.referral-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.referral-stat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.referral-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2px;
}

.referral-stat-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.referral-milestone {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    padding: 12px;
}

.referral-milestone-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.referral-milestone-header i {
    color: #f59e0b;
    font-size: 1rem;
}

.referral-milestone-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
}

.referral-milestone-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.referral-milestone-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.referral-milestone-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #8b5cf6 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.referral-milestone-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    min-width: 50px;
    text-align: right;
}

.referral-milestone-reward {
    font-size: 0.75rem;
    color: #f59e0b;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.referral-login-prompt {
    text-align: center;
    padding: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.referral-login-prompt a {
    color: var(--primary-color);
    text-decoration: none;
}

.referral-login-prompt a:hover {
    text-decoration: underline;
}

/* Light mode adjustments for referral section */
[data-theme="light"] .referral-code-box {
    background: rgba(139, 92, 246, 0.05);
}

[data-theme="light"] .referral-stat {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .referral-stat-label {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .referral-milestone-count {
    color: rgba(0, 0, 0, 0.7);
}

/* ======================== */
/* Sound Settings Styles    */
/* ======================== */
.sound-settings-section {
    margin-bottom: 12px;
}

.sound-settings-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sound-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sound-setting-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    cursor: pointer;
}

.sound-setting-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
}

.sound-setting-desc {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .sound-setting-row {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .sound-setting-desc {
    color: rgba(0, 0, 0, 0.5);
}

/* ============================================================
   CHAT GAMES
   ============================================================ */

/* Game button in chat input area */
.game-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: none;
    font-size: 1rem;
}

.game-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.game-btn.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gift button in chat input area */
.gift-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: none;
    font-size: 1rem;
}

.gift-btn:hover {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-color: #f59e0b;
    color: #fff;
}

.gift-btn.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gift Picker Modal */
.gift-picker-modal {
    max-width: 480px;
}

.gift-picker-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.gift-picker-modal .modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gift-picker-modal .modal-body {
    padding: 1rem;
}

.gift-balance {
    text-align: center;
    font-size: 0.9rem;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    color: #f59e0b;
    font-weight: 600;
}

.gift-categories {
    display: flex;
    gap: 6px;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.gift-cat-chip {
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.gift-cat-chip:hover {
    border-color: #f59e0b;
    color: #f59e0b;
}

.gift-cat-chip.active {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #000;
}

.gift-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.gift-card {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-color);
    font-family: inherit;
}

.gift-card:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    transform: scale(1.05);
}

.gift-card:active {
    transform: scale(0.95);
}

.gift-card.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.gift-card-emoji {
    font-size: 2rem;
    line-height: 1;
}

.gift-card-name {
    font-size: 0.75rem;
    font-weight: 600;
}

.gift-card-cost {
    font-size: 0.7rem;
    color: #f59e0b;
    font-weight: 600;
}

/* Gift Animation Overlay */
.gift-animation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.gift-anim-emoji {
    position: absolute;
    font-size: 3rem;
    pointer-events: none;
}

/* Float animation */
@keyframes giftFloat {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-200px) scale(1.5); }
}

/* Burst animation */
@keyframes giftBurst {
    0% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1.5); }
    100% { opacity: 0; transform: scale(2.5); }
}

/* Rain animation */
@keyframes giftRain {
    0% { opacity: 1; transform: translateY(-40px) rotate(0deg); }
    100% { opacity: 0; transform: translateY(400px) rotate(360deg); }
}

/* Sparkle animation */
@keyframes giftSparkle {
    0% { opacity: 0; transform: scale(0) rotate(0deg); }
    40% { opacity: 1; transform: scale(1.3) rotate(180deg); }
    70% { opacity: 1; transform: scale(1) rotate(270deg); }
    100% { opacity: 0; transform: scale(1.5) rotate(360deg); }
}

/* Gift received toast */
.gift-received-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
}

.gift-received-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Light theme overrides */
[data-theme="light"] .gift-card {
    background: #f8f9fa;
}

[data-theme="light"] .gift-cat-chip.active {
    color: #fff;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .gift-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Game Selection Modal */
.game-select-modal {
    max-width: 480px;
}

.game-select-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.game-select-modal .modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-select-modal .modal-body {
    padding: 1rem;
}

.game-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.game-card {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-color);
    font-family: inherit;
}

.game-card:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.game-card-icon {
    font-size: 2rem;
    line-height: 1;
}

.game-card-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.game-card-desc {
    font-size: 0.75rem;
    opacity: 0.6;
    line-height: 1.3;
}

/* ---- Inline Game Messages ---- */
.game-message {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin: 8px 0;
    width: 100%;
    box-sizing: border-box;
}

.game-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
}

.game-message-header .game-icon {
    font-size: 1.1rem;
}

.game-round-badge {
    margin-left: auto;
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Would You Rather / Trivia option buttons */
.game-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.game-option-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.85rem;
    text-align: left;
    width: 100%;
}

.game-option-btn:hover:not(.disabled):not(.selected) {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

.game-option-btn .option-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
    flex-shrink: 0;
}

.game-option-btn.selected {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.15);
    cursor: default;
}

.game-option-btn.disabled {
    opacity: 0.5;
    cursor: default;
}

.game-option-btn.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

.game-option-btn.correct .option-badge {
    background: #22c55e;
    color: #fff;
}

.game-option-btn.wrong {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.game-option-btn.wrong .option-badge {
    background: #ef4444;
    color: #fff;
}

/* Truth or Dare choice buttons */
.tod-choices {
    display: flex;
    gap: 10px;
}

.tod-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    color: #fff;
}

.tod-btn.truth-btn {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

.tod-btn.truth-btn:hover {
    background: rgba(59, 130, 246, 0.35);
}

.tod-btn.dare-btn {
    background: rgba(249, 115, 22, 0.2);
    border-color: #f97316;
}

.tod-btn.dare-btn:hover {
    background: rgba(249, 115, 22, 0.35);
}

.tod-btn.disabled {
    opacity: 0.5;
    cursor: default;
}

/* Prompt card (for Truth or Dare) */
.game-prompt-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.5;
}

.game-prompt-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.5;
    margin-bottom: 6px;
}

/* 20 Questions */
.twentyq-input-area {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.twentyq-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.85rem;
}

.twentyq-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.twentyq-send-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    transition: opacity 0.2s;
}

.twentyq-send-btn:hover {
    opacity: 0.85;
}

.twentyq-answer-btns {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.twentyq-answer-btn {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.twentyq-answer-btn:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

.twentyq-answer-btn.yes { color: #22c55e; border-color: rgba(34, 197, 94, 0.3); }
.twentyq-answer-btn.no { color: #ef4444; border-color: rgba(239, 68, 68, 0.3); }
.twentyq-answer-btn.sometimes { color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); }

.twentyq-history {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.twentyq-history-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
}

.twentyq-history-item .qa-question {
    flex: 1;
    opacity: 0.8;
}

.twentyq-history-item .qa-answer {
    font-weight: 600;
    margin-left: 8px;
}

.twentyq-history-item .qa-answer.yes { color: #22c55e; }
.twentyq-history-item .qa-answer.no { color: #ef4444; }
.twentyq-history-item .qa-answer.sometimes { color: #f59e0b; }

.twentyq-counter {
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.5;
    margin-top: 6px;
}

/* Game results */
.game-results-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.85rem;
}

.game-results-label {
    opacity: 0.6;
}

.game-result-correct {
    color: #22c55e;
    font-weight: 600;
}

.game-result-wrong {
    color: #ef4444;
    font-weight: 600;
}

.game-result-match {
    color: var(--primary-color);
    font-weight: 600;
}

.game-scores {
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    margin-top: 6px;
    border-top: 1px solid var(--border-color);
}

.game-score-item {
    text-align: center;
}

.game-score-label {
    font-size: 0.7rem;
    opacity: 0.5;
    margin-bottom: 2px;
}

.game-score-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Waiting indicator */
.game-waiting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    font-size: 0.8rem;
    opacity: 0.6;
}

.game-waiting-dots span {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-color);
    animation: gameDotBounce 1.4s infinite ease-in-out both;
}

.game-waiting-dots span:nth-child(1) { animation-delay: -0.32s; }
.game-waiting-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes gameDotBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

/* Game action buttons (next round, end game) */
.game-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.game-action-btn-inline {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    color: var(--text-color);
    background: transparent;
}

.game-action-btn-inline.primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.game-action-btn-inline.primary:hover {
    opacity: 0.85;
}

.game-action-btn-inline.secondary:hover {
    border-color: var(--text-color);
}

/* Game ended message */
.game-ended-msg {
    text-align: center;
    padding: 8px;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ---- Mobile responsive ---- */
@media (max-width: 768px) {
    .game-grid {
        grid-template-columns: 1fr;
    }

    .game-select-modal {
        max-width: 95%;
    }

    .game-message {
        padding: 0.75rem;
    }

    .game-option-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .tod-choices {
        flex-direction: column;
    }

    .game-actions {
        flex-direction: column;
    }

    .twentyq-input-area {
        flex-direction: column;
    }
}

/* ---- Light theme ---- */
[data-theme="light"] .game-btn {
    color: #334155;
    border-color: #e2e8f0;
}

[data-theme="light"] .game-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

[data-theme="light"] .game-card {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

[data-theme="light"] .game-card:hover {
    background: rgba(59, 130, 246, 0.08);
}

[data-theme="light"] .game-message {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .game-option-btn {
    background: #fff;
    border-color: #e2e8f0;
    color: #1e293b;
}

[data-theme="light"] .game-option-btn:hover:not(.disabled):not(.selected) {
    background: rgba(59, 130, 246, 0.06);
}

[data-theme="light"] .game-prompt-card {
    background: #fff;
    border-color: #e2e8f0;
}

[data-theme="light"] .twentyq-input {
    background: #fff;
    border-color: #e2e8f0;
    color: #1e293b;
}

[data-theme="light"] .twentyq-input::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .twentyq-answer-btn {
    background: #fff;
    border-color: #e2e8f0;
    color: #1e293b;
}

[data-theme="light"] .twentyq-history-item {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .game-action-btn-inline {
    color: #1e293b;
    border-color: #e2e8f0;
}

[data-theme="light"] .game-waiting-dots span {
    background: #64748b;
}

/* ==========================================
   Weekly Leaderboard Styles
   ========================================== */

/* Nav trophy button */
.nav-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: #f59e0b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.nav-icon-btn:hover {
    background: rgba(245, 158, 11, 0.15);
    transform: scale(1.1);
}

.leaderboard-btn {
    position: relative;
}

/* Leaderboard modal */
.lb-modal-content {
    max-width: 500px;
    width: 92%;
}

.lb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.lb-header h2 {
    margin: 0;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lb-header h2 i {
    color: #f59e0b;
}

.lb-header .close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.lb-header .close-btn:hover {
    color: #fff;
}

/* Tab switcher */
.lb-tabs {
    display: flex;
    gap: 0;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
}

.lb-tab {
    flex: 1;
    padding: 0.7rem 0.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #888;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lb-tab:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.03);
}

.lb-tab.active {
    color: #f59e0b;
    border-bottom-color: #f59e0b;
}

/* User's own rank banner */
.lb-user-rank {
    padding: 0.6rem 1.25rem;
    background: rgba(245, 158, 11, 0.1);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Table container */
.lb-table-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.lb-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: #888;
    font-size: 0.9rem;
}

/* Leaderboard rows */
.lb-table {
    width: 100%;
    padding: 0;
}

.lb-row {
    display: flex;
    align-items: center;
    padding: 0.65rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s ease;
}

.lb-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.lb-row:last-child {
    border-bottom: none;
}

.lb-row.me {
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid #f59e0b;
}

.lb-rank {
    width: 36px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.lb-rank.gold { color: #f59e0b; }
.lb-rank.silver { color: #94a3b8; }
.lb-rank.bronze { color: #cd7f32; }

.lb-username {
    flex: 1;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 0.75rem;
}

.lb-stat {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f59e0b;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Empty state */
.lb-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    color: #888;
    text-align: center;
}

.lb-empty i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.lb-empty p {
    margin: 0;
    font-size: 0.9rem;
}

/* Footer */
.lb-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.25rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: #666;
}

.lb-week-label {
    font-weight: 500;
}

/* Light theme overrides */
[data-theme="light"] .lb-header .close-btn:hover {
    color: #1e293b;
}

[data-theme="light"] .lb-row {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .lb-row:hover {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .lb-row.me {
    background: rgba(245, 158, 11, 0.06);
}

[data-theme="light"] .nav-icon-btn:hover {
    background: rgba(245, 158, 11, 0.1);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .lb-modal-content {
        width: 96%;
        max-width: none;
    }

    .lb-tab {
        font-size: 0.78rem;
        padding: 0.6rem 0.3rem;
    }

    .lb-row {
        padding: 0.55rem 0.75rem;
    }

    .lb-rank {
        width: 28px;
        font-size: 0.85rem;
    }

    .lb-username {
        font-size: 0.82rem;
    }

    .lb-stat {
        font-size: 0.8rem;
    }

    .lb-table-container {
        max-height: 350px;
    }

    .nav-icon-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        margin-right: 0.3rem;
    }

    .snap-mode-container {
        flex-direction: row;
    }
}

/* ============================
   Snap Mode Styles
   ============================ */

.snap-mode-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.75rem;
}

.snap-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 0.4rem;
    user-select: none;
}

.snap-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.snap-toggle-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: background 0.3s;
    flex-shrink: 0;
}

.snap-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.snap-toggle input:checked + .snap-toggle-slider {
    background: #f59e0b;
}

.snap-toggle input:checked + .snap-toggle-slider::after {
    transform: translateX(16px);
}

.snap-toggle-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    transition: color 0.3s;
}

.snap-toggle-label i {
    color: #f59e0b;
}

.snap-toggle input:checked ~ .snap-toggle-label {
    color: #f59e0b;
}

.snap-mode-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    animation: snapBadgePulse 2s ease-in-out infinite;
}

@keyframes snapBadgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Snap Countdown Ring */
.snap-countdown {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 60px;
    height: 60px;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
}

.snap-ring-svg {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.snap-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 3;
}

.snap-ring-circle {
    fill: none;
    stroke: #f59e0b;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 150.796;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.snap-countdown.snap-urgent .snap-ring-circle {
    stroke: #ef4444;
    animation: snapUrgentPulse 0.5s ease-in-out infinite;
}

@keyframes snapUrgentPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.snap-time {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.snap-countdown.snap-urgent .snap-time {
    color: #ef4444;
}

/* Snap Time's Up Flash */
.snap-timeup-flash {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    color: #f59e0b;
    font-size: 2rem;
    font-weight: 800;
    z-index: 20;
    animation: snapTimeupFade 1.5s ease-out forwards;
    pointer-events: none;
}

@keyframes snapTimeupFade {
    0% { opacity: 1; transform: scale(1.2); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.9); }
}

/* Light theme overrides */
[data-theme="light"] .snap-toggle-slider {
    background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .snap-toggle-label {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .snap-toggle input:checked ~ .snap-toggle-label {
    color: #d97706;
}

[data-theme="light"] .snap-mode-badge {
    color: #d97706;
    background: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .snap-mode-container {
        margin-left: 0.5rem;
    }

    .snap-countdown {
        top: 8px;
        right: 8px;
        width: 50px;
        height: 50px;
    }

    .snap-ring-svg {
        width: 50px;
        height: 50px;
    }

    .snap-ring-bg,
    .snap-ring-circle {
        cx: 25;
        cy: 25;
        r: 20;
    }

    .snap-time {
        font-size: 0.9rem;
    }

    .snap-timeup-flash {
        font-size: 1.5rem;
    }
}

/* ==================
   Rewind / Reconnect
   ================== */

.rewind-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-left: 0.5rem;
}

.rewind-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
}

.rewind-btn.pending {
    animation: rewind-pulse 1.5s ease-in-out infinite;
}

@keyframes rewind-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(168, 85, 247, 0); }
}

.rewind-panel {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    max-height: 300px;
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    z-index: 20;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.rewind-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rewind-panel-header h3 {
    margin: 0;
    font-size: 0.9rem;
    color: #a855f7;
}

.rewind-panel-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
}

.rewind-panel-close:hover {
    color: #fff;
}

.rewind-panel-body {
    padding: 0.5rem;
    max-height: 220px;
    overflow-y: auto;
}

.rewind-empty {
    text-align: center;
    padding: 1rem;
    color: #888;
    font-size: 0.85rem;
}

.rewind-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.rewind-list-item:hover {
    background: rgba(168, 85, 247, 0.15);
}

.rewind-list-item .rewind-flag {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.rewind-list-item .rewind-info {
    flex: 1;
    min-width: 0;
}

.rewind-list-item .rewind-label {
    font-size: 0.85rem;
    color: #ddd;
}

.rewind-list-item .rewind-time {
    font-size: 0.7rem;
    color: #888;
}

.rewind-list-item .rewind-online {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rewind-list-item .rewind-online.online {
    background: #22c55e;
    box-shadow: 0 0 4px #22c55e;
}

.rewind-list-item .rewind-online.offline {
    background: #555;
}

.rewind-list-item .rewind-reconnect-icon {
    color: #a855f7;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Rewind request modal */
.rewind-request-content {
    text-align: center;
    max-width: 320px;
    padding: 2rem;
}

.rewind-request-icon {
    font-size: 2.5rem;
    color: #a855f7;
    margin-bottom: 0.5rem;
}

.rewind-request-content h3 {
    margin: 0.5rem 0;
    color: #fff;
}

.rewind-request-content p {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.rewind-request-timer {
    font-size: 2rem;
    font-weight: bold;
    color: #a855f7;
    margin-bottom: 1rem;
}

.rewind-request-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.rewind-request-actions .btn-accept {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.rewind-request-actions .btn-accept:hover {
    transform: scale(1.05);
}

.rewind-request-actions .btn-decline {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.rewind-request-actions .btn-decline:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Light theme overrides */
[data-theme="light"] .rewind-panel {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(168, 85, 247, 0.2);
}

[data-theme="light"] .rewind-panel-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .rewind-list-item .rewind-label {
    color: #333;
}

[data-theme="light"] .rewind-list-item .rewind-time {
    color: #666;
}

[data-theme="light"] .rewind-empty {
    color: #666;
}

[data-theme="light"] .rewind-request-content h3 {
    color: #222;
}

[data-theme="light"] .rewind-request-content p {
    color: #666;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .rewind-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .rewind-panel {
        width: 260px;
        bottom: 60px;
    }
}

/* Very small screens - tighter dock */
@media (max-width: 360px) {
    .video-controls {
        gap: 0.4rem;
        padding: 0.4rem 0.5rem;
    }

    .snap-toggle-label {
        display: none;
    }

    .action-btn {
        padding: 0.45rem 1rem;
        font-size: 0.75rem;
    }
}
