/* ============================================
   JoySuite AI Prompting Course - Stylesheet
   ============================================ */

/* CSS Custom Properties - JoySuite Brand */
:root {
    --color-bg: #FAFBFC;
    --color-bg-warm: #F5F7FA;
    --color-bg-accent: #EDE9FE;
    --color-text: #2D3142;
    --color-text-muted: #4e5d78;
    --color-text-light: #636d7e;
    --color-primary: #5e3099;
    --color-primary-dark: #4a2679;
    --color-primary-light: #ac7fdd;
    --color-secondary: #2D3142;
    --color-accent-blue: #006edb;
    --color-accent-cyan: #13e1f3;
    --color-accent-gold: #ffd966;
    --color-accent-green: #10b981;
    --color-accent-lavender: #9c89df;
    --color-white: #ffffff;
    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-success: #10b981;

    --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Fira Code', 'Consolas', 'Monaco', monospace;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --gradient-primary: linear-gradient(135deg, #5e3099, #006edb);
    --gradient-accent: linear-gradient(135deg, #5e3099, #13e1f3);
    --gradient-warm: linear-gradient(135deg, #5e3099 0%, #9c89df 50%, #006edb 100%);
    --focus-ring: 0 0 0 3px rgba(94, 48, 153, 0.4);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
    min-height: 100vh;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Top Navigation Bar
   ============================================ */
.course-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-logo {
    height: 28px;
    width: auto;
}

.topbar-divider {
    width: 1px;
    height: 24px;
    background: var(--color-border);
}

.topbar-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.topbar-progress-bar {
    width: 120px;
    height: 6px;
    background: var(--color-bg-accent);
    border-radius: 3px;
    overflow: hidden;
}

.topbar-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.5s var(--ease-out-expo);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: var(--color-bg-warm);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--color-text);
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    transition: background 0.2s ease;
}

.topbar-user:hover {
    background: var(--color-bg-accent);
}

.topbar-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.topbar-dashboard-link {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.topbar-dashboard-link:hover {
    background: var(--color-bg-warm);
    color: var(--color-primary);
}

/* ============================================
   Login Page
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 440px;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    height: 36px;
    margin-bottom: 1.5rem;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.login-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
}

.login-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border-light);
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--focus-ring);
}

.login-form .btn-login {
    width: 100%;
    padding: 1rem;
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-body);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-form .btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(94, 48, 153, 0.3);
}

.login-form .btn-login:active {
    transform: translateY(0);
}

.login-error {
    display: none;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    color: var(--color-danger);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.login-error.visible {
    display: block;
}

/* ============================================
   Dashboard Page
   ============================================ */
.dashboard-page {
    padding-top: 64px;
    min-height: 100vh;
}

.dashboard-hero {
    background: linear-gradient(135deg, #1a0533 0%, #2D3142 40%, #143d6b 100%);
    padding: 4rem 2rem 3rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(94, 48, 153, 0.3), transparent 60%);
    pointer-events: none;
}

.dashboard-hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(0, 110, 219, 0.2), transparent 60%);
    pointer-events: none;
}

.dashboard-hero-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.dashboard-welcome {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.dashboard-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.dashboard-hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    line-height: 1.6;
}

/* Overall Progress Card */
.progress-overview {
    max-width: 1000px;
    margin: -2rem auto 0;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.progress-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: 2rem 2.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.progress-stats {
    display: flex;
    gap: 2rem;
    flex-shrink: 0;
}

.progress-stat {
    text-align: center;
}

.progress-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

.progress-stat-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.progress-bar-container {
    flex: 1;
}

.progress-bar-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--color-bg-accent);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 5px;
    transition: width 0.8s var(--ease-out-expo);
    min-width: 0;
}

.progress-continue-btn {
    flex-shrink: 0;
    padding: 0.85rem 1.75rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.progress-continue-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(94, 48, 153, 0.3);
    color: white;
}

/* Module Cards Grid */
.modules-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.modules-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

.module-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 1.75rem 2rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}

.module-card:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-md);
    color: inherit;
}

.module-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.module-card-number {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    background: var(--color-bg-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.module-card-status {
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.module-card-status.completed {
    color: var(--color-success);
}

.module-card-status.in-progress {
    color: var(--color-accent-blue);
}

.module-card-status.locked {
    color: var(--color-text-light);
}

.module-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.module-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.module-card-lessons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.module-card-lesson-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-border);
    transition: background 0.3s ease;
}

.module-card-lesson-dot.completed {
    background: var(--color-success);
}

.module-card-lesson-dot.current {
    background: var(--color-accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 110, 219, 0.2);
}

/* ============================================
   Lesson Page Layout
   ============================================ */
.lesson-page {
    padding-top: 64px;
    min-height: 100vh;
    display: flex;
}

/* Lesson Sidebar */
.lesson-sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: 300px;
    background: var(--color-white);
    border-right: 1px solid var(--color-border);
    overflow-y: auto;
    padding: 1.5rem 0;
    z-index: 100;
    transition: transform 0.3s var(--ease-out-expo);
}

.lesson-sidebar-header {
    padding: 0 1.5rem 1.25rem;
    border-bottom: 1px solid var(--color-border-light);
    margin-bottom: 1rem;
}

.lesson-sidebar-module {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.lesson-sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.3;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav-item:hover {
    background: var(--color-bg-warm);
    color: var(--color-text);
}

.sidebar-nav-item.active {
    background: var(--color-bg-accent);
    color: var(--color-primary);
    border-left-color: var(--color-primary);
    font-weight: 600;
}

.sidebar-nav-item.completed {
    color: var(--color-text);
}

.sidebar-nav-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.65rem;
    transition: all 0.2s ease;
}

.sidebar-nav-item.completed .sidebar-nav-icon {
    background: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.sidebar-nav-item.active .sidebar-nav-icon {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: white;
}

/* Lesson Content Area */
.lesson-content {
    margin-left: 300px;
    flex: 1;
    padding: 3rem 2rem 6rem;
    max-width: 100%;
}

.lesson-container {
    max-width: 780px;
    margin: 0 auto;
}

/* Lesson Header */
.lesson-header {
    margin-bottom: 3rem;
}

.lesson-breadcrumb {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lesson-breadcrumb a {
    color: var(--color-text-muted);
}

.lesson-breadcrumb a:hover {
    color: var(--color-primary);
}

.lesson-breadcrumb .separator {
    color: var(--color-border);
}

.lesson-module-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    background: var(--color-bg-accent);
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.lesson-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.lesson-meta {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lesson-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ============================================
   Lesson Content Typography
   ============================================ */
.lesson-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-bg-accent);
}

.lesson-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.lesson-body h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.lesson-body p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 1.25rem;
}

.lesson-body ul,
.lesson-body ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.lesson-body li {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.lesson-body strong {
    font-weight: 700;
    color: var(--color-text);
}

.lesson-body em {
    font-style: italic;
}

.lesson-body blockquote {
    border-left: 4px solid var(--color-primary);
    background: var(--color-bg-accent);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 0.95rem;
    color: var(--color-text);
}

.lesson-body blockquote p:last-child {
    margin-bottom: 0;
}

/* Code Blocks */
.lesson-body code {
    font-family: var(--font-mono);
    background: var(--color-bg-accent);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--color-primary-dark);
}

.lesson-body pre {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.lesson-body pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* ============================================
   Info Boxes / Callouts
   ============================================ */
.info-box {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.info-box-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-box.tip {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.info-box.warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.info-box.note {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.info-box.key-concept {
    background: var(--color-bg-accent);
    border: 1px solid #c4b5fd;
    color: var(--color-primary-dark);
}

/* ============================================
   Prompt Example Boxes
   ============================================ */
.prompt-example {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
    overflow: hidden;
}

.prompt-example-header {
    background: var(--color-bg-warm);
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prompt-example-body {
    padding: 1.25rem 1.5rem;
}

.prompt-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.prompt-label.bad {
    color: var(--color-danger);
}

.prompt-label.good {
    color: var(--color-success);
}

.prompt-label.better {
    color: var(--color-accent-blue);
}

.prompt-text {
    background: #f8fafc;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    white-space: pre-wrap;
    font-family: var(--font-body);
    color: var(--color-text);
}

.prompt-text:last-child {
    margin-bottom: 0;
}

.prompt-text.bad {
    border-left: 3px solid var(--color-danger);
    background: #fef2f2;
}

.prompt-text.good {
    border-left: 3px solid var(--color-success);
    background: #f0fdf4;
}

.prompt-text.better {
    border-left: 3px solid var(--color-accent-blue);
    background: #eff6ff;
}

/* Comparison Box */
.comparison-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.comparison-side {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--color-border);
}

.comparison-side.before {
    border-top: 3px solid var(--color-danger);
}

.comparison-side.after {
    border-top: 3px solid var(--color-success);
}

.comparison-side h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.comparison-side.before h4 {
    color: var(--color-danger);
}

.comparison-side.after h4 {
    color: var(--color-success);
}

/* ============================================
   Try This (Exercise) Boxes
   ============================================ */
.try-this {
    background: var(--color-white);
    border: 2px solid var(--color-accent-blue);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2.5rem 0;
    position: relative;
}

.try-this::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent-blue), var(--color-accent-cyan));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.try-this-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.try-this-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-accent-blue), var(--color-accent-cyan));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.try-this-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
}

.try-this-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.try-this-body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text);
}

.try-this-body p {
    margin-bottom: 1rem;
}

.try-this-body ol,
.try-this-body ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.try-this-body li {
    margin-bottom: 0.5rem;
}

.try-this-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text);
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-top: 0.5rem;
}

.try-this-textarea:focus {
    outline: none;
    border-color: var(--color-accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 110, 219, 0.15);
}

.try-this-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    align-items: center;
}

.try-this-actions .btn-save-exercise {
    padding: 0.6rem 1.25rem;
    background: var(--color-accent-blue);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
}

.try-this-actions .btn-save-exercise:hover {
    background: #0059b3;
    transform: translateY(-1px);
}

.try-this-actions .btn-save-exercise.saved {
    background: var(--color-success);
}

.try-this-actions .btn-save-exercise.saved:hover {
    background: #1b8a3e;
}

.try-this-saved {
    font-size: 0.85rem;
    color: var(--color-success);
    font-weight: 600;
    display: none;
}

.try-this-saved.visible {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* ============================================
   Lesson Navigation (Bottom)
   ============================================ */
.lesson-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3rem;
    margin-top: 3rem;
    border-top: 2px solid var(--color-bg-accent);
    gap: 1rem;
}

.lesson-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: var(--font-body);
    border: none;
    cursor: pointer;
}

.lesson-nav-btn.prev {
    background: var(--color-bg-warm);
    color: var(--color-text);
}

.lesson-nav-btn.prev:hover {
    background: var(--color-bg-accent);
    color: var(--color-primary);
}

.lesson-nav-btn.next {
    background: var(--gradient-primary);
    color: white;
    margin-left: auto;
}

.lesson-nav-btn.next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(94, 48, 153, 0.3);
    color: white;
}

/* Mark Complete Button */
.mark-complete-section {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.btn-mark-complete {
    padding: 1rem 2.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid var(--color-success);
    background: white;
    color: var(--color-success);
}

.btn-mark-complete:hover {
    background: var(--color-success);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-mark-complete.completed {
    background: var(--color-success);
    color: white;
    pointer-events: none;
}

/* ============================================
   Mobile Sidebar Toggle
   ============================================ */
.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 200;
    box-shadow: var(--shadow-lg);
    align-items: center;
    justify-content: center;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .lesson-sidebar {
        transform: translateX(-100%);
    }

    .lesson-sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }

    .lesson-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .course-topbar {
        padding: 0 1rem;
    }

    .topbar-progress-bar {
        width: 80px;
    }

    .topbar-title {
        display: none;
    }

    .topbar-search-label,
    .topbar-search-kbd {
        display: none;
    }

    .topbar-search-btn {
        padding: 0.4rem 0.5rem;
    }

    .search-overlay {
        padding-top: 0;
        align-items: flex-start;
    }

    .search-modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .dashboard-hero {
        padding: 3rem 1.5rem 2rem;
    }

    .progress-card {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.25rem;
    }

    .progress-stats {
        width: 100%;
        justify-content: space-around;
    }

    .progress-bar-container {
        width: 100%;
    }

    .progress-continue-btn {
        width: 100%;
        text-align: center;
    }

    .modules-section {
        padding: 2rem 1.5rem 3rem;
    }

    .lesson-content {
        padding: 2rem 1.5rem 5rem;
    }

    .lesson-navigation {
        flex-direction: column;
    }

    .lesson-nav-btn {
        width: 100%;
        justify-content: center;
    }

    .lesson-nav-btn.next {
        margin-left: 0;
    }

    .comparison-box {
        grid-template-columns: 1fr;
    }

    .try-this {
        padding: 1.5rem;
    }

    .login-card {
        padding: 1.75rem;
    }
}

@media (max-width: 480px) {
    .topbar-progress {
        display: none;
    }

    .login-title {
        font-size: 1.5rem;
    }
}

/* ============================================
   Animations
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .module-card {
        transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .module-card:hover {
        transform: translateY(-2px);
    }

    .fade-in {
        animation: fadeIn 0.5s ease forwards;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .slide-in {
        animation: slideIn 0.3s var(--ease-out-expo) forwards;
    }

    @keyframes slideIn {
        from { opacity: 0; transform: translateX(-20px); }
        to { opacity: 1; transform: translateX(0); }
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .course-topbar,
    .lesson-sidebar,
    .sidebar-toggle,
    .lesson-navigation,
    .mark-complete-section,
    .try-this-actions,
    .try-this-textarea,
    .search-overlay {
        display: none !important;
    }

    .lesson-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .lesson-body {
        font-size: 12pt;
    }
}

/* ============================================
   Capstone & Appendix specific
   ============================================ */
.appendix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.appendix-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.appendix-card:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-md);
}

.appendix-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.appendix-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Template code blocks */
.template-block {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin: 1rem 0;
    overflow: hidden;
}

.template-block-header {
    background: var(--color-bg-warm);
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-block-body {
    padding: 1rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--color-text);
}

.btn-copy {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.btn-copy:hover {
    background: var(--color-bg-accent);
    color: var(--color-primary);
    border-color: var(--color-primary-light);
}

.btn-copy.copied {
    background: var(--color-success);
    color: white;
    border-color: var(--color-success);
}

/* Glossary */
.glossary-term {
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border-light);
}

.glossary-term:last-child {
    border-bottom: none;
}

.glossary-term dt {
    font-weight: 700;
    color: var(--color-text);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.glossary-term dd {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   Topbar Search Button
   ============================================ */
.topbar-search-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: var(--color-bg-warm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.topbar-search-btn:hover {
    background: var(--color-bg-accent);
    border-color: var(--color-primary-light);
    color: var(--color-primary);
}

.topbar-search-label {
    font-weight: 500;
}

.topbar-search-kbd {
    font-size: 0.7rem;
    font-family: var(--font-body);
    padding: 0.15rem 0.4rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: var(--color-text-light);
    line-height: 1;
    font-weight: 600;
}

/* ============================================
   Search Modal Overlay
   ============================================ */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: min(20vh, 140px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.search-overlay.open {
    opacity: 1;
    visibility: visible;
}

.search-modal {
    width: 100%;
    max-width: 620px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: scale(0.96) translateY(-8px);
    transition: transform 0.15s var(--ease-out-expo);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.search-overlay.open .search-modal {
    transform: scale(1) translateY(0);
}

/* Search Input */
.search-input-wrap {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--color-border-light);
    gap: 0.75rem;
}

.search-input-icon {
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.05rem;
    font-family: var(--font-body);
    color: var(--color-text);
    background: transparent;
    line-height: 1.5;
}

.search-input::placeholder {
    color: var(--color-text-light);
}

.search-esc-kbd {
    font-size: 0.7rem;
    font-family: var(--font-body);
    padding: 0.2rem 0.5rem;
    background: var(--color-bg-warm);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: var(--color-text-light);
    font-weight: 600;
    flex-shrink: 0;
}

/* Search Results */
.search-results {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.search-results-list {
    padding: 0.5rem;
}

.search-result-item {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: background 0.1s ease;
}

.search-result-item:hover,
.search-result-item.active {
    background: var(--color-bg-accent);
}

.search-result-item.active {
    outline: 2px solid var(--color-primary-light);
    outline-offset: -2px;
}

.search-result-meta {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.search-result-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.search-result-snippet {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-snippet mark {
    background: rgba(255, 217, 102, 0.4);
    color: inherit;
    padding: 0 0.1em;
    border-radius: 2px;
}

.search-results-footer {
    padding: 0.6rem 1.25rem;
    font-size: 0.8rem;
    color: var(--color-text-light);
    border-top: 1px solid var(--color-border-light);
    text-align: center;
}

/* Search Empty & No Results States */
.search-empty-state,
.search-no-results {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--color-text-muted);
}

.search-empty-state p,
.search-no-results p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.search-no-results-hint {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.search-hints {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.search-hints > span {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.search-hint-chip {
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    background: var(--color-bg-warm);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    color: var(--color-text-muted);
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.15s ease;
}

.search-hint-chip:hover {
    background: var(--color-bg-accent);
    border-color: var(--color-primary-light);
    color: var(--color-primary);
}

.search-loading {
    padding: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* ============================================
   User dropdown menu
   ============================================ */
.user-dropdown {
    position: relative;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 0.5rem;
    z-index: 1001;
    display: none;
}

.user-dropdown-menu.open {
    display: block;
}

.user-dropdown-item {
    display: block;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: var(--color-text);
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-body);
    text-decoration: none;
}

.user-dropdown-item:hover {
    background: var(--color-bg-warm);
    color: var(--color-primary);
}

.user-dropdown-item.danger {
    color: var(--color-danger);
}

.user-dropdown-item.danger:hover {
    background: #fef2f2;
}

/* ============================================
   Quiz Styles
   ============================================ */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
}

.quiz-progress {
    margin-bottom: 2rem;
}

.quiz-progress-text {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.quiz-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--color-bg-accent);
    border-radius: 3px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.quiz-question h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.quiz-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text);
}

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

.quiz-option.selected {
    border-color: var(--color-primary);
    background: var(--color-bg-accent);
    box-shadow: 0 0 0 3px rgba(94, 48, 153, 0.15);
}

.quiz-option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-bg-warm);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

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

.quiz-option-text {
    padding-top: 0.25rem;
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border-light);
}

/* Quiz Results */
.quiz-results {
    text-align: center;
}

.quiz-results-header {
    padding: 2.5rem 2rem;
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
}

.quiz-results-header.passed {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #86efac;
}

.quiz-results-header.failed {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 2px solid #93c5fd;
}

.quiz-results-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.quiz-results-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.quiz-results-header.passed h2 {
    color: #166534;
}

.quiz-results-header.failed h2 {
    color: #1e40af;
}

.quiz-results-score {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.quiz-results-header.passed .quiz-results-score {
    color: var(--color-success);
}

.quiz-results-header.failed .quiz-results-score {
    color: var(--color-accent-blue);
}

.quiz-results-header p {
    font-size: 1rem;
    color: var(--color-text-muted);
    max-width: 400px;
    margin: 0 auto;
}

.quiz-review {
    text-align: left;
    margin-bottom: 2rem;
}

.quiz-review h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.quiz-review-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
}

.quiz-review-item.correct {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.quiz-review-item.incorrect {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.quiz-review-status {
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.quiz-review-item.correct .quiz-review-status {
    color: var(--color-success);
}

.quiz-review-item.incorrect .quiz-review-status {
    color: var(--color-danger);
}

.quiz-review-question {
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--color-text);
    font-size: 0.95rem;
}

.quiz-review-answer {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.quiz-review-correct {
    font-size: 0.9rem;
    color: var(--color-success);
    margin-bottom: 0.25rem;
}

.quiz-review-explanation {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--color-border-light);
}

.quiz-results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1rem;
}

/* ============================================
   Quiz Locked State
   ============================================ */
.quiz-locked {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.quiz-locked-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.quiz-locked h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.quiz-locked p {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.quiz-locked-progress {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    padding: 0.5rem 1rem;
    background: var(--color-bg-accent);
    border-radius: var(--radius-md);
    display: inline-block;
}

/* ============================================
   Completion / Celebration Page
   ============================================ */
.completion-page {
    min-height: 100vh;
    padding-top: 64px;
    background: linear-gradient(180deg, #1a0533 0%, #2D3142 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.completion-page::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(94, 48, 153, 0.4), transparent 60%);
    pointer-events: none;
}

.completion-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
}

.completion-trophy {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.completion-container h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffd966, #13e1f3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.completion-container .completion-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.completion-name {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin-bottom: 2rem;
}

.completion-certificate {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
}

.completion-certificate h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-accent-gold);
    margin-bottom: 1.5rem;
}

.completion-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 1.5rem;
}

.completion-stat {
    text-align: center;
}

.completion-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: white;
}

.completion-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.completion-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1rem;
}

.completion-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #0A66C2;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-linkedin:hover {
    background: #004182;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(10, 102, 194, 0.4);
    color: white;
}

.btn-dashboard {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-dashboard:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* Confetti canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

@media (max-width: 768px) {
    .completion-stats {
        gap: 1.5rem;
    }

    .completion-certificate {
        padding: 1.5rem;
    }

    .completion-actions {
        flex-direction: column;
        align-items: center;
    }

    .quiz-nav {
        flex-direction: column;
        gap: 0.75rem;
    }

    .quiz-nav .lesson-nav-btn {
        width: 100%;
        justify-content: center;
    }
}
