/* --- Global Reset & Color Palette --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --bg-main: #131114;
    --bg-card: #201a1e;
    --bg-card-secondary: #2d242a;
    --text-primary: #ffffff;
    --text-muted: #a69fa5;
    --accent-rose: #e0a39a;
    --accent-gold: #e5b869;
    --accent-gradient: linear-gradient(135deg, #e0a39a, #b07e76);
    --border-color: #382d35;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    padding-bottom: 60px; /* Space for mobile nav */
}

/* --- Top Navbar --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #1a1619;
    border-bottom: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: url('https://via.placeholder.com/150') center/cover;
    border: 2px solid var(--accent-rose);
}

.user-ui-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-signup {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--text-muted);
    color: var(--text-primary);
    padding: 6px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-signup:hover {
    background: var(--text-primary);
    color: var(--bg-main);
}

/* --- Layout Architecture --- */
.dashboard-container {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 20px;
    padding: 25px;
    max-width: 1600px;
    margin: 0 auto;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Generic Reusable Card Utility */
.card {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Component Styles --- */

/* Hero Banner */
.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px 0;
}

.hero-section h1 {
    font-size: 1.4rem;
    color: var(--text-muted);
    font-weight: 400;
}

.hero-section h2 {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, var(--accent-rose));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bengali-text {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 5px;
}

/* Team Dropdown Selector */
.team-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 5px;
}

.country-dropdown {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

/* Middle Layout Split */
.middle-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
}

/* Tournament Stadium Graphic Mockup */
.tournament-progress .stadium-graphic {
    height: 180px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), #1a3c1e), url('https://images.unsplash.com/photo-1508098682722-e99c43a406b2?w=600') center/cover;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.floating-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

.badge-title { font-size: 0.7rem; color: var(--text-muted); }
.badge-status { font-size: 0.75rem; color: var(--accent-gold); font-weight: bold; }

.progress-timeline {
    position: absolute;
    bottom: 15px;
    width: 90%;
    left: 5%;
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(0,0,0,0.4);
    padding: 6px;
    border-radius: 10px;
}

.progress-timeline .step.active {
    color: var(--accent-gold);
    font-weight: bold;
}

/* Points Sub-grid */
.points-system {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.point-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    flex: 1;
}

.point-card h4 { font-size: 0.85rem; color: var(--text-muted); }
.point-value { font-size: 1.6rem; font-weight: bold; color: #fff; margin: 2px 0; }
.card-icon { font-size: 1.8rem; opacity: 0.8; }

/* Bottom Layout Split */
.bottom-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
}

.card-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-all {
    font-size: 0.75rem;
    color: var(--accent-rose);
    text-decoration: none;
}

/* Mission System UI Elements */
.mission-item {
    background-color: var(--bg-card-secondary);
    padding: 12px;
    border-radius: 10px;
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.mission-info { flex: 1; }
.mission-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 5px; }

.status-current { color: #5cb85c; font-size: 0.75rem; margin-left: 8px; }
.status-completed { color: var(--accent-rose); font-size: 0.75rem; margin-left: 8px; }

.progress-bar-container {
    background: #44353f;
    height: 6px;
    border-radius: 3px;
    margin: 6px 0;
    overflow: hidden;
}

.progress-bar {
    background: var(--accent-rose);
    height: 100%;
}
.progress-bar.completed { background: #5cb85c; }

.reward-tag { font-size: 0.75rem; color: var(--accent-gold); }

.btn-claim {
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    background: #BF953F;
}

.btn-claim.disabled { background: #44353f; color: #887; cursor: not-allowed; }
.btn-claim.active { background: var(--accent-gradient); color: #fff; }

/* Rewards Vault System */
.tab-menu {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.tab {
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
}

.tab.active {
    color: var(--accent-rose);
    border-bottom: 2px solid var(--accent-rose);
    padding-bottom: 6px;
}

.rewards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.reward-box {
    background: var(--bg-card-secondary);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.box-icon { font-size: 1.8rem; margin-bottom: 8px; }
.reward-box p { font-size: 0.75rem; margin-bottom: 10px; min-height: 32px; }

.btn-unlock {
    width: 100%;
    background: rgba(224, 163, 154, 0.15);
    border: 1px solid var(--accent-rose);
    color: var(--accent-rose);
    padding: 6px 0;
    font-size: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
}

/* --- Sidebar Widgets --- */

/* Leaderboard Displays */
.podium-display {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    margin: 20px 0;
    height: 100px;
}

.podium-rank {
    background: var(--bg-card-secondary);
    width: 70px;
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
}

.rank-1 { height: 90px; border: 1px solid var(--accent-gold); }
.rank-2 { height: 70px; }
.rank-3 { height: 60px; }
.podium-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }

.leaderboard-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card-secondary);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.rank-number { font-weight: bold; width: 20px; color: var(--text-muted); }
.user-info { display: flex; align-items: center; gap: 10px; flex: 1; }
.score { font-weight: bold; }

/* Referral Widget Box */
.referral-card {
    text-align: center;
}

.btn-invite {
    width: 100%;
    background: var(--accent-gradient);
    border: none;
    color: #fff;
    padding: 10px;
    border-radius: 25px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    margin-bottom: 10px;
}

.code-text { font-size: 0.75rem; color: var(--text-muted); }
.highlight-code { color: var(--accent-rose); font-weight: bold; }

.referral-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.stat-num { font-size: 1.2rem; font-weight: bold; color: var(--accent-rose); }
.stat-label { font-size: 0.65rem; color: var(--text-muted); }

/* Event Countdown Watch Block */
.countdown-card { text-align: center; }
.timer-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.time-block {
    background: var(--bg-card-secondary);
    padding: 8px 12px;
    border-radius: 6px;
    min-width: 45px;
}

.time-block span { font-size: 1.2rem; font-weight: bold; color: var(--accent-gold); }
.time-block p { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; }
.time-divider { font-weight: bold; color: var(--text-muted); }

/* Mobile Bottom Navigation Bar (Hidden by Default) */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1619;
    border-top: 1px solid var(--border-color);
    display: none;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 999;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.65rem;
    gap: 4px;
}

.nav-item i { font-size: 1.1rem; }
.nav-item.active { color: var(--accent-rose); }


/* --- RESPONSIVE MEDIA QUERIES (Breakpoints) --- */

/* Tablet Viewports */
@media (max-width: 1024px) {
    .dashboard-container {
        grid-template-columns: 1fr; /* Stack columns vertically */
    }
}

/* Smartphone Mobile Viewports */
@media (max-width: 768px) {
    body {
        padding-bottom: 70px; /* Adjust layout for bottom action-bar */
    }
    
    .navbar {
        padding: 10px 15px;
    }

    .hero-section h2 {
        font-size: 1.6rem;
    }

    /* Convert horizontal layouts into streamlined single columns */
    .middle-grid, .bottom-grid, .rewards-grid {
        grid-template-columns: 1fr;
    }

    .mobile-bottom-nav {
        display: flex; /* Bring up the bottom app navigation bar */
    }
}