/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
}

/* Authentication Bar */
.auth-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.auth-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ffffff;
}

.auth-status #authMessage {
    font-weight: 500;
    color: #ffffff;
}

.sync-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
}

.sync-status::before {
    content: '●';
    font-size: 1.2rem;
}

.sync-status.synced::before {
    color: #10b981;
}

.sync-status.syncing::before {
    color: #f59e0b;
    animation: pulse 1.5s infinite;
}

.sync-status.error::before {
    color: #ef4444;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.auth-actions {
    display: flex;
    gap: 0.75rem;
}

.auth-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    color: #667eea;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.auth-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: #ffffff;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Adjust navbar position when auth bar is shown */
body.authenticated .navbar {
    top: 52px;
}

body.authenticated .hero {
    margin-top: 52px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    color: #10b981;
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-subtitle {
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 400;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #10b981;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #4b5563;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #10b981;
}

.stat-label {
    font-size: 0.9rem;
    color: #6b7280;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #10b981;
    color: white;
}

.btn-primary:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #10b981;
    border: 2px solid #10b981;
}

.btn-secondary:hover {
    background: #10b981;
    color: white;
}

.btn-outline {
    background: transparent;
    color: #6b7280;
    border: 2px solid #d1d5db;
}

.btn-outline:hover {
    border-color: #10b981;
    color: #10b981;
}

/* Progress Circle */
.hero-image {
    display: flex;
    justify-content: center;
}

.progress-circle {
    position: relative;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.35s;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-percent {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
}

.progress-label {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Program Overview */
.program-overview {
    padding: 80px 0;
    background: white;
}

.program-overview h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* Curriculum Section */
.curriculum {
    padding: 80px 0;
    background: #f8fafc;
}

.curriculum h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 3rem;
}

.curriculum-timeline {
    max-width: 800px;
    margin: 0 auto;
}

.week-module {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.week-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.week-number {
    background: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.week-header h3 {
    font-size: 1.5rem;
    color: #1f2937;
    flex: 1;
    margin-left: 1rem;
}

.week-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.progress-bar {
    width: 120px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.progress-fill {
    height: 100%;
    background: #10b981;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: #6b7280;
    white-space: nowrap;
    flex-shrink: 0;
}

.modules-list {
    display: grid;
    gap: 0.5rem;
}

.module-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer;
}

.module-item:hover {
    border-left-color: #10b981;
    background: #f0f9f4;
}

.module-item.completed {
    border-left-color: #10b981;
    background: #f0f9f4;
}

.module-title {
    font-weight: 500;
    color: #1f2937;
}

.module-status {
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.module-status:contains("Not Started") {
    background: #fef3c7;
    color: #92400e;
}

.module-status:contains("Completed") {
    background: #d1fae5;
    color: #065f46;
}

.module-status:contains("Locked") {
    background: #f3f4f6;
    color: #6b7280;
}

/* Progress Dashboard */
.progress-dashboard {
    padding: 80px 0;
    background: white;
}

.progress-dashboard h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 3rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.dashboard-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.dashboard-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.large-progress-circle {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.progress-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.progress-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.performance-stats {
    display: grid;
    gap: 1rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-value {
    font-weight: 600;
    color: #10b981;
}

.milestones-list {
    display: grid;
    gap: 1rem;
    text-align: left;
}

.milestone-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.milestone-icon {
    font-size: 1.5rem;
}

.milestone-content {
    display: flex;
    flex-direction: column;
}

.milestone-title {
    font-weight: 600;
    color: #1f2937;
}

.milestone-date {
    font-size: 0.9rem;
    color: #6b7280;
}

.recommendations {
    display: grid;
    gap: 1rem;
    text-align: left;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.rec-icon {
    font-size: 1.2rem;
}

/* Resources Section */
.resources {
    padding: 80px 0;
    background: #f8fafc;
}

.resources h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 3rem;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.resource-category {
    background: white;
    padding: 2rem;
    border-radius: 12px;
}

.resource-category h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.resource-list {
    display: grid;
    gap: 1rem;
}

.resource-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.resource-item:hover {
    background: #f0f9f4;
    border-left: 4px solid #10b981;
}

.resource-title {
    font-weight: 500;
    color: #1f2937;
}

.resource-meta {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Practice Exams */
.practice-exams {
    padding: 80px 0;
    background: white;
}

.practice-exams h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 3rem;
}

.exams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.exam-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.exam-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
}

.exam-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.exam-badge.available {
    background: #d1fae5;
    color: #065f46;
}

.exam-badge.locked {
    background: #f3f4f6;
    color: #6b7280;
}

.exam-details {
    margin-bottom: 2rem;
    text-align: left;
}

.exam-details p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.exam-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #4b5563;
}

.exam-btn {
    width: 100%;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #10b981;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #10b981;
}

.footer-domain {
    font-weight: 600;
    color: #10b981;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .week-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .week-header h3 {
        margin-left: 0;
        margin-bottom: 0;
    }
    
    .week-progress {
        width: 100%;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .exam-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .exams-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scale-in {
    transform: scale(0.8);
    opacity: 0;
    animation: scaleIn 0.4s ease forwards;
}

@keyframes scaleIn {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* Authentication Bar Styles */
.auth-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
    padding: 6px 12px;
    font-size: 0.8rem;
    background: #f5f7fa;
    border-bottom: 1px solid #e2e8f0;
}

[data-theme='dark'] .auth-bar {
    background: #1f2937;
    border-color: #374151;
}

.auth-status-ok {
    color: #16a34a;
    font-weight: 600;
}

.auth-status-warn {
    color: #d97706;
    font-weight: 600;
}

.sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    display: inline-block;
    margin-right: 4px;
}

.sync-dot.off {
    background: #9ca3af;
}

button.auth-btn {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #64748b;
    background: #fff;
    cursor: pointer;
}

[data-theme='dark'] button.auth-btn {
    background: #334155;
    color: #f1f5f9;
    border-color: #475569;
}

button.auth-btn:hover {
    background: #e2e8f0;
}

[data-theme='dark'] button.auth-btn:hover {
    background: #1e293b;
}

/* Adjust navbar to sit below auth bar */
.navbar {
    top: 32px !important;
}

/* Adjust hero section to account for both bars */
.hero {
    margin-top: 100px !important;
}

/* Utility classes for replacing inline styles */
.module-status-completed {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

.module-status-in-progress {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.module-status-available {
    background: #dbeafe !important;
    color: #1e40af !important;
}

.module-status-locked {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
}

/* Progress fill widths */
.progress-width-0 { width: 0% !important; }
.progress-width-25 { width: 25% !important; }
.progress-width-50 { width: 50% !important; }
.progress-width-75 { width: 75% !important; }
.progress-width-100 { width: 100% !important; }

/* Dynamic progress class - will be set via data attribute */
.progress-fill {
    width: var(--progress-width, 0%);
}

/* Circle progress - stroke styles */
.progress-ring-fill {
    stroke-dasharray: var(--stroke-dasharray, 603.186);
    stroke-dashoffset: var(--stroke-dashoffset, 603.186);
    transition: stroke-dashoffset 0.5s ease;
}

#overall-progress {
    stroke-dasharray: var(--stroke-dasharray, 339.292);
    stroke-dashoffset: var(--stroke-dashoffset, 339.292);
    transition: stroke-dashoffset 0.5s ease;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6b7280;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Message notification styles */
.message {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.message-success {
    border-left: 4px solid #10b981;
}

.message-error {
    border-left: 4px solid #ef4444;
}

.message-info {
    border-left: 4px solid #3b82f6;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Achievement notification styles */
.achievement-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: achievementPop 0.5s ease forwards;
    max-width: 400px;
}

.achievement-icon {
    font-size: 3rem;
    animation: bounce 1s ease infinite;
}

.achievement-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.achievement-content p {
    margin: 0;
    opacity: 0.9;
}

@keyframes achievementPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}