/* ================================================================
   AKADEMI - Complete Overhaul
   TradingView-style Professional Design
   Dual Theme (Light/Dark) with Blue + Gold Palette
   ================================================================ */

/* ================================================================
   THEME VARIABLES - DARK MODE (Default)
   ================================================================ */
:root,
[data-theme="dark"] {
    /* Primary Colors - Blue */
    --ak-primary: #3b82f6;
    --ak-primary-light: #60a5fa;
    --ak-primary-dark: #2563eb;
    --ak-primary-glow: rgba(59, 130, 246, 0.3);

    /* Accent Colors - Gold */
    --ak-accent: #fbbf24;
    --ak-accent-light: #fcd34d;
    --ak-accent-dark: #f59e0b;
    --ak-accent-glow: rgba(251, 191, 36, 0.3);

    /* Status Colors */
    --ak-success: #22c55e;
    --ak-warning: #f97316;
    --ak-error: #ef4444;

    /* Backgrounds */
    --ak-bg: #0a0a0f;
    --ak-bg-surface: #0f0f17;
    --ak-bg-card: #14141f;
    --ak-bg-elevated: #1a1a28;
    --ak-bg-hover: #222235;

    /* Text */
    --ak-text: #ffffff;
    --ak-text-secondary: #94a3b8;
    --ak-text-muted: #64748b;

    /* Borders */
    --ak-border: rgba(255, 255, 255, 0.08);
    --ak-border-active: rgba(59, 130, 246, 0.5);

    /* Gradients */
    --ak-gradient-primary: linear-gradient(135deg, #3b82f6, #6366f1);
    --ak-gradient-accent: linear-gradient(135deg, #fbbf24, #f59e0b);
    --ak-gradient-success: linear-gradient(135deg, #22c55e, #16a34a);
    --ak-gradient-hero: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(59, 130, 246, 0.15), transparent 50%);

    /* Shadows */
    --ak-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --ak-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --ak-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --ak-glow-primary: 0 0 40px rgba(59, 130, 246, 0.3);
    --ak-glow-accent: 0 0 40px rgba(251, 191, 36, 0.3);
}

/* ================================================================
   THEME VARIABLES - LIGHT MODE
   ================================================================ */
[data-theme="light"] {
    /* Primary Colors - Blue */
    --ak-primary: #2563eb;
    --ak-primary-light: #3b82f6;
    --ak-primary-dark: #1d4ed8;
    --ak-primary-glow: rgba(37, 99, 235, 0.2);

    /* Accent Colors - Gold */
    --ak-accent: #f59e0b;
    --ak-accent-light: #fbbf24;
    --ak-accent-dark: #d97706;
    --ak-accent-glow: rgba(245, 158, 11, 0.2);

    /* Status Colors */
    --ak-success: #16a34a;
    --ak-warning: #ea580c;
    --ak-error: #dc2626;

    /* Backgrounds */
    --ak-bg: #f8fafc;
    --ak-bg-surface: #ffffff;
    --ak-bg-card: #ffffff;
    --ak-bg-elevated: #f1f5f9;
    --ak-bg-hover: #e2e8f0;

    /* Text */
    --ak-text: #0f172a;
    --ak-text-secondary: #475569;
    --ak-text-muted: #94a3b8;

    /* Borders */
    --ak-border: rgba(0, 0, 0, 0.08);
    --ak-border-active: rgba(37, 99, 235, 0.5);

    /* Gradients */
    --ak-gradient-primary: linear-gradient(135deg, #2563eb, #4f46e5);
    --ak-gradient-accent: linear-gradient(135deg, #f59e0b, #d97706);
    --ak-gradient-success: linear-gradient(135deg, #16a34a, #15803d);
    --ak-gradient-hero: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(37, 99, 235, 0.08), transparent 50%);

    /* Shadows */
    --ak-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --ak-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --ak-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --ak-glow-primary: 0 0 40px rgba(37, 99, 235, 0.15);
    --ak-glow-accent: 0 0 40px rgba(245, 158, 11, 0.15);
}

/* ================================================================
   BASE STYLES
   ================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.akademi-page {
    background: var(--ak-bg);
    color: var(--ak-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    padding-top: var(--header-height);
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease, color 0.3s ease;
}

.ak-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ================================================================
   THEME TOGGLE BUTTON
   ================================================================ */
.theme-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    background: var(--ak-bg-card);
    border: 1px solid var(--ak-border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s;
    box-shadow: var(--ak-shadow-md);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--ak-primary);
    box-shadow: var(--ak-glow-primary);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    stroke: var(--ak-text);
    transition: transform 0.3s;
}

.theme-toggle:hover svg {
    transform: rotate(15deg);
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
    display: none;
}

/* ================================================================
   ANIMATED BACKGROUND
   ================================================================ */
.ak-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ak-bg-gradient {
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background:
        radial-gradient(ellipse 60% 40% at 30% 30%, var(--ak-primary-glow), transparent 50%),
        radial-gradient(ellipse 50% 30% at 70% 60%, var(--ak-accent-glow), transparent 50%);
    animation: bgFloat 25s ease-in-out infinite;
}

.ak-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
}

@keyframes bgFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(2%, 1%) rotate(0.5deg);
    }

    66% {
        transform: translate(-1%, 2%) rotate(-0.5deg);
    }
}

/* ================================================================
   COVER HERO SECTION (TradingView Style)
   ================================================================ */
.ak-hero {
    position: relative;
    z-index: 1;
    padding: 80px 0 60px;
    min-height: 70vh;
    display: flex;
    align-items: center;
    background: var(--ak-gradient-hero);
}

.ak-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

@media (max-width: 1024px) {
    .ak-hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ak-hero-visual {
        order: -1;
    }
}

/* Hero Badge */
.ak-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ak-primary-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.ak-badge svg {
    width: 16px;
    height: 16px;
}

/* Hero Title */
.ak-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 20px;
}

.ak-hero-title .highlight {
    background: var(--ak-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ak-hero-title .highlight-accent {
    background: var(--ak-gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Description */
.ak-hero-desc {
    font-size: 18px;
    color: var(--ak-text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
    max-width: 520px;
}

@media (max-width: 1024px) {
    .ak-hero-desc {
        margin: 0 auto 32px;
    }
}

/* Hero Stats */
.ak-hero-stats {
    display: flex;
    gap: 48px;
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .ak-hero-stats {
        justify-content: center;
    }
}

.hero-stat {
    text-align: left;
}

@media (max-width: 1024px) {
    .hero-stat {
        text-align: center;
    }
}

.hero-stat-value {
    font-size: 36px;
    font-weight: 900;
    color: var(--ak-text);
    line-height: 1;
}

.hero-stat-value span {
    color: var(--ak-primary);
}

.hero-stat-label {
    font-size: 13px;
    color: var(--ak-text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hero Actions */
.ak-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

@media (max-width: 1024px) {
    .ak-hero-actions {
        justify-content: center;
    }
}

/* Buttons */
.ak-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    position: relative;
    overflow: hidden;
}

.ak-btn-primary {
    background: var(--ak-gradient-primary);
    color: white;
    box-shadow: var(--ak-glow-primary);
}

.ak-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(59, 130, 246, 0.4);
}

.ak-btn-secondary {
    background: var(--ak-bg-card);
    color: var(--ak-text);
    border: 1px solid var(--ak-border);
}

.ak-btn-secondary:hover {
    border-color: var(--ak-primary);
    background: var(--ak-bg-hover);
}

.ak-btn-accent {
    background: var(--ak-gradient-accent);
    color: #0f172a;
    box-shadow: var(--ak-glow-accent);
}

.ak-btn-accent:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(251, 191, 36, 0.4);
}

.ak-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s;
}

.ak-btn:hover svg {
    transform: translateX(4px);
}

/* Hero Visual */
.ak-hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-card-main {
    background: var(--ak-bg-card);
    border: 1px solid var(--ak-border);
    border-radius: 24px;
    padding: 28px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--ak-shadow-lg);
    position: relative;
    z-index: 2;
}

.hero-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.hero-card-icon {
    width: 52px;
    height: 52px;
    background: var(--ak-gradient-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-card-icon svg {
    width: 26px;
    height: 26px;
    stroke: white;
}

.hero-card-title {
    font-size: 18px;
    font-weight: 700;
}

.hero-card-subtitle {
    font-size: 13px;
    color: var(--ak-text-muted);
}

.hero-progress {
    margin-bottom: 20px;
}

.hero-progress-bar {
    height: 10px;
    background: var(--ak-bg-elevated);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.hero-progress-fill {
    height: 100%;
    background: var(--ak-gradient-primary);
    border-radius: 10px;
    transition: width 1s ease;
    position: relative;
}

.hero-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.hero-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--ak-text-muted);
}

.hero-progress-meta strong {
    color: var(--ak-primary);
}

/* Floating Cards */
.hero-float-card {
    position: absolute;
    background: var(--ak-bg-card);
    border: 1px solid var(--ak-border);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: var(--ak-shadow-md);
    animation: heroFloat 6s ease-in-out infinite;
    z-index: 3;
}

.hero-float-card.card-xp {
    top: -20px;
    right: -30px;
    background: var(--ak-gradient-success);
    border: none;
    color: white;
    font-weight: 800;
    font-size: 16px;
}

.hero-float-card.card-level {
    bottom: 40px;
    left: -40px;
    background: var(--ak-gradient-accent);
    border: none;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    animation-delay: -2s;
}

.hero-float-card.card-level svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

@keyframes heroFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* ================================================================
   STICKY TAB NAVIGATION (TradingView Style)
   ================================================================ */
.ak-tabs-nav {
    position: sticky;
    top: var(--header-height);
    z-index: 100;
    background: rgba(var(--ak-bg), 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--ak-border);
    padding: 0;
}

[data-theme="dark"] .ak-tabs-nav {
    background: rgba(10, 10, 15, 0.95);
}

[data-theme="light"] .ak-tabs-nav {
    background: rgba(248, 250, 252, 0.95);
}

.ak-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.ak-tabs::-webkit-scrollbar {
    display: none;
}

.ak-tab {
    padding: 18px 28px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ak-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color 0.2s;
}

.ak-tab:hover {
    color: var(--ak-text);
}

.ak-tab.active {
    color: var(--ak-primary);
}

.ak-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--ak-gradient-primary);
    border-radius: 3px 3px 0 0;
}

/* ================================================================
   LEARNING PATH SECTION
   ================================================================ */
.ak-path-section {
    position: relative;
    z-index: 1;
    padding: 80px 0;
    background: var(--ak-bg-surface);
}

.ak-section-header {
    text-align: center;
    margin-bottom: 60px;
}

.ak-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ak-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.ak-section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.ak-section-desc {
    font-size: 17px;
    color: var(--ak-text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Path Steps */
.ak-path-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    position: relative;
}

@media (max-width: 900px) {
    .ak-path-grid {
        grid-template-columns: 1fr;
    }
}

.ak-path-step {
    background: var(--ak-bg-card);
    border: 1px solid var(--ak-border);
    border-radius: 24px;
    padding: 32px;
    position: relative;
    cursor: pointer;
    transition: all 0.4s;
    overflow: hidden;
}

.ak-path-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ak-gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.ak-path-step:hover,
.ak-path-step.active {
    border-color: var(--ak-primary);
    transform: translateY(-8px);
    box-shadow: var(--ak-glow-primary);
}

.ak-path-step:hover::before,
.ak-path-step.active::before {
    transform: scaleX(1);
}

.ak-path-step.completed {
    border-color: var(--ak-success);
}

.ak-path-step.completed::before {
    background: var(--ak-gradient-success);
    transform: scaleX(1);
}

.path-step-icon {
    width: 64px;
    height: 64px;
    background: var(--ak-gradient-primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
}

.path-step-icon svg {
    width: 28px;
    height: 28px;
    stroke: white;
}

.path-step-number {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    background: var(--ak-bg-card);
    border: 2px solid var(--ak-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--ak-primary);
}

.ak-path-step.completed .path-step-number {
    background: var(--ak-success);
    border-color: var(--ak-success);
    color: white;
}

.path-step-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 10px;
}

.path-step-desc {
    font-size: 14px;
    color: var(--ak-text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.path-step-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ak-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.2s;
}

.path-step-link:hover {
    gap: 12px;
}

.path-step-progress {
    position: absolute;
    top: 32px;
    right: 32px;
}

.progress-ring {
    position: relative;
    width: 56px;
    height: 56px;
}

.progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: var(--ak-bg-elevated);
    stroke-width: 4;
}

.ring-fill {
    fill: none;
    stroke: var(--ak-primary);
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s;
}

.progress-ring span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 700;
    color: var(--ak-primary);
}

/* ================================================================
   COURSES SECTION
   ================================================================ */
.ak-courses-section {
    position: relative;
    z-index: 1;
    padding: 80px 0;
}

.ak-courses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.ak-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ak-filter-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--ak-border);
    border-radius: 10px;
    color: var(--ak-text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ak-filter-btn:hover {
    border-color: var(--ak-primary);
    color: var(--ak-text);
}

.ak-filter-btn.active {
    background: var(--ak-gradient-primary);
    border-color: transparent;
    color: white;
}

/* Course Cards */
.ak-courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .ak-courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .ak-courses-grid {
        grid-template-columns: 1fr;
    }
}

.ak-course-card {
    background: var(--ak-bg-card);
    border: 1px solid var(--ak-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s;
    cursor: pointer;
}

.ak-course-card:hover {
    border-color: var(--ak-primary);
    transform: translateY(-8px);
    box-shadow: var(--ak-glow-primary);
}

.course-card-image {
    height: 140px;
    background: linear-gradient(135deg, var(--ak-bg-elevated), var(--ak-bg-surface));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.course-card-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--ak-gradient-primary);
    opacity: 0.1;
}

.course-card-image svg {
    width: 48px;
    height: 48px;
    stroke: var(--ak-primary);
    opacity: 0.5;
}

.course-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.course-badge.hot {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.course-badge.new {
    background: var(--ak-gradient-primary);
}

.course-xp {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 12px;
    background: var(--ak-gradient-success);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    color: white;
}

.course-card-content {
    padding: 24px;
}

.course-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.course-card-desc {
    font-size: 14px;
    color: var(--ak-text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.course-card-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.course-card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ak-text-muted);
}

.course-card-meta svg {
    width: 14px;
    height: 14px;
    stroke: var(--ak-text-muted);
}

.course-progress-bar {
    height: 5px;
    background: var(--ak-bg-elevated);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 16px;
}

.course-progress-fill {
    height: 100%;
    background: var(--ak-gradient-primary);
    border-radius: 5px;
    transition: width 0.5s;
}

.course-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-btn {
    padding: 10px 20px;
    background: var(--ak-gradient-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.course-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
}

.course-btn.completed {
    background: var(--ak-gradient-success);
}

.course-status {
    font-size: 13px;
    font-weight: 600;
    color: var(--ak-text-muted);
}

.course-status.in-progress {
    color: var(--ak-primary);
}

.course-status.done {
    color: var(--ak-success);
}

/* ================================================================
   DAILY CHALLENGE CARD
   ================================================================ */
.ak-challenge-card {
    background: linear-gradient(135deg, var(--ak-bg-card), var(--ak-bg-elevated));
    border: 1px solid var(--ak-border);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 40px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .ak-challenge-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.ak-challenge-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, var(--ak-accent-glow), transparent 60%);
    pointer-events: none;
}

.challenge-content {
    position: relative;
    z-index: 1;
}

.challenge-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--ak-gradient-accent);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
}

.challenge-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
}

.challenge-desc {
    font-size: 15px;
    color: var(--ak-text-secondary);
    line-height: 1.6;
}

.challenge-action {
    position: relative;
    z-index: 1;
    text-align: center;
}

.challenge-xp {
    font-size: 32px;
    font-weight: 900;
    color: var(--ak-accent);
    margin-bottom: 8px;
}

.challenge-xp span {
    font-size: 16px;
    font-weight: 600;
}

/* ================================================================
   QUIZ COMPONENT STYLES
   ================================================================ */
.ak-quiz-container {
    background: var(--ak-bg-card);
    border: 1px solid var(--ak-border);
    border-radius: 20px;
    padding: 32px;
    margin: 32px 0;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ak-border);
}

.quiz-title {
    font-size: 20px;
    font-weight: 700;
}

.quiz-progress {
    font-size: 14px;
    color: var(--ak-text-muted);
}

.quiz-question {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    line-height: 1.5;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.quiz-option {
    padding: 16px 20px;
    background: var(--ak-bg-elevated);
    border: 2px solid var(--ak-border);
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 14px;
}

.quiz-option:hover {
    border-color: var(--ak-primary);
    background: var(--ak-bg-hover);
}

.quiz-option.selected {
    border-color: var(--ak-primary);
    background: rgba(59, 130, 246, 0.1);
}

.quiz-option.correct {
    border-color: var(--ak-success);
    background: rgba(34, 197, 94, 0.1);
}

.quiz-option.wrong {
    border-color: var(--ak-error);
    background: rgba(239, 68, 68, 0.1);
}

.option-letter {
    width: 32px;
    height: 32px;
    background: var(--ak-bg-card);
    border: 1px solid var(--ak-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.quiz-option.selected .option-letter {
    background: var(--ak-primary);
    border-color: var(--ak-primary);
    color: white;
}

.quiz-option.correct .option-letter {
    background: var(--ak-success);
    border-color: var(--ak-success);
    color: white;
}

.quiz-option.wrong .option-letter {
    background: var(--ak-error);
    border-color: var(--ak-error);
    color: white;
}

.quiz-feedback {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.6;
}

.quiz-feedback.correct {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--ak-success);
}

.quiz-feedback.wrong {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--ak-error);
}

.quiz-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ================================================================
   FLASHCARD COMPONENT
   ================================================================ */
.ak-flashcard {
    perspective: 1000px;
    width: 100%;
    height: 280px;
    cursor: pointer;
    margin: 24px 0;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.ak-flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.flashcard-front {
    background: var(--ak-gradient-primary);
    color: white;
}

.flashcard-front h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
}

.flashcard-front p {
    font-size: 14px;
    opacity: 0.8;
}

.flashcard-back {
    background: var(--ak-bg-card);
    border: 1px solid var(--ak-border);
    transform: rotateY(180deg);
}

.flashcard-back p {
    font-size: 16px;
    color: var(--ak-text-secondary);
    line-height: 1.7;
}

.flashcard-hint {
    position: absolute;
    bottom: 16px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* ================================================================
   XP ANIMATION
   ================================================================ */
@keyframes xpPop {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-60px) scale(1.2);
        opacity: 0;
    }
}

.xp-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--ak-gradient-success);
    color: white;
    padding: 20px 40px;
    border-radius: 16px;
    font-size: 24px;
    font-weight: 800;
    z-index: 9999;
    animation: xpPop 1.5s ease-out forwards;
    box-shadow: 0 10px 40px rgba(34, 197, 94, 0.5);
}

/* ================================================================
   GAMIFICATION SECTION
   ================================================================ */
.ak-gamification {
    padding: 80px 0;
    background: var(--ak-bg-surface);
}

.ak-game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .ak-game-grid {
        grid-template-columns: 1fr;
    }
}

.ak-game-card {
    background: var(--ak-bg-card);
    border: 1px solid var(--ak-border);
    border-radius: 24px;
    padding: 32px;
    text-align: center;
    transition: all 0.4s;
}

.ak-game-card:hover {
    border-color: var(--ak-primary);
    transform: translateY(-8px);
    box-shadow: var(--ak-glow-primary);
}

.game-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-icon svg {
    width: 32px;
    height: 32px;
    stroke: white;
}

.game-icon.xp {
    background: var(--ak-gradient-primary);
}

.game-icon.level {
    background: var(--ak-gradient-accent);
}

.game-icon.badge {
    background: var(--ak-gradient-success);
}

.ak-game-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.ak-game-card p {
    font-size: 14px;
    color: var(--ak-text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.game-stat .value {
    display: block;
    font-size: 32px;
    font-weight: 900;
    color: var(--ak-primary);
}

.game-stat .label {
    font-size: 13px;
    color: var(--ak-text-muted);
}

/* Badge Gallery */
.badge-gallery {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.mini-badge {
    width: 48px;
    height: 48px;
    background: var(--ak-bg-elevated);
    border: 1px solid var(--ak-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.mini-badge svg {
    width: 24px;
    height: 24px;
    fill: var(--ak-text-muted);
}

.mini-badge.earned {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1));
    border-color: rgba(251, 191, 36, 0.4);
}

.mini-badge.earned svg {
    fill: var(--ak-accent);
}

.mini-badge:hover {
    transform: scale(1.1);
}

/* ================================================================
   USER PROGRESS SUMMARY
   ================================================================ */
.ak-summary {
    padding: 60px 0 100px;
}

.ak-summary-card {
    background: var(--ak-bg-card);
    border: 1px solid var(--ak-border);
    border-radius: 24px;
    padding: 32px;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: var(--ak-gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: white;
}

.user-details h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.user-details p {
    font-size: 14px;
    color: var(--ak-text-muted);
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 640px) {
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.summary-stat {
    text-align: center;
    padding: 20px;
    background: var(--ak-bg-elevated);
    border-radius: 16px;
}

.summary-stat .stat-val {
    display: block;
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 4px;
    color: var(--ak-text);
}

.summary-stat .stat-lbl {
    font-size: 13px;
    color: var(--ak-text-muted);
}

/* ================================================================
   ANIMATIONS
   ================================================================ */
/* Animate-on-scroll elements are VISIBLE by default */
/* The 'visible' class adds enhanced animations but elements are never hidden */
.animate-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When JS is available, start hidden for animation effect */
.js-enabled .animate-on-scroll:not(.visible) {
    opacity: 0;
    transform: translateY(30px);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Confetti animation for correct answers */
@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) rotate(720deg);
        opacity: 0;
    }
}

.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    z-index: 9999;
    animation: confetti 1s ease-out forwards;
}

/* ================================================================
   RESPONSIVE UTILITIES
   ================================================================ */
@media (max-width: 768px) {
    .ak-hero {
        padding: 60px 0 40px;
        min-height: auto;
    }

    .ak-section-title {
        font-size: 1.75rem;
    }

    .ak-challenge-card {
        padding: 24px;
    }

    .ak-quiz-container {
        padding: 24px;
    }
}