:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #3b82f6;
    --accent: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --gradient-main: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 20%);
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 40px 0;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    max-width: 600px;
    margin: 0 auto 60px;
}

/* Cards */
.level-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

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

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.card h2 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.card p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1rem;
}

.cta-btn {
    background: var(--gradient-main);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.cta-btn:hover {
    opacity: 0.9;
}

/* Dashboard & Topics (Dynamic Content) */
.dashboard-header {
    margin-bottom: 30px;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 1rem;
}

.back-btn:hover {
    color: var(--text-main);
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.topic-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.topic-card:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
}

.topic-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.topic-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Lesson View */
.lesson-container {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--glass-border);
}

.lesson-content {
    line-height: 1.8;
    color: #cbd5e1;
}

.lesson-content h2 {
    color: var(--text-main);
    margin: 30px 0 15px;
}

.lesson-content p {
    margin-bottom: 20px;
}

.lesson-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.lesson-content li {
    margin-bottom: 10px;
}

.interactive-demo {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
    text-align: center;
    border: 1px dashed var(--text-muted);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

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

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

/* Coming Soon Card Style */
.card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.8);
    position: relative;
}

.card.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--glass-border);
}

.card.disabled::after {
    content: "Coming Soon";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.2rem;
    white-space: nowrap;
}

/* Quiz Styles */
.quiz-container {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--glass-border);
    max-width: 800px;
    margin: 0 auto;
}

.question-card {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
}

.question-card:last-child {
    border-bottom: none;
}

.question-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

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

.option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 15px 20px;
    border-radius: 12px;
    text-align: left;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.option-btn.selected {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
    color: white;
}

.option-btn.correct {
    background: rgba(74, 222, 128, 0.2) !important;
    border-color: #4ade80 !important;
    color: #4ade80 !important;
}

.option-btn.wrong {
    background: rgba(248, 113, 113, 0.2) !important;
    border-color: #f87171 !important;
    color: #f87171 !important;
}

.quiz-score {
    text-align: center;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.topic-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.topic-card:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
}

.topic-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.topic-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Lesson View */
.lesson-container {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--glass-border);
}

.lesson-content {
    line-height: 1.8;
    color: #cbd5e1;
}

.lesson-content h2 {
    color: var(--text-main);
    margin: 30px 0 15px;
}

.lesson-content p {
    margin-bottom: 20px;
}

.lesson-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.lesson-content li {
    margin-bottom: 10px;
}

.interactive-demo {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
    text-align: center;
    border: 1px dashed var(--text-muted);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

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

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

/* Coming Soon Card Style */
.card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.8);
    position: relative;
}

.card.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--glass-border);
}

.card.disabled::after {
    content: "Coming Soon";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.2rem;
    white-space: nowrap;
}

/* Quiz Styles */
.quiz-container {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--glass-border);
    max-width: 800px;
    margin: 0 auto;
}

.question-card {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
}

.question-card:last-child {
    border-bottom: none;
}

.question-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

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

.option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 15px 20px;
    border-radius: 12px;
    text-align: left;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.option-btn.selected {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
    color: white;
}

.option-btn.correct {
    background: rgba(74, 222, 128, 0.2) !important;
    border-color: #4ade80 !important;
    color: #4ade80 !important;
}

.option-btn.wrong {
    background: rgba(248, 113, 113, 0.2) !important;
    border-color: #f87171 !important;
    color: #f87171 !important;
}

.quiz-score {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.quiz-feedback {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Footer Styles */
.app-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--glass-border);
    padding: 20px;
    text-align: center;
    margin-top: 60px;
    backdrop-filter: blur(10px);
}

.app-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.app-footer strong {
    color: var(--text-main);
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Auth Styles */
.auth-container {
    max-width: 400px;
    margin: 40px auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    text-align: center;
}

.auth-header {
    margin-bottom: 30px;
}

.auth-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.auth-btn {
    width: 100%;
    margin-top: 10px;
}

.auth-toggle {
    margin-top: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.question-card:last-child {
    border-bottom: none;
}

.question-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

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

.option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 15px 20px;
    border-radius: 12px;
    text-align: left;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.option-btn.selected {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
    color: white;
}

.option-btn.correct {
    background: rgba(74, 222, 128, 0.2) !important;
    border-color: #4ade80 !important;
    color: #4ade80 !important;
}

.option-btn.wrong {
    background: rgba(248, 113, 113, 0.2) !important;
    border-color: #f87171 !important;
    color: #f87171 !important;
}

.quiz-score {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.quiz-feedback {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Footer Styles */
.app-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--glass-border);
    padding: 20px;
    text-align: center;
    margin-top: 60px;
    backdrop-filter: blur(10px);
}

.app-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.app-footer strong {
    color: var(--text-main);
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Auth Styles */
.auth-container {
    max-width: 400px;
    margin: 40px auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    text-align: center;
}

.auth-header {
    margin-bottom: 30px;
}

.auth-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.auth-btn {
    width: 100%;
    margin-top: 10px;
}

.auth-toggle {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-toggle a {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}

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

.error-msg {
    color: #f87171;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: none;
}

.success-msg {
    color: #4ade80;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: none;
}

/* Update Notification */
.update-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--primary);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    display: none;
    /* Hidden by default */
    animation: slideIn 0.3s ease-out;
    max-width: 300px;
}

.update-notification.show {
    display: block;
}

.update-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.update-text {
    font-size: 0.95rem;
    color: var(--text-main);
}

.update-buttons {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.update-btn {
    background: var(--gradient-main);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    flex: 1;
}

.dismiss-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
}

.dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}

@keyframes slideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-btn:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.user-greeting {
    color: var(--text-main);
    font-weight: 600;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    font-size: 0.95rem;
}

.user-greeting i {
    margin-right: 8px;
    color: var(--accent);
}

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

    /* Mobile Navbar Adjustments */
    .navbar {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    .user-greeting {
        width: 100%;
        justify-content: center;
        font-size: 0.9rem;
        padding: 10px 16px;
    }

    .nav-btn {
        font-size: 0.85rem;
        padding: 8px 12px;
        flex: 1;
        min-width: 80px;
    }

    .nav-btn i {
        display: none;
        /* Hide icons on mobile to save space */
    }

    .logo {
        font-size: 1.3rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
    }

    .check-update-btn {
        width: 100%;
    }
}

/* Footer Content Layout */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer-info p {
    margin: 0;
}

#version-display {
    font-weight: 600;
    color: var(--accent);
}

/* Check Update Button */
.check-update-btn {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--accent);
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    white-space: nowrap;
}

.check-update-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.check-update-btn:active {
    transform: translateY(0);
}

.check-update-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.check-update-btn i {
    font-size: 1rem;
}

/* Update Notification Popup */
.update-notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: bottom 0.4s ease-out;
    min-width: 320px;
}

.update-notification.show {
    bottom: 30px;
}

.update-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.update-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
    text-align: center;
}

.update-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

.update-btn,
.dismiss-btn {
    flex: 1;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.update-btn {
    background: var(--gradient-main);
    color: white;
}

.update-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.dismiss-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

.dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

/* Success color variable */
:root {
    --success: #10b981;
}