:root {
    --primary-green: #00A651;

    --primary-green-dark: #008f45;
    --bg-body: #000000;
    --bg-app: #0a0a0a;
    --bg-card: #161616;
    --bg-sidebar: #050505;
    --text-white: #ffffff;
    --text-grey: #a0a0a0;
    --radius-lg: 16px;
    --radius-sm: 8px;
    --max-width: 480px;
    --nav-height: 70px;
    --padding-container: 20px;
    --accent-red: #E40030;
    --accent-blue: #0ea5e9;
    --bg-card-light: #222222;
    /* Medals */
    --gold: #fbbf24;
    --silver: #94a3b8;
    --bronze: #b45309;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-white);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- LAYOUT GRID --- */
.layout-wrapper {
    display: flex;
    width: 100%;
    max-width: 1200px;
    position: relative;
}

/* --- SIDEBAR (Desktop & Mobile Shared Styles) --- */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    padding: 30px 20px;
    height: 100vh;
    border-right: 1px solid #222;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

/* Desktop specific positioning */
@media (min-width: 901px) {
    .sidebar {
        position: sticky;
        top: 0;
    }

    .close-btn {
        display: none;
    }

    /* Hide close button on desktop */
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.sidebar-logo {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo i {
    color: var(--primary-green);
}

.close-btn {
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    padding: 5px;
}

.sidebar-menu {
    list-style: none;
    flex: 1;
}

.sidebar-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    color: var(--text-grey);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.sidebar-item:hover {
    background: #1a1a1a;
    color: white;
}

.sidebar-item.active {
    background: rgba(0, 166, 81, 0.1);
    color: var(--primary-green);
    border-left: 3px solid var(--primary-green);
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid #222;
    font-size: 0.8rem;
    color: #555;
}

/* --- MAIN APP CONTAINER --- */
.app-container {
    width: 100%;
    max-width: var(--max-width);
    background: var(--bg-app);
    min-height: 100vh;
    position: relative;
    border-left: 1px solid #222;
    border-right: 1px solid #222;
    padding-bottom: calc(var(--nav-height) + 20px);
    /* Padding for fixed footer */
    margin: 0 auto;
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px var(--padding-container);
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid #222;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: var(--primary-green);
}

.user-icon {
    width: 36px;
    height: 36px;
    background: #222;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #333;
}

/* --- CONTENT --- */
.content-pad {
    padding: 0 20px;
}

.hero {
    margin: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #004d26 100%);
    border-radius: var(--radius-lg);
    padding: 25px;
    position: relative;
    overflow: hidden;
    border: 1px solid #333;
    box-shadow: 0 4px 20px rgba(0, 166, 81, 0.1);
}

.hero h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 5px;
    line-height: 1;
    text-transform: uppercase;
}

.hero p {
    color: #ccc;
    font-size: 0.85rem;
    margin-bottom: 15px;
    width: 60%;
}

.btn-play {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 166, 81, 0.3);
}

.cat-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 20px 20px 20px;
    scrollbar-width: none;
}

.cat-scroll::-webkit-scrollbar {
    display: none;
}

.pill {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid #333;
    border-radius: 20px;
    font-size: 0.8rem;
    white-space: nowrap;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pill.active {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 12px;
    font-family: 'Rajdhani', sans-serif;
}

.section-title h3 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.see-all {
    color: var(--primary-green);
    font-size: 0.8rem;
    cursor: pointer;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 1/1.3;
    transition: transform 0.2s;
    border: 1px solid #222;
    max-height: 180px;
}

.card:hover {
    transform: translateY(-3px);
    border-color: #333;
}

.card-img {
    width: 100%;
    height: 80%;
    background: #333;
    background-position: center;
    background-size: contain;
}

.card-info {
    padding: 8px 4px;
    text-align: center;
}

.card-title {
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


span.one-liner {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: ellipsis;
}

/* --- STICKY BOTTOM NAV --- */
.bottom-nav {
    position: fixed;
    /* STICKY BEHAVIOR */
    bottom: 0;
    width: 100%;
    max-width: var(--max-width);
    /* Match container width */
    height: var(--nav-height);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid #222;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 900;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 0.7rem;
    cursor: pointer;
}

.nav-btn.active {
    color: var(--primary-green);
}

.nav-btn i {
    font-size: 1.2rem;
}

/* --- OVERLAY (Mobile) --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 950;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* --- MOBILE RESPONSIVE LOGIC --- */
@media (max-width: 900px) {
    .app-container {
        border: none;
        max-width: 100%;
    }

    .bottom-nav {
        max-width: 100%;
    }

    .menu-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        /* HIDE OFF SCREEN */
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        transform: translateX(0);
        /* SLIDE IN */
    }
}

.cat-scroll a {
    text-decoration: none;
}

ul.sidebar-menu a {
    text-decoration: none;
}

.sidebar-menu {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
}

.sidebar-menu::-webkit-scrollbar {
    display: none;
}

.sidebar-divider {
    height: 1px;
    background-color: #222;
    margin: 15px 5px;
    list-style: none;
}

/* GAME DETAILS PAGE */
/* Game Banner */
.game-banner {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 50%, var(--bg-app) 100%),
        linear-gradient(45deg, #d97706, #b45309);
    /* Simulating an image */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid #333;
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.banner-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Content Padding */
.details-content {
    padding: 0 20px;
    margin-top: -10px;
    position: relative;
    z-index: 10;
}

/* Title & Stats */
.game-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.game-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.game-developer {
    font-size: 0.85rem;
    color: var(--primary-green);
    font-weight: 600;
}

.game-stats {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-grey);
    margin-bottom: 25px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat i {
    color: #f59e0b;
}

/* Star color */

/* Action Bar (Play & Like) */
.action-bar {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 30px;
}

.btn-play-large {
    flex: 1;
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 16px 20px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 166, 81, 0.3);
    text-transform: uppercase;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 1px;
    transition: transform 0.1s, box-shadow 0.2s;
}

.btn-play-large:active {
    transform: scale(0.98);
}

.btn-play-large:hover {
    box-shadow: 0 6px 20px rgba(0, 166, 81, 0.5);
}

/* Circular Like Button */
.btn-like {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--text-grey);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
}

/* Liked State */
.btn-like.liked {
    background: rgba(228, 0, 48, 0.1);
    /* Light red tint */
    border-color: var(--accent-red);
    color: var(--accent-red);
    transform: scale(1.05);
}

/* Tags Section */
.section-heading {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-bottom: 12px;
    border-bottom: 1px solid #222;
    padding-bottom: 5px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.tag-pill {
    padding: 6px 14px;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    /* Slightly squarer for tags */
    font-size: 0.75rem;
    color: #ccc;
    cursor: pointer;
    transition: 0.2s;
}

.tag-pill:hover {
    background: var(--bg-card);
    border-color: var(--primary-green);
    color: white;
}

/* Description */
.description {
    font-size: 0.9rem;
    color: var(--text-grey);
    line-height: 1.6;
    margin-bottom: 30px;
}

.alert {
    background-color: #f44336;
    /* Red */
    color: white;
    padding: 15px;
    margin: auto;
    border-radius: 30px;
    position: fixed;
    z-index: 100;
    bottom: 80px;
    left: 16px;
    right: 16px;
    max-width: 374px;
    text-align: center;
}

.alert.success {
    background-color: #4BB543;
}

/* Green */

.alert.info {
    background-color: #2196F3;
}

/* Blue */

.alert.warning {
    background-color: #ff9800;
}

/* Orange */

.alert.danger {
    background-color: rgb(244 67 54 / 60%);
}

/* Red */

.alert.closebtn {
    position: absolute;
    top: 10px;
    right: 25px;
    color: white;
    font-weight: bold;
    font-size: 22px;
    line-height: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.alert.closebtn:hover {
    color: black;
}

.alert.closebtn:after {
    content: "×";
    font-size: 20px;
    line-height: 20px;
    position: absolute;
    right: 10px;
    top: 0;
}

.alert.closebtn:hover:after {
    color: black;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
}

/* --- TOURNAMENT PAGE STYLES --- */

/* Page Title & Filters */
.page-header {
    padding: 20px 20px 10px 20px;
}

.page-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.8rem;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-grey);
    background: var(--bg-card);
    border: 1px solid #333;
    cursor: pointer;
    transition: 0.2s;
}

.tab.active {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}

/* Tournament List */
.tournament-list {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Tournament Card */
.t-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid #222;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
}

.t-card:hover {
    transform: translateY(-3px);
    border-color: #333;
}

/* Card Banner Area */
.t-banner {
    width: 100%;
    height: 350px;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
}

/* Simulated Banner Gradients */
.banner-1 {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.8)), linear-gradient(45deg, #1d4ed8, #0ea5e9);
}

.banner-2 {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.8)), linear-gradient(45deg, #b45309, #f59e0b);
}

.banner-3 {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.8)), linear-gradient(45deg, #7e22ce, #c084fc);
}

/* Status Badges */
.t-badge {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-live {
    background: var(--accent-red);
    color: white;
    animation: pulse 2s infinite;
}

.badge-upcoming {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(228, 0, 48, 0.7);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(228, 0, 48, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(228, 0, 48, 0);
    }
}

.live-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

/* Banner Text */
.t-game-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.t-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-top: 2px;
}

/* Card Content Area */
.t-content {
    padding: 15px;
}

/* Prize Pool */
.t-prize-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #222;
    padding-bottom: 12px;
}

.prize-label {
    font-size: 0.75rem;
    color: var(--text-grey);
}

.prize-value {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-green);
}

/* Details (Date/Players) */
.t-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #ccc;
}

.detail-item i {
    color: var(--text-grey);
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.t-desc {
    font-size: 0.85rem;
    color: var(--text-grey);
    line-height: 1.4;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Actions */
.t-actions {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    border: none;
    font-family: 'Inter', sans-serif;
}

.btn-join {
    background: var(--primary-green);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 166, 81, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-join:hover {
    background: var(--primary-green-dark);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid #444;
}

.btn-outline:hover {
    background: #222;
    border-color: #555;
}

.t-bottom-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    display: flex;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8));
    align-items: flex-end;
    padding: 10px;
}

/* --- TOURNAMENT DETAILS SPECIFIC --- */

/* Banner Area */
.t-banner {
    width: 100%;
    height: 350px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), var(--bg-app)), linear-gradient(45deg, #1d4ed8, #0ea5e9);
    position: relative;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.banner-top-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.icon-btn {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid #333;
    transition: 0.2s;
}

.icon-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Title Area */
.t-title-area {
    margin-bottom: 40px;
    /* Space for overlapping card */
    position: absolute;
    bottom: 30px;
}

.t-badge-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-red);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    animation: pulse 2s infinite;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.t-badge-upcoming {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.upcoming-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.t-badge-completed {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ccc;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.completed-dot {
    width: 6px;
    height: 6px;
    background: #ccc;
    border-radius: 50%;
}

.t-game-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.t-main-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.1;
    margin-top: 2px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(228, 0, 48, 0.7);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(228, 0, 48, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(228, 0, 48, 0);
    }
}

/* Overlapping Info Card */
.info-card {
    background: var(--bg-card);
    border: 1px solid #333;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: -50px 20px 20px 20px;
    position: relative;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-grey);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

.text-green {
    color: var(--primary-green);
}

.btn-large-join {
    display: inline-block;
    text-align: center;
    width: 100%;
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 166, 81, 0.3);
    transition: 0.2s;
}

.btn-large-join:active {
    transform: scale(0.98);
}

/* Content Tabs */
.content-area {
    padding: 0 20px;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px 0;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-grey);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.tab-btn.active {
    color: var(--primary-green);
    border-bottom-color: var(--primary-green);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Overview Tab Content */
.section-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-bottom: 12px;
    color: white;
}

.desc-text, .desc-text > * {
    font-size: 0.85rem;
    color: var(--text-grey);
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Prizes List */
.prize-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.prize-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card-light);
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid #333;
}

.prize-rank {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.prize-rank i {
    font-size: 1.2rem;
}

.rank-1 i {
    color: var(--gold);
}

.rank-2 i {
    color: var(--silver);
}

.rank-3 i {
    color: var(--bronze);
}

.prize-reward {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-green);
}

/* Leaderboard Tab Content */
.lb-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #222;
}

.lb-rank {
    width: 30px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    color: var(--text-grey);
}

.lb-user {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

.lb-avatar {
    width: 30px;
    height: 30px;
    background: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.lb-score {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    color: white;
}

.lb-row.is-me {
    background: rgba(0, 166, 81, 0.1);
    border-radius: 8px;
    padding: 12px 10px;
    margin: 0 -10px;
    border: 1px solid rgba(0, 166, 81, 0.3);
}

.lb-row.is-me .lb-rank {
    color: var(--primary-green);
}

/* --- LEADERBOARD SPECIFIC --- */

/* Top Section: Title & Filters */
.lb-header {
    padding: 20px 20px 10px;
}

.lb-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.lb-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.8rem;
    text-transform: uppercase;
    font-weight: 800;
}

.game-filter {
    background: var(--bg-card);
    /* border: 1px solid #333; */
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin-bottom: 30px;
}

.time-tabs {
    display: flex;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 25px;
}

.time-tab {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-grey);
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.time-tab.active {
    background: var(--primary-green);
    color: white;
}

/* Top 3 Podium */
.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    padding: 0 20px 30px;
    border-bottom: 1px solid #222;
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 30%;
}

.podium-avatar {
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 10px;
    background-size: cover;
    background-position: center;
}

.podium-item.rank-2 .podium-avatar {
    width: 70px;
    height: 70px;
    border: 3px solid var(--silver);
}

.podium-item.rank-1 .podium-avatar {
    width: 90px;
    height: 90px;
    border: 4px solid var(--gold);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
    z-index: 2;
}

.podium-item.rank-3 .podium-avatar {
    width: 60px;
    height: 60px;
    border: 3px solid var(--bronze);
}

/* Crown for 1st Place */
.crown {
    position: absolute;
    top: -20px;
    font-size: 1.5rem;
    color: var(--gold);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.podium-rank-badge {
    position: absolute;
    bottom: -10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    color: #000;
}

.rank-1 .podium-rank-badge {
    background: var(--gold);
}

.rank-2 .podium-rank-badge {
    background: var(--silver);
}

.rank-3 .podium-rank-badge {
    background: var(--bronze);
}

.podium-name {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.rank-1 .podium-name {
    color: var(--gold);
    font-size: 0.95rem;
}

.podium-score {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    color: var(--text-grey);
    font-size: 0.85rem;
}

/* List Section */
.lb-list {
    padding: 10px 20px;
    flex: 1;
}

.list-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #1a1a1a;
    transition: background 0.2s;
}

.list-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.row-rank {
    width: 35px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #666;
    text-align: center;
}

.row-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 15px 0 10px;
    font-size: 0.8rem;
    color: #888;
}

.row-info {
    flex: 1;
}

.row-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #eee;
    margin-bottom: 2px;
}

.row-xp {
    font-size: 0.75rem;
    color: var(--text-grey);
}

.row-score {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-green);
    text-align: right;
}

/* Sticky 'Me' Row */
.sticky-me {
    position: fixed;
    bottom: var(--nav-height);
    width: 100%;
    max-width: var(--max-width);
    background: rgba(0, 166, 81, 0.15);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 166, 81, 0.3);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    z-index: 800;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.sticky-me .row-rank {
    color: var(--primary-green);
}

.sticky-me .row-avatar {
    border: 2px solid var(--primary-green);
    background: rgba(0, 166, 81, 0.2);
    color: white;
}

.sticky-me .row-name {
    color: white;
}

/* DROPDOWN FOR CHALLENGES */
.challenge-dropdown-wrapper {
    position: relative;
    width: 100%;
}

.challenge-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg, #1a1a2e);
    color: var(--text-primary, #fff);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    transition: border-color 0.2s, background 0.2s;
    white-space: nowrap;
    width: 100%;
}

.challenge-dropdown-btn:hover {
    border-color: var(--primary-green, #00ff87);
    background: rgba(0, 255, 135, 0.05);
}

.challenge-dropdown-btn .fa-trophy {
    color: var(--primary-green, #00ff87);
    font-size: 0.8rem;
}

.dropdown-arrow {
    font-size: 0.7rem;
    margin-left: 4px;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.challenge-dropdown-wrapper.open .dropdown-arrow {
    transform: rotate(180deg);
}

.challenge-dropdown-list {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    list-style: none;
    margin: 0;
    padding: 6px;
    min-width: 200px;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: dropdownFadeIn 0.2s ease;
    width: 100%;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.challenge-dropdown-wrapper.open .challenge-dropdown-list {
    display: block;
}

.challenge-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    transition: background 0.15s, color 0.15s;
}

.challenge-dropdown-item:hover {
    background: rgba(0, 255, 135, 0.08);
    color: #fff;
}

.challenge-dropdown-item.active {
    background: rgba(0, 255, 135, 0.12);
    color: var(--primary-green, #00ff87);
    font-weight: 600;
}

.live-dot {
    font-size: 0.45rem;
    color: #ff4d4d;
    animation: livePulse 1.4s ease-in-out infinite;
}

.challenge-dropdown-item.active .live-dot {
    color: var(--primary-green, #00ff87);
}

@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}