/* ============================================================
   TTTC Network - Cybersecurity Theme
   Color Palette: Black #0a0a0a, Red #e63946, Green #00ff88, Cyan #00d4ff
   ============================================================ */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111118;
  --bg-card: #161622;
  --bg-hover: #1e1e2e;
  --color-red: #e63946;
  --color-red-dark: #c1121f;
  --color-green: #00ff88;
  --color-green-dark: #00c96d;
  --color-cyan: #00d4ff;
  --color-yellow: #ffd60a;
  --color-purple: #7b2fbe;
  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --text-muted: #555566;
  --border-color: #1e1e3a;
  --border-glow-red: rgba(230, 57, 70, 0.3);
  --border-glow-green: rgba(0, 255, 136, 0.3);
  --border-glow-cyan: rgba(0, 212, 255, 0.3);
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --font-sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.6);
  --transition: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================================ SCROLLBAR */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-red);
  border-radius: 3px;
}

/* ============================================================ TYPOGRAPHY */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.3;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
}

code,
pre {
  font-family: var(--font-mono);
}

a {
  color: var(--color-cyan);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-green);
}

/* ============================================================ NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.navbar-brand .logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}

.navbar-brand span {
  color: var(--color-red);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto 0 2rem;
  list-style: none;
}

.navbar-nav .nav-link {
  padding: 6px 14px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.navbar-nav .nav-link.active {
  color: var(--color-green);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.notif-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.2rem;
  padding: 6px;
  transition: var(--transition);
}

.notif-btn:hover {
  color: var(--color-yellow);
}

.notif-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--color-red);
  color: white;
  font-size: 0.6rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.4rem;
}

/* ============================================================ BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-red), #c1121f);
  color: white;
  box-shadow: 0 0 20px var(--border-glow-red);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ff4757, var(--color-red));
  transform: translateY(-1px);
  box-shadow: 0 0 30px var(--border-glow-red);
}

.btn-success {
  background: linear-gradient(135deg, var(--color-green-dark), #009e56);
  color: #000;
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px var(--border-glow-green);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--color-cyan);
  color: var(--color-cyan);
}

.btn-cyber {
  background: transparent;
  border: 1px solid var(--color-cyan);
  color: var(--color-cyan);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.btn-cyber:hover {
  background: rgba(0, 212, 255, 0.1);
  box-shadow: 0 0 20px var(--border-glow-cyan);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ============================================================ CARDS */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.card:hover {
  border-color: rgba(230, 57, 70, 0.2);
}

.card-danger {
  border-left: 3px solid var(--color-red);
}

.card-success {
  border-left: 3px solid var(--color-green);
}

.card-info {
  border-left: 3px solid var(--color-cyan);
}

.card-warning {
  border-left: 3px solid var(--color-yellow);
}

/* ============================================================ BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-red {
  background: rgba(230, 57, 70, 0.15);
  color: var(--color-red);
  border: 1px solid rgba(230, 57, 70, 0.3);
}

.badge-green {
  background: rgba(0, 255, 136, 0.1);
  color: var(--color-green);
  border: 1px solid rgba(0, 255, 136, 0.2);
}

.badge-cyan {
  background: rgba(0, 212, 255, 0.1);
  color: var(--color-cyan);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.badge-yellow {
  background: rgba(255, 214, 10, 0.1);
  color: var(--color-yellow);
  border: 1px solid rgba(255, 214, 10, 0.2);
}

.badge-purple {
  background: rgba(123, 47, 190, 0.15);
  color: #b06aff;
  border: 1px solid rgba(123, 47, 190, 0.3);
}

/* Difficulty badges */
.badge-beginner {
  background: rgba(0, 255, 136, 0.1);
  color: var(--color-green);
}

.badge-intermediate {
  background: rgba(255, 214, 10, 0.1);
  color: var(--color-yellow);
}

.badge-advanced {
  background: rgba(230, 57, 70, 0.15);
  color: var(--color-red);
}

.badge-expert {
  background: rgba(123, 47, 190, 0.15);
  color: #b06aff;
}

/* ============================================================ FORMS */
.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-error {
  color: var(--color-red);
  font-size: 0.8rem;
  margin-top: 4px;
}

/* ============================================================ HERO SECTION */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(230, 57, 70, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(0, 255, 136, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  max-width: 700px;
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(230, 57, 70, 0.1);
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: 100px;
  color: var(--color-red);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
}

.hero-title {
  margin-bottom: 1.5rem;
}

.hero-title .accent {
  color: var(--color-red);
}

.hero-title .accent-green {
  color: var(--color-green);
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 550px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-visual {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  opacity: 0.7;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  min-width: 120px;
}

.stat-card .stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.stat-card .stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================ SECTION */
.section {
  padding: 5rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  margin-bottom: 0.8rem;
}

.section-subtitle {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0.8rem auto 0;
}

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

/* ============================================================ GRID */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ============================================================ FEATURE CARDS */
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-color, var(--color-red)), transparent);
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--border-color);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card.red {
  --accent-color: var(--color-red);
}

.feature-card.green {
  --accent-color: var(--color-green);
}

.feature-card.cyan {
  --accent-color: var(--color-cyan);
}

.feature-card.yellow {
  --accent-color: var(--color-yellow);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}

.feature-icon.red {
  background: rgba(230, 57, 70, 0.15);
}

.feature-icon.green {
  background: rgba(0, 255, 136, 0.1);
}

.feature-icon.cyan {
  background: rgba(0, 212, 255, 0.1);
}

.feature-icon.yellow {
  background: rgba(255, 214, 10, 0.1);
}

.feature-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ============================================================ LAB CARDS */
.lab-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
  cursor: pointer;
}

.lab-card:hover {
  border-color: var(--color-red);
  box-shadow: 0 0 30px rgba(230, 57, 70, 0.1);
}

.lab-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

.lab-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.lab-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lab-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cvss-score {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.cvss-critical {
  background: rgba(230, 57, 70, 0.2);
  color: var(--color-red);
}

.cvss-high {
  background: rgba(255, 100, 0, 0.2);
  color: #ff6400;
}

.cvss-medium {
  background: rgba(255, 214, 10, 0.1);
  color: var(--color-yellow);
}

/* ============================================================ PROGRESS */
.progress-bar {
  background: var(--bg-hover);
  border-radius: 100px;
  height: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--color-red), var(--color-cyan));
  transition: width 0.6s ease;
}

/* ============================================================ DASHBOARD */
.dashboard-layout {
  min-height: 100vh;
  padding-top: 64px;
}

.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 1.5rem 0;
  position: fixed;
  top: 64px;
  left: 0;
  width: 260px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-left-color: var(--color-red);
}

.sidebar-nav li a.active {
  color: var(--color-red);
}

.sidebar-section-title {
  padding: 0.5rem 1.5rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 1rem;
}

.main-content {
  margin-left: 260px;
  padding: 2rem;
  width: calc(100% - 260px);
  max-width: 100%;
}

/* ============================================================ STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-widget-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.stat-widget-value {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.stat-widget-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ============================================================ TABLE */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead tr {
  background: var(--bg-hover);
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

tbody tr {
  border-top: 1px solid var(--border-color);
  transition: var(--transition);
}

tbody tr:hover {
  background: var(--bg-hover);
}

tbody td {
  padding: 12px 16px;
  font-size: 0.9rem;
}

/* ============================================================ MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 540px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: var(--transition);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.3rem;
}

.modal-close:hover {
  color: var(--color-red);
}

/* ============================================================ CHAT */
.chat-box {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
}

.chat-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-red), var(--color-cyan));
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
  transition: var(--transition);
}

.chat-toggle:hover {
  transform: scale(1.1);
}

.chat-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 360px;
  height: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  transform: translateY(10px);
}

.chat-window.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.chat-header {
  padding: 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-green);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.chat-msg {
  max-width: 80%;
}

.chat-msg.own {
  align-self: flex-end;
}

.chat-msg .msg-bubble {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  background: var(--bg-hover);
  word-break: break-word;
}

.chat-msg.own .msg-bubble {
  background: rgba(230, 57, 70, 0.2);
  color: var(--text-primary);
}

.chat-msg .msg-info {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.chat-input-area {
  padding: 0.75rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.chat-input:focus {
  outline: none;
  border-color: var(--color-cyan);
}

.chat-send {
  background: var(--color-red);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================ NOTIFICATION PANEL */
.notif-panel {
  position: fixed;
  top: 64px;
  right: 0;
  width: 380px;
  max-height: calc(100vh - 64px);
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  overflow-y: auto;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
}

.notif-panel.open {
  transform: translateX(0);
}

.notif-panel-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

.notif-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: pointer;
}

.notif-item:hover {
  background: var(--bg-hover);
}

.notif-item.unread {
  border-left: 3px solid var(--color-red);
}

.notif-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 3px;
}

.notif-item-msg {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.notif-item-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================ QUIZ */
.quiz-container {
  max-width: 800px;
  margin: 0 auto;
}

.quiz-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--color-yellow);
}

.quiz-timer.warning {
  color: var(--color-red);
  animation: pulse 1s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.question-num {
  font-size: 0.8rem;
  color: var(--color-cyan);
  font-family: var(--font-mono);
  margin-bottom: 0.8rem;
}

.question-text {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.option-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.option-item:hover {
  border-color: var(--color-cyan);
  background: rgba(0, 212, 255, 0.05);
}

.option-item.selected {
  border-color: var(--color-cyan);
  background: rgba(0, 212, 255, 0.1);
}

.option-item.correct {
  border-color: var(--color-green);
  background: rgba(0, 255, 136, 0.1);
}

.option-item.wrong {
  border-color: var(--color-red);
  background: rgba(230, 57, 70, 0.1);
}

.option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
  font-family: var(--font-mono);
}

/* ============================================================ LEVEL CARDS */
.level-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
  position: relative;
}

.level-card.completed {
  border-color: rgba(0, 255, 136, 0.2);
}

.level-card.locked {
  opacity: 0.6;
  filter: grayscale(0.3);
}

.level-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-cyan);
  margin-bottom: 0.5rem;
}

.level-tier-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* ============================================================ ALERTS */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-danger {
  background: rgba(230, 57, 70, 0.1);
  border: 1px solid rgba(230, 57, 70, 0.3);
  color: var(--color-red);
}

.alert-success {
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.2);
  color: var(--color-green);
}

.alert-info {
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--color-cyan);
}

.alert-warning {
  background: rgba(255, 214, 10, 0.08);
  border: 1px solid rgba(255, 214, 10, 0.2);
  color: var(--color-yellow);
}

/* ============================================================ LOADING */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--color-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* ============================================================ TERMINAL EFFECT */
.terminal {
  background: #000;
  border: 1px solid var(--color-green);
  border-radius: var(--radius);
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-green);
  position: relative;
  overflow: hidden;
}

.terminal::before {
  content: '●  ●  ●';
  position: absolute;
  top: 8px;
  left: 12px;
  color: var(--text-muted);
  font-size: 0.6rem;
  letter-spacing: 4px;
}

.terminal-line {
  line-height: 1.8;
}

.terminal-line .prompt {
  color: var(--color-cyan);
}

.terminal-line .output {
  color: var(--color-green);
}

.terminal-line .error {
  color: var(--color-red);
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--color-green);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* ============================================================ TOAST */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  min-width: 300px;
  text-align: center;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.toast-success {
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid var(--color-green);
  color: var(--color-green);
}

.toast-error {
  background: rgba(230, 57, 70, 0.15);
  border: 1px solid var(--color-red);
  color: var(--color-red);
}

.toast-info {
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid var(--color-cyan);
  color: var(--color-cyan);
}

/* ============================================================ FOOTER */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem 1.5rem;
  text-align: center;
}

footer .footer-brand {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

footer .footer-brand span {
  color: var(--color-red);
}

footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer .footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 1rem 0;
}

/* ============================================================ RESPONSIVE */
@media (max-width: 1024px) {
  .hero-visual {
    display: none;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
  }

  .navbar-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem;
    gap: 2px;
    display: none;
  }

  .navbar-nav.open {
    display: flex;
  }

  .navbar-nav .nav-link {
    padding: 10px 14px;
    font-size: 1rem;
  }

  .hamburger {
    display: flex;
  }

  .navbar-actions {
    gap: 6px;
  }

  .navbar-actions .btn-sm {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 1rem;
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chat-window {
    width: calc(100vw - 2rem);
    right: -1rem;
  }

  .hero {
    padding: 6rem 1rem 3rem;
    flex-direction: column;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    text-align: center;
    justify-content: center;
  }

  .section {
    padding: 3rem 1rem;
  }

  .container {
    padding: 0 1rem;
  }

  .card {
    padding: 1.25rem;
  }

  .feature-card {
    padding: 1.25rem;
  }

  table {
    font-size: 0.85rem;
  }

  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
}

@media (max-width: 480px) {
  .navbar-brand {
    font-size: 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .btn-lg {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .section-header h2 {
    font-size: 1.4rem;
  }

  .hero-tag {
    font-size: 0.8rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .chat-box {
    bottom: 1rem;
    right: 1rem;
  }

  .chat-window {
    width: calc(100vw - 2rem);
    right: -0.5rem;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
}

/* ============================================================ UTILITY */
.text-red {
  color: var(--color-red);
}

.text-green {
  color: var(--color-green);
}

.text-cyan {
  color: var(--color-cyan);
}

.text-yellow {
  color: var(--color-yellow);
}

.text-muted {
  color: var(--text-muted);
}

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

.text-mono {
  font-family: var(--font-mono);
}

.d-flex {
  display: flex;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm {
  gap: 8px;
}

.gap-md {
  gap: 16px;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}