:root {
    --bg-color: #0f0f0f;
    --card-bg: #1c1c1e;
    --accent: #007aff;
    --text-primary: #ffffff;
    --text-secondary: #8e8e93;
    --success: #34c759;
    --warning: #ff9500;
    --safe-bottom: env(safe-area-inset-bottom, 20px);
}

/* --- Core Reset --- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    padding-bottom: calc(80px + var(--safe-bottom));
}

/* --- Header --- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.user-info h2 { margin: 0; font-size: 18px; }
.user-info span { font-size: 12px; color: var(--text-secondary); }

.points-pill {
    background: rgba(0, 122, 255, 0.15);
    color: #5ac8fa;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
}

/* --- Hero & XP --- */
.hero-card {
    background: #1c1c1e;
    border-radius: 16px;
    padding: 24px;
    margin: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}

.level-title { font-size: 28px; margin: 0; }
.next-level { color: var(--text-secondary); font-size: 14px; margin-top: 8px; display: block; }

.xp-bar-container {
    height: 8px;
    background: #2c2c2e;
    border-radius: 4px;
    margin-top: 16px;
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.5s ease;
}

/* --- TELEGRAM TASK CARD (Screenshot 2 Fix) --- */
.task-card {
    background: var(--card-bg);
    margin: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.task-info h4 { margin: 0; font-size: 16px; }
.task-info p { margin: 4px 0 0 0; color: var(--success); font-weight: bold; font-size: 14px; }

.claim-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
}

/* --- DAILY SUPPLY DROP (Screenshot 1 & 2 Fix) --- */
.quest-box {
    background: linear-gradient(90deg, rgba(52, 199, 89, 0.08) 0%, rgba(52, 199, 89, 0.02) 100%);
    border: 1px solid rgba(52, 199, 89, 0.2);
    margin: 16px;
    padding: 20px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quest-info h4 { margin: 0; font-size: 18px; color: #fff; }
.quest-info p { margin: 8px 0 0 0; font-size: 14px; color: var(--text-secondary); }

.quest-btn {
    background: var(--success);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* --- Action Grid --- */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
}

.action-card {
    background: var(--card-bg);
    padding: 24px 16px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.action-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.action-label { font-weight: 600; font-size: 14px; }

/* --- 2026 Projections (Salary Engine) --- */
.section-header {
    padding: 16px 16px 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-badge { font-size: 11px; font-weight: bold; letter-spacing: 1px; }

.salary-row { padding: 0 16px; margin-bottom: 20px; }
.salary-meta { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.demand-bar-bg { height: 6px; background: #2c2c2e; border-radius: 3px; }
.demand-bar-fill { height: 100%; background: var(--success); border-radius: 3px; }

/* --- Navigation --- */
.nav-bar {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #1c1c1e;
    display: flex;
    justify-content: space-around;
    padding: 12px 0 calc(12px + var(--safe-bottom)) 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    z-index: 1000;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    gap: 4px;
}

.nav-item.active { color: var(--accent); }
.nav-icon { font-size: 20px; }

/* --- Academy & Path Mastery --- */
.path-container {
    margin: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border-left: 4px solid var(--accent);
}

.path-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    color: var(--accent);
    font-weight: bold;
}

.path-stats {
    background: var(--accent);
    color: white;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- General Card & Utilities --- */
.card {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.section { display: none; padding-top: 10px; }
.section.active { display: block; }

.tag {
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    text-transform: uppercase;
}

.unlock-hint {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.lesson-done-tag {
    margin-top: 12px;
    color: var(--success);
    font-weight: bold;
    text-align: center;
}

/* --- Animations --- */
.floating-reward {
    position: fixed;
    color: var(--success);
    font-weight: bold;
    animation: floatUp 1.5s forwards;
    pointer-events: none;
    z-index: 2000;
}

@keyframes floatUp {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, -100px); opacity: 0; }
}

/* Container that holds the video */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    width: 100%;
    border-radius: 12px;
    margin-top: 10px;
    background: #000;
}

/* The actual iframe inside that container */
.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Ensure the thumbnail also takes up proper space */
.video-thumbnail {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: #1a1a1a;
    color: #fff;
    font-weight: bold;
}

.play-icon {
    font-size: 40px;
    background: rgba(0,0,0,0.6);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(4px);
}





