/* ===== BASE CSS ===== */
/* Reset, Variables, Typography */

:root {
    --bg: #000000;
    --bg-gradient: radial-gradient(circle at 50% 0%, #1a1a1a 0%, #000000 100%);
    --bg-elevated: rgba(28, 28, 30, 0.6);
    --bg-overlay: rgba(0, 0, 0, 0.8);
    --surface: rgba(44, 44, 46, 0.5);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --accent: #0a84ff;
    --accent-rgb: 10, 132, 255;
    --accent-hover: #007aff;
    --accent-gradient: linear-gradient(135deg, #0a84ff, #007aff);
    --accent-glow: 0 0 20px rgba(10, 132, 255, 0.3);
    --success: #32d74b;
    --danger: #ff453a;
    --error: #ff453a;
    --warning: #ff9f0a;
    --text: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-tertiary: rgba(255, 255, 255, 0.35);
    --border: rgba(255, 255, 255, 0.1);
    --radius: 20px;
    --radius-sm: 14px;
}

[data-theme="light"] {
    --bg: #f2f2f7;
    --bg-gradient: radial-gradient(circle at 50% 0%, #ffffff 0%, #f2f2f7 100%);
    --bg-elevated: rgba(255, 255, 255, 0.65);
    --bg-overlay: rgba(255, 255, 255, 0.8);
    --surface: rgba(242, 242, 247, 0.5);
    --glass-border: 1px solid rgba(0, 0, 0, 0.05);
    --text: #000000;
    --text-secondary: rgba(0, 0, 0, 0.6);
    --text-tertiary: rgba(0, 0, 0, 0.35);
    --border: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    background-image: var(--bg-gradient);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Classes */
.glass {
    background: var(--bg-elevated);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    /* Use will-change sparingly for elements that animate frequently */
}

/* Improve rendering performance with CSS containment */
.chat-message,
.game-arena,
.participant-card {
    contain: layout style;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 90px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

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

audio {
    display: none;
}

/* Keyframe Animations */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes ring {
    0% {
        box-shadow: 0 0 0 0 var(--accent-glow);
    }

    100% {
        box-shadow: 0 0 0 30px transparent;
    }
}

@keyframes ring-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

@keyframes voice-ring {
    0% {
        transform: scale(0.9);
        opacity: 1;
    }

    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

@keyframes pop-in {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

/* ===== SUGGESTION BOX ===== */
/* Suggestion Trigger Button - positioned below header */
.suggestion-trigger {
    position: absolute;
    top: 70px;
    right: 0;
    left: auto;
    width: auto;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 20px 0 0 20px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    transition: padding-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    will-change: padding-left, box-shadow;
}

.suggestion-trigger:hover {
    padding-left: 18px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Lightbulb Icon - subtle glow */
.suggestion-bulb {
    font-size: 16px;
    filter: drop-shadow(0 0 3px rgba(255, 230, 100, 0.4));
    animation: bulb-glow 2.5s ease-in-out infinite;
}

@keyframes bulb-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 2px rgba(255, 230, 100, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 5px rgba(255, 230, 100, 0.5));
    }
}

.suggestion-trigger svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* Modal Overlay */
.suggestion-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    will-change: opacity;
}

.suggestion-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.suggestion-modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: linear-gradient(145deg,
            rgba(30, 30, 35, 0.95) 0%,
            rgba(20, 20, 25, 0.98) 100%);
    border-radius: 24px;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

.suggestion-modal-overlay.active .suggestion-modal {
    transform: scale(1) translateY(0);
}
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(102, 126, 234, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.suggestion-modal-overlay.active .suggestion-modal {
    transform: scale(1) translateY(0);
}

/* Close Button */
.suggestion-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.suggestion-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: rotate(90deg);
}

/* Header */
.suggestion-header {
    text-align: center;
    margin-bottom: 24px;
}

.suggestion-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: suggestion-bounce 2s infinite;
}

@keyframes suggestion-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.suggestion-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #fff 0%, #a8b2d1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.suggestion-header p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* Form */
#suggestionForm {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.suggestion-input-wrapper {
    position: relative;
}

#suggestionMessage {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    resize: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#suggestionMessage::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

#suggestionMessage:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.05);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.textarea-glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 18px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    filter: blur(8px);
}

#suggestionMessage:focus~.textarea-glow {
    opacity: 0.3;
}

/* Submit Button */
.suggestion-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.suggestion-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.suggestion-submit:hover::before {
    opacity: 1;
}

.suggestion-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.suggestion-submit:active {
    transform: translateY(0);
}

.submit-text,
.submit-icon {
    position: relative;
    z-index: 1;
}

.submit-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.suggestion-submit.loading .submit-text,
.suggestion-submit.loading .submit-icon {
    display: none;
}

.suggestion-submit.loading .submit-loader {
    display: block;
}

/* Success State */
.suggestion-success {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.suggestion-success.show {
    display: block;
    animation: suggestion-fadeInUp 0.5s ease;
}

@keyframes suggestion-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.success-icon {
    font-size: 56px;
    margin-bottom: 16px;
    animation: suggestion-pulse 1.5s infinite;
}

@keyframes suggestion-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.suggestion-success h4 {
    font-size: 22px;
    font-weight: 700;
    color: #4ade80;
    margin: 0 0 8px 0;
}

.suggestion-success p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.5;
}

/* Hide form when success is shown */
.suggestion-modal.success #suggestionForm {
    display: none;
}

.suggestion-modal.success .suggestion-header {
    display: none;
}

/* Responsive */
@media (max-width: 480px) {
    .suggestion-trigger {
        padding: 8px 12px;
        font-size: 11px;
        gap: 5px;
    }

    .suggestion-trigger svg {
        width: 14px;
        height: 14px;
    }

    .suggestion-modal {
        padding: 24px;
        padding-top: 48px;
        border-radius: 20px;
        margin: 12px;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Larger close button for mobile touch */
    .suggestion-close {
        width: 44px;
        height: 44px;
        top: 8px;
        right: 8px;
    }

    .suggestion-icon {
        font-size: 40px;
    }

    .suggestion-header h3 {
        font-size: 20px;
    }

    #suggestionMessage {
        font-size: 16px;
        /* Prevents iOS zoom on focus */
    }

    .suggestion-submit {
        padding: 14px 24px;
        font-size: 15px;
    }
}


/* ===== CALL UI CSS ===== */
/* Call display, avatar, timer, actions */

/* Call Display */
.call-display {
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    min-width: 280px;
}

/* Call Topbar - Signal left, Timer right */
.call-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 10px;
    min-height: 28px;
    visibility: hidden;
    /* Hidden by default, preserves space */
}

.call-topbar.active {
    visibility: visible;
}

.call-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--accent), #bf5af2, #ff6b6b);
    background-size: 200% 200%;
    animation: gradient-rotate 4s ease infinite;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 60px var(--accent-glow),
        0 0 100px rgba(191, 90, 242, 0.2),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes gradient-rotate {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}



.call-avatar svg {
    width: 56px;
    height: 56px;
    color: white;
    z-index: 2;
    position: relative;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.call-avatar.searching {
    animation: ring 1.5s ease-out infinite;
}

.call-avatar.in-call::after {
    content: '';
    position: absolute;
    inset: -6px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: ring-pulse 2s ease-out infinite;
}

.call-avatar.in-call::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 60%, rgba(10, 132, 255, 0.1) 100%);
    animation: waveform-idle 3s ease-in-out infinite;
}

@keyframes waveform-idle {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Voice Activity */
.call-avatar.speaking {
    box-shadow: 0 0 0 8px rgba(48, 209, 88, 0.3), 0 0 40px var(--accent-glow);
}

.call-avatar.speaking::before {
    background: radial-gradient(circle, transparent 60%, rgba(48, 209, 88, 0.2) 100%);
    animation: waveform-speaking 0.8s ease-in-out infinite;
}

@keyframes waveform-speaking {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* State animations */
.call-avatar.state-idle {
    transform: scale(1);
    box-shadow: 0 0 30px rgba(10, 132, 255, 0.2);
}

.call-avatar.state-searching {
    transform: scale(1.05);
    animation: search-pulse 1.5s ease-in-out infinite;
}

.call-avatar.state-connected {
    transform: scale(1.1);
    box-shadow: 0 0 60px rgba(48, 209, 88, 0.4);
}

@keyframes search-pulse {

    0%,
    100% {
        transform: scale(1.05);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Peer Muted Indicator */
.peer-muted {
    display: none;
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 28px;
    height: 28px;
    background: var(--danger);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg);
}

.peer-muted.visible {
    display: flex;
}

.peer-muted svg {
    width: 14px;
    height: 14px;
    color: white;
}

/* Call Timer - Always visible in topbar */
.call-timer {
    font-size: 18px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    padding: 4px 12px;
    background: var(--surface);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.call-timer.active {
    color: var(--text);
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.15), rgba(191, 90, 242, 0.15));
    border: 1px solid rgba(10, 132, 255, 0.3);
}

.call-status {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 2px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.call-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Mood Badge */
.mood-badge {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--surface);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 10px;
}

.mood-badge.visible {
    display: inline-flex;
}

.mood-badge svg {
    width: 14px;
    height: 14px;
}

/* Mood Match Banner */
.mood-match-banner {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.15), rgba(191, 90, 242, 0.15));
    border: 1px solid rgba(10, 132, 255, 0.3);
    border-radius: 16px;
    margin-top: 16px;
    animation: mood-match-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mood-match-banner.visible {
    display: flex;
}

.mood-match-banner svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.mood-match-banner span {
    font-size: 14px;
    font-weight: 500;
    background: linear-gradient(135deg, var(--accent), #bf5af2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes mood-match-in {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Voice Indicator */
.voice-indicator {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 12px;
    transition: all 0.3s ease;
}

.voice-indicator.visible {
    display: inline-flex;
}

.voice-indicator.speaking {
    background: rgba(48, 209, 88, 0.15);
    color: var(--success);
    border: 1px solid rgba(48, 209, 88, 0.3);
}

.voice-indicator.listening {
    background: rgba(10, 132, 255, 0.15);
    color: var(--accent);
    border: 1px solid rgba(10, 132, 255, 0.3);
}

.voice-indicator svg {
    width: 12px;
    height: 12px;
}

/* Connection Bar - Always visible in topbar */
.connection-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    padding: 4px 10px;
    background: var(--surface);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.connection-bar.active {
    color: var(--text-secondary);
}

.signal-bars {
    display: flex;
    gap: 2px;
    align-items: flex-end;
}

.signal-bar {
    width: 3px;
    background: var(--text-tertiary);
    border-radius: 1px;
    transition: background 0.3s ease;
}

.signal-bar:nth-child(1) {
    height: 5px;
}

.signal-bar:nth-child(2) {
    height: 9px;
}

.signal-bar:nth-child(3) {
    height: 13px;
}

.signal-bar:nth-child(4) {
    height: 17px;
}

.signal-bar.good {
    background: var(--success);
}

.signal-bar.fair {
    background: var(--warning);
}

.signal-bar.poor {
    background: var(--danger);
}

/* Action Area - Fixed Layout */
.action-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Action Buttons Row: Mute | Call | Report */
.action-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Side Action Buttons (Mute & Report) */
.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    border: none;
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover:not(:disabled) {
    background: var(--bg-elevated);
    color: var(--text);
    transform: translateY(-2px);
}

.action-btn:active:not(:disabled) {
    transform: scale(0.95);
}

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

.action-btn svg {
    width: 20px;
    height: 20px;
}

.action-btn-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Mute Button Active State */
.action-btn.mute.active {
    background: var(--danger);
    color: white;
}

/* Report Button Hover */
.action-btn.report:hover:not(:disabled) {
    background: rgba(255, 159, 10, 0.15);
    color: var(--warning);
}

/* Main Action Button */
.main-action {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.main-action svg {
    width: 32px;
    height: 32px;
    color: white;
}

.main-action.call {
    background: var(--success);
}

.main-action.call:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(48, 209, 88, 0.5);
}

.main-action.end {
    background: var(--danger);
}

.main-action.end:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 69, 58, 0.5);
}

.main-action:active {
    transform: scale(0.95);
}

/* Searching State - Outer Spinning Ring */
.main-action.searching {
    background: var(--danger);
    position: relative;
}

.main-action.searching::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.9);
    border-right-color: rgba(255, 255, 255, 0.3);
    animation: ring-spin 1s linear infinite;
}

.main-action.searching::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(255, 69, 58, 0.6);
    border-left-color: rgba(255, 69, 58, 0.2);
    animation: ring-spin 1.5s linear infinite reverse;
}

@keyframes ring-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Skip to Next Button - Prominent during peer disconnect */
.main-action.skip-next {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    position: relative;
    animation: skip-pulse 1.5s ease-in-out infinite;
}

.main-action.skip-next:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(6, 182, 212, 0.6);
}

.main-action.skip-next::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.3);
    animation: skip-ring-pulse 1.5s ease-out infinite;
}

.main-action.skip-next::after {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.15);
    animation: skip-ring-pulse 1.5s ease-out infinite 0.3s;
}

@keyframes skip-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 6px 24px rgba(6, 182, 212, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 32px rgba(6, 182, 212, 0.6);
    }
}

@keyframes skip-ring-pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

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

/* Auto-reconnect Toggle */
.auto-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.toggle {
    width: 36px;
    height: 20px;
    background: rgba(120, 120, 128, 0.4);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle.active {
    background: var(--success);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: left 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle.active::after {
    left: 18px;
}

/* Audio Badge */
.audio-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(48, 209, 88, 0.15);
    border: 1px solid rgba(48, 209, 88, 0.3);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    color: var(--success);
}

.audio-badge svg {
    width: 12px;
    height: 12px;
}

/* Confetti Container */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translateY(-100%) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

/* ===== E2EE ENCRYPTION BADGE ===== */
.encryption-badge {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.12), rgba(48, 209, 88, 0.06));
    border: 1px solid rgba(48, 209, 88, 0.25);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--success);
    margin-top: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: encryption-fade-in 0.5s ease-out;
}

.encryption-badge.visible {
    display: inline-flex;
}

.encryption-badge:hover {
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.2), rgba(48, 209, 88, 0.1));
    border-color: rgba(48, 209, 88, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(48, 209, 88, 0.2);
}

.encryption-badge svg {
    width: 14px;
    height: 14px;
}

/* Secure pulse animation */
.encryption-badge::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.3), transparent);
    opacity: 0;
    animation: encryption-pulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes encryption-fade-in {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes encryption-pulse {

    0%,
    100% {
        opacity: 0;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

/* Encryption Tooltip */
.encryption-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    min-width: 260px;
    padding: 16px;
    background: var(--bg-elevated);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(48, 209, 88, 0.2);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(48, 209, 88, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
    pointer-events: none;
}

.encryption-badge:hover .encryption-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
    pointer-events: auto;
}

/* Tooltip Arrow */
.encryption-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 16px;
    height: 16px;
    background: var(--bg-elevated);
    border-right: 1px solid rgba(48, 209, 88, 0.2);
    border-bottom: 1px solid rgba(48, 209, 88, 0.2);
}

.encryption-tooltip .tooltip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--success);
    font-weight: 600;
    font-size: 14px;
}

.encryption-tooltip .tooltip-header svg {
    width: 18px;
    height: 18px;
}

.encryption-tooltip p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.encryption-tooltip .tooltip-details {
    background: rgba(48, 209, 88, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
}

/* Simple feature items for non-tech users */
.encryption-tooltip .tooltip-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(48, 209, 88, 0.08);
    border-radius: 10px;
    padding: 12px;
}

.encryption-tooltip .feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text);
}

.encryption-tooltip .feature-item svg {
    width: 16px;
    height: 16px;
    color: var(--success);
}

/* Encryption States */
.encryption-badge.encrypting {
    background: linear-gradient(135deg, rgba(255, 159, 10, 0.12), rgba(255, 159, 10, 0.06));
    border-color: rgba(255, 159, 10, 0.25);
    color: var(--warning);
}

.encryption-badge.encrypting::before {
    animation: none;
}

.encryption-badge.error {
    background: linear-gradient(135deg, rgba(255, 69, 58, 0.12), rgba(255, 69, 58, 0.06));
    border-color: rgba(255, 69, 58, 0.25);
    color: var(--danger);
}

/* Active state - when in an encrypted call */
.encryption-badge.active {
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.18), rgba(48, 209, 88, 0.08));
    border-color: rgba(48, 209, 88, 0.4);
    box-shadow: 0 0 20px rgba(48, 209, 88, 0.15);
}

.encryption-badge.active::before {
    animation: encryption-pulse 2s ease-in-out infinite;
}

/* ===== PARTNER LOCATION DISPLAY ===== */
.partner-location {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--surface);
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
    animation: location-fade-in 0.4s ease-out;
}

.partner-location.visible {
    display: inline-flex;
}

.partner-location svg {
    width: 14px;
    height: 14px;
    color: var(--accent);
}

.partner-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
}

@keyframes location-fade-in {
    0% {
        opacity: 0;
        transform: translateY(-8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== REPORT MODAL ===== */
.report-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.report-modal.visible {
    display: flex;
}

.report-modal-content {
    background: var(--bg-elevated, #1c1c1e);
    border-radius: 20px;
    padding: 24px;
    max-width: 360px;
    width: 100%;
    animation: modal-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-in {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.report-modal-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text, #fff);
}

.report-modal-content>p {
    font-size: 14px;
    color: var(--text-secondary, #8e8e93);
    margin-bottom: 20px;
}

.report-reasons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.report-reason {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface, #2c2c2e);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.report-reason:hover {
    background: var(--bg-elevated, #3a3a3c);
    border-color: var(--accent, #0a84ff);
    transform: translateX(4px);
}

.report-reason-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.report-reason-text h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text, #fff);
    margin-bottom: 2px;
}

.report-reason-text p {
    font-size: 12px;
    color: var(--text-secondary, #8e8e93);
}

.report-cancel {
    display: block;
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 1px solid var(--border, #38383a);
    border-radius: 14px;
    color: var(--text-secondary, #8e8e93);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-cancel:hover {
    background: var(--surface, #2c2c2e);
    color: var(--text, #fff);
}

/* ===== HISTORY.CSS ===== */
/* Call History Panel & Callback Notification Styles */

/* ============================================================================
   HISTORY PANEL
   ============================================================================ */

.history-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(380px, 90vw);
    height: 100%;
    background: rgba(18, 18, 24, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.history-panel.visible {
    right: 0;
}

/* Header */
.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.history-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-header h3::before {
    content: '📞';
    font-size: 1.1rem;
}

.history-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #aaa;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Settings Section */
.history-settings {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.setting-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.setting-toggle span:first-child {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.setting-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 48px;
    height: 26px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 13px;
    transition: all 0.3s ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.setting-toggle input:checked+.toggle-slider {
    background: linear-gradient(135deg, #32d74b, #28a745);
}

.setting-toggle input:checked+.toggle-slider::after {
    left: 25px;
}

/* History List */
.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

/* Empty State */
.history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
}

.history-empty i {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.history-empty p {
    margin: 0 0 8px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
}

.history-empty span {
    font-size: 0.85rem;
}

/* History Item */
.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.history-item:last-child {
    margin-bottom: 0;
}

/* Item Icon - simplified to single style */
.history-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(10, 132, 255, 0.15);
    color: #0a84ff;
    position: relative;
}

.history-item-icon i {
    width: 20px;
    height: 20px;
}

/* Online Status Indicator */
.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(18, 18, 24, 0.97);
}

.online-indicator.status-online {
    background: #32d74b;
    box-shadow: 0 0 6px rgba(50, 215, 75, 0.5);
}

.online-indicator.status-offline {
    background: #636366;
}

.online-indicator.status-unknown {
    background: #636366;
    animation: pulseCheck 1.5s ease-in-out infinite;
}

@keyframes pulseCheck {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Item Info */
.history-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-item-type {
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
}

.history-item-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Duration Badge */
.history-item-duration {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* Callback Button */
.history-callback-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: linear-gradient(135deg, #32d74b, #28a745);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.history-callback-btn i {
    width: 18px;
    height: 18px;
}

.history-callback-btn:hover:not(.disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(50, 215, 75, 0.4);
}

.history-callback-btn.disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

/* Clear History Button */
.history-clear {
    margin: 16px 24px 24px;
    padding: 14px 24px;
    background: rgba(255, 69, 58, 0.1);
    border: 1px solid rgba(255, 69, 58, 0.3);
    color: #ff453a;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.history-clear:hover {
    background: rgba(255, 69, 58, 0.2);
    border-color: rgba(255, 69, 58, 0.5);
}

.history-clear i {
    width: 16px;
    height: 16px;
}

/* ============================================================================
   CALLBACK MODAL (Full-screen incoming call popup)
   ============================================================================ */

.callback-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2001;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.callback-modal.visible {
    display: flex;
    opacity: 1;
}

.callback-content {
    background: linear-gradient(145deg, #1a1a24, #12121a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    animation: callbackPopIn 0.3s ease-out;
}

@keyframes callbackPopIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.callback-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    animation: callbackRing 1s ease-in-out infinite;
}

@keyframes callbackRing {

    0%,
    100% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(10deg);
    }
}

.callback-content h3 {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 8px;
}

.callback-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin: 0 0 24px;
}

.callback-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.callback-accept,
.callback-reject {
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.callback-accept {
    background: linear-gradient(135deg, #32d74b, #28a745);
    color: #fff;
}

.callback-accept:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(50, 215, 75, 0.4);
}

.callback-reject {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.callback-reject:hover {
    background: rgba(255, 69, 58, 0.8);
    border-color: transparent;
    color: #fff;
}

/* ============================================================================
   CALLBACK NOTIFICATION BANNER (Top notification, not full-screen popup)
   ============================================================================ */

.callback-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(50, 215, 75, 0.95), rgba(40, 167, 69, 0.95));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: bannerSlideIn 0.3s ease-out;
}

@keyframes bannerSlideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

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

.callback-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.callback-banner-content i {
    width: 24px;
    height: 24px;
    color: #fff;
    animation: bannerPulse 1s ease-in-out infinite;
}

@keyframes bannerPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.callback-banner-content span {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.callback-banner-actions {
    display: flex;
    gap: 8px;
}

.callback-accept-btn,
.callback-reject-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.callback-accept-btn {
    background: #fff;
    color: #28a745;
}

.callback-accept-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.callback-reject-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.callback-reject-btn:hover {
    background: rgba(255, 69, 58, 0.8);
    border-color: transparent;
}

/* ============================================================================
   LIGHT THEME OVERRIDES
   ============================================================================ */

[data-theme="light"] .history-panel {
    background: rgba(255, 255, 255, 0.97);
    border-left-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .history-header {
    background: rgba(0, 0, 0, 0.02);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .history-header h3 {
    color: #1a1a1a;
}

[data-theme="light"] .history-close {
    background: rgba(0, 0, 0, 0.06);
    color: #666;
}

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

[data-theme="light"] .history-settings {
    background: rgba(0, 0, 0, 0.02);
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .setting-toggle span:first-child {
    color: rgba(0, 0, 0, 0.8);
}

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

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

[data-theme="light"] .history-empty p {
    color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .history-item {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .history-item:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .history-item-type {
    color: #1a1a1a;
}

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

[data-theme="light"] .history-item-duration {
    color: rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .history-callback-btn.disabled {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .callback-modal {
    background: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .callback-content {
    background: linear-gradient(145deg, #fff, #f5f5f7);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .callback-content h3 {
    color: #1a1a1a;
}

[data-theme="light"] .callback-content p {
    color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .callback-reject {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 480px) {
    .history-panel {
        width: 100%;
    }

    .history-header {
        padding: 16px 20px;
    }

    .history-settings {
        padding: 14px 20px;
    }

    .history-list {
        padding: 10px;
    }

    .history-item {
        padding: 12px;
        gap: 10px;
    }

    .history-clear {
        margin: 12px 20px 20px;
    }

    .callback-content {
        padding: 24px;
    }

    .callback-icon {
        font-size: 2.5rem;
    }

    .callback-content h3 {
        font-size: 1.3rem;
    }

    .callback-actions {
        flex-direction: column;
    }
}

/* Rooms Sidebar Styles */

/* Sidebar specific overrides */
#roomsPanel .filter-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rooms-sidebar-actions {
    margin-bottom: 8px;
}

.btn-primary-small.width-100 {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 14px;
}

.rooms-sidebar-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    display: none;
    /* Hidden for cleanliness, or can show */
    margin-bottom: 8px;
}

.rooms-preview-grid.sidebar-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 60vh;
    /* Scrollable list */
}

/* Sidebar mini cards */
.mini-room-card.sidebar-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
}

.mini-room-card.sidebar-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.mini-room-arrow {
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
}

.mini-room-arrow i {
    width: 16px;
    height: 16px;
}

.rooms-sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
    margin-top: auto;
    text-align: center;
}

.see-all-rooms-link {
    color: var(--primary-color, #0a84ff);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}

.see-all-rooms-link:hover {
    opacity: 0.8;
}

.see-all-rooms-link i {
    width: 16px;
    height: 16px;
}

.no-rooms-preview.sidebar-empty {
    padding: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.small-text {
    font-size: 12px;
    opacity: 0.5;
}

/* Original Card Styles needed for reuse */
.mini-room-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.mini-room-info {
    flex: 1;
}

.mini-room-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #fff;
    background: linear-gradient(135deg, #fff, #aaa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mini-room-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-room-count {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mini-room-count i {
    width: 12px;
    height: 12px;
}

.mini-room-cat {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.mini-room-icon {
    font-size: 20px;
}

/* Buttons */
.btn-primary-small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    background: linear-gradient(135deg, #0a84ff, #0066cc);
    color: white;
    border: none;
    cursor: pointer;
}

.btn-primary-small:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-primary-small i {
    width: 14px;
    height: 14px;
}

/* Landing Page & Footer Styles */

/* Performance optimization: Use content-visibility for off-screen content */
.seo-section,
.features-section,
.how-section,
.faq-section,
.cta-section,
.explore-section,
.blog-preview,
.site-footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* ========== SEO Content Section ========== */
.seo-section {
    background: var(--bg);
    padding: 60px 20px 80px;
    border-top: 1px solid var(--border);
}

.seo-content {
    max-width: 1100px;
    margin: 0 auto;
}

/* SEO Hero */
.seo-hero {
    text-align: center;
    margin-bottom: 40px;
}

.seo-content h1 {
    color: var(--text);
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
}

.seo-subtitle {
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
}

.seo-content h2 {
    color: var(--text);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}

.seo-content p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 50px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.trust-badge svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

/* Stats Section */
.stats-section {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 60px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.08), rgba(var(--accent-rgb), 0.02));
    border-radius: 16px;
    border: 1px solid rgba(var(--accent-rgb), 0.1);
}

.stats-section .stat-item {
    text-align: center;
    min-width: 100px;
}

.stats-section .stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 4px;
}

.stats-section .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Why Section */
.why-section {
    text-align: center;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.why-section p {
    text-align: center;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.feature-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.feature-icon svg {
    width: 26px;
    height: 26px;
    color: white;
}

.feature-card h3 {
    color: var(--text);
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Privacy Section */
.privacy-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 60px;
}

.privacy-section h2 {
    margin-bottom: 20px;
}

.privacy-content>p {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 30px;
}

.privacy-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.privacy-point {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--bg);
    border-radius: 12px;
}

.privacy-point svg {
    width: 22px;
    height: 22px;
    color: var(--error);
    flex-shrink: 0;
    margin-top: 2px;
}

.privacy-point strong {
    display: block;
    color: var(--text);
    font-size: 15px;
    margin-bottom: 4px;
}

.privacy-point p {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

/* How It Works */
.how-it-works {
    margin-bottom: 60px;
    text-align: center;
}

.how-it-works h2 {
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 30px;
}

.steps-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.step {
    text-align: center;
    max-width: 180px;
    flex: 1;
    min-width: 150px;
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    margin: 0 auto 14px;
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

.step h4 {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.step p {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Use Cases Section */
.use-cases-section {
    margin-bottom: 60px;
}

.use-cases-section h2 {
    margin-bottom: 30px;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.use-case {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: transform 0.2s;
}

.use-case:hover {
    transform: translateY(-2px);
}

.use-case-emoji {
    font-size: 28px;
    flex-shrink: 0;
}

.use-case h4 {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.use-case p {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

/* FAQ Section */
.faq-section {
    margin-bottom: 60px;
}

.faq-section h2 {
    margin-bottom: 30px;
}

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

.faq-item {
    padding: 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.faq-item h4 {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
}

.faq-item p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.02));
    border: 1px solid rgba(var(--accent-rgb), 0.15);
    border-radius: 24px;
}

.cta-section h2 {
    margin-bottom: 12px;
}

.cta-section p {
    text-align: center;
    max-width: 500px;
    margin: 0 auto 24px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 100px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.4);
}

.cta-button svg {
    width: 20px;
    height: 20px;
}



/* ========== RESPONSIVE STYLES ========== */

/* Tablet - 1024px and below */
@media (max-width: 1024px) {
    .seo-content {
        max-width: 900px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1.5fr repeat(4, 1fr);
        gap: 30px;
    }
}

/* Small Tablet / Large Phone - 768px and below */
@media (max-width: 768px) {
    .seo-section {
        padding: 40px 16px 60px;
    }

    .seo-content h1 {
        font-size: 26px;
        line-height: 1.35;
    }

    .seo-subtitle {
        font-size: 15px;
    }

    .seo-content h2 {
        font-size: 22px;
    }

    /* Trust Badges */
    .trust-badges {
        gap: 10px;
    }

    .trust-badge {
        padding: 8px 14px;
        font-size: 12px;
    }

    .trust-badge svg {
        width: 14px;
        height: 14px;
    }

    /* Stats */
    .stats-section {
        gap: 20px;
        padding: 24px 16px;
    }

    .stats-section .stat-number {
        font-size: 26px;
    }

    .stats-section .stat-label {
        font-size: 12px;
    }

    /* Why Section */
    .why-section {
        margin-bottom: 40px;
    }

    .why-section p {
        font-size: 14px;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        margin-bottom: 50px;
    }

    .feature-card {
        padding: 22px 18px;
        border-radius: 14px;
    }

    .feature-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 14px;
    }

    .feature-icon svg {
        width: 22px;
        height: 22px;
    }

    .feature-card h3 {
        font-size: 15px;
    }

    .feature-card p {
        font-size: 13px;
    }

    /* Privacy Section */
    .privacy-section {
        padding: 28px 20px;
        border-radius: 16px;
        margin-bottom: 50px;
    }

    .privacy-points {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .privacy-point {
        padding: 14px;
    }

    .privacy-point svg {
        width: 20px;
        height: 20px;
    }

    .privacy-point strong {
        font-size: 14px;
    }

    .privacy-point p {
        font-size: 12px;
    }

    /* Steps */
    .steps-grid {
        gap: 16px;
    }

    .step {
        min-width: 130px;
    }

    .step-number {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .step h4 {
        font-size: 14px;
    }

    .step p {
        font-size: 12px;
    }

    /* Use Cases */
    .use-cases-section {
        margin-bottom: 50px;
    }

    .use-cases-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .use-case {
        padding: 16px;
    }

    .use-case-emoji {
        font-size: 24px;
    }

    .use-case h4 {
        font-size: 14px;
    }

    .use-case p {
        font-size: 12px;
    }

    /* FAQ */
    .faq-section {
        margin-bottom: 50px;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .faq-item {
        padding: 20px;
    }

    .faq-item h4 {
        font-size: 14px;
    }

    .faq-item p {
        font-size: 13px;
    }

    /* CTA */
    .cta-section {
        padding: 36px 20px;
        border-radius: 18px;
    }

    .cta-button {
        padding: 14px 28px;
        font-size: 15px;
    }

    /* Footer */
    .site-footer {
        padding: 40px 16px 24px;
    }

    .footer-trust {
        gap: 16px;
        margin-bottom: 30px;
        padding-bottom: 24px;
    }

    .trust-item {
        font-size: 12px;
    }

    .trust-item svg {
        width: 16px;
        height: 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        margin-bottom: 30px;
    }

    .footer-about {
        grid-column: span 2;
        max-width: none;
        text-align: center;
    }

    .footer-brand {
        justify-content: center;
    }

    .footer-tagline,
    .footer-description {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-section h4 {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .footer-section a {
        font-size: 12px;
        margin-bottom: 8px;
    }
}

/* Phone - 600px and below */
@media (max-width: 600px) {
    .seo-section {
        padding: 32px 14px 50px;
    }

    .seo-hero {
        margin-bottom: 30px;
    }

    .seo-content h1 {
        font-size: 22px;
    }

    .seo-subtitle {
        font-size: 14px;
    }

    .seo-content h2 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    /* Trust Badges - 2 per row */
    .trust-badges {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 30px;
    }

    .trust-badge {
        justify-content: center;
        padding: 10px 12px;
        font-size: 11px;
    }

    /* Stats - 2x2 Grid */
    .stats-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        padding: 20px 16px;
        margin-bottom: 40px;
    }

    .stats-section .stat-item {
        min-width: unset;
    }

    .stats-section .stat-number {
        font-size: 24px;
    }

    .stats-section .stat-label {
        font-size: 11px;
    }

    /* Features - Single Column */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 40px;
    }

    .feature-card {
        display: flex;
        align-items: flex-start;
        gap: 14px;
        padding: 18px;
        text-align: left;
    }

    .feature-icon {
        margin: 0;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .feature-icon svg {
        width: 20px;
        height: 20px;
    }

    .feature-card h3 {
        margin-bottom: 6px;
    }

    .feature-card p {
        text-align: left;
    }

    /* How It Works - 2x2 Grid */
    .how-it-works {
        margin-bottom: 40px;
    }

    .section-subtitle {
        font-size: 13px;
        margin-bottom: 24px;
    }

    .steps-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .step {
        max-width: none;
        min-width: unset;
        padding: 16px 12px;
        background: var(--bg-elevated);
        border: 1px solid var(--border);
        border-radius: 14px;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 16px;
        margin-bottom: 10px;
    }

    .step h4 {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .step p {
        font-size: 11px;
    }

    /* Use Cases */
    .use-cases-section {
        margin-bottom: 40px;
    }

    .use-cases-section h2 {
        margin-bottom: 20px;
    }

    .use-case {
        padding: 14px;
        gap: 12px;
    }

    .use-case-emoji {
        font-size: 22px;
    }

    /* FAQ */
    .faq-section {
        margin-bottom: 40px;
    }

    .faq-section h2 {
        margin-bottom: 20px;
    }

    .faq-item {
        padding: 16px;
        border-radius: 12px;
    }

    /* CTA */
    .cta-section {
        padding: 28px 16px;
        border-radius: 16px;
    }

    .cta-section h2 {
        font-size: 20px;
    }

    .cta-section p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
    }

    /* Footer */
    .footer-trust {
        gap: 12px;
        margin-bottom: 24px;
        padding-bottom: 20px;
    }

    .trust-item span {
        display: none;
    }

    .trust-item svg {
        width: 20px;
        height: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .footer-about {
        grid-column: span 2;
    }

    .footer-description {
        font-size: 12px;
    }

    .social-links a {
        width: 40px;
        height: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
        padding-top: 20px;
    }

    .footer-legal p {
        font-size: 11px;
    }

    .footer-disclaimer {
        font-size: 11px;
    }

    .footer-badges {
        justify-content: center;
        gap: 8px;
    }

    .footer-badge {
        padding: 5px 12px;
        font-size: 11px;
    }
}

/* Small Phone - 480px and below */
@media (max-width: 480px) {
    .seo-section {
        padding: 28px 12px 40px;
    }

    .seo-content h1 {
        font-size: 20px;
    }

    .seo-subtitle {
        font-size: 13px;
    }

    .seo-content h2 {
        font-size: 18px;
    }

    /* Trust Badges */
    .trust-badge svg {
        display: none;
    }

    /* Privacy Section */
    .privacy-section {
        padding: 20px 14px;
        border-radius: 14px;
    }

    .privacy-section h2 {
        font-size: 18px;
    }

    .privacy-content>p {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .privacy-point {
        padding: 12px;
        gap: 10px;
    }

    /* Steps - 2x2 Grid maintained */
    .step {
        padding: 14px 10px;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-bottom: 8px;
    }



}

/* Extra Small Phone - 360px and below */
@media (max-width: 360px) {
    .seo-section {
        padding: 24px 10px 36px;
    }

    .seo-content h1 {
        font-size: 18px;
    }

    .seo-content h2 {
        font-size: 16px;
    }

    /* Trust Badges - Stack vertically */
    .trust-badges {
        grid-template-columns: 1fr;
    }

    .trust-badge {
        padding: 10px 16px;
        font-size: 12px;
    }

    .trust-badge svg {
        display: block;
    }

    /* Stats - 2x2 maintained */
    .stats-section .stat-number {
        font-size: 20px;
    }

    /* Feature cards horizontal scroll on tiny screens */
    .feature-card {
        padding: 14px;
        gap: 12px;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
    }

    .feature-icon svg {
        width: 18px;
        height: 18px;
    }

    .feature-card h3 {
        font-size: 14px;
    }

    .feature-card p {
        font-size: 12px;
    }

    /* Steps - Single column */
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .step {
        display: flex;
        align-items: center;
        gap: 14px;
        text-align: left;
        padding: 14px;
    }

    .step-number {
        margin: 0;
        flex-shrink: 0;
    }

    .step h4 {
        margin-bottom: 2px;
    }

    /* CTA */
    .cta-section {
        padding: 24px 14px;
    }

    .cta-section h2 {
        font-size: 18px;
    }

    .cta-button {
        font-size: 14px;
        padding: 14px 20px;
    }


}

/* ========== Explore Section - Internal Linking ========== */
.explore-section {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
    padding: 60px 20px;
    border-top: 1px solid var(--border);
}

.explore-content {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.explore-section h2 {
    color: var(--text);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.explore-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 40px;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: left;
    margin-bottom: 40px;
}

.explore-category {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}

.explore-category h3 {
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.explore-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.explore-category li {
    margin-bottom: 10px;
}

.explore-category a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    display: block;
}

.explore-category a:hover {
    color: var(--accent);
}

.explore-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.explore-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    background: var(--accent);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.2s;
}

.explore-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3);
}

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

.explore-btn.secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: none;
}

/* Responsive Explore Section */
@media (max-width: 1024px) {
    .explore-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .explore-section {
        padding: 40px 16px;
    }

    .explore-section h2 {
        font-size: 22px;
    }

    .explore-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .explore-category {
        padding: 20px;
    }

    .explore-cta {
        flex-direction: column;
        gap: 12px;
    }

    .explore-btn {
        width: 100%;
        justify-content: center;
    }
}


/* ===== LAYOUT CSS ===== */
/* Header, Main, Modals, Overlays */

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    background: var(--bg-elevated);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

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

/* Logo Image */
.logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
}

.brand {
    font-size: 18px;
    font-weight: 600;
}

.online-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--surface);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.online-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Center section for Trust Health (stable anchor) */
.header-center {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: flex-end;
}

/* Icon Button */
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}

.icon-btn:hover {
    background: var(--surface);
    color: var(--text);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

.badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--danger);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
}

.badge.visible {
    display: flex;
}

/* In-call only buttons - hidden by default, visible during call */
.in-call-only {
    display: none !important;
}

body.in-call .in-call-only {
    display: flex !important;
}

/* Main - Call UI Section (70% of viewport) */
.main {
    min-height: 70vh;
    min-height: 70dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 40px 20px;
    position: relative;
}

/* Welcome Note - Small & Elegant */
.welcome-note {
    text-align: center;
    margin-bottom: 8px;
    animation: welcome-fade-in 0.6s ease-out;
}

.welcome-note span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.welcome-note.hidden {
    display: none;
}

@keyframes welcome-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

.welcome-wave {
    font-size: 36px;
    margin-bottom: 4px;
    animation: wave-hand 2s ease-in-out infinite;
    display: inline-block;
    transform-origin: 70% 70%;
}

@keyframes wave-hand {

    0%,
    100% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(14deg);
    }

    20% {
        transform: rotate(-8deg);
    }

    30% {
        transform: rotate(14deg);
    }

    40% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(10deg);
    }

    60%,
    100% {
        transform: rotate(0deg);
    }
}

.welcome-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 50%, #bf5af2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.welcome-tagline {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 260px;
    margin: 0 auto;
    line-height: 1.4;
}

@keyframes welcome-fade-in {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide welcome hero during call */
.welcome-hero.hidden {
    display: none;
}

/* Scroll Hint Indicator */
.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    padding-top: 20px;
    color: var(--text-tertiary);
    font-size: 12px;
    animation: scroll-bounce 2s ease-in-out infinite;
    cursor: pointer;
    transition: color 0.2s;
}

.scroll-hint:hover {
    color: var(--text-secondary);
}

.scroll-hint svg {
    width: 20px;
    height: 20px;
}

.scroll-hint.hidden {
    display: none;
}

@keyframes scroll-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}

/* Status Row - Contains status pill and trust health */
.status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Status Pill */
.status-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--bg-elevated);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Online Count in Status Row */
.online-count {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--bg-elevated);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

.status-dot.connected {
    background: var(--success);
}

.status-dot.searching {
    background: var(--warning);
    animation: pulse 0.5s infinite;
}

.status-dot.in-call {
    background: var(--accent);
}

/* Overlays */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease-out;
}

.overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Fixed Ad Banner */
.ad-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: var(--bg-elevated);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.ad-placeholder {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 16px 32px;
    text-align: center;
}

.ad-placeholder span {
    color: var(--text-tertiary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer */
.site-footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 40px 20px 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    color: var(--text-tertiary);
    font-size: 12px;
}

/* SEO Content Section */
.seo-section {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
    padding: 50px 20px 60px;
    border-top: 1px solid var(--border);
    position: relative;
}

.seo-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #bf5af2);
    border-radius: 2px;
}

.seo-content {
    max-width: 800px;
    margin: 0 auto;
}

.seo-content h2 {
    color: var(--text);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}

.seo-content p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.feature-card {
    background: var(--bg-elevated);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.feature-card h3 {
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    margin-bottom: 0;
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
    pointer-events: none;
}

.toast {
    background: rgba(28, 28, 30, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: toast-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.hiding {
    animation: toast-out 0.2s ease-in forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}
/* ===== RESPONSIVE CSS ===== */
/* Media queries for all screen sizes */

/* Header responsive - 600px */
@media (max-width: 600px) {
    .header {
        padding: 10px 12px;
    }

    .header-left {
        flex: 0 1 auto;
        /* Allow shrinking */
        gap: 8px;
    }

    .online-badge {
        padding: 3px 8px;
        font-size: 11px;
    }

    .header-right {
        gap: 2px;
    }

    .icon-btn {
        width: 32px;
        height: 32px;
    }
}

/* Header responsive - 480px: Compact online badge */
@media (max-width: 480px) {
    .header {
        padding: 8px 10px;
    }

    .online-badge {
        padding: 2px 6px;
        font-size: 10px;
        gap: 4px;
    }

    .online-dot {
        width: 5px;
        height: 5px;
    }

    .logo-img {
        width: 28px;
        height: 28px;
    }

    .brand {
        font-size: 16px;
    }

    .icon-btn {
        width: 30px;
        height: 30px;
    }

    .icon-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 400px) {
    .brand {
        display: none;
    }

    .call-avatar {
        width: 85px;
        height: 85px;
    }

    .call-avatar svg {
        width: 34px;
        height: 34px;
    }

    .call-timer {
        font-size: 25px;
    }

    .main-action {
        width: 60px;
        height: 60px;
    }

    .main-action svg {
        width: 22px;
        height: 22px;
    }

    .sec-btn {
        width: 44px;
        height: 44px;
    }

    .sec-btn svg {
        width: 18px;
        height: 18px;
    }

    .audio-badge {
        display: none;
    }
}

/* Game responsive */
@media (max-width: 500px) {
    .game-selection {
        gap: 12px;
    }

    .game-select-card {
        padding: 24px 16px;
    }

    .game-card-emoji {
        font-size: 40px;
    }

    .ttt-cell {
        font-size: 22px;
        border-radius: 10px;
    }

    .ttt-grid {
        gap: 6px;
    }

    .scoreboard {
        padding: 12px 16px;
    }

    .player-avatar {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .wyr-question-label {
        font-size: 22px;
    }

    .wyr-choice-btn {
        padding: 18px 16px;
    }

    .wyr-choice-emoji {
        font-size: 28px;
    }

    .wyr-choice-text {
        font-size: 14px;
    }
}

@media (max-width: 350px) {
    .wyr-actions {
        flex-direction: column;
    }

    .wyr-action-btn {
        width: 100%;
        justify-content: center;
    }
}