/* ==========================================================================
   IHK ExamPrep / Prüfungs-Simulator - Central Stylesheet
   ========================================================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Custom Properties / Design System */
:root {
    /* Colors */
    --color-bg: #f8fafc;
    --color-primary: #0f172a;      /* Navy Deep Blue */
    --color-accent: #3b82f6;       /* Primary Blue / Indigo */
    --color-accent-hover: #2563eb;
    --color-success: #10b981;      /* Emerald Green */
    --color-success-hover: #059669;
    --color-text-main: #1e293b;
    --color-text-muted: #64748b;
    --color-white: #ffffff;
    --color-border: #e2e8f0;
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #047857 100%);
    
    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Layout */
    --container-max-width: 1440px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Overrides (Optional / Future-proof) */
@media (prefers-color-scheme: dark) {
    /* Keep a clean modern layout; user can toggle later. For now, light slate bg is default as requested. */
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1.25;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

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

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: 6rem 0;
}

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

/* Buttons Styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.25);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--color-white);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-border);
}

.btn-outline:hover {
    background-color: var(--color-white);
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--gradient-success);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn-success:hover {
    background: var(--color-success-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.25);
}

/* Header & Navigation */
header {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
}

header .container {
    max-width: 100% !important;
    width: 100%;
    padding-left: 3.5rem;
    padding-right: 3.5rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Desktop layout spacing */
@media (min-width: 769px) {
    header nav {
        flex: 1;
        display: flex;
        justify-content: center;
        margin: 0 2rem;
    }

    .nav-links {
        display: flex;
        gap: 2.75rem;
        align-items: center;
    }

    .nav-actions {
        display: flex;
        align-items: center;
        gap: 1.25rem;
        flex-shrink: 0;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-white);
    text-decoration: none;
    flex-shrink: 0;
}

.logo span {
    color: var(--color-accent);
}

.nav-logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    transition: transform 0.25s ease;
}

.logo:hover .nav-logo-img {
    transform: scale(1.05);
}

.mobile-only {
    display: none;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-links a:hover {
    color: var(--color-white);
    background: rgba(59, 130, 246, 0.15);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: var(--gradient-hero);
    color: var(--color-white);
    position: relative;
    overflow: hidden;
    padding: 8rem 0;
}

/* Decorative backdrop effects */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

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

.hero-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background-color: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--color-accent);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.hero h1 span {
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subline {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    font-weight: 400;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Modules Grid Section */
.section-title-wrapper {
    margin-bottom: 4rem;
}

.section-tag {
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.module-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 2.5rem 2rem;
    transition: var(--transition-normal);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    border-top-left-radius: var(--border-radius-md);
    border-top-right-radius: var(--border-radius-md);
    transition: var(--transition-normal);
}

.module-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border-color: rgba(59, 130, 246, 0.2);
}

/* Modul-specific accent borders */
.module-card.ap1:hover::before { background: var(--gradient-accent); }
.module-card.ap2-ga1:hover::before { background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%); }
.module-card.ap2-ga2:hover::before { background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%); }
.module-card.wiso:hover::before { background: var(--gradient-success); }

.module-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    background-color: var(--color-bg);
}

.ap1 .module-icon { color: var(--color-accent); background-color: rgba(59, 130, 246, 0.1); }
.ap2-ga1 .module-icon { color: #a855f7; background-color: rgba(168, 85, 247, 0.1); }
.ap2-ga2 .module-icon { color: #ec4899; background-color: rgba(236, 72, 153, 0.1); }
.wiso .module-icon { color: var(--color-success); background-color: rgba(16, 185, 129, 0.1); }

.module-code {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.module-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.module-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.module-topics-list {
    margin-bottom: 2rem;
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
}

.module-topics-list li {
    font-size: 0.85rem;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.module-topics-list li::before {
    content: "✓";
    color: var(--color-success);
    font-weight: bold;
}

/* Features Section */
.features {
    background-color: var(--color-white);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
}

.feature-icon-wrapper {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-sm);
    background-color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--color-accent);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.feature-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   Footer Section Styling (Premium Dark Aesthetic)
   ========================================================================== */
footer {
    background: linear-gradient(180deg, #0b1120 0%, #0f172a 100%);
    color: #94a3b8;
    padding: 5rem 0 2.5rem 0;
    font-size: 0.9rem;
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.5) 50%, transparent 100%);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3.5rem;
    margin-bottom: 4rem;
}

.footer-brand h4 {
    color: var(--color-white);
    font-size: 1.35rem;
    margin-bottom: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-brand h4 i {
    color: var(--color-accent);
    background: rgba(59, 130, 246, 0.15);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.footer-brand p {
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #94a3b8;
}

.footer-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
}

.footer-status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.footer-col h5 {
    color: var(--color-white);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.85rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-links a i {
    font-size: 0.75rem;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.25s ease;
    color: var(--color-accent);
}

.footer-links a:hover {
    color: var(--color-white);
    transform: translateX(4px);
}

.footer-links a:hover i {
    opacity: 1;
    transform: translateX(0);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-bottom p {
    font-size: 0.82rem;
    color: #64748b;
}

.footer-legal-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-legal-links a {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

.footer-legal-links a:hover {
    color: var(--color-white);
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-2px);
}

/* ==========================================================================
   Legal Pages System (Impressum, Datenschutz, Nutzungsbedingungen)
   ========================================================================== */
.legal-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    padding: 5rem 0 3.5rem 0;
    position: relative;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    overflow: hidden;
}

.legal-hero::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.legal-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}

.legal-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.legal-hero h1 i {
    color: #60a5fa;
}

.legal-hero-sub {
    color: #94a3b8;
    font-size: 1.05rem;
    max-width: 650px;
    margin-bottom: 1.5rem;
}

.legal-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
}

.legal-breadcrumb a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.legal-breadcrumb a:hover {
    color: #60a5fa;
}

.legal-breadcrumb span {
    color: #475569;
}

.legal-body-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 5rem 1.5rem;
}

.legal-toc-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-md);
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.legal-toc-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.6rem;
}

.legal-toc-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--color-text-main);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.legal-toc-link:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--color-accent);
    transform: translateX(3px);
}

.legal-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-md);
    padding: 2.2rem;
    margin-bottom: 1.8rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.legal-card-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-accent);
    opacity: 0.8;
}

.legal-card-item:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.legal-card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.legal-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.legal-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
}

.legal-card-content {
    color: #334155;
    line-height: 1.8;
    font-size: 0.95rem;
}

.legal-card-content p {
    margin-bottom: 0.85rem;
}

.legal-card-content p:last-child {
    margin-bottom: 0;
}

.legal-card-content ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.legal-card-content li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.6rem;
}

.legal-card-content li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--color-success);
    font-size: 0.85rem;
}

.legal-highlight-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(16, 185, 129, 0.06) 100%);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-left: 4px solid var(--color-accent);
    border-radius: var(--border-radius-sm);
    padding: 1.2rem 1.6rem;
    margin: 1.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.legal-highlight-icon {
    font-size: 1.4rem;
    color: var(--color-accent);
    margin-top: 2px;
    flex-shrink: 0;
}

.legal-highlight-text {
    font-size: 0.95rem;
    color: #1e293b;
    line-height: 1.6;
}

.legal-address-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-sm);
    padding: 1.25rem 1.5rem;
    line-height: 1.8;
    margin-top: 1rem;
}

.legal-meta-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 4rem 0;
    }
    
    header {
        padding: 0.75rem 0;
    }
    
    .mobile-nav-toggle {
        display: block;
    }
    
    .mobile-only {
        display: block;
    }
    
    .nav-links {
        display: none; /* JS will toggle active class */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-primary);
        padding: 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: var(--shadow-lg);
        gap: 1rem;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        display: block;
        width: 100%;
        padding: 0.5rem 0;
    }
    
    .nav-actions {
        display: none; /* Hide desktop header action buttons on mobile */
    }

    .hero {
        padding: 6rem 0;
    }

    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero-subline {
        font-size: 1.1rem;
    }
    
    .hero-ctas {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-ctas .btn {
        width: 100%;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ==========================================================================
   Authentication & Form Styling
   ========================================================================== */
.auth-wrapper {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.auth-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

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

.auth-header p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control-wrapper {
    position: relative;
}

.form-control-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    color: var(--color-text-main);
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
    background-color: var(--color-white);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.auth-footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.auth-footer-links a {
    color: var(--color-accent);
    font-weight: 500;
}

.auth-footer-links a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.auth-redirect {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.auth-redirect a {
    color: var(--color-accent);
    font-weight: 600;
}

.auth-redirect a:hover {
    text-decoration: underline;
}

/* Alert Boxes */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
}

.alert-danger {
    background-color: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.alert-success {
    background-color: #ecfdf5;
    border-color: #6ee7b7;
    color: #047857;
}

.alert-info {
    background-color: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.alert-hidden {
    display: none;
}

/* ==========================================================================
   Dashboard styling
   ========================================================================== */
.dashboard-nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
}

@media (max-width: 768px) {
    .dashboard-nav-actions {
        gap: 0.5rem;
    }
    .user-profile-badge span {
        display: none;
    }
    .user-profile-badge {
        padding: 0.5rem;
        width: 38px;
        height: 38px;
        justify-content: center;
        border-radius: 50%;
    }
    .dashboard-nav-actions .btn span {
        display: none;
    }
    .dashboard-nav-actions .btn {
        padding: 0.5rem;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

.user-profile-badge i {
    color: var(--color-accent);
}

.dashboard-layout {
    padding: 3rem 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.stat-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-number.success {
    color: var(--color-success);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Weaknesses & Recommendations Card */
.recs-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.recs-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recs-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.rec-item {
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    background-color: var(--color-bg);
    border-left: 4px solid var(--color-accent);
}

.rec-item.low-score {
    border-left-color: #ef4444; /* Red indicator for weak topics */
    background-color: #fef2f2;
}

.rec-topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.rec-module-tag {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.05);
}

.rec-score {
    font-weight: 700;
    color: #ef4444;
}

.rec-description {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Tab Panels */
.tabs-navigation {
    display: flex;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 2rem;
    gap: 0.5rem;
    overflow-x: auto;
}

.tab-btn {
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.tab-btn:hover {
    color: var(--color-primary);
}

.tab-btn.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Exam Set Cards */
.exams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.exam-set-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.exam-set-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(59, 130, 246, 0.2);
}

.exam-set-card h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.exam-meta-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.exam-meta-info span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Dashboard Banner */
.welcome-banner {
    background: var(--gradient-hero);
    color: var(--color-white);
    padding: 2.5rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    right: -5%;
    top: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.welcome-banner h2 {
    color: var(--color-white);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.welcome-banner p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
    max-width: 600px;
}

/* ==========================================================================
   Exam Simulator & Result Page Styles
   ========================================================================== */
.exam-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 70px);
    background-color: var(--color-bg);
}

@media (max-width: 768px) {
    .exam-layout {
        grid-template-columns: 1fr;
    }
}

/* Simulator Sidebar */
.exam-sidebar {
    background-color: var(--color-white);
    border-right: 1px solid var(--color-border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

@media (max-width: 768px) {
    .exam-sidebar {
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding: 1.25rem;
        gap: 1rem;
    }
    
    .sidebar-task-list {
        flex-direction: row !important;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        width: 100%;
        gap: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .sidebar-task-btn {
        flex: 0 0 auto;
        padding: 0.65rem 1rem;
    }
}

.sidebar-task-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-task-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text-main);
    cursor: pointer;
    text-align: left;
    transition: var(--transition-fast);
}

.sidebar-task-btn:hover {
    border-color: var(--color-accent);
    background-color: rgba(59, 130, 246, 0.05);
}

.sidebar-task-btn.active {
    background: var(--gradient-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.task-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #cbd5e1; /* slate-300 */
}

.sidebar-task-btn.active .task-status-dot {
    background-color: var(--color-white);
}

.sidebar-task-btn.answered .task-status-dot {
    background-color: var(--color-success);
}

/* Exam Content */
.exam-main {
    padding: 2.5rem;
    overflow-y: auto;
    height: calc(100vh - 70px);
}

@media (max-width: 768px) {
    .exam-main {
        height: auto;
        padding: 1.5rem;
    }
}

.exam-content-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .exam-content-card {
        padding: 1.5rem;
    }
}

/* Subtask Styles */
.subtask-block {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.subtask-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.subtask-label {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-primary);
}

.points-badge {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--color-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Form inputs */
.multiple-choice-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mc-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.mc-option:hover {
    border-color: var(--color-accent);
    background-color: rgba(59, 130, 246, 0.02);
}

.mc-option input[type="radio"] {
    accent-color: var(--color-accent);
    width: 18px;
    height: 18px;
}

.sql-editor {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #334155;
    padding: 1rem;
    line-height: 1.5;
}

.sql-editor:focus {
    border-color: var(--color-accent);
    background-color: #0f172a;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* Sticky Timer Header */
.exam-sticky-header {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .exam-sticky-header {
        padding: 1rem 1.5rem;
    }
    .exam-sticky-header h2 {
        display: none;
    }
}

.timer-badge {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.timer-badge.warning {
    background-color: #ef4444;
    animation: flash 1s infinite alternate;
}

@keyframes flash {
    from { opacity: 1; }
    to { opacity: 0.6; }
}

/* Exam Navigation */
.exam-nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

/* Result styles */
.result-header {
    background: var(--gradient-hero);
    color: var(--color-white);
    padding: 4rem 0;
    text-align: center;
}

.result-header h1 {
    color: var(--color-white);
    font-size: 2.75rem;
    margin-bottom: 1rem;
}

.result-card-container {
    max-width: 800px;
    margin: -3rem auto 3rem auto;
    padding: 0 1.5rem;
}

.result-summary-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.result-percentage-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 8px solid var(--color-border);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.result-percentage-circle.passed {
    border-color: var(--color-success);
}

.result-percentage-circle.failed {
    border-color: #ef4444;
}

.result-percentage-val {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--color-primary);
}

.result-percentage-val.passed { color: var(--color-success); }
.result-percentage-val.failed { color: #ef4444; }

.feedback-details-block {
    background-color: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 1.25rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: left;
}

.feedback-details-block.correct {
    border-left: 4px solid var(--color-success);
}

.feedback-details-block.incorrect {
    border-left: 4px solid #ef4444;
}

.feedback-details-block.partial {
    border-left: 4px solid #f59e0b; /* Amber */
}

/* ==========================================================================
   Dashboard Accordion Styling
   ========================================================================== */
.accordion-item {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    background: var(--color-white);
    transition: all 0.2s ease;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.4rem;
    background: #f8fafc;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.accordion-header:hover {
    background: #f1f5f9;
}

.accordion-header.active {
    border-bottom: 1px solid var(--color-border);
    background: #ffffff;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
    color: var(--color-accent);
}

.accordion-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.accordion-body {
    padding: 1.25rem 1.4rem;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.3s ease;
    max-height: 3000px;
    opacity: 1;
    overflow: hidden;
}

.accordion-body.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* ==========================================================================
   Modern Interactive Module Card Pills (AP1 / AP2 Selector)
   ========================================================================== */
.module-card-pill {
    background: #f8fafc;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.module-card-pill:hover {
    border-color: rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: #ffffff;
}

.module-card-pill.active {
    background: #ffffff;
    border-color: var(--color-accent);
    box-shadow: 0 8px 25px -5px rgba(37, 99, 235, 0.2), 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.pill-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.pill-badge {
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pill-badge.badge-ap1 {
    background: rgba(37, 99, 235, 0.12);
    color: var(--color-accent);
}

.pill-badge.badge-ap2 {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
}

.pill-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.pill-body {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.pill-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.module-card-pill:hover .pill-icon-box {
    transform: scale(1.08);
}

.pill-icon-box.ap1-icon {
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-accent);
}

.pill-icon-box.ap2-icon {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
}

.pill-text h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

/* ==========================================================================
   Spacious Square-Style Button Navigation (No Scrollbar, Clean Fit)
   ========================================================================== */
.tabs-navigation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    background: transparent;
    padding: 0;
    border: none;
    overflow: visible;
}

.tab-btn {
    min-height: 90px;
    padding: 1.1rem 1.35rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-md);
    background: #f8fafc;
    color: var(--color-primary);
    cursor: pointer;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.4rem;
    text-align: left;
    box-shadow: var(--shadow-sm);
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
}

.tab-btn:hover {
    border-color: rgba(37, 99, 235, 0.4);
    background: #ffffff;
    color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tab-btn.active {
    background: #eff6ff !important;
    color: var(--color-accent) !important;
    font-weight: 700 !important;
    border: 2px solid var(--color-accent) !important;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15) !important;
}

.tab-btn-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-primary);
    width: 100%;
}

.tab-btn.active .tab-btn-header {
    color: var(--color-accent);
}

.tab-btn-subtitle {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    line-height: 1.4;
    width: 100%;
}

.tab-btn.active .tab-btn-subtitle {
    color: #1e40af;
}








