/* Custom Design Tokens & variables */
:root {
    --bg-dark: #f0f2f5;
    --card-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.08);
    --neon-blue: #1877f2;
    --neon-blue-glow: rgba(24, 119, 242, 0.15);
    --neon-pink: #e41e3f;
    --neon-pink-glow: rgba(228, 30, 63, 0.15);
    --neon-gold: #ffd700;
    --neon-gold-glow: rgba(255, 215, 0, 0.15);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Global Styles */
html, body {
    height: 100%;
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: #050505;
    display: flex;
    flex-direction: column;
}

.bg-dots {
    background-color: var(--bg-dark) !important;
    background-image: none !important; /* Remove background dots */
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

/* Glassmorphism CSS */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 12px 35px 0 rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-navbar {
    background: rgba(7, 9, 14, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.glass-footer {
    background: rgba(7, 9, 14, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.brand-glow {
    background: linear-gradient(135deg, #00d2ff 0%, #ff007f 100%);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.35);
}

.hover-pill {
    transition: all 0.2s ease;
}
.hover-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
}

/* Chess Card styling */
.chess-card {
    background: rgba(13, 19, 32, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.6);
}

/* Coordinates & Board Grid */
.board-outer-container {
    position: relative;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.board-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    border: 4px solid rgba(255, 255, 255, 0.05);
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 100%;
    height: 100%;
}

/* Coordinate Label Tracks */
.coordinates {
    display: flex;
    color: rgba(0, 0, 0, 0.55);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-heading);
    user-select: none;
}

.coordinates-x {
    height: 24px;
    width: 100%;
    justify-content: space-around;
    align-items: center;
    padding: 0 2px;
}

.coordinates-x span {
    flex-grow: 1;
    text-align: center;
}

.coordinates-y {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: -20px;
    width: 16px;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.coordinates-y span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 12.5%;
}

/* Shift spacing when board flipped (handled by JS coordinates rewrite) */

/* Chess Square definition */
.square {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease;
}

/* SVGs pieces */
.piece-svg {
    width: 80%;
    height: 80%;
    z-index: 5;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

.square:hover .piece-svg {
    transform: scale(1.08) translateY(-2px);
}

/* Valid move markers */
.valid-dot {
    position: absolute;
    width: 20%;
    height: 20%;
    border-radius: 50%;
    background-color: rgba(0, 210, 255, 0.5);
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.8);
    z-index: 10;
    pointer-events: none;
}

.valid-capture-ring {
    position: absolute;
    width: 82%;
    height: 82%;
    border-radius: 50%;
    border: 3.5px solid rgba(255, 0, 127, 0.6);
    box-shadow: inset 0 0 8px rgba(255, 0, 127, 0.4);
    z-index: 10;
    pointer-events: none;
}

/* King check highlight */
.square.check-square {
    background: radial-gradient(circle, rgba(255, 0, 0, 0.5) 0%, rgba(255, 0, 0, 0.15) 70%) !important;
    animation: pulseCheck 1.2s infinite ease-in-out;
}

@keyframes pulseCheck {
    0%, 100% { box-shadow: inset 0 0 15px rgba(255,0,0,0.6); }
    50% { box-shadow: inset 0 0 25px rgba(255,0,0,0.9); }
}

/* Move indicators */
.square.last-move-source {
    box-shadow: inset 0 0 0 3px rgba(0, 210, 255, 0.4);
}
.square.last-move-target {
    box-shadow: inset 0 0 0 3px rgba(0, 210, 255, 0.7);
}

.square.selected-square {
    box-shadow: inset 0 0 0 3px var(--neon-pink);
    background-color: rgba(255, 0, 127, 0.15) !important;
}

/* BOARD THEMES COLOR PALETTES */

/* 1. Midnight Neon Theme */
.board-grid.MidnightNeon .square-light {
    background-color: #242f47;
}
.board-grid.MidnightNeon .square-dark {
    background-color: #111827;
}
.board-grid.MidnightNeon .square.last-move-source {
    background-color: rgba(0, 210, 255, 0.15);
}
.board-grid.MidnightNeon .square.last-move-target {
    background-color: rgba(0, 210, 255, 0.25);
}

/* 2. Woodland Walnut Theme */
.board-grid.Woodland .square-light {
    background-color: #efe3c3;
}
.board-grid.Woodland .square-dark {
    background-color: #5b8048;
}
.board-grid.Woodland .square-light .piece-svg {
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.3));
}
.board-grid.Woodland .square.last-move-source {
    background-color: rgba(245, 222, 179, 0.4);
}
.board-grid.Woodland .square.last-move-target {
    background-color: rgba(255, 235, 59, 0.35);
    box-shadow: inset 0 0 0 3px #ffd54f;
}

/* 3. Classic Slate Theme */
.board-grid.ClassicSlate .square-light {
    background-color: #ececd7;
}
.board-grid.ClassicSlate .square-dark {
    background-color: #739552;
}
.board-grid.ClassicSlate .square.last-move-source {
    background-color: rgba(255, 255, 255, 0.3);
}
.board-grid.ClassicSlate .square.last-move-target {
    background-color: rgba(205, 220, 57, 0.4);
    box-shadow: inset 0 0 0 3px #d4e157;
}

/* 4. Royal Gold Theme */
.board-grid.RoyalGold .square-light {
    background-color: #f5f0e6;
}
.board-grid.RoyalGold .square-dark {
    background-color: #51185c;
}
.board-grid.RoyalGold .square.last-move-source {
    background-color: rgba(255, 215, 0, 0.15);
}
.board-grid.RoyalGold .square.last-move-target {
    background-color: rgba(255, 215, 0, 0.25);
    box-shadow: inset 0 0 0 3px var(--neon-gold);
}

/* 5. Classic Monochrome Theme (Black & White) */
.board-grid.ClassicMonochrome .square-light {
    background-color: #f1f5f9; /* Slate-100 (Premium Soft Off-White) */
}
.board-grid.ClassicMonochrome .square-dark {
    background-color: #27272a; /* Zinc-800 (Premium Matte Charcoal Black) */
}
.board-grid.ClassicMonochrome .square.last-move-source {
    background-color: rgba(0, 210, 255, 0.18);
}
.board-grid.ClassicMonochrome .square.last-move-target {
    background-color: rgba(0, 210, 255, 0.28);
    box-shadow: inset 0 0 0 3px var(--neon-blue);
}

/* Player Info Row & Captured Pieces */
.player-info-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 10px 14px;
}

.player-color-indicator {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.white-indicator {
    background-color: #ffffff;
    box-shadow: 0 0 8px rgba(255,255,255,0.4);
}
.black-indicator {
    background-color: #1a1e29;
    border-color: rgba(255, 255, 255, 0.25);
}

.captured-tray {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 24px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.captured-piece-mini {
    width: 18px;
    height: 18px;
    opacity: 0.75;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

/* Move Log layout */
.move-log-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.move-log-container::-webkit-scrollbar {
    width: 6px;
}
.move-log-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.move-log-row {
    display: flex;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-family: var(--font-body);
}

.move-log-row:nth-child(odd) {
    background: rgba(255, 255, 255, 0.02);
}

.move-log-num {
    width: 40px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 600;
}

.move-log-white, .move-log-black {
    flex-grow: 1;
    color: #cbd5e1;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease;
}
.move-log-white:hover, .move-log-black:hover {
    color: var(--neon-blue);
}

/* Audio mute toggles styles */
.btn-glass {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.btn-glass:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-neon-blue {
    background: linear-gradient(135deg, #00b0ff 0%, #00e5ff 100%);
    border: none;
    color: #07090e;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.25);
    transition: all 0.2s ease;
}
.btn-neon-blue:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.45);
    color: #07090e;
}

.btn-neon-pink {
    background: linear-gradient(135deg, #ff007f 0%, #ff5252 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 0, 127, 0.25);
    transition: all 0.2s ease;
}
.btn-neon-pink:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 0, 127, 0.45);
    color: #fff;
}

.slider-neon::-webkit-slider-thumb {
    background: var(--neon-pink) !important;
    box-shadow: 0 0 10px var(--neon-pink-glow) !important;
}

.slider-neon::-moz-range-thumb {
    background: var(--neon-pink) !important;
    box-shadow: 0 0 10px var(--neon-pink-glow) !important;
}

/* Modals settings */
.modal-glass {
    background: rgba(7, 9, 14, 0.85);
    backdrop-filter: blur(20px);
}
.modal-glass .modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 60px rgba(0,0,0,0.8);
    border-radius: 20px;
}

.form-control-glass, .form-select-glass {
    background-color: rgba(13, 19, 32, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #f1f5f9 !important;
}
.form-control-glass:focus, .form-select-glass:focus {
    border-color: var(--neon-blue) !important;
    box-shadow: 0 0 10px var(--neon-blue-glow) !important;
}

.promo-choice-btn {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
}

/* Alerts and notifications */
.win-alert {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, rgba(255, 140, 0, 0.12) 100%);
    border: 1px solid var(--neon-gold);
    box-shadow: 0 0 15px var(--neon-gold-glow);
    color: #fef08a;
    animation: slideDown 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .coordinates-y {
        display: none; /* Hide Y numbers on small screens to save space */
    }
    .board-outer-container {
        padding-left: 0;
    }
    .square {
        border-radius: 2px;
    }
    .chess-card {
        padding: 8px !important;
    }
    .coordinates-x {
        font-size: 0.65rem;
    }
}

/* ==========================================================================
   Tic Tac Toe Styles (Vibrant Neon Theme)
   ========================================================================== */

.tictactoe-card {
    background: rgba(13, 19, 32, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
}

.ttt-grid-wrapper {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ttt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100%;
    height: 100%;
    gap: 12px;
}

.ttt-cell {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 3.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.ttt-cell:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* X styles - Glowing Cyan */
.cell-x {
    color: var(--neon-blue);
    text-shadow: 0 0 12px var(--neon-blue-glow), 0 0 25px rgba(0, 210, 255, 0.2);
    border-color: rgba(0, 210, 255, 0.3);
    background: rgba(0, 210, 255, 0.01);
}

/* O styles - Glowing Hot Pink */
.cell-o {
    color: var(--neon-pink);
    text-shadow: 0 0 12px var(--neon-pink-glow), 0 0 25px rgba(255, 0, 127, 0.2);
    border-color: rgba(255, 0, 127, 0.3);
    background: rgba(255, 0, 127, 0.01);
}

/* Cell Win Line highlight */
.ttt-cell.winner-cell-highlight {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.1) 0%, rgba(255, 0, 127, 0.1) 100%);
    border-color: var(--neon-gold);
    animation: winPulse 1.5s infinite ease-in-out;
}

@keyframes winPulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.4), inset 0 0 10px rgba(255, 215, 0, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.7), inset 0 0 15px rgba(255, 215, 0, 0.4);
        transform: scale(1.03);
    }
}

/* Score card animations and styling */
.player-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.active-turn-x {
    border-color: var(--neon-blue) !important;
    background: rgba(0, 210, 255, 0.03) !important;
    box-shadow: 0 0 15px var(--neon-blue-glow) !important;
}

.active-turn-o {
    border-color: var(--neon-pink) !important;
    background: rgba(255, 0, 127, 0.03) !important;
    box-shadow: 0 0 15px var(--neon-pink-glow) !important;
}

.draw-alert {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    animation: slideDown 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.absolute-glow {
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 0, 127, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* ==========================================================================
   Pac-Man Styles (Retro Yellow Theme)
   ========================================================================== */
:root {
    --neon-yellow: #ffff00;
    --neon-yellow-glow: rgba(255, 255, 0, 0.35);
}

.bg-neon-yellow-glow {
    background-color: var(--neon-yellow-glow) !important;
}

.text-neon-yellow {
    color: var(--neon-yellow) !important;
}

.btn-neon-yellow {
    background: linear-gradient(135deg, #ffff00 0%, #ffea00 100%);
    border: none;
    color: #07090e !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 255, 0, 0.25);
    transition: all 0.2s ease;
}
.btn-neon-yellow:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 255, 0, 0.45);
    color: #07090e !important;
}

.absolute-glow-yellow {
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 0, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.bg-black-20 {
    background: rgba(0, 0, 0, 0.25);
}

/* Remove 300ms double-tap delay on mobile browsers */
.square, .ttt-cell, .dpad-btn, .promo-choice-btn, .btn, select, input {
    touch-action: manipulation;
}

/* Virtual D-pad button stylings */
.dpad-btn {
    border: 2px solid rgba(255, 255, 0, 0.4) !important;
    background-color: rgba(7, 9, 14, 0.6) !important;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.1) !important;
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.dpad-btn:active {
    background-color: rgba(255, 255, 0, 0.25) !important;
    border-color: var(--neon-yellow) !important;
    box-shadow: 0 0 15px var(--neon-yellow-glow) !important;
    transform: scale(0.92);
}

/* Touch Action enhancements for scroll lock inside canvas area */
.canvas-container {
    touch-action: none; /* Prevents viewport scrolling while swiping on the Pac-Man canvas */
}

/* Responsive adjustments for mobile dashboards */
@media (max-width: 576px) {
    .tictactoe-card {
        padding: 12px 6px !important;
    }
    .ttt-cell {
        font-size: 2.5rem !important;
    }
    .glass-card {
        padding: 16px !important;
    }
}

/* ==========================================================================
   Grid Runner (Cyber Scavenger) CSS Styles
   ========================================================================== */
:root {
    --neon-green: #39ff14;
    --neon-green-glow: rgba(57, 255, 20, 0.35);
}

.bg-neon-green-glow {
    background-color: var(--neon-green-glow) !important;
}

.text-neon-green {
    color: var(--neon-green) !important;
}

.btn-neon-green {
    background: linear-gradient(135deg, #39ff14 0%, #20c997 100%);
    border: none;
    color: #050508 !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(57, 255, 20, 0.25);
    transition: all 0.2s ease;
}
.btn-neon-green:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(57, 255, 20, 0.45);
    color: #050508 !important;
}

.absolute-glow-green {
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(57, 255, 20, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.dpad-green {
    border: 2px solid rgba(57, 255, 20, 0.4) !important;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.1) !important;
}

.dpad-green:active {
    background-color: rgba(57, 255, 20, 0.25) !important;
    border-color: var(--neon-green) !important;
    box-shadow: 0 0 15px var(--neon-green-glow) !important;
}

/* ==========================================
   ChitChat Gaming Light Mode Styles
   ========================================== */
:root {
    --cc-bg: #f0f2f5;          /* Light gray background */
    --cc-card-bg: #ffffff;     /* Pure white cards */
    --cc-hover-bg: #e4e6eb;    /* Soft gray hover state */
    --cc-text-primary: #050505;/* Very dark charcoal/black text */
    --cc-text-secondary: #65676b;/* Slate gray secondary text */
    --cc-blue: #1877f2;        /* ChitChat branding blue */
    --cc-blue-hover: #1565c0;  /* Deeper blue hover */
    --cc-border: rgba(0, 0, 0, 0.08); /* Faint dark border */
}

body.bg-dots {
    background-color: var(--cc-bg) !important;
    background-image: none !important; /* Overwrite neon dots for light theme */
    color: var(--cc-text-primary) !important;
}

/* Navbar fixed top */
.cc-navbar {
    background-color: var(--cc-card-bg) !important;
    border-bottom: 1px solid var(--cc-border) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.cc-logo {
    width: 38px;
    height: 38px;
    background: var(--cc-blue);
    color: #fff;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.cc-brand-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
    color: var(--cc-blue) !important;
}

.cc-brand-text .brand-subtext {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--cc-text-secondary);
    vertical-align: middle;
    margin-left: 5px;
    background: #f0f2f5;
    padding: 2px 6px;
    border-radius: 6px;
}

.bg-light {
    background-color: #f0f2f5 !important;
}

.cc-search-bar input {
    color: var(--cc-text-primary);
}

.cc-search-bar input::placeholder {
    color: var(--cc-text-secondary);
}

.btn-cc-circle-nav {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background-color: #f0f2f5;
    transition: background-color 0.2s ease;
}

.btn-cc-circle-nav:hover {
    background-color: #e4e6eb !important;
}

.cc-nav-right .badge-count {
    top: -3px;
    right: -3px;
    font-size: 0.65rem;
    padding: 2px 5px;
    font-weight: bold;
}

/* Three-column layout classes */
.fb-layout-container {
    max-width: 1350px;
    margin: 0 auto;
}

.fb-sticky-sidebar {
    position: sticky;
    top: 75px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

/* Left sidebar navigation */
.fb-sidebar-nav .fb-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--cc-text-primary) !important;
    padding: 10px 12px !important;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.fb-sidebar-nav .fb-sidebar-item:hover, .fb-sidebar-nav .fb-sidebar-item.active {
    background-color: var(--cc-hover-bg) !important;
    color: var(--cc-blue) !important;
}

.fb-sidebar-nav .fb-sidebar-item.active .icon-circle {
    background-color: var(--cc-blue) !important;
    color: #ffffff !important;
}

.fb-sidebar-nav .fb-sidebar-item .icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e4e6eb;
    color: var(--cc-text-primary);
}

.fb-sidebar-shortcuts .fb-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--cc-text-secondary);
    padding: 8px 12px !important;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.fb-sidebar-shortcuts .fb-sidebar-item:hover {
    background-color: var(--cc-hover-bg) !important;
    color: var(--cc-text-primary) !important;
}

.fb-sidebar-shortcuts .fb-sidebar-item .icon-circle-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #e4e6eb;
}

/* Center Feed Composer and Post Cards */
.fb-composer-card {
    background-color: var(--cc-card-bg);
    border: 1px solid var(--cc-border);
}

.composer-fake-input {
    background-color: #f0f2f5 !important;
    color: var(--cc-text-secondary) !important;
    text-align: left;
    transition: background-color 0.2s ease;
}

.composer-fake-input:hover {
    background-color: #e4e6eb !important;
}

.btn-fb-composer-action:hover {
    background-color: #f0f2f5 !important;
}

.fb-post-card {
    background-color: var(--cc-card-bg);
    border: 1px solid var(--cc-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.fb-page-avatar {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    font-family: var(--font-heading);
}

.fb-post-card .small-title {
    color: var(--cc-text-primary) !important;
    font-size: 0.95rem;
    font-weight: 700;
}

/* Post Graphic Media Container */
.fb-media-container {
    height: 200px;
    border-top: 1px solid var(--cc-border);
    border-bottom: 1px solid var(--cc-border);
}

.bg-chess-banner {
    background: linear-gradient(135deg, #1e1b4b 0%, #311042 100%);
}

.bg-tictactoe-banner {
    background: linear-gradient(135deg, #064e3b 0%, #0c2d24 100%);
}

.bg-gridrunner-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}

.bg-pacman-banner {
    background: linear-gradient(135deg, #172554 0%, #0c0a09 100%);
}

.bg-wordsearch-banner {
    background: linear-gradient(135deg, #701a75 0%, #4a044e 100%);
}

.chess-banner-pieces {
    font-size: 2.2rem;
    letter-spacing: 8px;
    text-shadow: 0 0 15px rgba(255,255,255,0.5);
}

.fb-media-container h3 {
    letter-spacing: 1.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    font-size: 1.4rem;
}

.btn-fb-action {
    transition: background-color 0.2s ease;
    color: var(--cc-text-secondary) !important;
}

.btn-fb-action:hover {
    background-color: #f0f2f5 !important;
    color: var(--cc-text-primary) !important;
}

.btn-fb-play-action {
    background-color: var(--cc-blue) !important;
    color: #fff !important;
    border: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-fb-play-action:hover {
    background-color: var(--cc-blue-hover) !important;
    transform: scale(1.02);
}

/* Right sidebar contacts list */
.fb-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.fb-contact-item:hover {
    background-color: #e4e6eb;
}

.avatar-circle-wrapper {
    position: relative;
    width: 34px;
    height: 34px;
}

.avatar-circle-wrapper .avatar-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
}

.avatar-circle-wrapper .active-dot {
    width: 10px;
    height: 10px;
    background-color: #31a24c;
    border: 2px solid var(--cc-card-bg);
    border-radius: 50%;
    bottom: 0;
    right: 0;
}

/* Footer Link Hover */
.cc-footer-links a {
    color: var(--cc-text-secondary);
    font-size: 0.85rem;
    transition: color 0.15s ease;
}

.cc-footer-links a:hover {
    color: var(--cc-blue) !important;
    text-decoration: underline !important;
}

/* Informational Views styling */
.text-light-300 {
    color: #334155;
    line-height: 1.6;
}

.small-text-muted {
    font-size: 0.8rem;
    color: var(--cc-text-secondary);
}

/* Scrollable Main Content wrapper with vertical padding offset for fixed headers/footers */
.cc-main-content-wrapper {
    background-color: var(--cc-bg);
    min-height: 100vh;
    padding-top: 75px !important;
    padding-bottom: 90px !important;
    overflow-y: auto;
}

/* Login/Auth Portal styles */
.auth-card {
    border: 1px solid var(--cc-border) !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05) !important;
}

.auth-tab-btn {
    border-bottom: 2px solid transparent !important;
    transition: all 0.2s ease;
}

.auth-tab-btn:hover {
    color: var(--cc-blue) !important;
}

.auth-tab-btn.active {
    border-bottom: 2px solid var(--cc-blue) !important;
}

.form-select-glass {
    background-color: #ffffff !important;
    color: #050505 !important;
    border: 1px solid #ced4da !important;
}

.form-select-glass:focus {
    border-color: var(--cc-blue) !important;
    box-shadow: 0 0 0 0.25rem rgba(24, 119, 242, 0.25) !important;
}

/* Custom overlay classes */
.fb-clickable {
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .fb-media-container {
        height: 160px;
    }
}

/* ==========================================================================
   Real-Time Floating Chat Widget
   ========================================================================== */
.cc-chat-box {
    position: fixed;
    bottom: 80px; /* Offset just above the fixed footer */
    right: 24px;
    width: 330px;
    z-index: 1050;
    border-radius: 16px;
    border: 1px solid var(--cc-border);
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cc-chat-box.dragging {
    transition: none !important;
}

.cc-chat-box.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.cc-chat-box.minimized .cc-chat-body,
.cc-chat-box.minimized .cc-chat-footer {
    display: none !important;
}

.cc-chat-box.maximized {
    width: 550px !important;
    max-width: calc(100vw - 48px) !important;
}

.cc-chat-box.maximized .cc-chat-body {
    max-height: 450px !important;
    height: 450px !important;
}

.cc-chat-header {
    background: linear-gradient(135deg, #0084ff 0%, #0066cc 100%) !important;
    border-bottom: 1px solid var(--cc-border);
    cursor: move; /* Indicate header is draggable */
    user-select: none;
}

.cc-chat-header-actions button {
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.cc-chat-header-actions button:hover {
    opacity: 1 !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-radius: 4px;
}

.cc-chat-body {
    background-color: #ffffff;
    max-height: 280px;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.cc-chat-footer {
    border-top: 1px solid var(--cc-border);
    padding: 10px 12px;
    background-color: #ffffff;
}

.cc-chat-box .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.cc-chat-box .btn-close-white:hover {
    opacity: 1;
}

/* Facebook Messenger Style Chat Bubbles */
.msg-bubble-me {
    background-color: #0084ff !important;
    color: #ffffff !important;
    border-radius: 18px 18px 4px 18px;
    font-size: 0.825rem;
    box-shadow: 0 1px 2px rgba(0, 132, 255, 0.15);
}

.msg-bubble-other {
    background-color: #e4e6eb !important;
    color: #050505 !important;
    border-radius: 18px 18px 18px 4px;
    font-size: 0.825rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   High-Contrast Move History for White Background
   ========================================================================== */
.move-log-white, .move-log-black {
    color: var(--cc-text-primary) !important;
}

.move-log-num {
    color: var(--cc-text-secondary) !important;
}

#chessModal .move-log-container {
    background-color: #f8fafc;
    border: 1px solid var(--cc-border);
    border-radius: 8px;
    padding: 8px;
}

/* ==========================================================================
   Screen-Fitting Gameplay Viewports (.cc-game-layout)
   ========================================================================== */
body:has(.cc-game-layout) {
    overflow: hidden !important;
}
body:has(.cc-game-layout) .cc-main-content-wrapper {
    overflow: hidden !important;
    height: 100vh !important;
    min-height: auto !important;
    padding-top: 75px !important;
    padding-bottom: 70px !important;
}
body:has(.cc-game-layout) main,
body:has(.cc-game-layout) .cc-main-content-wrapper main {
    height: 100% !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
}
body:has(.cc-game-layout) footer,
body:has(.cc-game-layout) .footer,
body:has(.cc-game-layout) footer.fixed-bottom.bg-white {
    background-color: #0d121f !important;
    background: #0d121f !important;
    border-top: 1px solid rgba(57, 255, 20, 0.15) !important;
}



@media (min-width: 992px) {

    .cc-game-layout {
        height: 100%;
        max-height: calc(100vh - 145px); /* Header 75px + Footer 70px */
        overflow: hidden;
    }
    .cc-game-layout #gameplay-screen {
        height: 100%;
    }
    .cc-game-layout #gameplay-screen > .row {
        height: 100%;
        align-items: center;
    }
    .cc-game-layout .canvas-column {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .cc-game-layout .canvas-container {
        max-height: calc(100vh - 240px); /* Leave room for margin, D-pad, header spacing */
        aspect-ratio: 448/496;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .cc-game-layout canvas {
        max-height: 100% !important;
        max-width: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain;
    }
    .cc-game-layout .stats-column {
        height: 100%;
        overflow-y: auto;
        max-height: calc(100vh - 165px);
        padding-right: 5px;
    }
    .cc-game-layout .stats-column::-webkit-scrollbar {
        width: 6px;
    }
    .cc-game-layout .stats-column::-webkit-scrollbar-thumb {
        background: var(--cc-border);
        border-radius: 3px;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 991px) {
    .cc-game-layout .canvas-container {
        max-width: 100%;
        aspect-ratio: 448/496;
    }
    .cc-game-layout canvas {
        width: 100% !important;
        height: auto !important;
    }
}

/* ==========================================================================
   ChitChat Search Dropdown Results Panel
   ========================================================================== */
.cc-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 320px;
    background-color: #ffffff;
    border: 1px solid var(--cc-border);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 1100;
    margin-top: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px 0;
}

.cc-search-item {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--cc-text-primary) !important;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.cc-search-item:last-child {
    border-bottom: none;
}

.cc-search-item:hover {
    background-color: var(--cc-hover-bg);
    color: var(--cc-blue) !important;
}

.cc-search-item .item-title {
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 2px;
}

.cc-search-item .item-desc {
    font-size: 0.76rem;
    color: var(--cc-text-secondary);
}

/* ==========================================================================
   Active / Active Toggled Social States
   ========================================================================== */
.btn-like.active-liked {
    color: var(--cc-blue) !important;
    font-weight: 700 !important;
}

.btn-heart.active-hearted {
    color: var(--neon-pink) !important;
    font-weight: 700 !important;
}

/* ==========================================================================
   Game Card Feed Comments section
   ========================================================================== */
.comments-section {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.comments-list::-webkit-scrollbar {
    width: 5px;
}

.comments-list::-webkit-scrollbar-thumb {
    background: var(--cc-border);
    border-radius: 3px;
}

.comment-input::placeholder {
    color: var(--cc-text-secondary);
}

.avatar-circle-xs {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* ==========================================================================
   Tournament Lobby Bracket styles
   ========================================================================== */
.tournament-item-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.tournament-match-bracket {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    background: #f8fafc;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.tournament-match-node {
    background: #ffffff;
    border: 1px solid #dadde1;
    border-radius: 4px;
    padding: 6px;
    font-size: 0.72rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.tournament-match-node .node-round {
    font-size: 0.65rem;
    color: #65676b;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 1px solid #f0f2f5;
    padding-bottom: 3px;
    margin-bottom: 4px;
}

.tournament-match-node .node-player {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    color: #1c1e21;
}

.tournament-match-node .node-player.winner {
    font-weight: 700;
    color: #1877f2;
}

/* ==========================================================================
   AI Live Stream Canvas Board
   ========================================================================== */
.mini-board-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 280px;
    height: 280px;
}

.mini-board-grid .square {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
}

/* ==========================================================================
   Right Sidebar Live News Feed and Clips Items
   ========================================================================== */
.news-feed-item {
    font-size: 0.78rem;
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f5;
    transition: background-color 0.2s ease;
}

.news-feed-item:last-child {
    border-bottom: none;
}

.news-feed-item a {
    color: #1877f2;
    font-weight: 600;
    text-decoration: none;
}

.news-feed-item a:hover {
    text-decoration: underline;
}

.clip-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
    background-color: #f8fafc;
    font-size: 0.75rem;
}

.clip-list-item:hover {
    background-color: #f1f5f9;
}

/* ==========================================================================
   Online Gamers Collapsible Sidebar & Mobile Custom Styles
   ========================================================================== */

.cc-sidebar-right {
    position: fixed;
    top: 57px;
    bottom: 62px;
    right: 0;
    width: 280px;
    background-color: var(--cc-card-bg);
    border-left: 1px solid var(--cc-border);
    display: flex;
    flex-direction: column;
    z-index: 1025;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.03);
}

.cc-sidebar-right.collapsed {
    transform: translateX(100%);
}

.cc-sidebar-header {
    flex-shrink: 0;
    background-color: var(--cc-card-bg);
}

.cc-sidebar-body {
    overflow-y: auto;
    flex-grow: 1;
    padding: 0.5rem;
}

/* Custom Webkit scrollbar for online gamers list */
.cc-sidebar-body::-webkit-scrollbar {
    width: 5px;
}
.cc-sidebar-body::-webkit-scrollbar-thumb {
    background: var(--cc-border);
    border-radius: 3px;
}

.cc-sidebar-toggle-btn {
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 48px;
    background-color: var(--cc-card-bg);
    border: 1px solid var(--cc-border);
    border-right: none;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: -3px 2px 8px rgba(0, 0, 0, 0.06);
    z-index: 1026;
    color: var(--cc-text-secondary);
    transition: background-color 0.2s, color 0.2s;
}

.cc-sidebar-toggle-btn:hover {
    color: var(--cc-blue);
    background-color: var(--cc-hover-bg);
}

/* Page content layout transition when sidebar is open */
.cc-main-content-wrapper {
    transition: padding-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 992px) {
    body.sidebar-open .cc-main-content-wrapper {
        padding-right: 280px !important;
    }
}

/* Mobile Post Action Buttons wrapping and Play Now alignment */
@media (max-width: 576px) {
    .fb-post-card div.d-flex.justify-content-between.gap-1 {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    
    .fb-post-card .btn-fb-action {
        flex: 1 1 calc(33.33% - 6px) !important;
        font-size: 0.75rem !important;
        padding: 8px 4px !important;
    }
    
    .fb-post-card .btn-fb-play-action {
        width: 100% !important;
        flex: 1 1 100% !important;
        margin-top: 4px;
        font-size: 0.85rem !important;
        padding: 8px 12px !important;
        text-align: center;
        justify-content: center;
    }
}

/* ==========================================================================
   Playable Ad Teaser ("Space Defender") Custom Styling
   ========================================================================== */

.playable-ad-media {
    position: relative;
    width: 100%;
    height: 300px;
    background-color: #030712;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0;
}

.playable-ad-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1e1b4b 0%, #030712 100%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.playable-ad-cover.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Moving neon stars in cover */
.playable-ad-stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, #fff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 150px 50px, #a855f7, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 80px 220px, #3b82f6, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 280px 120px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 250px 250px, #06b6d4, rgba(0,0,0,0));
    opacity: 0.6;
}

.playable-ad-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background-color: #020617;
}

/* Timer and progress bar styles */
.playable-ad-timer-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    z-index: 5;
}

.playable-ad-timer-progress {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #10b981, #06b6d4);
    transition: width 0.1s linear;
}

.playable-ad-timer-text {
    position: absolute;
    top: 12px;
    right: 16px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 5;
    font-family: 'Outfit', sans-serif;
}

/* On-screen controls for mobile */
.playable-ad-controls {
    position: absolute;
    bottom: 12px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    pointer-events: none;
    z-index: 5;
}

.playable-ad-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.1s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.playable-ad-btn:active {
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(0.9);
}

.playable-ad-btn-fire {
    width: 52px;
    height: 52px;
    background-color: rgba(239, 68, 68, 0.5);
    border-color: rgba(239, 68, 68, 0.7);
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
}

.playable-ad-btn-fire:active {
    background-color: rgba(239, 68, 68, 0.7);
}

/* Glassmorphic End Overlay */
.playable-ad-end-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.playable-ad-end-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Glowing Pulsing CTA Button */
.btn-playable-cta {
    background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
    border: none;
    color: #fff;
    padding: 10px 24px;
    font-weight: 700;
    border-radius: 24px;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: cta-pulse 2s infinite;
}

.btn-playable-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.7);
}

@keyframes cta-pulse {
    0% {
        box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
    }
    50% {
        box-shadow: 0 0 22px rgba(168, 85, 247, 0.8), 0 0 10px rgba(59, 130, 246, 0.6);
    }
    100% {
        box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
    }
}
/* ==========================================================================
   Real-Time Multi-User Video/Mic Chat Media Panel
   ========================================================================== */
.cc-chat-media-panel {
    background-color: #f8fafc;
    border-bottom: 1px solid var(--cc-border);
    transition: all 0.3s ease-in-out;
}

/* Video Grid and Responsive Layout */
.cc-video-grid {
    display: grid;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding: 2px;
}

.cc-video-box {
    position: relative;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background-color: #0f172a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    height: 98px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cc-video-box.active-speaker {
    border-color: #06b6d4;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

.cc-video-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cc-avatar-circle-sm {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

.cc-avatar-circle-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.cc-avatar-circle-pink {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.4);
}

/* Tic Tac Toe Custom Controls UX Colors */
.btn-ttt-mute {
    color: #d946ef !important; /* Fuchsia */
    border-color: rgba(217, 70, 239, 0.25) !important;
    text-shadow: 0 0 8px rgba(217, 70, 239, 0.4);
    box-shadow: 0 0 8px rgba(217, 70, 239, 0.05);
}
.btn-ttt-mute:hover {
    color: #fff !important;
    background: rgba(217, 70, 239, 0.1) !important;
    border-color: #d946ef !important;
    box-shadow: 0 0 15px rgba(217, 70, 239, 0.3) !important;
}

.btn-ttt-settings {
    color: #38bdf8 !important; /* Vibrant Cyan */
    border-color: rgba(56, 189, 248, 0.25) !important;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.05);
}
.btn-ttt-settings:hover {
    color: #fff !important;
    background: rgba(56, 189, 248, 0.1) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3) !important;
}

.btn-ttt-leaderboard {
    color: #fbbf24 !important; /* Amber / Gold */
    border-color: rgba(251, 191, 36, 0.25) !important;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.05);
}
.btn-ttt-leaderboard:hover {
    color: #fff !important;
    background: rgba(251, 191, 36, 0.1) !important;
    border-color: #fbbf24 !important;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3) !important;
}

.text-ttt-gold {
    color: #fbbf24 !important;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}
