/* ROOT VARIABLES - Cyberpunk Theme */
:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --primary-cyan: #06b6d4;
    --primary-indigo: #6366f1;
    --accent-pink: #ec4899;
    --success: #10b981;
    --danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(6, 182, 212, 0.2);
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* RESET & BASE */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background-color: var(--bg-darker);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.15), transparent 25%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    line-height: 1.6;
}

h1, h2, h3, h4 { font-family: var(--font-heading); }
.glow-text {
    color: var(--primary-cyan);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
}

/* UTILITIES */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.w-100 { width: 100%; }

/* BUTTONS */
button {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-indigo));
    color: white;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}
.btn-primary:hover { box-shadow: 0 0 20px rgba(6, 182, 212, 0.6); transform: translateY(-2px); }
.btn-secondary { background: #334155; color: white; border: 1px solid #475569; }
.btn-secondary:hover { background: #475569; }
.btn-danger { background: rgba(239, 68, 68, 0.2); border: 1px solid var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }
.btn-success { background: rgba(16, 185, 129, 0.2); border: 1px solid var(--success); color: var(--success); }
.btn-success:hover { background: var(--success); color: white; }

/* AUTH SCREEN */
.auth-container {
    max-width: 450px;
    margin: 80px auto;
    animation: fadeIn 0.8s ease-out;
}
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header h1 { font-size: 3rem; margin-bottom: 0.5rem; }
.auth-header h1 span { color: var(--primary-indigo); }
.auth-tabs { display: flex; border-bottom: 2px solid #334155; margin-bottom: 2rem; }
.auth-tab {
    flex: 1; background: transparent; color: var(--text-muted); font-size: 1.2rem;
    padding: 10px; border-radius: 0; box-shadow: none;
}
.auth-tab.active { color: var(--primary-cyan); border-bottom: 2px solid var(--primary-cyan); transform: translateY(2px); }
.auth-form { display: none; flex-direction: column; gap: 15px; }
.auth-form.active { display: flex; animation: slideUp 0.4s ease; }
.input-group { position: relative; }
.input-group i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.input-group i.toggle-password { left: auto; right: 15px; cursor: pointer; }
.input-group input {
    width: 100%; padding: 12px 40px; background: rgba(0,0,0,0.3); border: 1px solid #334155;
    border-radius: 6px; color: white; font-family: var(--font-body); font-size: 1rem;
    transition: border 0.3s;
}
.input-group input:focus { outline: none; border-color: var(--primary-cyan); box-shadow: 0 0 8px rgba(6, 182, 212, 0.3); }

/* MAIN APP LAYOUT */
.app-layout { display: flex; min-height: 100vh; }
.sidebar { width: 280px; border-radius: 0; border-right: 1px solid var(--glass-border); display: flex; flex-direction: column; }
.sidebar-brand { font-size: 2rem; text-align: center; font-family: var(--font-heading); padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.user-profile { padding: 20px 0; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--primary-indigo); display: flex; justify-content: center; align-items: center; font-size: 1.5rem; }
.user-info h3 { font-size: 1.1rem; font-family: var(--font-body); margin-bottom: 5px; }
.badge { font-size: 0.8rem; padding: 3px 8px; border-radius: 12px; background: rgba(6,182,212,0.2); color: var(--primary-cyan); border: 1px solid var(--primary-cyan); }
.sidebar-nav { flex: 1; padding: 20px 0; display: flex; flex-direction: column; gap: 10px; }
.nav-item {
    padding: 12px 20px; background: transparent; color: var(--text-muted); text-align: left;
    display: flex; align-items: center; gap: 15px; font-family: var(--font-body); font-size: 1rem; font-weight: normal; border-radius: 8px;
}
.nav-item:hover, .nav-item.active { background: rgba(6, 182, 212, 0.1); color: var(--primary-cyan); }
.nav-item i { width: 20px; text-align: center; }
.sidebar-footer { padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); }

/* CONTENT AREA */
.content-area { flex: 1; padding: 40px; height: 100vh; overflow-y: auto; }
.content-section { display: none; animation: fadeIn 0.5s ease; }
.content-section.active { display: block; }
.section-title { font-size: 2.2rem; border-bottom: 2px solid var(--primary-cyan); display: inline-block; padding-bottom: 5px; margin-bottom: 25px; }
.hero-card { text-align: center; padding: 60px 30px; }
.hero-card h1 { font-size: 3rem; margin-bottom: 20px; }
.hero-card p { font-size: 1.2rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* MATERIAL CARDS */
.material-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 25px; }
.material-card h3 { color: var(--primary-cyan); font-size: 1.5rem; margin-bottom: 15px; border-bottom: 1px dashed rgba(255,255,255,0.2); padding-bottom: 10px; }
.material-card p { margin-bottom: 15px; text-align: justify; }

/* DRAG AND DROP GAME */
.game-container { display: flex; flex-direction: column; gap: 30px; margin: 30px 0; }
.drag-zone, .drop-zone {
    display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; min-height: 80px; padding: 20px;
    background: rgba(0,0,0,0.3); border: 2px dashed #475569; border-radius: 12px;
}
.drop-zone { border-color: var(--primary-indigo); background: rgba(99, 102, 241, 0.05); }
.drag-item {
    width: 60px; height: 60px; background: var(--primary-cyan); color: white; display: flex;
    justify-content: center; align-items: center; font-size: 1.5rem; font-weight: bold; font-family: var(--font-heading);
    border-radius: 8px; cursor: grab; box-shadow: 0 4px 10px rgba(6,182,212,0.4);
}
.drag-item:active { cursor: grabbing; transform: scale(0.95); }
.game-feedback { font-size: 1.2rem; font-weight: bold; margin-top: 15px; }

/* QUIZ STYLES */
.warning-text { color: var(--accent-pink); background: rgba(236, 72, 153, 0.1); padding: 15px; border-radius: 8px; border-left: 4px solid var(--accent-pink); margin-bottom: 20px; }
.quiz-item { background: rgba(0,0,0,0.2); padding: 20px; border-radius: 8px; margin-bottom: 20px; border: 1px solid #334155; }
.quiz-question { font-size: 1.1rem; margin-bottom: 15px; font-weight: 600; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
    display: flex; align-items: center; gap: 12px; padding: 12px; background: rgba(255,255,255,0.05);
    border: 1px solid #334155; border-radius: 6px; cursor: pointer; transition: all 0.2s;
}
.quiz-option:hover { background: rgba(6, 182, 212, 0.1); border-color: var(--primary-cyan); }
.quiz-option input[type="radio"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary-cyan); }
.btn-submit-quiz { width: 100%; font-size: 1.2rem; padding: 15px; margin-top: 20px; }

.lock-icon { font-size: 5rem; color: var(--success); margin-bottom: 20px; text-shadow: 0 0 20px rgba(16,185,129,0.5); }
.score-display { font-size: 4rem; font-family: var(--font-heading); font-weight: bold; color: var(--primary-cyan); margin: 20px 0; }
.info-text { color: var(--text-muted); font-size: 0.9rem; max-width: 500px; margin: 0 auto; }

/* DASHBOARD TABLE */
.dashboard-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.table-responsive { overflow-x: auto; }
.cyber-table { width: 100%; border-collapse: collapse; text-align: left; }
.cyber-table th, .cyber-table td { padding: 15px; border-bottom: 1px solid #334155; }
.cyber-table th { background: rgba(0,0,0,0.5); font-family: var(--font-heading); font-size: 1.1rem; color: var(--primary-cyan); letter-spacing: 1px; }
.cyber-table tr:hover { background: rgba(255,255,255,0.02); }
.status-badge { padding: 5px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: bold; }
.status-done { background: rgba(16,185,129,0.2); color: var(--success); border: 1px solid var(--success); }
.action-btns { display: flex; gap: 8px; }
.btn-sm { padding: 6px 12px; font-size: 0.9rem; }

/* MODAL */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); z-index: 1000;
    justify-content: center; align-items: center; padding: 20px;
}
.modal-content { max-width: 800px; width: 100%; max-height: 90vh; display: flex; flex-direction: column; animation: scaleIn 0.3s ease; }
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #334155; padding-bottom: 15px; margin-bottom: 20px; }
.close-modal { background: none; color: var(--text-main); font-size: 1.5rem; padding: 0; }
.close-modal:hover { color: var(--danger); transform: none; }
.modal-body { overflow-y: auto; padding-right: 10px; }
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--primary-cyan); border-radius: 4px; }

/* REFLECTION ITEMS */
.reflection-item { margin-bottom: 25px; padding: 15px; border-radius: 8px; background: rgba(0,0,0,0.3); border-left: 4px solid #334155; }
.reflection-item.benar { border-color: var(--success); }
.reflection-item.salah { border-color: var(--danger); }
.ref-q { font-weight: bold; margin-bottom: 10px; }
.ref-a { display: flex; flex-direction: column; gap: 5px; font-size: 0.95rem; margin-bottom: 10px; }
.ref-ans-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.85rem; font-weight: bold; margin-right: 10px; }
.badge-benar { background: rgba(16,185,129,0.2); color: var(--success); }
.badge-salah { background: rgba(239,68,68,0.2); color: var(--danger); }
.ref-exp { background: rgba(99,102,241,0.1); padding: 10px; border-radius: 6px; font-size: 0.9rem; border-left: 3px solid var(--primary-indigo); }

/* ANIMATIONS & RESPONSIVE */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 768px) {
    .app-layout { flex-direction: column; }
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--glass-border); padding: 15px; }
    .sidebar-nav { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 5px; }
    .nav-item { padding: 8px 12px; font-size: 0.9rem; }
    .nav-item span { display: none; /* Hide text on mobile nav, icons only */ }
    .content-area { padding: 20px; height: auto; }
}