:root {
    --bg-dark: #0f172a;        /* Main Background */
    --sidebar-bg: #1e293b;     /* Sidebar Color */
    --card-bg: #1e293b;        /* Card Color */
    --card-hover: #334155;     /* Card Hover */
    --accent: #3b82f6;         /* Primary Blue */
    --accent-glow: rgba(59, 130, 246, 0.5);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --green: #22c55e;
    --orange: #f59e0b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden; /* Prevents double scrollbars */
}

/* Layout: Sidebar + Main */
.app-container {
    display: flex;
    height: 100%;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid #334155;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links { list-style: none; flex: 1; }
.nav-links li { margin-bottom: 10px; }

.nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: 0.3s;
    font-weight: 500;
}

.nav-links li.active a, .nav-links a:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #334155;
}

.avatar {
    width: 40px; height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* --- MAIN CONTENT --- */
.main-content {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.top-bar h1 { font-size: 1.8rem; }

.stats-container { display: flex; gap: 20px; }
.stat-item {
    background: var(--card-bg);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #334155;
}
.flame { color: var(--orange); }
.star { color: #eab308; }

/* Progress Bar */
.progress-section {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 40px;
    border: 1px solid #334155;
}
.section-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #334155;
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--green);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

/* Grid System */
.section-title { margin-bottom: 20px; font-size: 1.2rem; }
.challenge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Cards */
.challenge-card {
    background: var(--card-bg);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--text-main);
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.challenge-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.card-icon {
    width: 50px; height: 50px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent);
}

.card-info h3 { font-size: 1rem; margin-bottom: 4px; }
.card-info p { font-size: 0.8rem; color: var(--text-muted); }

.card-status {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 6px;
}

.status-play { background: rgba(34, 197, 94, 0.1); color: var(--green); }
.status-lock { color: var(--text-muted); opacity: 0.7; }

/* Locked State */
.locked { opacity: 0.6; pointer-events: none; grayscale: 0.8; }
.active-card { border: 1px solid var(--accent); }