/*
Theme Name: OrthoLearn
Theme URI: #
Author: System
Description: Premium Custom Theme for Orthopedic Surgery LMS
Version: 1.0.0
Text Domain: ortholearn
*/

:root {
    /* Primary Colors */
    --bg-main: #0B0E14; /* Slightly deeper richer background */
    --bg-card: #151A28; /* Richer card background */
    --bg-secondary: #0F172A;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 180, 216, 0.5);
    
    /* Accent Colors */
    --accent-blue: #0077B6;
    --accent-teal: #00B4D8;
    --accent-cyan: #00D9FF;
    --accent-gradient: linear-gradient(135deg, var(--accent-blue), var(--accent-teal), var(--accent-cyan));
    
    /* Text */
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    
    /* Semantic */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --ai-purple: #8B5CF6;
    --ai-gradient: linear-gradient(135deg, #8B5CF6, #00D9FF);
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* Shadows & Effects */
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.2), 0 4px 6px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.3), 0 10px 10px -5px rgba(0,0,0,0.2);
    --shadow-glow: 0 0 20px rgba(0, 180, 216, 0.3);
    --shadow-glow-ai: 0 0 25px rgba(139, 92, 246, 0.4);
    
    /* Layout */
    --container-max: 1280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

a {
    color: var(--accent-teal);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: var(--accent-cyan);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    width: 100%;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 15px rgba(0, 180, 216, 0.2);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 180, 216, 0.5);
    }
    100% {
        box-shadow: 0 0 15px rgba(0, 180, 216, 0.2);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: 1px solid transparent;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

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

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary) !important;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-teal);
    color: var(--accent-teal) !important;
    transform: translateY(-2px);
}

.btn-ai {
    background: var(--bg-card);
    border: 1px solid rgba(139, 92, 246, 0.5);
    color: #fff !important;
    position: relative;
}

.btn-ai::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--ai-gradient);
    opacity: 0.15;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-ai:hover {
    transform: translateY(-2px);
    border-color: var(--ai-purple);
    box-shadow: var(--shadow-glow-ai);
}

.btn-ai:hover::before {
    opacity: 0.3;
}

/* Header */
.site-header {
    background: rgba(11, 14, 20, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-md) 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 26px;
    margin: 0;
    letter-spacing: -0.5px;
}

.site-title a {
    color: var(--text-primary);
}

.site-title span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    margin: 0;
}

.main-navigation a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    position: relative;
    padding-bottom: 4px;
}

.main-navigation a:hover {
    color: var(--text-primary);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.main-navigation a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.header-actions {
    display: flex;
    gap: var(--space-md);
}

.header-actions .btn {
    padding: 10px 20px;
    font-size: 14px;
}

/* Main Content Area */
.site-main {
    padding-top: 100px;
    min-height: calc(100vh - 300px);
}

/* Hero Section */
.hero-section {
    padding: var(--space-4xl) 0 var(--space-3xl);
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: -1;
    background: radial-gradient(circle at top right, rgba(0, 119, 182, 0.08), transparent 40%),
                radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.08), transparent 40%);
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 180, 216, 0.1) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(40px);
    z-index: -1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 30px;
    color: #D8B4FE;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--space-xl);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.hero-title {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-lg);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.1;
}

.hero-title span.highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(18px, 2vw, 22px);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto var(--space-2xl);
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Grid */
.features-section {
    padding: var(--space-3xl) 0;
    position: relative;
}

.section-head {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-size: 36px;
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
}

.course-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: var(--space-xl);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.course-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(0, 180, 216, 0.1);
}

.course-card:hover::before {
    transform: scaleX(1);
}

.card-badges {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge.ai-badge {
    background: rgba(139, 92, 246, 0.15);
    color: #D8B4FE;
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.course-card h3 {
    font-size: 22px;
    margin-bottom: var(--space-sm);
}

.course-card p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: var(--space-lg);
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.rating {
    color: var(--warning);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.review-count {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 13px;
}

.price {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    margin-top: var(--space-md);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: loading 2s infinite;
}

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

/* Footer */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-3xl) 0 var(--space-lg);
    margin-top: var(--space-4xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-3xl);
}

.footer-widget h4 {
    font-size: 18px;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.footer-widget p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    max-width: 300px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: var(--space-sm);
}

.footer-widget a {
    color: var(--text-secondary);
}

.footer-widget a:hover {
    color: var(--accent-cyan);
}

.site-info {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .site-title {
        font-size: 20px;
    }
    .main-navigation {
        display: none;
    }
    .hero-title {
        font-size: 40px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
/* ==========================================================================
   Phase 12: Quiz Master Premium UI
   ========================================================================== */

.quiz-master-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 9999;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quiz-master-header {
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.quiz-timer-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 40px;
    border: 1px solid rgba(0, 180, 216, 0.3);
}

.quiz-timer-pulse {
    width: 12px;
    height: 12px;
    background: var(--accent-teal);
    border-radius: 50%;
    animation: quiz-pulse 1.5s infinite;
}

@keyframes quiz-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.4); }
    70% { transform: scale(1.2); box-shadow: 0 0 0 10px rgba(0, 180, 216, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 180, 216, 0); }
}

.quiz-card {
    background: rgba(20, 40, 50, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 50px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.quiz-question h2 {
    font-size: 1.8rem;
    line-height: 1.4;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.quiz-options {
    display: grid;
    gap: 15px;
}

.quiz-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.quiz-option:hover {
    background: rgba(0, 180, 216, 0.05);
    border-color: var(--accent-teal);
    transform: translateX(10px);
}

.quiz-option.selected {
    background: var(--accent-teal);
    color: var(--bg-dark);
    font-weight: 700;
}

.quiz-xp-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.quiz-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-teal));
    width: 0%;
    transition: width 1s ease-out;
}

.surgical-precision-score {
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 0.75rem;
    color: var(--accent-teal);
    font-weight: 800;
    letter-spacing: 1px;
}

/* Gamification & Leaderboard */
.surgical-leaderboard {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(15px);
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.surgical-leaderboard:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 180, 216, 0.1);
}
.leaderboard-item {
    transition: 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.leaderboard-item:hover {
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--accent-blue);
}

/* Badge System */
.badge-unlocked {
    animation: badgePulse 2s infinite;
}
@keyframes badgePulse {
    0% { filter: drop-shadow(0 0 0px var(--accent-teal)); }
    50% { filter: drop-shadow(0 0 10px var(--accent-teal)); }
    100% { filter: drop-shadow(0 0 0px var(--accent-teal)); }
}

/* Clinical Modals */
.clinical-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.clinical-modal-content {
    background: rgba(15, 25, 30, 0.95);
    border: 1px solid rgba(0, 180, 216, 0.3);
    max-width: 600px;
    width: 100%;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.modal-header h3 { font-size: 1.5rem; color: var(--accent-teal); margin: 0; }
.btn-close { background: none; border: none; color: #fff; cursor: pointer; font-size: 1.2rem; transition: 0.3s; }
.btn-close:hover { color: var(--accent-blue); transform: rotate(90deg); }
.modal-body-text { font-size: 1.1rem; line-height: 1.6; color: var(--text-primary); }
