/* ============================
   PROFESSIONAL LAYOUT SYSTEM
   ============================ */

/* Title-Text Buttons — hero-big-title style adapted for inline buttons */
.btn-title-text {
    display: inline-block;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--text-secondary, #777);
    background: linear-gradient(180deg, var(--text-secondary, #999), var(--text-muted, #555));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    padding: 8px 0;
    position: relative;
    transition: opacity 0.25s ease, transform 0.25s ease;
    cursor: pointer;
    border: none;
    outline: none;
}
.btn-title-text::after {
    content: "";
    display: block;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color, #3b82f6), transparent);
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 2px;
}
.btn-title-text:hover {
    opacity: 0.85;
    transform: translateX(4px);
    -webkit-text-fill-color: transparent;
    color: var(--text-primary, #eee);
    background: linear-gradient(180deg, var(--text-primary, #eee), var(--text-secondary, #999));
    -webkit-background-clip: text;
    background-clip: text;
}
.btn-title-text:hover::after {
    width: 100%;
}
.btn-title-sm {
    font-size: clamp(0.75rem, 1.8vw, 0.95rem);
    letter-spacing: 0.5px;
}
@media (max-width: 768px) {
    .btn-title-text { font-size: 1rem; }
    .btn-title-sm { font-size: 0.75rem; }
}

/* Section Spacing & Backgrounds */
.hp-section {
    padding: 70px 0;
    position: relative;
}
.hp-section-sm {
    padding: 45px 0;
    position: relative;
}
.hp-section-bg {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.hp-section-dark {
    background: rgba(0, 0, 0, 0.4);
}

/* Section Headers */
.section-header-block {
    text-align: center;
    margin-bottom: 40px;
}
.section-header-block .section-title {
    margin-bottom: 10px;
}
.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Big Rotated Section Titles — mirrors .hero-big-title exactly */
.section-titled {
    overflow-x: clip;
    overflow-y: visible;
    position: relative;
}
.section-titled-inner {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}
.section-big-title {
    position: absolute;
    transform: rotate(-90deg) translateX(-50%);
    transform-origin: 0 0;
    top: 50%;
    left: -20px;
    color: var(--text-secondary, #ccc);
    font-size: clamp(50px, 8vw, 100px);
    font-weight: 900;
    line-height: 1;
    text-align: left;
    letter-spacing: -1px;
    text-transform: uppercase;
    z-index: 10;
    margin: 0;
    white-space: nowrap;
    pointer-events: none;
}
.section-big-title span {
    text-shadow: 0 2px 0 rgba(0,0,0,0.3);
    background: -webkit-linear-gradient(var(--text-secondary, #777), transparent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    position: relative;
}
.section-big-title span:nth-of-type(2) {
    display: inline-block;
    margin-left: 0.5em;
    top: -0.4em;
}
.section-big-title::before {
    content: "";
    position: absolute;
    right: -25%;
    width: 150%;
    bottom: -50px;
    height: 150px;
    background: linear-gradient(transparent, var(--bg-primary, #111), transparent);
}
/* Push container content right to make room for title */
.section-titled-inner > .container {
    padding-left: max(calc(2% + 80px), 110px);
    position: relative;
    z-index: 1;
}
/* Ensure consistent min-height so big-title centers properly */
.section-titled-inner {
    min-height: 600px;
}

@media (max-width: 1200px) {
    .section-big-title {
        font-size: clamp(45px, 7vw, 85px);
        left: -20px;
    }
    .section-titled-inner > .container {
        padding-left: max(calc(2% + 60px), 90px);
    }
}
@media (max-width: 992px) {
    .section-big-title {
        font-size: clamp(40px, 7vw, 70px);
        left: -15px;
    }
    .section-titled-inner > .container {
        padding-left: 80px;
    }
}
@media (max-width: 768px) {
    .section-big-title {
        font-size: 36px;
        left: -10px;
    }
    .section-titled-inner > .container {
        padding-left: 55px;
    }
}
@media (max-width: 480px) {
    .section-big-title {
        font-size: 28px;
        left: -5px;
    }
    .section-titled-inner > .container {
        padding-left: 42px;
    }
}

/* Section Dividers */
.hp-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gradient-1);
    border-radius: 3px;
    opacity: 0;
}
.hp-section-divider::after {
    opacity: 0.4;
}

/* Scroll Reveal Animation — only if JS loaded (class added by JS) */
.reveal-ready .reveal-section {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-ready .reveal-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   ★ COMPONENT CSS
   ============================ */

/* Dashboard Strip */
.dashboard-strip { padding: 14px 0; background: linear-gradient(135deg, rgba(var(--primary-rgb),0.06), rgba(var(--primary-rgb),0.03)); border-bottom: 1px solid var(--border-color); backdrop-filter: blur(8px); }
.dash-grid { display: flex; align-items: center; gap: 12px; overflow-x: auto; scrollbar-width: none; }
.dash-grid::-webkit-scrollbar { display: none; }
.dash-card { display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 14px; white-space: nowrap; flex-shrink: 0; transition: all 0.3s ease; }
.dash-card:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.dash-icon { font-size: 1.1rem; opacity: 0.7; }
.dash-level .dash-icon { color: var(--primary-color); }
.dash-points .dash-icon { color: var(--warning); }
.dash-winrate .dash-icon { color: var(--success); }
.dash-streak .dash-icon { color: var(--danger); }
.dash-games .dash-icon { color: var(--info); }
.dash-value { font-weight: 800; font-size: 1rem; color: var(--text-primary); }
.dash-label { font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.dash-play { background: var(--gradient-1); color: white !important; text-decoration: none; font-weight: 700; font-size: 0.95rem; border: none; padding: 12px 24px; border-radius: 14px; }
.dash-play:hover { box-shadow: 0 5px 20px rgba(var(--primary-rgb),0.4); color: white; transform: translateY(-2px); }

/* Activity Feed */
/* ── Activity Feed Bar ── */
.activity-feed-section {
    padding: 0;
    margin: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.activity-feed-section + .bg-animated,
.activity-feed-section ~ .hero-section { margin-top: 0; }

.activity-feed-bar {
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    padding: 6px 0;
}

/* Live badge */
.feed-label {
    font-weight: 800;
    font-size: 0.65rem;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px 4px 10px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 20px;
    flex-shrink: 0;
    margin-right: 14px;
    box-shadow: 0 0 12px rgba(239,68,68,0.3);
    position: relative;
}
.feed-label::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: pulse-dot 1.5s ease-in-out infinite;
    flex-shrink: 0;
}
.feed-label i { display: none; }
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

/* Scroll track */
.feed-scroll {
    display: flex;
    gap: 0;
    animation: scroll-feed 35s linear infinite;
    white-space: nowrap;
}
.feed-scroll:hover { animation-play-state: paused; }

/* Feed items */
.feed-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
    flex-shrink: 0;
    padding: 3px 14px;
    border-right: 1px solid rgba(255,255,255,0.06);
    transition: color 0.2s ease;
}
.feed-item:hover { color: rgba(255,255,255,0.85); }
.feed-item strong {
    color: rgba(255,255,255,0.9);
    font-weight: 700;
}

/* Avatar */
.feed-avatar {
    width: 20px; height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1.5px solid rgba(255,255,255,0.15);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Game icon in feed */
.feed-item .fas { font-size: 0.7rem; opacity: 0.5; }

/* Reward badge */
.feed-reward {
    font-weight: 800;
    font-size: 0.7rem;
    color: #fbbf24;
    background: rgba(251,191,36,0.1);
    padding: 1px 6px;
    border-radius: 10px;
    letter-spacing: 0.3px;
}

@keyframes scroll-feed {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Tournament Cards */
.tournament-card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 20px; padding: 28px; position: relative; overflow: hidden; transition: all 0.3s ease; }
.tournament-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.3); }
.tournament-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient-1); }
.tournament-status { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.status-in_progress { background: rgba(239,68,68,0.15); color: var(--danger); animation: pulse-badge 2s ease-in-out infinite; }
.status-registration { background: rgba(16,185,129,0.15); color: var(--success); }
.status-scheduled, .status-open { background: rgba(59,130,246,0.15); color: var(--info); }
.tournament-name { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); margin-bottom: 8px; }
.tournament-desc { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 15px; line-height: 1.5; }
.tournament-meta { display: flex; gap: 20px; margin-bottom: 15px; }
.tourn-stat { text-align: center; }
.tourn-stat i { display: block; font-size: 1.1rem; margin-bottom: 4px; color: var(--text-secondary); }
.tourn-stat span { font-weight: 700; color: var(--text-primary); font-size: 1rem; }
.tourn-stat small { display: block; font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; }
.tournament-countdown { font-size: 0.85rem; color: var(--warning); padding: 8px 0; }
.progress-bar-mini { height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
.progress-fill-mini { height: 100%; background: var(--gradient-1); border-radius: 3px; transition: width 0.5s ease; }

/* Challenges */
.challenges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 15px; }
.challenge-card { display: flex; align-items: center; gap: 15px; padding: 20px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 16px; position: relative; transition: all 0.3s ease; overflow: hidden; }
.challenge-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }
.challenge-done { border-color: rgba(16,185,129,0.3); background: rgba(16,185,129,0.05); }
.challenge-type-badge { position: absolute; top: 8px; right: 10px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; color: var(--primary-color); opacity: 0.7; }
.challenge-icon { font-size: 1.5rem; flex-shrink: 0; width: 45px; text-align: center; }
.challenge-body { flex: 1; min-width: 0; }
.challenge-title { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); margin-bottom: 6px; }
.challenge-bar { display: flex; align-items: center; gap: 8px; }
.challenge-bar-track { flex: 1; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
.challenge-bar-fill { height: 100%; background: var(--gradient-1); border-radius: 3px; transition: width 0.5s ease; }
.challenge-progress-text { font-size: 0.75rem; color: var(--text-secondary); white-space: nowrap; }
.challenge-rewards { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.reward-badge { font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.reward-pts { background: rgba(251,191,36,0.15); color: var(--warning); }
.reward-xp { background: rgba(139,92,246,0.15); color: var(--primary-color); }
.challenge-check { position: absolute; top: 10px; left: 10px; color: var(--success); font-size: 1.2rem; }
.challenges-teaser { text-align: center; padding: 60px 20px; }
.teaser-icon { font-size: 3rem; opacity: 0.3; margin-bottom: 15px; color: var(--text-secondary); }
.challenges-teaser h3 { font-weight: 800; color: var(--text-primary); margin-bottom: 8px; }
.challenges-teaser p { color: var(--text-secondary); margin-bottom: 20px; }

/* Achievements Swiper */
.achievements-swiper { padding: 20px 0 40px; }
.badge-card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 16px; padding: 25px 20px; text-align: center; transition: all 0.3s ease; }
.badge-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.badge-icon-wrap { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(251,191,36,0.15)); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; font-size: 1.5rem; color: var(--warning); }
.badge-name { font-weight: 800; font-size: 0.95rem; color: var(--text-primary); margin-bottom: 10px; }
.badge-earner { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.badge-earner-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.badge-earner span { font-size: 0.85rem; color: var(--text-secondary); }
.badge-time { font-size: 0.75rem; color: var(--text-secondary); opacity: 0.7; }

/* Recent Games Grid */
.recent-games-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.recent-game-card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; transition: all 0.3s ease; position: relative; overflow: hidden; }
.recent-game-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.recent-game-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.recent-game-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-size: 1rem; flex-shrink: 0; }
.recent-game-name { font-weight: 700; font-size: 0.85rem; color: var(--text-primary); }
.recent-game-time { font-size: 0.7rem; color: var(--text-secondary); }
.recent-game-winner { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.recent-game-winner img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.recent-game-winner-name { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); }
.recent-game-meta { display: flex; gap: 12px; font-size: 0.75rem; color: var(--text-secondary); }
.recent-game-badge { position: absolute; top: 10px; right: 10px; font-size: 0.65rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.badge-winner { background: rgba(251,191,36,0.15); color: var(--warning); }
.badge-capot { background: rgba(239,68,68,0.15); color: var(--danger); }

/* Community */
.community-card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 20px; padding: 28px; }
.community-card-title { font-size: 1.05rem; font-weight: 800; color: var(--text-primary); margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.topic-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); text-decoration: none; transition: all 0.2s ease; }
.topic-row:last-child { border-bottom: none; }
.topic-row:hover { padding-left: 5px; }
.topic-row-icon { color: var(--primary-color); font-size: 0.9rem; flex-shrink: 0; }
.topic-row-info { flex: 1; min-width: 0; }
.topic-row-title { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topic-row-meta { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }
.topic-row-replies { background: rgba(var(--primary-rgb),0.1); color: var(--primary-color); font-weight: 700; font-size: 0.8rem; padding: 4px 10px; border-radius: 8px; flex-shrink: 0; }
.community-link { display: block; text-align: center; margin-top: 15px; color: var(--primary-color); text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: color 0.2s; }
.community-link:hover { color: var(--primary-color); filter: brightness(0.85); }
.online-users-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.online-user-pill { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 20px; text-decoration: none; font-size: 0.8rem; color: var(--text-secondary); transition: all 0.2s ease; }
.online-user-pill:hover { background: rgba(var(--primary-rgb),0.1); border-color: rgba(var(--primary-rgb),0.2); color: var(--text-primary); }
.online-user-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.quick-stat-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.85rem; }
.quick-stat-row:last-child { border-bottom: none; }
.quick-stat-row span { color: var(--text-secondary); }
.quick-stat-row strong { color: var(--text-primary); }

/* Top Players per Game */
.game-leaderboards-section { margin-top: 60px; padding-top: 50px; border-top: 1px solid var(--border-color); }
.game-leaderboards-title {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 30px;
    font-size: 1.6rem;
    font-weight: 800;
}

/* Responsive for new sections */
@media (max-width: 768px) {
    .hp-section { padding: 50px 0; }
    .hp-section-sm { padding: 35px 0; }
    .dash-grid { gap: 8px; }
    .dash-card { padding: 8px 12px; }
    .dash-value { font-size: 0.85rem; }
    .challenges-grid { grid-template-columns: 1fr; }
    .recent-games-grid { grid-template-columns: repeat(2, 1fr); }
    .tournament-meta { gap: 10px; }
    .community-card { padding: 20px; }
}
@media (max-width: 480px) {
    .hp-section { padding: 40px 0; }
    .recent-games-grid { grid-template-columns: 1fr; }
}
.css-particles { position:fixed; width:100%; height:100%; top:0; left:0; z-index:1; pointer-events:none; overflow:hidden; }
.css-particles span { position:absolute; border-radius:50%; opacity:0; bottom:0; animation:cssFloat linear infinite; will-change:transform,opacity; }
.css-particles span:nth-child(1)  { width:4px; height:4px; left:10%; background:var(--primary-color); animation-duration:18s; animation-delay:0s; }
.css-particles span:nth-child(2)  { width:6px; height:6px; left:25%; background:var(--primary-color); opacity:0.7; animation-duration:22s; animation-delay:2s; }
.css-particles span:nth-child(3)  { width:3px; height:3px; left:40%; background:var(--info); animation-duration:16s; animation-delay:4s; }
.css-particles span:nth-child(4)  { width:5px; height:5px; left:55%; background:var(--primary-color); animation-duration:20s; animation-delay:1s; }
.css-particles span:nth-child(5)  { width:7px; height:7px; left:70%; background:var(--primary-color); opacity:0.7; animation-duration:24s; animation-delay:3s; }
.css-particles span:nth-child(6)  { width:4px; height:4px; left:85%; background:var(--info); animation-duration:19s; animation-delay:5s; }
.css-particles span:nth-child(7)  { width:3px; height:3px; left:15%; background:var(--primary-color); opacity:0.7; animation-duration:21s; animation-delay:7s; }
.css-particles span:nth-child(8)  { width:5px; height:5px; left:35%; background:var(--primary-color); animation-duration:17s; animation-delay:6s; }
.css-particles span:nth-child(9)  { width:6px; height:6px; left:60%; background:var(--info); animation-duration:23s; animation-delay:8s; }
.css-particles span:nth-child(10) { width:4px; height:4px; left:80%; background:var(--primary-color); animation-duration:20s; animation-delay:9s; }
.css-particles span:nth-child(11) { width:3px; height:3px; left:5%;  background:var(--primary-color); opacity:0.7; animation-duration:25s; animation-delay:10s; }
.css-particles span:nth-child(12) { width:5px; height:5px; left:50%; background:var(--info); animation-duration:18s; animation-delay:11s; }
@keyframes cssFloat {
    0%   { opacity:0; transform:translateX(0) translateY(5vh) scale(0.5); }
    10%  { opacity:0.3; }
    50%  { opacity:0.15; transform:translateX(40px) translateY(-50vh) scale(1); }
    90%  { opacity:0.25; }
    100% { opacity:0; transform:translateX(-20px) translateY(-105vh) scale(0.5); }
}

.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
    opacity: 0.95;
}

.bg-animated::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--primary-rgb, 59, 130, 246), 0.1) 0%, transparent 70%);
    animation: bgMove 20s linear infinite;
}

@keyframes bgMove {
    0% { transform: translate(0, 0); }
        50% { transform: translate(-50%, -50%); }
        100% { transform: translate(0, 0); }
    }
    
    /* Top Bar */
    .top-bar {
        background: rgba(0, 0, 0, 0.9);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 8px 0;
        font-size: 0.85rem;
        position: sticky;
        top: 0;
        z-index: 1001;
    }
    .top-bar-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
    }
    .top-bar-left {
        display: flex;
        align-items: center;
        gap: 30px;
        flex: 1;
    }
    .top-bar-right {
        display: flex;
        align-items: center;
        gap: 20px;
    }
    .jackpot-ticker {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--warning);
        font-weight: 700;
    }
    .jackpot-amount {
        font-size: 1.1rem;
        animation: pulse 2s ease-in-out infinite;
    }
    .winner-ticker {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--text-secondary);
        flex: 1;
        overflow: hidden;
    }
    .winner-ticker marquee {
        font-size: 0.85rem;
    }
    .support-status {
        display: flex;
        align-items: center;
        gap: 6px;
        color: var(--success);
        font-weight: 600;
    }
    .support-status i {
        animation: pulse 1.5s ease-in-out infinite;
    }
    .language-selector {
        display: flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        padding: 4px 10px;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.05);
        transition: all 0.3s ease;
    }
    .language-selector:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    /* Navbar styles in assets/css/themes.css — no overrides needed */

    .search-bar-header {
        display: flex;
        align-items: center;
        gap: 10px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 8px 15px;
        min-width: 250px;
        transition: all 0.3s ease;
    }
    .search-bar-header:focus-within {
        background: rgba(255, 255, 255, 0.08);
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
    }
    .search-bar-header input {
        background: transparent;
        border: none;
        outline: none;
        color: var(--text-primary);
        flex: 1;
    }
    .search-bar-header i {
        color: var(--text-secondary);
    }
    
    /* .points-display in assets/css/themes.css */

    .user-avatar {
        width: 35px;
        height: 35px;
        border-radius: 50%;
        background: var(--gradient-1);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        color: white;
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    
    .user-avatar-img {
        width: 35px;
        height: 35px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid rgba(var(--primary-rgb), 0.5);
        flex-shrink: 0;
    }
    
    .user-menu-trigger {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .username-display {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.9rem;
    }
    
    @media (max-width: 768px) {
        .username-display {
            display: none;
        }
    }
    
    .notification-dropdown, .user-dropdown {
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        padding: 0;
        min-width: 320px;
        margin-top: 10px;
    }
    .notification-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .notification-header h6 {
        margin: 0;
        font-weight: 700;
        color: var(--text-primary);
    }
    .notification-header a {
        color: var(--primary-color);
        text-decoration: none;
        font-size: 0.85rem;
    }
    .notification-item {
        display: flex;
        align-items: start;
        gap: 12px;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: all 0.3s ease;
    }
    .notification-item:hover {
        background: rgba(255, 255, 255, 0.03);
    }
    .notification-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        flex-shrink: 0;
    }
    .notification-content p {
        margin: 0;
        color: var(--text-primary);
        font-size: 0.9rem;
    }
    .notification-content span {
        color: var(--text-secondary);
        font-size: 0.75rem;
    }
    
    .user-dropdown .dropdown-item {
        padding: 12px 20px;
        color: var(--text-primary);
        transition: all 0.3s ease;
    }
    .user-dropdown .dropdown-item:hover {
        background: rgba(var(--primary-rgb), 0.1);
        color: var(--primary-color);
    }
    .user-dropdown .dropdown-item i {
        width: 20px;
        margin-right: 10px;
    }
    
    .btn-deposit {
        background: linear-gradient(135deg, var(--success), #059669);
        color: white;
        padding: 10px 20px;
        border-radius: 10px;
        font-weight: 700;
        transition: all 0.3s ease;
        border: none;
    }
    .btn-deposit:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
        color: white;
    }
    
    /* .navbar-brand, .nav-link styles in assets/css/themes.css */

    .btn-gradient {
        background: var(--gradient-1);
        border: none;
        color: white;
        padding: 10px 25px;
        border-radius: 10px;
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
    }

    .btn-gradient:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 25px rgba(var(--primary-rgb), 0.6);
        color: white;
    }
    
    .notification-badge {
        position: absolute;
        top: 5px;
        right: 5px;
        background: linear-gradient(135deg, var(--danger), var(--danger));
        color: white;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.7rem;
        font-weight: 700;
        box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
        animation: pulse-badge 2s infinite;
    }

    @keyframes pulse-badge {
        0%, 100% {
            transform: scale(1);
            opacity: 1;
        }
        50% {
            transform: scale(1.1);
            opacity: 0.85;
        }
    }
    
    /* Hero Swiper Slider */
    /* Hero styles are in hero-critical.css (inlined) */

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Stats Section */
    .stats-section {
        padding: 80px 0;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
    }

    .stats-section.stats-compact {
        padding: 25px 0;
        margin: 0;
        border-top: none;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 30px;
    }

    .stats-compact .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }

    .stat-card {
        background: var(--bg-tertiary);
        padding: 40px 30px;
        border-radius: 20px;
        text-align: center;
        border: 1px solid var(--border-color);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }

    .stats-compact .stat-card {
        padding: 18px 12px;
        border-radius: 14px;
    }
    
    .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: var(--gradient-1);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.4s ease;
    }
    
    .stat-card::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(var(--primary-rgb), 0.1), transparent);
        transform: translate(-50%, -50%);
        transition: width 0.4s ease, height 0.4s ease;
    }
    
    .stat-card:hover::before {
        transform: scaleX(1);
    }
    
    .stat-card:hover::after {
        width: 300px;
        height: 300px;
    }
    
    .stat-card:hover {
        transform: translateY(-10px) scale(1.02);
        box-shadow: 0 15px 50px rgba(var(--primary-rgb), 0.3);
        border-color: rgba(var(--primary-rgb), 0.3);
    }

    .stats-compact .stat-card:hover {
        transform: translateY(-5px) scale(1.01);
        box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.2);
    }
    
    .stat-icon {
        width: 80px;
        height: 80px;
        margin: 0 auto 20px;
        border-radius: 20px;
        background: var(--gradient-1);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2.5rem;
        color: white;
        position: relative;
        z-index: 1;
        transition: transform 0.3s ease;
    }

    .stats-compact .stat-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 10px;
        border-radius: 12px;
        font-size: 1.2rem;
    }
    
    .stat-icon-points { background: linear-gradient(135deg, var(--warning), #d97706); }
    .stat-icon-games { background: linear-gradient(135deg, var(--success), #059669); }
    .stat-icon-prizes { background: linear-gradient(135deg, #f97316, #ea580c); }
    .stat-icon-online { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

    .stat-card:hover .stat-icon {
        transform: scale(1.1) rotate(5deg);
    }
    
    .stat-number {
        font-size: 3rem;
        font-weight: 900;
        background: var(--gradient-1);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-bottom: 10px;
    }

    .stats-compact .stat-number {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }

    .stat-label {
        font-size: 1.1rem;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .stats-compact .stat-label {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }
    
    /* Features Section */
    .features-section {
        padding: 70px 0;
    }
    
    .section-title {
        text-align: center;
        font-size: 2.2rem;
        font-weight: 800;
        margin-bottom: 35px;
        background: var(--gradient-1);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    .section-title i {
        -webkit-text-fill-color: initial;
        background: none;
        opacity: 0.5;
        font-size: 0.85em;
        margin-right: 4px;
    }
    
    .features-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .feature-card {
        background: var(--bg-secondary);
        padding: 25px;
        border-radius: 16px;
        border: 1px solid var(--border-color);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }
    
    .feature-card::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(var(--primary-rgb), 0.05), transparent 70%);
        opacity: 0;
        transition: opacity 0.4s ease;
    }
    
    .feature-card:hover::before {
        opacity: 1;
    }
    
    .feature-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
        border-color: var(--primary-color);
    }
    
    .feature-icon {
        width: 55px;
        height: 55px;
        border-radius: 12px;
        background: var(--gradient-1);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: white;
        margin-bottom: 18px;
        transition: all 0.3s ease;
        position: relative;
        z-index: 1;
    }
    
    .feature-icon-play { background: linear-gradient(135deg, var(--success), #059669); }
    .feature-icon-chat { background: linear-gradient(135deg, var(--info), #2563eb); }
    .feature-icon-trophy { background: linear-gradient(135deg, var(--warning), #d97706); }

    .feature-card:hover .feature-icon {
        transform: scale(1.1) rotate(-5deg);
        box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
    }

    .feature-title {
        font-size: 1.2rem;
        font-weight: 700;
        margin-bottom: 10px;
        color: var(--text-primary);
    }
    
    .feature-desc {
        color: var(--text-secondary);
        line-height: 1.6;
        font-size: 0.95rem;
    }
    
    /* Recent Topics */
    .topics-section {
        padding: 100px 0;
        background: var(--bg-secondary);
    }
    
    .topic-card {
        background: var(--bg-tertiary);
        padding: 25px;
        border-radius: 16px;
        border: 1px solid var(--border-color);
        margin-bottom: 20px;
        transition: all 0.3s ease;
        display: flex;
        gap: 20px;
        align-items: center;
    }
    
    .topic-card:hover {
        transform: translateX(10px);
        border-color: var(--primary-color);
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
    }
    
    .topic-icon {
        width: 60px;
        height: 60px;
        border-radius: 12px;
        background: var(--gradient-1);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: white;
        flex-shrink: 0;
    }
    
    .topic-content {
        flex: 1;
    }
    
    .topic-title {
        font-size: 1.2rem;
        font-weight: 700;
        margin-bottom: 8px;
    }
    
    .topic-title a {
        color: var(--text-primary);
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .topic-title a:hover {
        color: var(--primary-color);
    }
    
    .topic-meta {
        font-size: 0.9rem;
        color: var(--text-secondary);
        display: flex;
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .topic-meta span {
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 80px 0;
        background: var(--gradient-1);
        text-align: center;
        position: relative;
        overflow: hidden;
    }
    
    .cta-section::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
        animation: rotate 30s linear infinite;
    }
    
    @keyframes rotate {
        100% { transform: rotate(360deg); }
    }
    
    .cta-content {
        position: relative;
        z-index: 2;
    }
    
    .cta-title {
        font-size: clamp(1.8rem, 4vw, 2.8rem);
        font-weight: 900;
        color: white;
        margin-bottom: 20px;
        line-height: 1.2;
    }

    .cta-text {
        font-size: clamp(1rem, 2vw, 1.2rem);
        color: rgba(255,255,255,0.9);
        margin-bottom: 35px;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.6;
    }
    
    .cta-btn {
        background: white;
        color: var(--primary-color);
        padding: 18px 50px;
        font-size: 1.2rem;
        font-weight: 700;
        border-radius: 12px;
        text-decoration: none;
        display: inline-block;
        transition: all 0.3s ease;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    }
    
    .cta-btn:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 30px rgba(0,0,0,0.4);
        color: var(--primary-color);
    }

    /* Leaderboard Section */
    .leaderboard-section {
        padding: 80px 0;
        background: var(--bg-primary);
        position: relative;
    }
    
    .leaderboard-tabs {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin: 40px 0;
        flex-wrap: wrap;
    }
    
    .leaderboard-tab {
        background: var(--bg-tertiary);
        backdrop-filter: blur(10px);
        border: 1px solid var(--border-color);
        color: var(--text-secondary);
        padding: 14px 30px;
        border-radius: 12px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        gap: 10px;
        position: relative;
        overflow: hidden;
    }

    .leaderboard-tab::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 3px;
        background: var(--gradient-1);
        border-radius: 3px 3px 0 0;
        transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .leaderboard-tab:hover {
        border-color: rgba(var(--primary-rgb), 0.4);
        color: var(--text-primary);
        transform: translateY(-2px);
        background: var(--bg-secondary);
    }

    .leaderboard-tab:hover::after {
        width: 60%;
        left: 20%;
    }

    .leaderboard-tab.active {
        background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15), rgba(var(--primary-rgb), 0.05));
        border-color: var(--primary-color);
        color: var(--primary-color);
        box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.25);
        transform: translateY(-2px);
    }

    .leaderboard-tab.active::after {
        width: 80%;
        left: 10%;
    }
    
    .leaderboard-tab i {
        font-size: 1.1rem;
    }
    
    .leaderboard-content {
        max-width: 1100px;
        margin: 0 auto;
    }

    #homepageLeaderboard {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        min-height: 400px;
        transition: opacity 0.25s ease, transform 0.25s ease;
    }
    
    .leaderboard-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .leaderboard-list.hidden {
        display: none;
    }
    
    .leaderboard-item {
        background: var(--bg-tertiary);
        backdrop-filter: blur(10px);
        border: 1px solid var(--border-color);
        border-radius: 14px;
        padding: 14px 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }
    
    .leaderboard-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.5), transparent);
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .leaderboard-item:hover {
        border-color: rgba(var(--primary-rgb), 0.3);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
        transform: translateX(5px);
    }
    
    .leaderboard-item:hover::before {
        opacity: 1;
    }
    
    .player-rank {
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-secondary);
        border-radius: 10px;
        font-size: 1rem;
        font-weight: 700;
        color: var(--text-secondary);
        flex-shrink: 0;
    }

    .player-rank.position-gold {
        background: linear-gradient(135deg, #ffd700, #ffed4e);
        color: #000;
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
        animation: pulse-gold 2s ease-in-out infinite;
    }
    
    .player-rank.position-silver {
        background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
        color: #000;
        box-shadow: 0 0 20px rgba(192, 192, 192, 0.5);
    }
    
    .player-rank.position-bronze {
        background: linear-gradient(135deg, #cd7f32, #e9a868);
        color: #000;
        box-shadow: 0 0 20px rgba(205, 127, 50, 0.5);
    }
    
    @keyframes pulse-gold {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.05); }
    }
    
    .player-rank i {
        font-size: 1.5rem;
    }
    
    .rank-number {
        font-size: 1.2rem;
    }
    
    .player-avatar {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        overflow: hidden;
        border: 2px solid rgba(var(--primary-rgb), 0.3);
        flex-shrink: 0;
        position: relative;
    }
    
    .player-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .online-badge {
        position: absolute;
        bottom: 0;
        right: 0;
        width: 18px;
        height: 18px;
        background: var(--success);
        border-radius: 50%;
        border: 2px solid var(--bg-primary);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .online-badge i {
        font-size: 0.5rem;
        color: white;
        animation: pulse 2s ease-in-out infinite;
    }
    
    .player-info {
        flex: 1;
        min-width: 0;
    }
    
    .player-name {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .player-stats {
        display: flex;
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .stat-item {
        font-size: 0.85rem;
        color: var(--text-secondary);
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    .stat-item i {
        color: var(--primary-color);
    }
    
    .player-points {
        text-align: right;
        flex-shrink: 0;
    }
    
    .points-value {
        font-size: 1.2rem;
        font-weight: 700;
        background: var(--gradient-1);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .points-label {
        font-size: 0.8rem;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .player-view-btn {
        width: 40px;
        height: 40px;
        background: rgba(var(--primary-rgb), 0.15);
        border: 1px solid rgba(var(--primary-rgb), 0.3);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary-color);
        text-decoration: none;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }
    
    .player-view-btn:hover {
        background: var(--gradient-1);
        color: white;
        transform: scale(1.1);
    }
    
    /* Responsive Leaderboard */
    @media (max-width: 768px) {
        #homepageLeaderboard {
            grid-template-columns: 1fr;
        }
        .leaderboard-item {
            padding: 15px;
            gap: 15px;
        }
        
        .player-rank {
            width: 40px;
            height: 40px;
            font-size: 1rem;
        }
        
        .player-avatar {
            width: 50px;
            height: 50px;
        }
        
        .player-name {
            font-size: 1rem;
        }
        
        .points-value {
            font-size: 1.2rem;
        }
        
        .player-view-btn {
            display: none;
        }
    }
    
    /* Modals - Premium Design */
    .modal-content {
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px) saturate(180%);
        border: 1px solid rgba(var(--primary-rgb), 0.3);
        border-radius: 25px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                    0 0 0 1px rgba(var(--primary-rgb), 0.1) inset;
        position: relative;
        overflow: hidden;
    }
    
    .modal-content::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--gradient-1);
        animation: shimmer 3s ease-in-out infinite;
    }
    
    .modal-header {
        border-bottom: 1px solid rgba(var(--primary-rgb), 0.2);
        padding: 30px;
        background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05), rgba(var(--primary-rgb), 0.03));
    }
    
    .modal-title {
        font-weight: 700;
        color: var(--text-primary);
        font-size: 1.5rem;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .modal-title i {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--gradient-1);
        border-radius: 12px;
        font-size: 1.2rem;
        box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
    }
    
    .modal-body {
        padding: 40px;
    }
    
    .form-label {
        color: var(--text-primary);
        font-weight: 600;
        margin-bottom: 10px;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .form-label i {
        color: var(--primary-color);
    }
    
    .form-control {
        background: rgba(30, 41, 59, 0.8);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(var(--primary-rgb), 0.2);
        color: var(--text-primary);
        padding: 14px 18px;
        border-radius: 12px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 0.95rem;
    }
    
    .form-control::placeholder {
        color: var(--text-secondary);
        opacity: 0.6;
    }
    
    .form-control:focus {
        background: rgba(30, 41, 59, 0.95);
        border-color: var(--primary-color);
        color: var(--text-primary);
        box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.15),
                    0 8px 20px rgba(var(--primary-rgb), 0.2);
        transform: translateY(-2px);
    }
    
    textarea.form-control {
        resize: vertical;
        min-height: 120px;
    }
    
    .form-check {
        padding-left: 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .form-check-input {
        width: 20px;
        height: 20px;
        background: rgba(30, 41, 59, 0.8);
        border: 2px solid rgba(var(--primary-rgb), 0.3);
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
        margin: 0;
    }
    
    .form-check-input:checked {
        background: var(--gradient-1);
        border-color: var(--primary-color);
        box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.4);
    }
    
    .form-check-label {
        color: var(--text-secondary);
        cursor: pointer;
        user-select: none;
        margin: 0;
        font-size: 0.9rem;
    }
    
    .modal-body a {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 600;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .modal-body a:hover {
        color: var(--primary-color);
        text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5);
    }
    
    .modal-body a::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--gradient-1);
        transition: width 0.3s ease;
    }
    
    .modal-body a:hover::after {
        width: 100%;
    }
    
    .btn-close {
        filter: invert(1);
        opacity: 0.8;
        transition: all 0.3s ease;
    }
    
    .btn-close:hover {
        opacity: 1;
        transform: rotate(90deg);
    }
    
    .modal-divider {
        text-align: center;
        margin: 25px 0;
        position: relative;
        color: var(--text-secondary);
        font-size: 0.85rem;
    }
    
    .modal-divider::before,
    .modal-divider::after {
        content: '';
        position: absolute;
        top: 50%;
        width: 45%;
        height: 1px;
        background: rgba(var(--primary-rgb), 0.2);
    }

    .modal-divider::before {
        left: 0;
    }
    
    .modal-divider::after {
        right: 0;
    }
    
    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='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 15px center;
        padding-right: 40px;
        appearance: none;
    }
    
    /* Modal Animations */
    .modal.fade .modal-dialog {
        transform: scale(0.8) translateY(-50px);
        opacity: 0;
        transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                    opacity 0.3s ease;
    }
    
    .modal.show .modal-dialog {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    
    .modal-backdrop.show {
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(5px);
    }
    
    /* Input Focus Effect */
    .form-control:focus + .input-underline {
        width: 100%;
    }
    
    /* Success/Error States for Forms */
    .form-control.is-valid {
        border-color: var(--success);
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
    }
    
    .form-control.is-invalid {
        border-color: var(--danger);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
    }
    
    .invalid-feedback,
    .valid-feedback {
        font-size: 0.85rem;
        margin-top: 5px;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    .invalid-feedback {
        color: var(--danger);
    }

    .valid-feedback {
        color: var(--success);
    }
    
    /* Responsive */
    @media (max-width: 992px) {
    }
    @media (max-width: 768px) {
        .section-title {
            font-size: 1.7rem;
        }

        .cta-title {
            font-size: 2rem;
        }
    }


/* ============================
   GAME TABS, PILLS & RULES
   ============================ */
    .game-tabs-wrapper {
        margin-bottom: 50px;
        position: relative;
    }
    .game-tabs {
        display: flex;
        gap: 10px;
        justify-content: center;
        padding: 8px;
        background: rgba(255, 255, 255, 0.03);
        backdrop-filter: blur(10px);
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        margin: 0 auto;
		flex-wrap: wrap;
    }
    .game-tab {
        position: relative;
        background: transparent;
        border: none;
        color: var(--text-secondary);
        padding: 16px 28px;
        border-radius: 14px;
        font-weight: 700;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        gap: 10px;
        overflow: hidden;
        letter-spacing: 0.5px;
    }
    .game-tab::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--primary-rgb), 0.05));
        opacity: 0;
        transition: opacity 0.4s ease;
        border-radius: 14px;
    }
    .game-tab:hover::before {
        opacity: 1;
    }
    .tab-glow {
        position: absolute;
        inset: 0;
        background: var(--gradient-1);
        opacity: 0;
        filter: blur(10px);
        transition: opacity 0.4s ease;
        z-index: -1;
    }
    .game-tab:hover .tab-glow {
        opacity: 0.3;
    }
    .tab-icon {
        font-size: 1.2rem;
        transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        display: flex;
        align-items: center;
    }
    .game-tab:hover .tab-icon {
        transform: scale(1.2) rotate(5deg);
    }
    .tab-label {
        transition: all 0.3s ease;
    }
    .tab-count {
        display: inline-block;
        background: rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 0.9);
        padding: 2px 8px;
        border-radius: 10px;
        font-size: 0.75rem;
        font-weight: 700;
        margin-left: 6px;
        min-width: 24px;
        text-align: center;
    }
    .game-tab.active .tab-count {
        background: rgba(255, 255, 255, 0.25);
        color: white;
    }
    .game-tab:hover {
        color: var(--text-primary);
        transform: translateY(-3px);
    }
    .game-tab.active {
        background: var(--gradient-1);
        color: white;
        box-shadow: 0 10px 40px rgba(var(--primary-rgb), 0.5), inset 0 1px 0 rgba(255,255,255,0.2);
        transform: translateY(-2px);
    }
    .game-tab.active::before {
        opacity: 0;
    }
    .game-tab.active .tab-icon {
        transform: scale(1.1);
    }
    .game-item {
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        animation: fadeInUp 0.6s ease forwards;
    }
    .game-item.hidden {
        display: none;
    }
    /* @keyframes fadeInUp — already defined above */
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: scale(0.95);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }
    /* @keyframes pulse — already defined in footer-styles.php */
    .game-pill {
        background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        padding: 18px;
        cursor: pointer;
        transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        position: relative;
        overflow: hidden;
        height: 100%;
    }
    .game-pill::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at top left, rgba(var(--primary-rgb), 0.1), transparent 70%);
        opacity: 0;
        transition: opacity 0.5s ease;
        pointer-events: none;
    }
    .game-pill::after {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient(45deg, transparent, rgba(255,255,255,0.05), transparent);
        transform: rotate(45deg);
        transition: all 0.6s ease;
        pointer-events: none;
    }
    .game-pill:hover::before {
        opacity: 1;
    }
    .game-pill:hover::after {
        left: 100%;
    }
    .game-pill:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(var(--primary-rgb), 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
        border-color: rgba(var(--primary-rgb), 0.5);
    }
    
    /* Game Top Players Cards */
    .game-top-card {
        background: var(--bg-secondary);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        overflow: hidden;
        transition: all 0.4s ease;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }
    
    .game-top-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
        border-color: rgba(var(--primary-rgb), 0.4);
    }

    .game-top-header {
        padding: 15px;
        color: white;
        font-weight: 700;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        gap: 10px;
        justify-content: center;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    
    .game-top-header i {
        font-size: 1.3rem;
    }
    
    .game-top-body {
        padding: 30px 20px;
        text-align: center;
        position: relative;
    }
    
    .top-player-crown {
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 2rem;
        color: var(--warning);
        animation: floatCrown 3s ease-in-out infinite;
    }

    @keyframes floatCrown {
        0%, 100% { transform: translateX(-50%) translateY(0); }
        50% { transform: translateX(-50%) translateY(-10px); }
    }
    
    .top-player-avatar {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: var(--gradient-1);
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 20px auto 15px;
        color: white;
        font-size: 2rem;
        font-weight: 700;
        box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.4);
        border: 3px solid var(--bg-primary);
    }
    
    .top-player-name {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 20px;
    }
    
    .top-player-stats {
        display: flex;
        justify-content: space-around;
        gap: 10px;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .top-stat {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    .top-stat i {
        font-size: 1.2rem;
        color: var(--primary-color);
    }

    .top-stat span {
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--text-primary);
    }
    
    .top-stat small {
        font-size: 0.7rem;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    .game-icon {
        width: 60px;
        height: 60px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 12px;
        color: white;
        font-size: 1.8rem;
        box-shadow: 0 8px 25px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
        position: relative;
        transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        overflow: hidden;
    }
    .game-icon-avatar {
        padding: 0;
    }
    .game-avatar-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 14px;
    }
    .game-icon::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 14px;
        padding: 2px;
        background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.05));
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    .game-pill:hover .game-icon {
        transform: scale(1.15) rotate(-5deg);
    }
    .game-pill:hover .game-icon::before {
        opacity: 1;
    }
    .game-info {
        text-align: center;
        margin-bottom: 10px;
    }
    .game-name {
        font-weight: 800;
        color: var(--text-primary);
        font-size: 1rem;
        margin-bottom: 8px;
        letter-spacing: 0.3px;
        transition: all 0.3s ease;
        text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
    .game-pill:hover .game-name {
        color: var(--primary-color);
        transform: translateY(-2px);
    }
    .game-stats-row {
        display: flex;
        justify-content: center;
        gap: 12px;
        margin-top: 6px;
    }
    .game-stat {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 0.75rem;
        color: var(--text-secondary);
        background: rgba(255, 255, 255, 0.05);
        padding: 4px 8px;
        border-radius: 6px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
    }
    .game-stat.active {
        color: var(--success);
        border-color: rgba(16, 185, 129, 0.3);
        background: rgba(16, 185, 129, 0.1);
    }
    .game-stat i {
        font-size: 0.8rem;
    }
    .stat-value {
        font-weight: 700;
    }
    .game-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        margin-top: 10px;
    }
    .game-max {
        font-size: 0.7rem;
        color: var(--warning);
        font-weight: 700;
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
        padding: 5px 8px;
        border-radius: 6px;
        border: 1px solid rgba(251, 191, 36, 0.2);
        letter-spacing: 0.5px;
        text-transform: uppercase;
        box-shadow: 0 2px 10px rgba(251, 191, 36, 0.1);
        transition: all 0.3s ease;
        white-space: nowrap;
    }
    .game-rules-btn {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 0.7rem;
        padding: 5px 8px;
        background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15), rgba(var(--primary-rgb), 0.1));
        border: 1px solid rgba(var(--primary-rgb), 0.3);
        border-radius: 6px;
        color: var(--primary-color);
        font-weight: 700;
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
    }
    .game-rules-btn:hover {
        background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.25), rgba(var(--primary-rgb), 0.15));
        border-color: rgba(var(--primary-rgb), 0.5);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
    }
    .game-rules-btn i {
        font-size: 0.75rem;
    }
    .game-pill:hover .game-max {
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(245, 158, 11, 0.15));
        box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
    }

    /* ========================================
       ✅ REMOVED: Game Modal & iFrame Styles
       (No longer needed - using direct redirect)
       ======================================== */
    
    /* Rules Modal Styles */
    .rules-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(5px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 100000;
        opacity: 0;
        transition: opacity 0.3s ease;
        padding: 20px;
    }
    
    .rules-modal.show {
        opacity: 1;
    }
    
    .rules-modal-content {
        background: var(--bg-secondary);
        border-radius: 20px;
        max-width: 700px;
        width: 100%;
        max-height: 80vh;
        display: flex;
        flex-direction: column;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.1);
        transform: scale(0.9);
        transition: transform 0.3s ease;
    }
    
    .rules-modal.show .rules-modal-content {
        transform: scale(1);
    }
    
    .rules-modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 25px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--primary-rgb), 0.05));
    }

    .rules-modal-header h2 {
        margin: 0;
        font-size: 1.5rem;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .rules-modal-header i {
        color: var(--primary-color);
    }
    
    .rules-modal-close {
        background: none;
        border: none;
        font-size: 2rem;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.3s ease;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .rules-modal-close:hover {
        background: rgba(239, 68, 68, 0.2);
        color: var(--danger);
        transform: rotate(90deg);
    }

    .rules-modal-body {
        padding: 25px;
        overflow-y: auto;
        max-height: calc(80vh - 80px);
    }
    
    .rule-section {
        margin-bottom: 20px;
        padding: 15px;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 12px;
        border-left: 3px solid var(--primary-color);
    }

    .rule-section:last-child {
        margin-bottom: 0;
    }
    
    .rule-section h3 {
        margin: 0 0 10px 0;
        font-size: 1.1rem;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .rule-section h3 i {
        color: var(--success);
        font-size: 1rem;
    }
    
    .rule-section p {
        margin: 0;
        color: var(--text-secondary);
        line-height: 1.6;
    }
    
    /* Mobile Portrait */
    @media (max-width: 768px) and (orientation: portrait) {
        .rules-modal {
            padding: 10px;
        }

        .rules-modal-content {
            max-height: 90vh;
            border-radius: 15px;
        }

        .rules-modal-header {
            padding: 15px 20px;
        }

        .rules-modal-header h2 {
            font-size: 1.2rem;
        }

        .rules-modal-body {
            padding: 20px;
        }

        .rule-section {
            padding: 12px;
        }

        .game-modal-content.game-modal-fullscreen {
            width: 100vw !important;
            height: 100vh !important;
            height: 100dvh !important; /* Dynamic viewport height for mobile browsers */
            margin: 0 !important;
            border-radius: 0 !important;
            max-width: none !important;
        }
        
        .game-modal-header-bar {
            border-radius: 0 !important;
            padding: 12px 15px;
        }
        
        .game-title {
            font-size: 1rem;
        }
        
        .game-title i {
            font-size: 1.2rem;
        }
        
        .game-modal-close-btn {
            width: 36px;
            height: 36px;
        }
        
        .game-iframe {
            border-radius: 0 !important;
        }
    }
    
    /* Mobile Landscape - Full Screen Experience */
    @media (max-width: 1024px) and (orientation: landscape) {
        .game-modal-content.game-modal-fullscreen {
            width: 100vw !important;
            height: 100vh !important;
            height: 100dvh !important;
            margin: 0 !important;
            border-radius: 0 !important;
            max-width: none !important;
        }
        
        .game-modal-header-bar {
            border-radius: 0 !important;
            padding: 8px 15px;
        }
        
        .game-title {
            font-size: 0.95rem;
            gap: 8px;
        }
        
        .game-title i {
            font-size: 1.1rem;
        }
        
        .game-modal-close-btn {
            width: 32px;
            height: 32px;
            font-size: 1rem;
        }
        
        .game-iframe {
            border-radius: 0 !important;
        }
        
        /* Hide address bar on mobile landscape */
        body.game-active {
            overflow: hidden;
        }
    }
    
    /* Tablet Portrait */
    @media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
        .game-modal-content.game-modal-fullscreen {
            width: 96vw !important;
            height: 94vh !important;
            margin: 3vh auto !important;
        }
    }
    
    /* Very small screens */
    @media (max-width: 375px) {
        .game-modal-header-bar {
            padding: 10px 12px;
        }
        
        .game-title span {
            font-size: 0.9rem;
        }
        
        .game-modal-close-btn {
            width: 32px;
            height: 32px;
        }
    }
    
    /* Game Rules Modal (for iframe communication) */
    .game-rules-overlay {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0);
        backdrop-filter: blur(0px);
        z-index: 100000;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: all 0.3s ease;
    }
    
    .game-rules-overlay.show {
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(10px);
        opacity: 1;
    }
    
    .game-rules-modal {
        background: linear-gradient(135deg, rgba(15, 32, 39, 0.98) 0%, rgba(32, 58, 67, 0.98) 100%);
        border: 2px solid rgba(255, 215, 0, 0.5);
        border-radius: 25px;
        max-width: 700px;
        width: 90%;
        max-height: 85vh;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
        transform: scale(0.8) translateY(-50px);
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        position: relative;
    }
    
    .game-rules-overlay.show .game-rules-modal {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    
    .rules-close-btn {
        position: absolute;
        top: 20px;
        right: 20px;
        background: rgba(239, 68, 68, 0.2);
        border: none;
        color: var(--danger);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 1.2rem;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }

    .rules-close-btn:hover {
        background: var(--danger);
        color: white;
        transform: rotate(90deg) scale(1.1);
    }
    
    .rules-header {
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 140, 0, 0.2) 100%);
        border-bottom: 2px solid rgba(255, 215, 0, 0.3);
        padding: 35px 30px 25px;
        text-align: center;
    }
    
    .rules-icon {
        font-size: 4rem;
        margin-bottom: 15px;
    }
    
    .rules-header h2 {
        font-size: 1.8rem;
        font-weight: 700;
        background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin: 0;
    }
    
    .rules-body {
        padding: 30px;
        max-height: calc(85vh - 150px);
        overflow-y: auto;
    }
    
    .rules-body::-webkit-scrollbar {
        width: 8px;
    }
    
    .rules-body::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 10px;
    }
    
    .rules-body::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
        border-radius: 10px;
    }
    
    .rule-item {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 215, 0, 0.2);
        border-radius: 15px;
        padding: 20px;
        margin-bottom: 20px;
        display: flex;
        gap: 20px;
        transition: all 0.3s ease;
    }
    
    .rule-item:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 215, 0, 0.4);
        transform: translateX(5px);
    }
    
    .rule-icon-small {
        font-size: 2.5rem;
        flex-shrink: 0;
        width: 60px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 140, 0, 0.2) 100%);
        border-radius: 15px;
        border: 1px solid rgba(255, 215, 0, 0.3);
    }
    
    .rule-content h3 {
        font-size: 1.3rem;
        font-weight: 700;
        color: #ffd700;
        margin: 0 0 10px 0;
    }
    
    .rule-content p {
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.9);
        line-height: 1.6;
        margin: 0 0 10px 0;
    }
    
    .rule-content ul {
        list-style: none;
        padding: 0;
        margin: 10px 0;
    }
    
    .rule-content ul li {
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.85);
        padding: 8px 0 8px 25px;
        position: relative;
        line-height: 1.5;
    }
    
    .rule-content ul li:before {
        content: "▸";
        position: absolute;
        left: 0;
        color: #ffd700;
        font-size: 1.2rem;
    }
    
    .rule-highlight {
        background: rgba(255, 215, 0, 0.1);
        border-left: 3px solid #ffd700;
        padding: 10px 15px;
        border-radius: 5px;
        font-size: 0.95rem;
        color: #ffed4e !important;
        margin-top: 10px;
    }
    
    @media (max-width: 768px) {
        .game-rules-modal {
            width: 95%;
            max-height: 90vh;
        }
        
        .rules-header {
            padding: 25px 20px 20px;
        }
        
        .rules-icon {
            font-size: 3rem;
        }
        
        .rules-header h2 {
            font-size: 1.4rem;
        }
        
        .rules-body {
            padding: 20px;
        }
        
        .rule-item {
            flex-direction: column;
            gap: 15px;
            padding: 15px;
        }
        
        .rule-icon-small {
            width: 50px;
            height: 50px;
            font-size: 2rem;
        }
    }

/* ============================
   COMPREHENSIVE RESPONSIVE FIXES
   ============================ */

/* --- Tablet (max-width: 992px) --- */
@media (max-width: 992px) {
    .stats-section { padding: 60px 0; }
    .stats-section.stats-compact { padding: 20px 0; }
    .stats-compact .stat-card { padding: 14px 10px; }
    .stats-compact .stat-icon { width: 36px; height: 36px; font-size: 1.1rem; }
    .stats-compact .stat-number { font-size: 1.3rem; }
    .leaderboard-section { padding: 60px 0; }
    .stat-card { padding: 30px 22px; }
    .stat-icon { width: 65px; height: 65px; font-size: 2rem; }
    .stat-number { font-size: 2.4rem; }
    .leaderboard-tab { padding: 12px 22px; font-size: 0.95rem; }
    .game-tab { padding: 14px 22px; font-size: 0.9rem; }
    .search-bar-header { min-width: 200px; }
}

/* --- Mobile (max-width: 768px) --- */
@media (max-width: 768px) {
    .top-bar-left { gap: 12px; }
    .search-bar-header { min-width: 0; flex: 1; padding: 6px 12px; }
    .top-bar-right { gap: 10px; }
    .notification-dropdown, .user-dropdown { min-width: 280px; }
    .stats-section { padding: 45px 0; }
    .stats-section.stats-compact { padding: 15px 0; }
    .stats-compact .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .stats-compact .stat-card { padding: 12px 8px; }
    .stats-compact .stat-icon { width: 32px; height: 32px; font-size: 1rem; margin-bottom: 8px; border-radius: 10px; }
    .stats-compact .stat-number { font-size: 1.2rem; }
    .stats-compact .stat-label { font-size: 0.65rem; }
    .stats-grid { gap: 15px; }
    .stat-card { padding: 25px 18px; }
    .stat-icon { width: 55px; height: 55px; font-size: 1.7rem; margin-bottom: 15px; }
    .stat-number { font-size: 2rem; }
    .stat-label { font-size: 0.9rem; }
    .leaderboard-section { padding: 50px 0; }
    .leaderboard-tabs { gap: 8px; margin: 25px 0; }
    .leaderboard-tab { padding: 10px 18px; font-size: 0.9rem; gap: 6px; }
    .leaderboard-tab i { font-size: 0.95rem; }
    .game-tab { padding: 12px 16px; font-size: 0.85rem; gap: 6px; }
    .game-tabs-wrapper { margin-bottom: 30px; }
    .game-leaderboards-title { font-size: 1.3rem; }
    .tournament-card { padding: 20px; }
    .tournament-name { font-size: 1.05rem; }
    .section-subtitle { font-size: 0.9rem; }
    .challenge-card { padding: 15px; gap: 10px; }
    .challenge-icon { font-size: 1.2rem; width: 38px; }
}

/* --- Small Mobile (max-width: 480px) --- */
@media (max-width: 480px) {
    .top-bar { padding: 6px 0; font-size: 0.78rem; }
    .top-bar-left { gap: 8px; }
    .top-bar-right { gap: 8px; }
    .jackpot-ticker { font-size: 0.78rem; gap: 5px; }
    .jackpot-amount { font-size: 0.9rem; }
    .search-bar-header { padding: 5px 10px; font-size: 0.85rem; }
    .notification-dropdown, .user-dropdown { min-width: 260px; right: -10px; }
    .notification-item { padding: 12px 15px; gap: 10px; }
    .notification-icon { width: 32px; height: 32px; }
    .stats-section { padding: 35px 0; }
    .stats-section.stats-compact { padding: 12px 0; }
    .stats-compact .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .stats-compact .stat-card { padding: 10px 8px; border-radius: 10px; }
    .stats-compact .stat-icon { width: 28px; height: 28px; font-size: 0.85rem; margin-bottom: 6px; border-radius: 8px; }
    .stats-compact .stat-number { font-size: 1rem; margin-bottom: 2px; }
    .stats-compact .stat-label { font-size: 0.6rem; letter-spacing: 0.3px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 20px 14px; border-radius: 14px; }
    .stat-icon { width: 45px; height: 45px; font-size: 1.4rem; margin-bottom: 12px; border-radius: 12px; }
    .stat-number { font-size: 1.6rem; margin-bottom: 5px; }
    .stat-label { font-size: 0.75rem; letter-spacing: 0.5px; }
    .leaderboard-section { padding: 40px 0; }
    .leaderboard-tabs { gap: 6px; margin: 20px 0; }
    .leaderboard-tab { padding: 8px 14px; font-size: 0.8rem; border-radius: 10px; }
    .leaderboard-tab i { font-size: 0.85rem; }
    .game-tab { padding: 10px 14px; font-size: 0.8rem; border-radius: 10px; }
    .tab-count { font-size: 0.65rem; padding: 1px 5px; margin-left: 3px; }
    .game-tabs-wrapper { margin-bottom: 25px; }
    .game-tabs { padding: 5px; gap: 5px; border-radius: 14px; }
    .game-leaderboards-title { font-size: 1.1rem; }
    .game-leaderboards-section { margin-top: 40px; padding-top: 30px; }
    .section-title { font-size: 1.4rem; margin-bottom: 25px; }
    .section-subtitle { font-size: 0.85rem; }
    .section-header-block { margin-bottom: 25px; }
    .tournament-card { padding: 18px; border-radius: 14px; }
    .tournament-name { font-size: 1rem; }
    .tournament-meta { flex-wrap: wrap; gap: 8px; }
    .tourn-stat span { font-size: 0.9rem; }
    .challenge-card { padding: 12px; gap: 8px; }
    .challenge-icon { font-size: 1rem; width: 34px; }
    .challenge-title { font-size: 0.8rem; }
    .challenge-progress-text { font-size: 0.7rem; }
    .reward-badge { font-size: 0.65rem; padding: 2px 6px; }
    .cta-section { padding: 50px 0; }
    .cta-btn { padding: 14px 30px; font-size: 1rem; }
    .community-card { padding: 16px; border-radius: 14px; }
    .community-card-title { font-size: 0.95rem; margin-bottom: 15px; }
    .topic-row-title { font-size: 0.85rem; }
    .topic-row-meta { font-size: 0.7rem; }
    .online-user-pill { padding: 4px 8px; font-size: 0.75rem; }
    .online-user-avatar { width: 18px; height: 18px; }
    .game-top-body { padding: 20px 15px; }
    .top-player-avatar { width: 60px; height: 60px; font-size: 1.5rem; }
    .top-player-name { font-size: 1rem; }
    .top-stat span { font-size: 1rem; }
    .top-stat small { font-size: 0.65rem; }
}

/* --- Extra Small (max-width: 360px) --- */
@media (max-width: 360px) {
    .top-bar-left { gap: 6px; }
    .jackpot-ticker { display: none; }
    .search-bar-header { display: none; }
    .btn-deposit { padding: 8px 14px; font-size: 0.8rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .stat-card { padding: 16px 10px; }
    .stat-icon { width: 40px; height: 40px; font-size: 1.2rem; margin-bottom: 10px; }
    .stat-number { font-size: 1.3rem; }
    .stat-label { font-size: 0.7rem; }
    .leaderboard-tab { padding: 7px 10px; font-size: 0.75rem; }
    .leaderboard-tab i { display: none; }
    .game-tab { padding: 8px 10px; font-size: 0.75rem; }
    .tab-icon { font-size: 0.9rem; }
    .tab-count { display: none; }
    .hero-btn { padding: 10px 20px; font-size: 0.9rem; }
    .hero-stats-row { gap: 8px; }
    .hero-stat-item i { font-size: 1rem; }
    .hero-stat-value { font-size: 0.9rem; }
    .section-title { font-size: 1.2rem; }
    .notification-dropdown, .user-dropdown { min-width: 240px; }
    .notification-item { padding: 10px 12px; }
    .game-leaderboards-title { font-size: 1rem; }
    .tournament-meta { gap: 6px; }
    .tourn-stat span { font-size: 0.8rem; }
    .tourn-stat small { font-size: 0.6rem; }
    .community-card { padding: 12px; }
    .cta-btn { padding: 12px 24px; font-size: 0.9rem; }
}

/* ============================
   LIGHT THEME OVERRIDES
   ============================ */
[data-theme="light"] .hp-section-dark {
    background: rgba(241, 245, 249, 0.8);
}

[data-theme="light"] .activity-feed-section {
    background: linear-gradient(180deg, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0.01) 100%);
    border-bottom-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .feed-item {
    color: rgba(0,0,0,0.45);
    border-right-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .feed-item:hover { color: rgba(0,0,0,0.75); }
[data-theme="light"] .feed-item strong { color: rgba(0,0,0,0.8); }
[data-theme="light"] .feed-avatar { border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .feed-reward { background: rgba(217,119,6,0.08); color: #b45309; }

[data-theme="light"] .bg-animated {
    background: linear-gradient(45deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
}

[data-theme="light"] .bg-animated::before {
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.06) 0%, transparent 70%);
}

[data-theme="light"] .top-bar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .language-selector {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .language-selector:hover {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .search-bar-header {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .search-bar-header:focus-within {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .notification-dropdown,
[data-theme="light"] .user-dropdown {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

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

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

[data-theme="light"] .notification-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .user-dropdown .dropdown-item:hover {
    background: rgba(var(--primary-rgb), 0.08);
}

[data-theme="light"] .dash-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .modal-content {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(var(--primary-rgb), 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(var(--primary-rgb), 0.08) inset;
}

[data-theme="light"] .modal-header {
    border-bottom-color: rgba(var(--primary-rgb), 0.15);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.04), rgba(var(--primary-rgb), 0.02));
}

[data-theme="light"] .form-control {
    background: rgba(241, 245, 249, 0.8);
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .game-tabs {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

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

[data-theme="light"] .game-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

[data-theme="light"] .game-pill {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.01) 100%);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .game-pill::after {
    background: linear-gradient(45deg, transparent, rgba(0, 0, 0, 0.03), transparent);
}

[data-theme="light"] .game-pill:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(var(--primary-rgb), 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .game-top-card {
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .game-top-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .game-name {
    text-shadow: none;
}

[data-theme="light"] .game-icon {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .game-stat {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .top-player-stats {
    border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .topic-row {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

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

[data-theme="light"] .quick-stat-row {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .rules-modal-content {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

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

[data-theme="light"] .rule-section {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .game-rules-modal {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .rule-item {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(255, 215, 0, 0.25);
}

[data-theme="light"] .rule-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .rule-content p {
    color: var(--text-primary);
}

[data-theme="light"] .rule-content ul li {
    color: var(--text-secondary);
}

[data-theme="light"] .rules-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .tournament-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .challenge-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .badge-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .recent-game-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .dashboard-strip {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.04), rgba(var(--primary-rgb), 0.02));
}

/* Performance: content-visibility for below-fold sections */
.hp-section,
.community-section,
.cta-section,
.newsletter-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

/* Performance: reduce animations for Lighthouse / reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .css-particles, .bg-animated, .floating-element { display: none !important; }
    .feed-scroll { animation: none !important; }
}
