/* ==========================================================================
   PlayZone — Modern Arabic Gaming Platform Theme v3.2
   A-Tier Production Design • RTL-First • Fully Responsive • AdSense Compliant
   ========================================================================== */

:root {
    /* ── Surface Palette (Deep Navy Slate, Zero Eye Strain) ── */
    --bg-base:       #0A0E17;
    --bg-main:       #0D111A;
    --bg-card:       #121824;
    --bg-surface:    #182030;
    --bg-raised:     #20293D;
    --bg-overlay:    rgba(10, 14, 23, 0.85);

    /* ── Borders & Dividers ── */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-color:  rgba(255, 255, 255, 0.12);
    --border-hover:  rgba(56, 139, 253, 0.4);
    --border-focus:  #388BFD;

    /* ── Typography & Text Colors ── */
    --text-primary:   #FFFFFF;
    --text-secondary: #D1D5DB;
    --text-muted:     #94A3B8;
    --text-faint:     #64748B;

    /* ── Brand & Accent System ── */
    --accent-blue:    #388BFD;   /* Primary Brand CTA */
    --primary:        #388BFD;
    --primary-hover:  #58A6FF;
    --primary-glow:   rgba(56, 139, 253, 0.35);

    --accent-cyan:    #00E5FF;
    --accent-teal:    #14B8A6;
    --accent-green:   #10B981;   /* Success / Online / XP */
    --accent-gold:    #F59E0B;   /* Rank 1 / Lucky Bonus / Quests */
    --accent-orange:  #F97316;   /* Alerts / Streak */
    --accent-red:     #EF4444;   /* Forfeit / Danger / Player 1 */
    --accent-purple:  #A855F7;   /* Badges / Magic */

    /* Player Colors */
    --p1-color:       #EF4444;
    --p2-color:       #F59E0B;

    /* ── Shadows & Glows ── */
    --shadow-sm:      0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-md:      0 6px 18px rgba(0, 0, 0, 0.45);
    --shadow-lg:      0 12px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow:    0 0 24px rgba(56, 139, 253, 0.25);
    --shadow-gold:    0 0 24px rgba(245, 158, 11, 0.25);
    --shadow-green:   0 0 20px rgba(16, 185, 129, 0.25);

    /* ── Border Radii ── */
    --radius-xs:  4px;
    --radius-sm:  8px;
    --radius-md:  14px;
    --radius-lg:  20px;
    --radius-xl:  28px;
    --radius-full: 9999px;

    /* ── Transitions ── */
    --transition-fast: 0.15s ease;
    --transition:      0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

    /* ── Backward Compatibility (Legacy Variables) ── */
    --neon-cyan:   var(--accent-blue);
    --neon-purple: var(--accent-purple);
    --neon-green:  var(--accent-green);
    --neon-orange: var(--accent-orange);
    --neon-pink:   var(--accent-red);
    --accent-neon: var(--accent-green);
}

/* ================================================================
   Reset & Base Styles
   ================================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

button, a, input, select, textarea,
.c4-column, .ttt-cell, .chk-piece, .chk-dark, .oth-cell {
    touch-action: manipulation;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-base);
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

body {
    background-color: var(--bg-base);
    color: var(--text-secondary);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    position: relative;
    line-height: 1.6;
    font-size: 16px;
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 139, 253, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(168, 85, 247, 0.04), transparent);
    background-attachment: fixed;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--primary-hover); }

img { max-width: 100%; display: block; }

/* Scrollbars */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* ================================================================
   Main Layout Wrapper
   ================================================================ */
.main-wrapper {
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 24px 60px;
}

/* ================================================================
   Navbar
   ================================================================ */
.navbar {
    background: rgba(18, 24, 36, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 500;
    transition: background var(--transition);
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--text-primary);
    white-space: nowrap;
    text-decoration: none;
}
.nav-logo-icon {
    font-size: 1.6rem;
    filter: drop-shadow(0 0 10px rgba(56, 139, 253, 0.6));
    animation: floatIcon 3s infinite ease-in-out alternate;
}
@keyframes floatIcon {
    from { transform: translateY(0); }
    to { transform: translateY(-3px); }
}
.nav-links {
    display: flex;
    gap: 6px;
    align-items: center;
}
.nav-link {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
.nav-link.active {
    color: #FFFFFF !important;
    background: rgba(56, 139, 253, 0.14) !important;
    border: 1px solid rgba(56, 139, 253, 0.32) !important;
    box-shadow: 0 0 14px rgba(56, 139, 253, 0.2);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.nav-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #CBD5E1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.05rem;
    transition: all var(--transition-fast);
    outline: none;
    padding: 0;
}
.nav-icon-btn:hover {
    background: rgba(56, 139, 253, 0.16);
    border-color: var(--accent-blue);
    color: #FFFFFF;
    transform: rotate(20deg);
    box-shadow: 0 0 14px rgba(56, 139, 253, 0.25);
}
.nav-user-dropdown-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.nav-user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 4px 12px 4px 6px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: #FFFFFF;
    outline: none;
    font-family: inherit;
}
.nav-user-pill:hover, .nav-user-pill.open {
    background: rgba(56, 139, 253, 0.14);
    border-color: rgba(56, 139, 253, 0.4);
    box-shadow: 0 0 16px rgba(56, 139, 253, 0.25);
}
.nav-user-avatar-wrap {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}
.nav-user-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid var(--accent-blue);
}
.nav-user-avatar-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #FFFFFF;
    border: 2px solid rgba(255, 255, 255, 0.2);
}
.nav-user-online-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 9px;
    height: 9px;
    background: #10B981;
    border: 2px solid #0D111A;
    border-radius: 50%;
}
.nav-user-details {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: right;
}
.nav-user-name {
    font-size: 0.9rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-user-badges-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-badge-lvl {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.28);
    padding: 2px 6px;
    border-radius: 6px;
    line-height: 1;
}
.nav-badge-elo {
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--accent-cyan);
    background: rgba(56, 139, 253, 0.14);
    border: 1px solid rgba(56, 139, 253, 0.25);
    padding: 2px 7px;
    border-radius: 6px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.nav-user-caret {
    font-size: 0.72rem;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
    margin-right: 2px;
}
.nav-user-pill.open .nav-user-caret {
    transform: rotate(180deg);
    color: var(--accent-blue);
}
.nav-user-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: rgba(18, 24, 38, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 8px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 139, 253, 0.15);
    z-index: 600;
}
.nav-user-menu.show {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nav-menu-header {
    padding: 10px 12px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.nav-menu-user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}
.nav-menu-user-info strong {
    font-size: 0.92rem;
    color: #FFFFFF;
}
.nav-menu-user-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.nav-menu-tier-pill {
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--accent-cyan);
    background: rgba(56, 139, 253, 0.15);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.nav-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 5px 6px;
}
.nav-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    transition: all var(--transition-fast);
    text-align: right;
    font-family: inherit;
}
.nav-menu-item:hover {
    background: rgba(56, 139, 253, 0.12);
    color: #FFFFFF;
}
.nav-menu-item.danger {
    color: #F87171;
}
.nav-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #EF4444;
}
.nav-menu-icon {
    font-size: 1.05rem;
    line-height: 1;
}
.nav-toggle {
    display: none;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.15rem;
}

/* Mobile Slide-in Drawer */
.nav-mobile-menu {
    display: none;
    position: fixed;
    top: 64px;
    right: 0;
    width: min(320px, 85vw);
    height: calc(100vh - 64px);
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    z-index: 490;
    padding: 20px 16px;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.6);
}
.nav-mobile-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid var(--border-subtle);
}

/* ================================================================
   Buttons System
   ================================================================ */
.btn-quick-play {
    background: linear-gradient(135deg, var(--accent-blue), #2563EB);
    color: #FFFFFF;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: all var(--transition);
}
.btn-quick-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 139, 253, 0.5);
    color: #FFF;
}
.btn-tool {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}
.btn-tool:hover {
    background: var(--bg-raised);
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

/* Action Buttons System (Used across Game Cards, Forms, Modals) */
.btn-play-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all var(--transition);
}
.btn-primary-action {
    background: linear-gradient(135deg, var(--accent-blue), #2563EB);
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}
.btn-primary-action:hover {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(56, 139, 253, 0.55);
    color: #FFFFFF !important;
}
.btn-secondary-action {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary) !important;
}
.btn-secondary-action:hover {
    background: var(--bg-raised);
    border-color: var(--text-muted);
    color: var(--text-primary) !important;
}

/* ================================================================
   Forms System (Production-Grade Dark UI)
   ================================================================ */
.form-group {
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    text-align: right;
    width: 100%;
}
.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}
.form-control {
    width: 100%;
    display: block;
    background-color: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    outline: none;
    transition: all var(--transition-fast);
    box-sizing: border-box;
    -webkit-appearance: none;
}
.form-control:focus {
    border-color: var(--accent-blue);
    background-color: var(--bg-raised);
    box-shadow: 0 0 16px rgba(56, 139, 253, 0.3);
    color: #FFFFFF;
}
.form-control::placeholder {
    color: var(--text-faint);
    font-weight: 500;
    opacity: 0.8;
}
select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.937 10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 36px;
}
textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

/* Authentication Cards (Login & Register) */
.auth-wrapper {
    max-width: 480px;
    width: 100%;
    margin: 40px auto;
    padding: 0 16px;
}
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
}
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}
.auth-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.auth-subtitle {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.auth-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #FCA5A5;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.auth-alert-info {
    background: rgba(56, 139, 253, 0.1);
    border: 1px solid rgba(56, 139, 253, 0.3);
    color: var(--accent-cyan);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 22px;
    line-height: 1.5;
}
.auth-footer-link {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.92rem;
    color: var(--text-muted);
}
.auth-footer-link a {
    color: var(--accent-blue);
    font-weight: 800;
    margin-right: 4px;
}
.auth-footer-link a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ================================================================
   AdSense & Promotional Banners (Non-obtrusive & Clean)
   ================================================================ */
.ad-slot-wrapper {
    margin: 16px auto;
    text-align: center;
    max-width: 1280px;
    width: 100%;
}
.promo-banner-header {
    background: linear-gradient(90deg, rgba(24, 32, 48, 0.9), rgba(32, 41, 61, 0.9));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}
.promo-badge {
    background: rgba(56, 139, 253, 0.15);
    border: 1px solid rgba(56, 139, 253, 0.3);
    color: var(--accent-blue);
    font-size: 0.8rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}
.promo-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}
.promo-link {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--accent-cyan);
    text-decoration: underline;
}
.promo-banner-sidebar {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 18px;
    text-align: center;
}
.promo-side-icon { font-size: 2.5rem; margin-bottom: 10px; }
.promo-side-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.promo-side-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}
.promo-side-btn {
    background: var(--accent-blue);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 800;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    display: inline-block;
    transition: all var(--transition-fast);
}
.promo-side-btn:hover {
    background: var(--primary-hover);
    color: #fff;
    transform: translateY(-1px);
}
.ad-label {
    font-size: 0.7rem;
    color: var(--text-faint);
    margin-bottom: 4px;
    text-transform: uppercase;
}
.ad-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ad-header-banner { width: 100%; max-width: 728px; height: 90px; margin: 0 auto; }
.ad-sidebar-box   { width: 300px; height: 250px; margin: 0 auto; }

/* ================================================================
   Hero Section
   ================================================================ */
.hero-section {
    position: relative;
    background: linear-gradient(180deg, #131A28 0%, #0D121D 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px 36px 40px;
    text-align: center;
    margin-bottom: 36px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.hero-glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}
.hero-glow-1 {
    width: 400px;
    height: 300px;
    top: -100px;
    left: 10%;
    background: rgba(56, 139, 253, 0.12);
}
.hero-glow-2 {
    width: 350px;
    height: 250px;
    bottom: -60px;
    right: 15%;
    background: rgba(168, 85, 247, 0.08);
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 860px;
    margin: 0 auto;
}
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(56, 139, 253, 0.1);
    border: 1px solid rgba(56, 139, 253, 0.3);
    color: var(--accent-cyan);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 20px;
}
.hero-tag-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
    animation: pulseDot 1.6s infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}
.hero-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}
.hero-title span {
    background: linear-gradient(135deg, #60A5FA 0%, #388BFD 50%, #00E5FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin: 0 auto 30px;
    max-width: 720px;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.btn-hero-primary {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #FFFFFF;
    border: 1px solid #60A5FA;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-size: 1.08rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.45);
    transition: all var(--transition);
    min-height: 52px;
}
.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(56, 139, 253, 0.6);
    background: linear-gradient(135deg, #3B82F6, #2563EB);
}
.btn-hero-secondary {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #FCD34D;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition);
    min-height: 52px;
}
.btn-hero-secondary:hover {
    background: rgba(245, 158, 11, 0.22);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
    border-color: #F59E0B;
}
.btn-hero-rooms {
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.35);
    color: var(--accent-cyan);
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition);
    min-height: 52px;
    text-decoration: none;
}
.btn-hero-rooms:hover {
    background: rgba(0, 229, 255, 0.2);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
    color: #fff;
}
.hero-rooms-tag {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    color: #94A3B8;
}

/* Quick Room PIN Bar */
.hero-pin-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}
.pin-bar-inner {
    background: rgba(24, 32, 48, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 6px 10px 6px 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 600px;
    width: 100%;
    box-shadow: var(--shadow-md);
    transition: border-color var(--transition);
}
.pin-bar-inner:focus-within {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow);
}
.pin-bar-icon { font-size: 1.2rem; }
.pin-bar-label {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-muted);
    white-space: nowrap;
}
.pin-select {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.88rem;
    outline: none;
    cursor: pointer;
}
.pin-input {
    flex: 1;
    min-width: 120px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 0.95rem;
    font-weight: 700;
    outline: none;
    text-transform: uppercase;
}
.pin-input::placeholder { color: var(--text-faint); font-weight: 600; }
.btn-pin-submit {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}
.btn-pin-submit:hover {
    background: var(--primary-hover);
    transform: scale(1.03);
}

/* Features Strip */
.hero-features-strip {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.feature-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ================================================================
   Section Titles & Headers
   ================================================================ */
.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}
.section-main-title {
    font-size: 1.65rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.section-sub-title {
    font-size: 0.95rem;
    color: var(--text-muted);
}
.games-counter-badge {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--accent-cyan);
}

/* ================================================================
   Games Grid & Modern Game Cards
   ================================================================ */
.games-section {
    margin-bottom: 48px;
}
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}
.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}
.game-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md), 0 0 24px rgba(56, 139, 253, 0.15);
}

/* Game Card Banner & Visual Board */
.game-card-banner {
    height: 160px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.banner-glass-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(18, 24, 36, 0.95) 100%);
    pointer-events: none;
}
.game-banner-visual {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
}
.game-main-emoji {
    font-size: 3.5rem;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6));
}

/* Micro Boards Preview */
.micro-c4-board {
    display: flex;
    gap: 6px;
    background: rgba(30, 58, 138, 0.6);
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #3B82F6;
}
.micro-disc {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}
.micro-disc.p1 { background: radial-gradient(circle, #F87171, #DC2626); box-shadow: 0 0 6px #DC2626; }
.micro-disc.p2 { background: radial-gradient(circle, #FDE047, #EAB308); box-shadow: 0 0 6px #EAB308; }

.micro-ttt-board {
    display: flex;
    gap: 6px;
    font-size: 1.4rem;
    font-weight: 900;
}
.micro-ttt-cell.x { color: var(--accent-cyan); text-shadow: 0 0 10px var(--accent-cyan); }
.micro-ttt-cell.o { color: #EC4899; text-shadow: 0 0 10px #EC4899; }

.micro-dnb-board {
    display: flex;
    align-items: center;
    gap: 4px;
}
.micro-dot { width: 8px; height: 8px; border-radius: 50%; background: #94A3B8; }
.micro-line.active { width: 30px; height: 4px; background: var(--accent-green); border-radius: 2px; }

.micro-chk-board { display: flex; gap: 8px; font-size: 1.8rem; }
.micro-piece.red { color: #EF4444; filter: drop-shadow(0 0 8px #EF4444); }
.micro-piece.gold { color: #F59E0B; filter: drop-shadow(0 0 8px #F59E0B); }

.micro-oth-board { display: flex; gap: 6px; }
.micro-disc.black { background: #1E293B; border: 1px solid #475569; }
.micro-disc.white { background: #F8FAFC; border: 1px solid #CBD5E1; }

/* Themes for Banners */
.preview-c4       { background: radial-gradient(circle at 50% 30%, #1E3A8A 0%, #0F172A 90%); }
.preview-ttt      { background: radial-gradient(circle at 50% 30%, #581C87 0%, #0F172A 90%); }
.preview-dnb      { background: radial-gradient(circle at 50% 30%, #065F46 0%, #0F172A 90%); }
.preview-checkers { background: radial-gradient(circle at 50% 30%, #78350F 0%, #0F172A 90%); }
.preview-othello  { background: radial-gradient(circle at 50% 30%, #047857 0%, #064E3B 60%, #0F172A 100%); }

.game-badge-top {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
}
.game-type-badge {
    background: rgba(18, 24, 36, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}
.game-meta-tags {
    position: absolute;
    bottom: 12px;
    left: 14px;
    display: flex;
    gap: 6px;
    z-index: 2;
}
.meta-tag {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
}

/* Card Body */
.game-card-body {
    padding: 20px 22px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.game-title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.game-title {
    font-size: 1.28rem;
    font-weight: 900;
    color: var(--text-primary);
}
.game-slug-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-surface);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    font-weight: 700;
}
.game-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 20px;
    flex: 1;
}
.game-actions-row {
    display: flex;
    gap: 10px;
}
.btn-game-play {
    flex: 1;
    background: var(--accent-blue);
    color: #FFFFFF;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-fast);
}
.btn-game-play:hover {
    background: var(--primary-hover);
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(56, 139, 253, 0.4);
}
.btn-game-solo {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}
.btn-game-solo:hover {
    background: var(--bg-raised);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

/* ================================================================
   Competitive Hub: Balanced Leaderboard + Daily Quests
   ================================================================ */
.competitive-hub-section {
    margin-bottom: 48px;
}
.competitive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: stretch;
}
.hub-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}
.hub-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}
.hub-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.hub-icon { font-size: 1.8rem; }
.hub-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text-primary);
}
.hub-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.hub-badge-counter, .hub-timer-badge {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}
.hub-timer-badge {
    color: var(--accent-gold);
    border-color: rgba(245, 158, 11, 0.3);
}

/* Leaderboard Filter Pills */
.leaderboard-filters-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 14px;
    scrollbar-width: none;
}
.leaderboard-filters-bar::-webkit-scrollbar { display: none; }
.filter-pill {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}
.filter-pill:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}
.filter-pill.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #FFFFFF;
    box-shadow: 0 2px 10px rgba(56, 139, 253, 0.3);
}

/* Leaderboard Table */
.table-responsive {
    overflow-x: auto;
    flex: 1;
}
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}
.leaderboard-table th {
    padding: 10px 12px;
    color: var(--text-faint);
    font-size: 0.82rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border-subtle);
    text-align: right;
}
.lb-row {
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border-subtle);
}
.lb-row:hover {
    background: rgba(56, 139, 253, 0.05);
}
.leaderboard-table td {
    padding: 10px 12px;
    font-size: 0.92rem;
    vertical-align: middle;
}
.rank-medal {
    font-size: 1.15rem;
    font-weight: 900;
    display: inline-block;
    min-width: 24px;
    text-align: center;
}
.lb-player-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}
.player-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #fff;
    flex-shrink: 0;
}
.player-meta-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.player-name-text {
    font-weight: 800;
    color: var(--text-primary);
    font-size: 0.95rem;
}
.player-tag-badge {
    font-family: monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: var(--bg-surface);
    padding: 2px 6px;
    border-radius: 4px;
}
.player-lvl-badge {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-gold);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 6px;
}
.elo-pill {
    background: rgba(56, 139, 253, 0.12);
    border: 1px solid rgba(56, 139, 253, 0.25);
    color: var(--accent-cyan);
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.88rem;
}
.winrate-pill {
    background: var(--bg-surface);
    color: var(--text-muted);
    font-weight: 700;
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
}
.winrate-pill.high-rate {
    color: var(--accent-green);
    background: rgba(16, 185, 129, 0.12);
}
.empty-table-cell {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
    font-weight: 700;
}

/* ================================================================
   Daily Quests Column
   ================================================================ */
.quests-container-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
    flex: 1;
}
.quest-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all var(--transition-fast);
}
.quest-card.quest-ready {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.15);
}
.quest-card.quest-claimed {
    opacity: 0.6;
}
.quest-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}
.quest-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.quest-icon { font-size: 1.4rem; }
.quest-title-text {
    font-weight: 800;
    font-size: 0.98rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.quest-desc-text {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
}
.quest-xp-badge {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-gold);
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-weight: 800;
    font-size: 0.78rem;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}
.quest-progress-section { margin-bottom: 12px; }
.quest-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}
.quest-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}
.quest-progress-fill {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 4px;
    transition: width 0.4s ease;
}
.quest-progress-fill.completed {
    background: var(--accent-green);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}
.btn-quest-claim {
    width: 100%;
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff;
    border: none;
    padding: 9px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: transform var(--transition-fast);
}
.btn-quest-claim:hover { transform: scale(1.02); }
.btn-quest-claimed {
    width: 100%;
    background: var(--bg-raised);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 8px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: default;
}
.quest-status-pending {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-faint);
    font-weight: 700;
    padding: 6px;
}

/* Lucky Reward Card */
.lucky-invite-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(24, 32, 48, 0.9));
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.lucky-invite-card:hover {
    border-color: #F59E0B;
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}
.lucky-icon-wrap { font-size: 2.2rem; flex-shrink: 0; }
.lucky-text-wrap { flex: 1; }
.lucky-text-wrap h4 {
    font-size: 0.98rem;
    font-weight: 800;
    color: #FDE047;
    margin-bottom: 2px;
}
.lucky-text-wrap p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.btn-lucky-open {
    background: #F59E0B;
    color: #000;
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 900;
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
}

/* ================================================================
   Live Waiting Rooms Section
   ================================================================ */
.waiting-rooms-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 36px;
}
.title-with-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}
.live-dot-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulseDot 1.4s infinite;
}
.live-badge-tag {
    color: var(--accent-green);
    font-size: 0.85rem;
    font-weight: 800;
}
.waiting-rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.waiting-room-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    transition: all var(--transition-fast);
}
.waiting-room-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}
.wr-title {
    font-weight: 800;
    font-size: 0.98rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.wr-host {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.wr-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.btn-wr-join {
    background: var(--accent-blue);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: all var(--transition-fast);
}
.btn-wr-join:hover {
    background: var(--primary-hover);
    color: #fff;
}

/* ================================================================
   Strategy Guide & Knowledge Center (SEO & AdSense Hub)
   ================================================================ */
.knowledge-hub-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 36px 30px;
    margin-bottom: 40px;
}
.knowledge-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.knowledge-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all var(--transition-fast);
}
.knowledge-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
}
.k-icon-circle {
    font-size: 2rem;
    margin-bottom: 12px;
}
.knowledge-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.knowledge-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* FAQ Accordion */
.faq-accordion-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
}
.faq-box-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 18px;
}
.faq-accordion-item {
    border-bottom: 1px solid var(--border-subtle);
}
.faq-accordion-item:last-child { border-bottom: none; }
.faq-trigger {
    width: 100%;
    background: transparent;
    border: none;
    padding: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: right;
    transition: color var(--transition-fast);
}
.faq-trigger:hover { color: var(--accent-cyan); }
.faq-chevron {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform var(--transition);
}
.faq-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-panel.open {
    max-height: 250px;
    padding-bottom: 16px;
}
.faq-panel p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ================================================================
   Game Arena & In-Game Layouts (Connect 4, TicTacToe, etc.)
   ================================================================ */
.arena-container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}
.arena-play-area {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* Match Player Cards Bar */
.players-match-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
    gap: 12px;
    box-sizing: border-box;
}
.player-card {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
}
.player-card-p1 {
    justify-content: flex-start;
}
.player-card-p2 {
    flex-direction: row-reverse;
    text-align: left;
    justify-content: flex-start;
}
.player-avatar-circle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    border: 2px solid transparent;
    transition: box-shadow 0.2s;
    user-select: none;
}
.player-details {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
}
.player-details h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.player-elo-badge {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.speaking-glow {
    border-color: var(--accent-green) !important;
    box-shadow: 0 0 16px var(--accent-green) !important;
    animation: pulseSpeaking 1.2s infinite;
}
@keyframes pulseSpeaking {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
.match-vs {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--accent-red);
    flex-shrink: 0;
    padding: 0 4px;
    user-select: none;
}

/* Voice Toolbar */
.voice-toolbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    margin-bottom: 16px;
    gap: 8px;
    box-sizing: border-box;
    flex-wrap: wrap;
}
.voice-controls-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.voice-actions-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.voice-status-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
    padding: 3px 10px;
    background: var(--bg-raised);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}
.btn-forfeit {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #F87171;
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all var(--transition-fast);
    font-family: inherit;
    white-space: nowrap;
}
.btn-forfeit:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #EF4444;
    color: #FFF;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}
.mic-meter-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-raised);
    padding: 4px 8px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
}
.mic-meter-bar {
    width: 36px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}
.mic-meter-level {
    height: 100%;
    background: #10B981;
    border-radius: 3px;
    transition: width 0.1s ease;
}

/* Turn Status Badges & Countdown Bar */
.turn-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    font-weight: 800;
    transition: all 0.2s ease;
}
.turn-badge.waiting-turn {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #94a3b8;
}
.turn-badge.my-turn {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
    animation: turnPulse 1.5s infinite;
}
.turn-badge.spectator-badge {
    background: rgba(56, 139, 253, 0.12);
    border: 1px solid rgba(56, 139, 253, 0.3);
    color: var(--accent-blue);
}
.turn-badge.win-badge {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #facc15;
    box-shadow: 0 0 12px rgba(234, 179, 8, 0.3);
}
.turn-badge.lose-badge {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}
@keyframes turnPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.turn-bar-wrapper { margin: 8px 0 14px; width: 100%; }
.turn-timer-bg {
    width: 100%;
    height: 6px;
    background: var(--bg-surface);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}
.turn-timer-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-teal));
    border-radius: 4px;
    transition: width 1s linear;
}
.turn-timer-warning {
    background: linear-gradient(90deg, var(--accent-red), var(--accent-gold)) !important;
}

/* Connect 4 Board */
.c4-grid {
    display: flex;
    background: linear-gradient(180deg, #1E40AF, #1D4ED8);
    padding: 14px;
    border-radius: var(--radius-md);
    border: 4px solid #1E3A8A;
    box-shadow: var(--shadow-lg);
    user-select: none;
}
.c4-column {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    padding: 3px;
    border-radius: 6px;
    transition: background var(--transition-fast);
}
.c4-column:hover { background: rgba(255, 255, 255, 0.12); }
.c4-cell {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.c4-slot {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #0A0E17;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.9);
}
.c4-slot.piece-player-1 {
    background: radial-gradient(circle at 35% 35%, #F87171, #DC2626);
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.6);
}
.c4-slot.piece-player-2 {
    background: radial-gradient(circle at 35% 35%, #FEF08A, #EAB308);
    box-shadow: 0 2px 10px rgba(234, 179, 8, 0.6);
}

/* Tic-Tac-Toe Board */
.ttt-grid {
    display: grid;
    grid-template-columns: repeat(3, 110px);
    grid-template-rows: repeat(3, 110px);
    gap: 12px;
    background: var(--bg-surface);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.ttt-cell {
    background: var(--bg-raised);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 900;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}
.ttt-cell:hover { background: #2A364F; }
.ttt-cell.p1-x { color: var(--accent-cyan); text-shadow: 0 0 16px rgba(0, 229, 255, 0.6); }
.ttt-cell.p2-o { color: #F43F5E; text-shadow: 0 0 16px rgba(244, 63, 94, 0.6); }

/* Dots & Boxes */
.dnb-board {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-surface);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.dnb-svg {
    width: 340px;
    height: 340px;
    background: var(--bg-base);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    max-width: 100%;
}
.dnb-dot { fill: var(--text-muted); }
.dnb-line {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 14;
    stroke-linecap: round;
    cursor: pointer;
    transition: stroke 0.15s;
}
.dnb-line:hover { stroke: rgba(56, 139, 253, 0.5); }
.dnb-line.line-p1 { stroke: var(--p1-color) !important; filter: drop-shadow(0 0 6px var(--p1-color)); }
.dnb-line.line-p2 { stroke: var(--p2-color) !important; filter: drop-shadow(0 0 6px var(--p2-color)); }
.dnb-box-rect.box-p1 { fill: rgba(239, 68, 68, 0.3) !important; stroke: var(--p1-color); stroke-width: 2; }
.dnb-box-rect.box-p2 { fill: rgba(245, 158, 11, 0.3) !important; stroke: var(--p2-color); stroke-width: 2; }

/* Checkers */
.chk-board {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-surface);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.chk-grid {
    display: grid;
    grid-template-columns: repeat(8, 48px);
    grid-template-rows: repeat(8, 48px);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.chk-sq { display: flex; align-items: center; justify-content: center; position: relative; user-select: none; }
.chk-light { background: #2A364F; }
.chk-dark  { background: #121824; cursor: pointer; }
.chk-dark:hover { background: #1B2436; }
.chk-piece {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.chk-p1 { background: radial-gradient(circle at 35% 35%, #F87171, #DC2626); box-shadow: 0 2px 8px rgba(220, 38, 38, 0.6); }
.chk-p2 { background: radial-gradient(circle at 35% 35%, #FEF08A, #EAB308); box-shadow: 0 2px 8px rgba(234, 179, 8, 0.6); }
.chk-king { border: 2px solid #fff; box-shadow: 0 0 10px #F59E0B !important; }

/* Chat Box */
.chat-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    height: 560px;
}
.chat-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text-primary);
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-msg {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
}
.chat-quick-taunts {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}
.quick-taunt-btn {
    background: var(--bg-raised);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
}
.quick-taunt-btn:hover { color: var(--text-primary); border-color: var(--accent-blue); }
.quick-taunt-btn.taunt-disabled { opacity: 0.4; cursor: not-allowed; }

.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border-subtle);
}
.chat-input {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 0.9rem;
}
.chat-input:focus { border-color: var(--accent-blue); }
.btn-chat-send {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    cursor: pointer;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

/* ================================================================
   Modern Organized Footer System
   ================================================================ */
.footer {
    background: #090D15;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 56px 24px 30px;
    position: relative;
    overflow: hidden;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 139, 253, 0.6), transparent);
}
.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 40px;
}
.footer-brand-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.footer-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 900;
    color: #FFFFFF;
    text-decoration: none;
    margin-bottom: 14px;
}
.footer-brand-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.75;
    margin-bottom: 18px;
    max-width: 320px;
}
.footer-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34D399;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 800;
}
.footer-pulse-dot {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10B981;
}
.footer-column h4 {
    font-size: 1.05rem;
    font-weight: 900;
    color: #FFFFFF;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.3px;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-links li {
    margin: 0;
}
.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}
.footer-links a:hover {
    color: #FFFFFF;
    transform: translateX(-4px);
}
.footer-links a.highlight {
    color: var(--accent-cyan);
    font-weight: 800;
}
.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.84rem;
    color: var(--text-faint);
}
.footer-bottom-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.footer-mini-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--radius-xs);
}

@media (max-width: 900px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
    .footer-brand-col {
        grid-column: 1 / -1;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
@media (max-width: 580px) {
    .footer-container {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   Secondary Pages & Legacy Shared Cards
   ================================================================ */
.seo-article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.seo-article-card h2 {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 800;
    margin: 20px 0 12px;
}
.seo-article-card h2:first-child { margin-top: 0; }
.seo-article-card h3 {
    color: var(--accent-cyan);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 16px 0 8px;
}
.seo-article-card p {
    margin-bottom: 14px;
    color: var(--text-muted);
}
.leaderboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

/* XP & Leveling */
.xp-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-top: 14px;
}
.xp-header {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.xp-bar-bg {
    background: var(--bg-base);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}
.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    border-radius: 5px;
    transition: width 0.6s ease;
}

/* Badges Grid */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.badge-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    text-align: center;
    position: relative;
    transition: all var(--transition-fast);
}
.badge-unlocked {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.15);
}
.badge-unlocked:hover { transform: translateY(-3px); }
.badge-locked { opacity: 0.45; filter: grayscale(0.8); }
.badge-icon { font-size: 2.6rem; margin-bottom: 8px; display: inline-block; }
.badge-title { font-size: 1rem; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.badge-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }

/* Friends & Presence */
.presence-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.presence-online { background-color: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }
.presence-in-game { background-color: var(--accent-gold); box-shadow: 0 0 6px var(--accent-gold); }
.presence-offline { background-color: var(--text-faint); }
.friends-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 14px;
}
.friend-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Category Filter Chip alias */
.cat-chip {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.cat-chip:hover { border-color: var(--text-muted); color: var(--text-primary); }
.cat-chip.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #FFFFFF;
}

/* ================================================================
   Responsive Breakpoints
   ================================================================ */
@media (max-width: 1024px) {
    .competitive-grid { grid-template-columns: 1fr; }
    .arena-container { grid-template-columns: 1fr; }
    .chat-wrapper { height: 420px; }
}

@media (max-width: 860px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; align-items: center; justify-content: center; }
    .hero-title { font-size: 2.2rem; }
    .hero-section { padding: 36px 20px; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .btn-hero-primary, .btn-hero-secondary { width: 100%; justify-content: center; }
    .hero-pin-bar .pin-bar-inner { border-radius: var(--radius-md); flex-direction: column; padding: 12px; }
    .pin-input, .pin-select, .btn-pin-submit { width: 100%; }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 14px;
        gap: 8px;
        height: 58px;
    }
    .nav-brand {
        font-size: 1.15rem;
        gap: 8px;
    }
    .nav-logo-icon {
        font-size: 1.35rem;
    }
    .nav-user-badges-row {
        display: none !important; /* Conceal Level & Elo from top bar on mobile - prominently shown in dropdown */
    }
    .nav-user-name {
        max-width: 80px;
        font-size: 0.84rem;
    }
    .nav-user-pill {
        padding: 3px 8px 3px 4px;
        gap: 6px;
    }
    .nav-user-menu {
        right: auto;
        left: 0;
        min-width: 250px;
        max-width: calc(100vw - 20px);
    }
    .main-wrapper {
        padding: 14px 12px 40px;
    }

    /* Arena & Dock Mobile Optimization */
    .arena-play-area {
        padding: 16px 12px;
        border-radius: var(--radius-md);
    }
    .players-match-bar {
        padding: 10px 12px;
        gap: 8px;
        margin-bottom: 12px;
    }
    .player-avatar-circle {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1.1rem;
    }
    .player-details h4 {
        font-size: 0.88rem;
    }
    .player-elo-badge {
        font-size: 0.72rem;
    }
    .match-vs {
        font-size: 1rem;
        padding: 0 2px;
    }

    /* Mobile 2-Row Voice Toolbar */
    .voice-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 8px 10px;
        gap: 8px;
        margin-bottom: 12px;
    }
    .voice-controls-group {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
    }
    .voice-controls-group .btn-tool {
        flex: 1;
        justify-content: center;
        padding: 6px 8px;
        font-size: 0.82rem;
        white-space: nowrap;
    }
    .voice-controls-group .voice-status-text {
        font-size: 0.75rem;
        padding: 4px 8px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .voice-actions-group {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 5px;
    }
    .voice-actions-group .btn-tool,
    .voice-actions-group .btn-forfeit {
        width: 100%;
        padding: 6px 2px;
        font-size: 0.76rem;
        justify-content: center;
        white-space: nowrap;
        gap: 3px;
    }
}

@media (max-width: 580px) {
    .nav-container {
        padding: 0 10px;
        gap: 6px;
        height: 54px;
    }
    .nav-brand {
        font-size: 1.05rem;
        gap: 6px;
    }
    .nav-icon-btn {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }
    .nav-toggle {
        padding: 5px 8px;
        font-size: 1rem;
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .nav-user-name {
        max-width: 60px;
        font-size: 0.78rem;
    }
    .main-wrapper {
        padding: 10px 6px 36px;
    }
    .games-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 1.8rem; }

    /* Arena & Dock Compact Mobile */
    .arena-play-area {
        padding: 12px 8px;
    }
    .players-match-bar {
        padding: 8px 8px;
        gap: 6px;
    }
    .player-avatar-circle {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 1rem;
    }
    .player-details h4 {
        font-size: 0.82rem;
    }
    .player-elo-badge {
        font-size: 0.68rem;
    }
    .match-vs {
        font-size: 0.9rem;
    }

    /* All 5 Game Boards Dynamic Fluid Scaling */
    /* 1. Tic-Tac-Toe */
    .ttt-grid {
        grid-template-columns: repeat(3, min(86px, 25vw));
        grid-template-rows: repeat(3, min(86px, 25vw));
        gap: 8px;
        padding: 8px;
        max-width: 100%;
    }
    .ttt-cell { font-size: min(2.8rem, 13vw); }

    /* 2. Connect 4 */
    .c4-grid {
        padding: 6px 3px;
        border-width: 2px;
        max-width: 100%;
        justify-content: center;
    }
    .c4-column { padding: 1px; }
    .c4-cell {
        width: min(42px, 12vw);
        height: min(42px, 12vw);
    }
    .c4-slot {
        width: min(34px, 10vw);
        height: min(34px, 10vw);
    }

    /* 3. Checkers */
    .chk-board {
        padding: 8px 4px;
        max-width: 100%;
        box-sizing: border-box;
    }
    .chk-grid {
        grid-template-columns: repeat(8, min(38px, 10.8vw));
        grid-template-rows: repeat(8, min(38px, 10.8vw));
        border-width: 2px;
    }
    .chk-piece {
        width: min(30px, 8.8vw);
        height: min(30px, 8.8vw);
    }

    /* 4. Dots & Boxes */
    .dnb-board {
        padding: 8px 4px;
        max-width: 100%;
        box-sizing: border-box;
    }
    .dnb-svg {
        width: min(320px, 88vw);
        height: min(320px, 88vw);
        max-width: 100%;
    }

    /* 5. Othello */
    .othello-container {
        max-width: 100%;
        margin: 6px auto;
    }
    .othello-score-bar {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    #othello-board {
        max-width: min(320px, 88vw);
        padding: 3px;
        gap: 2px;
    }
}

@media (max-width: 380px) {
    .nav-user-details {
        display: none !important; /* On extremely narrow screens, show avatar only in pill */
    }
    .nav-user-pill {
        padding: 2px;
        border-radius: 50%;
    }
    .nav-user-caret {
        display: none !important;
    }
    .nav-brand span {
        font-size: 0.95rem;
    }
    .voice-actions-group .btn-tool,
    .voice-actions-group .btn-forfeit {
        font-size: 0.7rem;
        padding: 5px 1px;
    }
    .turn-badge {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
    #turn-countdown-text {
        font-size: 0.78rem;
    }
}

/* ================================================================
   Avatar Upload & Image Compression Tool UI
   ================================================================ */
.avatar-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.6);
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.avatar-upload-zone:hover {
    border-color: var(--accent-blue);
    background: rgba(56, 139, 253, 0.08);
}
.avatar-preview-wrap {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 12px;
    border: 3px solid var(--accent-blue);
    box-shadow: 0 0 20px rgba(56, 139, 253, 0.35);
    background: #0B0F17;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.avatar-compress-badge {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.5;
    margin-top: 10px;
    text-align: center;
    display: none;
}
.avatar-compress-badge.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
.avatar-remove-btn {
    background: none;
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.avatar-remove-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
}

/* ==========================================================================
   Modern Gamer Profile Layout & Decluttered Components
   ========================================================================== */
.profile-wrapper {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Unified Gamer Identity Hero Card */
.profile-hero-card {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}
.profile-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #38bdf8, #10b981, #f59e0b);
}
.profile-hero-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.profile-hero-identity {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}
.profile-avatar-frame {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    border: 3px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.profile-avatar-icon {
    font-size: 3rem;
    line-height: 1;
}
.profile-avatar-lvl {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 900;
    padding: 3px 9px;
    border-radius: 12px;
    border: 2px solid #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 2;
}
.profile-user-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.profile-username-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.profile-username-title {
    font-size: 1.85rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    margin: 0;
}
.profile-tag-pill {
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.35);
    padding: 3px 12px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.profile-tag-pill:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: #818cf8;
    color: #fff;
    transform: translateY(-1px);
}
.profile-badge-status {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
}
.profile-badge-verified {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}
.profile-badge-guest {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}
.profile-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.85rem;
}
.profile-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4px 10px;
    border-radius: 6px;
    color: var(--text-muted);
}
.profile-meta-pill.clean-play {
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.2);
    background: rgba(16, 185, 129, 0.06);
}
.profile-hero-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.profile-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    border: none;
}
.profile-btn-edit {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.profile-btn-edit:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateY(-2px);
}
.profile-btn-share {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.profile-btn-share:hover {
    background: rgba(56, 189, 248, 0.22);
    border-color: #38bdf8;
    color: #fff;
    transform: translateY(-2px);
}
.profile-btn-upgrade {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.profile-btn-upgrade:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
}
.profile-btn-addfriend {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.profile-btn-addfriend:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    transform: translateY(-2px);
}

/* Integrated Hero XP Bar */
.profile-xp-block {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.profile-xp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}
.profile-xp-level-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.profile-xp-level-text {
    color: #818cf8;
    font-weight: 900;
    font-size: 0.98rem;
}
.profile-xp-total-text {
    color: var(--text-muted);
    font-size: 0.82rem;
}
.profile-xp-target-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.profile-xp-target-text {
    color: #94a3b8;
    font-size: 0.84rem;
}
.profile-xp-pct-pill {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 800;
}
.profile-xp-track {
    background: rgba(0, 0, 0, 0.4);
    height: 8px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.profile-xp-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #6366f1, #38bdf8, #10b981);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* 4 Streamlined KPI Stats */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 26px;
}
@media (max-width: 960px) {
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .profile-stats-grid {
        grid-template-columns: 1fr;
    }
}
.profile-kpi-card {
    background: linear-gradient(145deg, rgba(20, 27, 45, 0.75), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.profile-kpi-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.profile-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.profile-kpi-icon.rank {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}
.profile-kpi-icon.elo {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
}
.profile-kpi-icon.winrate {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}
.profile-kpi-icon.badges {
    background: rgba(236, 72, 153, 0.12);
    border: 1px solid rgba(236, 72, 153, 0.3);
    color: #ec4899;
}
.profile-kpi-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.profile-kpi-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.profile-kpi-value {
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1.1;
}
.profile-kpi-sub {
    font-size: 0.76rem;
    color: #64748b;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modern Segmented Navigation Tabs */
.profile-nav-pills {
    display: flex;
    gap: 8px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 6px;
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
}
.profile-nav-pills::-webkit-scrollbar {
    display: none;
}
.profile-nav-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-family: 'Cairo', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.profile-nav-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}
.profile-nav-btn.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(79, 70, 229, 0.5));
    color: #fff;
    border: 1px solid rgba(99, 102, 241, 0.55);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}
.profile-tab-badge {
    font-size: 0.74rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 1px 7px;
    border-radius: 10px;
}
.profile-tab-badge.pending {
    background: #ef4444;
}

/* Tab 1: Refined Game Cards Grid */
.profile-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 20px;
}
.profile-game-card {
    background: linear-gradient(145deg, rgba(20, 27, 45, 0.75), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}
.profile-game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.18);
}
.profile-game-accent-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}
.profile-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.profile-game-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}
.profile-game-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.profile-game-name {
    font-size: 1.08rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}
.profile-game-matrix {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.profile-game-tile {
    background: rgba(11, 15, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px 12px;
    text-align: center;
}
.profile-game-tile-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}
.profile-game-tile-value {
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.2;
}
.profile-game-play-btn {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.88rem;
    font-family: 'Cairo', sans-serif;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.profile-game-play-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.profile-panel {
    background: linear-gradient(145deg, rgba(20, 27, 45, 0.75), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 26px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Gamer Profile Banner Cover, Gender Badges & AAA Visual Elements
   ========================================================================== */
.profile-cover-banner {
    height: 120px;
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 50%, #172554 100%);
    position: relative;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 20px;
}
.profile-cover-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(99, 102, 241, 0.4), transparent 50%),
                radial-gradient(circle at 15% 85%, rgba(56, 189, 248, 0.3), transparent 50%);
    pointer-events: none;
}
.profile-cover-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 16px 16px;
    opacity: 0.35;
    pointer-events: none;
}
.profile-cover-tag {
    position: relative;
    z-index: 2;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.profile-hero-body {
    padding: 0 28px 24px;
}
.profile-hero-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: -50px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 16px;
}
.profile-avatar-frame.hero-overlap {
    width: 96px;
    height: 96px;
    border: 4px solid #0f172a;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.5);
    z-index: 3;
}

/* Gender Badges */
.profile-gender-male {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}
.profile-gender-female {
    background: rgba(244, 114, 182, 0.15);
    color: #f472b6;
    border: 1px solid rgba(244, 114, 182, 0.4);
}

/* Gender Selector Card Component */
.gender-select-card {
    cursor: pointer;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.5);
    transition: all 0.2s ease;
    padding: 12px 10px;
    text-align: center;
    display: block;
}
.gender-select-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}
.gender-select-card.selected,
.gender-select-card:has(input:checked) {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.18);
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.35);
}
.gender-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* Featured Trophies Ribbon inside Hero */
.profile-featured-trophies {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 6px 14px;
    border-radius: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.profile-trophy-item {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
    transition: transform 0.2s ease;
}
.profile-trophy-item:hover {
    transform: scale(1.15);
}

/* Game Card Win Rate Progress Indicator */
.profile-game-winrate-bar {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    margin-top: 6px;
    overflow: hidden;
}
.profile-game-winrate-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #38bdf8, #10b981);
    transition: width 0.6s ease;
}

/* ================================================================
   Global Mobile Polish & Drawer Refinements
   ================================================================ */
@media (max-width: 768px) {
    .nav-mobile-menu {
        top: 58px;
        height: calc(100vh - 58px);
    }
    .profile-hero-body {
        padding: 0 16px 20px;
    }
    .profile-hero-top-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -45px;
        gap: 12px;
    }
    .profile-user-details {
        align-items: center;
        text-align: center;
    }
    .profile-username-row {
        justify-content: center;
    }
    .profile-hero-buttons {
        width: 100%;
        justify-content: center;
    }
    .profile-btn-action {
        flex: 1;
        justify-content: center;
        font-size: 0.82rem;
        padding: 8px 14px;
        box-sizing: border-box;
    }
    .profile-featured-trophies {
        justify-content: center;
    }
    .profile-panel {
        padding: 16px 12px;
        border-radius: var(--radius-md);
    }
    .profile-wrapper {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .nav-mobile-menu {
        top: 54px;
        height: calc(100vh - 54px);
        width: 100vw;
        border-left: none;
        padding: 16px 12px;
    }
    .profile-cover-banner {
        height: 90px;
        padding: 10px 14px;
    }
    .profile-username-title {
        font-size: 1.4rem;
    }
    .profile-btn-action span:last-child {
        font-size: 0.78rem;
    }
}

/* ==========================================================================
   PlayZone In-Site Notification Center & Live Support Chat Styles
   ========================================================================== */

/* Navbar Notification Bell & Dropdown */
.nav-notification-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-notif-btn {
    position: relative;
}

.nav-notif-btn:hover {
    transform: scale(1.08) !important;
    background: rgba(245, 158, 11, 0.16) !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
    color: #fbbf24 !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.3) !important;
}

.nav-notif-btn.active {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: #f59e0b !important;
    color: #fbbf24 !important;
}

.nav-notif-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    border-radius: var(--radius-full);
    border: 2px solid #0D111A;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

.nav-notif-badge.pulse {
    animation: notifPulse 1.8s infinite;
}

@keyframes notifPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.nav-notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: -10px;
    width: 330px;
    max-width: 90vw;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(56, 139, 253, 0.12);
    z-index: 1000;
    overflow: hidden;
    flex-direction: column;
}

.nav-notif-dropdown.show {
    display: flex;
    animation: dropdownFadeIn 0.2s ease-out;
}

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

.nav-notif-header {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-notif-mark-all-btn {
    background: transparent;
    border: none;
    color: var(--neon-cyan);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    outline: none;
}

.nav-notif-mark-all-btn:hover {
    background: rgba(0, 240, 255, 0.1);
    color: #fff;
}

.nav-notif-list {
    max-height: 350px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.nav-notif-list::-webkit-scrollbar {
    width: 5px;
}
.nav-notif-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.nav-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    text-align: right;
}

.nav-notif-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-notif-item.unread {
    background: rgba(56, 139, 253, 0.07);
    border-right: 3px solid var(--accent-blue);
}

.nav-notif-item-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.nav-notif-item-content {
    flex: 1;
    min-width: 0;
}

.nav-notif-item-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 3px;
    line-height: 1.3;
}

.nav-notif-item-msg {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nav-notif-item-time {
    font-size: 0.72rem;
    color: var(--text-faint);
    margin-top: 4px;
}

.nav-notif-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-blue);
    flex-shrink: 0;
    align-self: center;
    box-shadow: 0 0 8px var(--accent-blue);
}

.nav-notif-empty {
    padding: 30px 16px;
    text-align: center;
}

.nav-notif-footer {
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
}

.nav-notif-footer a {
    color: var(--neon-cyan);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    display: block;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.nav-notif-footer a:hover {
    background: rgba(0, 240, 255, 0.1);
    color: #fff;
}

/* In-Site Toast Alerts */
.pz-toast-container {
    position: fixed;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 440px;
    width: calc(100% - 32px);
    pointer-events: none;
}

.pz-toast-item {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 240, 255, 0.18);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    direction: rtl;
    animation: toastSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: transform 0.2s, opacity 0.3s;
}

@keyframes toastSlideDown {
    from {
        opacity: 0;
        transform: translateY(-25px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pz-toast-item.pz-toast-fadeout {
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
}

.pz-toast-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.pz-toast-content {
    flex: 1;
    min-width: 0;
    text-align: right;
}

.pz-toast-title {
    display: block;
    font-size: 0.92rem;
    color: #fff;
    font-weight: 800;
    margin-bottom: 2px;
}

.pz-toast-body {
    margin: 0;
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pz-toast-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.pz-toast-view-btn {
    background: rgba(0, 240, 255, 0.15);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.pz-toast-view-btn:hover {
    background: var(--neon-cyan);
    color: #0d111a;
}

.pz-toast-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    outline: none;
    line-height: 1;
}

.pz-toast-close-btn:hover {
    color: #fff;
}

/* In-Site Live Support Chat Widget & Modal */
.pz-chat-modal {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 540px;
    max-height: calc(100vh - 100px);
    z-index: 99999;
    direction: rtl;
}

.pz-chat-modal.show {
    display: flex;
    animation: chatPopup 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chatPopup {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pz-chat-card {
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(56, 139, 253, 0.35);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 139, 253, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pz-chat-header {
    padding: 14px 16px;
    background: rgba(30, 41, 59, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pz-chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pz-chat-avatar-wrap {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(56, 139, 253, 0.2);
    border: 1px solid var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.pz-chat-online-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 11px;
    height: 11px;
    background: #10B981;
    border: 2px solid #0F172A;
    border-radius: 50%;
    box-shadow: 0 0 8px #10B981;
}

.pz-chat-header-title {
    font-size: 0.96rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.pz-chat-header-status {
    font-size: 0.74rem;
    color: var(--neon-green);
    font-weight: 700;
    margin-top: 2px;
}

.pz-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pz-chat-header-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    outline: none;
}

.pz-chat-header-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.pz-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(10, 15, 29, 0.5);
    overscroll-behavior: contain;
}

.pz-chat-body::-webkit-scrollbar {
    width: 5px;
}
.pz-chat-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.pz-chat-welcome-banner {
    background: rgba(56, 139, 253, 0.1);
    border: 1px dashed rgba(56, 139, 253, 0.35);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
    color: #cbd5e1;
    font-size: 0.82rem;
    line-height: 1.5;
}

.pz-chat-welcome-banner strong {
    color: #fff;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 4px;
}

.pz-chat-messages-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pz-chat-row {
    display: flex;
    width: 100%;
}

.pz-chat-row.pz-bubble-user {
    justify-content: flex-start;
}

.pz-chat-row.pz-bubble-admin {
    justify-content: flex-end;
}

.pz-chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.86rem;
    line-height: 1.5;
    position: relative;
    word-break: break-word;
}

.pz-bubble-user .pz-chat-bubble {
    background: rgba(56, 139, 253, 0.22);
    border: 1px solid rgba(56, 139, 253, 0.4);
    color: #f1f5f9;
    border-bottom-right-radius: 4px;
}

.pz-bubble-admin .pz-chat-bubble {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #f1f5f9;
    border-bottom-left-radius: 4px;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.pz-bubble-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.pz-bubble-sender {
    font-weight: 800;
    font-size: 0.78rem;
}

.pz-bubble-user .pz-bubble-sender {
    color: var(--neon-cyan);
}

.pz-bubble-admin .pz-bubble-sender {
    color: #34d399;
}

.pz-bubble-time {
    font-size: 0.68rem;
    color: var(--text-faint);
}

.pz-bubble-text {
    white-space: pre-wrap;
    font-weight: 500;
}

.pz-bubble-status {
    font-size: 0.72rem;
    color: #fbbf24;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pz-chat-footer {
    padding: 12px;
    background: rgba(30, 41, 59, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.pz-chat-inputs-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pz-chat-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    direction: rtl;
    box-sizing: border-box;
}

.pz-chat-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.pz-chat-send-btn {
    background: linear-gradient(135deg, #00f0ff, #0088ff);
    color: #0b0f19;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    outline: none;
    height: 42px;
    flex-shrink: 0;
}

.pz-chat-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
}

/* Big Live Chat Button in Contact Hero */
.btn-live-support-chat {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.18), rgba(56, 139, 253, 0.25));
    border: 1px solid var(--neon-cyan);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.25);
    transition: all 0.25s ease;
    text-decoration: none;
    outline: none;
    font-family: inherit;
    margin-top: 14px;
}

.btn-live-support-chat:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 35px rgba(0, 240, 255, 0.45);
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.28), rgba(56, 139, 253, 0.38));
    border-color: #fff;
}

.live-dot-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 10px #10B981;
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.badge-online {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.74rem;
    font-weight: 800;
}

@media (max-width: 600px) {
    .pz-chat-modal {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100vw;
        max-width: 100vw;
        height: 80vh;
        max-height: 80vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    .pz-chat-card {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        border-bottom: none;
    }
    .btn-live-support-chat {
        font-size: 0.88rem;
        padding: 10px 16px;
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
    .nav-notif-dropdown {
        left: -50px;
        width: 300px;
    }
}

