:root {
    --bg-dark: #06080a; 
    --sidebar-bg: #0b0e13; 
    --card-bg: #0f131a;
    --accent: #00d4ff; 
    --accent-soft: rgba(0, 212, 255, 0.1);
    --text: #ffffff;
    --text-dim: #94a3b8; 
    --border: rgba(255, 255, 255, 0.05);
    --gold: #ffcf4d;
    --header-height: 100px;
}

body { 
    background: var(--bg-dark); 
    color: var(--text); 
    font-family: 'Inter', sans-serif; 
    margin: 0; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
    -webkit-font-smoothing: antialiased;
}

/* --- HEADER LAYOUT --- */
.top-branding-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 24px; 
    background: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(12px); 
    border-bottom: 1px solid var(--border); 
    position: sticky; top: 0; z-index: 1001; 
    height: var(--header-height); 
    box-sizing: border-box; 
}

.header-left { display: flex; align-items: center; gap: 20px; flex: 1; }
.header-right { display: flex; align-items: center; justify-content: flex-end; flex: 1; }

.logo-container img { max-height: 70px; width: auto; object-fit: contain; }

.menu-toggle { 
    background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text); 
    padding: 10px 20px; border-radius: 8px; cursor: pointer; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; 
}

@media (max-width: 1023px) {
    .top-branding-bar { justify-content: center; }
    .header-left { position: absolute; left: 16px; gap: 10px; }
    .header-right { display: none; }
    .logo-container img { max-height: 60px; }
}

@media (min-width: 1024px) { .menu-toggle { display: none; } }

.main-container { display: flex; flex: 1; align-items: flex-start; }

/* --- SIDEBAR --- */
.sidebar { 
    width: 280px; background: var(--sidebar-bg); border-right: 1px solid var(--border); 
    position: sticky; top: var(--header-height); height: calc(100vh - var(--header-height)); 
    z-index: 1000; overflow-y: auto; 
}
@media (max-width: 1023px) {
    .sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
    .sidebar.open { transform: translateX(0); }
}

.sidebar-content { padding: 32px 24px; }
.nav-link { display: flex; padding: 12px 16px; color: var(--text-dim); text-decoration: none; border-radius: 8px; font-size: 0.9rem; margin-bottom: 6px; transition: 0.2s; }
.nav-link:hover, .nav-link.active { background: var(--accent-soft); color: var(--accent); }

/* --- CONTENT --- */
.content-area { flex: 1; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; background: radial-gradient(circle at top center, rgba(0, 212, 255, 0.03) 0%, transparent 70%); }
.content-wrapper { width: 100%; max-width: 860px; }

.page-header { text-align: center; margin-bottom: 40px; width: 100%; }
.page-header h2 { font-size: 2.2rem; font-weight: 800; text-transform: uppercase; margin: 0; background: linear-gradient(to bottom, #fff, #94a3b8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.page-header p { color: var(--text-dim); margin-top: 8px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px; }

.timer-box { text-align: center; background: var(--card-bg); padding: 40px 20px; border-radius: 20px; border: 1px solid var(--border); margin-bottom: 32px; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.timer-digits { font-family: 'JetBrains Mono', monospace; font-size: 2.8rem; color: var(--accent); margin-top: 15px; display: block; text-shadow: 0 0 20px rgba(0, 212, 255, 0.3); }

/* --- TABLE --- */
.table-container { background: var(--card-bg); border-radius: 20px; border: 1px solid var(--border); overflow: hidden; margin-bottom: 32px; }
table { width: 100%; border-collapse: collapse; }
th { padding: 18px 24px; text-align: left; color: var(--text-dim); font-size: 0.75rem; text-transform: uppercase; border-bottom: 1px solid var(--border); }
td { padding: 18px 24px; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.col-rank { color: var(--accent); font-weight: 700; width: 60px; }
.col-wager { font-weight: 700; color: #fff; }
.col-prize { text-align: right; font-weight: 700; color: var(--gold); }

.player-info { display: flex; align-items: center; gap: 14px; }
.avatar { width: 36px; height: 36px; background: rgba(255,255,255,0.03); border-radius: 10px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); color: var(--accent); font-size: 0.75rem; }

/* --- RULES --- */
.rules-container { background: linear-gradient(135deg, var(--card-bg), #131820); border-radius: 20px; border: 1px solid var(--border); padding: 32px; margin-bottom: 40px; }
.rules-title { color: var(--gold); margin-bottom: 20px; font-size: 1rem; text-transform: uppercase; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.rules-title::before { content: ''; width: 4px; height: 18px; background: var(--gold); border-radius: 10px; }
.rules-list { list-style: none; padding: 0; margin: 0; }
.rules-list li { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 12px; display: flex; gap: 12px; }
.rules-list li::before { content: "•"; color: var(--accent); }

/* --- FOOTER --- */
.site-footer {
    background: var(--sidebar-bg);
    border-top: 1px solid var(--border);
    padding: 50px 24px;
    margin-top: auto;
    text-align: center;
}
.footer-nav {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.footer-nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}
.footer-nav a:hover { color: var(--accent); }
.footer-attribution { color: var(--text-dim); font-size: 0.75rem; letter-spacing: 0.5px; }
.heart { color: #ff4d4d; }
.copyright { opacity: 0.6; font-size: 0.7rem; text-transform: uppercase; margin-top: 8px; }

@media (max-width: 768px) {
    .page-header h2 { font-size: 1.6rem; }
    .timer-digits { font-size: 2rem; }
    th, td { padding: 14px 16px; }
}