:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.5);
    --secondary: #818cf8;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #f43f5e;
    --success: #10b981;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.hidden { display: none !important; }
.active { display: block; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.text-center { text-align: center; }
.text-left { text-align: left; }

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: rgba(30, 41, 59, 0.9);
    border-bottom: 1px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

/* Progress Bar */
#progress-container {
    width: 100%;
    height: 5px;
    background: var(--bg-card);
    position: sticky;
    top: 60px;
    z-index: 99;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

/* Sections & Containers */
main {
    padding: 20px 5%;
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.content-box {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5), 0 0 15px var(--primary-glow);
    border: 1px solid rgba(56, 189, 248, 0.2);
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Login UI */
.login-container {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 0 30px var(--primary-glow);
}

.glow-text {
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
    margin-bottom: 10px;
}

.tabs { display: flex; margin: 20px 0; border-radius: 8px; overflow: hidden; }
.tab-btn {
    flex: 1; padding: 10px; border: none; background: #334155; color: var(--text-muted); cursor: pointer; font-weight: 600;
}
.tab-btn.active { background: var(--primary); color: #fff; }

.form-group input, .form-group textarea {
    width: 100%; padding: 12px; margin-bottom: 15px; border-radius: 8px;
    border: 1px solid #334155; background: #0f172a; color: white;
}
.form-group input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 8px var(--primary-glow); }

.password-wrapper { position: relative; }
.toggle-password {
    position: absolute; right: 10px; top: 12px; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-muted);
}

/* Buttons */
.btn-primary, .btn-outline {
    padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; border: none;
}
.btn-primary { background: var(--primary); color: #000; }
.btn-primary:hover { box-shadow: 0 0 15px var(--primary-glow); background: #7dd3fc; }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #000; }

.navigation-buttons { display: flex; justify-content: space-between; margin-top: 20px; }

/* Interactive Simulation Elements */
.sim-box { background: #0f172a; padding: 20px; border-radius: 10px; border: 1px dashed var(--primary); margin-bottom: 15px; }
.draggable-item {
    display: inline-block; padding: 10px 15px; margin: 5px; background: var(--secondary); color: #fff; border-radius: 5px; cursor: pointer;
}
.drop-zone { min-height: 50px; border: 2px solid var(--primary); border-radius: 5px; margin-top: 10px; padding: 10px; display: flex; gap: 10px; }

canvas { background: #000; border: 1px solid var(--primary); border-radius: 8px; width: 100%; max-width: 400px; }

/* Quizzes & Tables */
.quiz-item { margin-bottom: 20px; background: rgba(255,255,255,0.05); padding: 15px; border-radius: 8px; }
.quiz-item label { display: block; margin: 8px 0; cursor: pointer; }
.quiz-item input[type="radio"] { margin-right: 10px; }

.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #334155; }
th { background: rgba(56, 189, 248, 0.1); color: var(--primary); }

.score-display { font-size: 3rem; margin: 10px 0; }

/* Responsive */
@media (max-width: 768px) {
    .navigation-buttons { flex-direction: column; gap: 10px; }
    .navigation-buttons button { width: 100%; }
}