/* --- GLOBAL VARIABLES & RESET --- */
:root {
  /* Palette - Slate & Blue (Cyber Defense Theme) - DARK MODE */
  --bg-dark: #0f172a; /* Slate 900 */
  --bg-panel: #1e293b; /* Slate 800 */
  --bg-card: #334155; /* Slate 700 */
  --bg-hover: #475569; /* Slate 600 */

  --text-main: #f8fafc; /* Slate 50 */
  --text-muted: #94a3b8; /* Slate 400 */

  --accent-primary: #3b82f6; /* Blue 500 */
  --accent-glow: rgba(59, 130, 246, 0.5);
  --accent-success: #10b981; /* Emerald 500 */
  --accent-danger: #ef4444; /* Red 500 */
  --accent-warning: #f59e0b; /* Amber 500 */

  --border: #334155;
  --glass: rgba(30, 41, 59, 0.7);

  --font-main: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;
}

/* LIGHT MODE */
[data-theme="light"] {
  --bg-dark: #f1f5f9; /* Slate 100 */
  --bg-panel: #ffffff;
  --bg-card: #e2e8f0; /* Slate 200 */
  --bg-hover: #cbd5e1; /* Slate 300 */

  --text-main: #0f172a; /* Slate 900 */
  --text-muted: #475569; /* Slate 600 */

  --border: #cbd5e1;
  --glass: rgba(255, 255, 255, 0.8);
  --accent-glow: rgba(59, 130, 246, 0.3);
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.theme-toggle .icon {
  font-size: 1rem;
}

/* Nav Stats Bar */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-stats {
  display: flex;
  gap: 15px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px;
  border-radius: 80px;
  border: 1px solid var(--border);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.stat-icon {
  font-size: 1rem;
}

/* Typewriter Effect for Onboarding */
.typewriter {
  overflow: hidden;
  border-right: 0.15em solid #0f0;
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 0.15em;
  animation: typing 2s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: #0f0;
  }
}

/* Keyboard Shortcuts Modal */
.shortcuts-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.shortcuts-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.shortcuts-modal h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

/* SIEM Simulator Styles */
.query-chip {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.query-chip:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent-primary);
  color: var(--text-main);
  transform: translateY(-1px);
}

.siem-table th {
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.siem-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(59, 130, 246, 0.1);
  border-top: 3px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Phishing Laboratory Styles */
.phish-meta-item:hover {
  border-color: #cbd5e1 !important;
  background: #f1f5f9;
}

.phish-attachment-item:hover {
  background: #fff !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.email-viewer-pro a {
  text-decoration: underline;
  color: #2563eb;
  cursor: pointer;
}

.email-viewer-pro a:hover {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

/* Modal System */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background: var(--bg-panel);
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 900px;
  width: 90%;
  max-height: 95vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: modalSlideUp 0.3s ease-out;
}

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

.modal-close,
.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  transition: all 0.2s;
  z-index: 10;
}

.modal-close:hover,
.modal-close-btn:hover {
  background: var(--accent-danger);
  color: white;
  border-color: var(--accent-danger);
  transform: rotate(90deg);
}

.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 2rem;
}

.shortcut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}

.shortcut-item kbd {
  font-family: "JetBrains Mono", monospace;
  background: var(--bg-dark);
  color: var(--accent-primary);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: bold;
}

.shortcut-item span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* --- NAVIGATION --- */
nav {
  background-color: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
  z-index: 20000; /* Ensure nav is above everything */
  position: sticky; /* Sticky positioning */
  top: 0;
  width: 100%;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f8fafc !important; /* Force light color */
}

.logo span {
  color: var(--accent-primary);
  text-shadow: 0 0 10px var(--accent-glow);
}

.nav-links {
  display: flex;
  gap: 5px;
}

.nav-btn {
  background: none;
  border: none;
  color: #94a3b8 !important; /* Force visible muted color */
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: #f8fafc !important; /* Force light hover */
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  color: var(--accent-primary) !important;
  background-color: rgba(59, 130, 246, 0.1);
}

/* --- GLOBAL SEARCH --- */
.nav-search {
  position: relative;
}

.nav-search input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-main);
  font-size: 0.85rem;
  width: 200px;
  transition: border-color 0.2s, width 0.3s;
}

.nav-search input:focus {
  outline: none;
  border-color: var(--accent-primary);
  width: 280px;
}

.nav-search input::placeholder {
  color: var(--text-muted);
}

.search-results {
  position: absolute;
  top: 100%;
  right: 0;
  width: 350px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 15000;
  margin-top: 8px;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.search-result-item:hover {
  background: var(--bg-card);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.search-result-type {
  font-size: 0.75rem;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-result-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-no-results {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- VIEW CONTAINER --- */
main {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* Visibility Utilities */
.hidden {
  display: none !important;
}

.view-section {
  display: none;
  height: 100%;
  overflow-y: auto;
  animation: fadeIn 0.3s ease-in-out;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.view-section {
  display: none;
  height: 100%;
  width: 100%;
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

.view-section.active {
  display: block;
}

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

/* --- DASHBOARD & SIMULATOR LAYOUT --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: 100%;
}

/* Sidebar (Alert Queue) */
.sidebar {
  background-color: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.filter-tabs {
  display: flex;
  background-color: var(--bg-dark);
  padding: 4px;
  border-radius: 6px;
}

.filter-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.filter-tab.active {
  background-color: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.alert-list {
  flex: 1;
  overflow-y: auto;
}

.alert-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.alert-item:hover {
  background-color: var(--bg-card);
}

.alert-item.selected {
  background-color: rgba(59, 130, 246, 0.1);
  border-left: 3px solid var(--accent-primary);
}

.alert-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.severity-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.severity-high {
  background-color: rgba(239, 68, 68, 0.2);
  color: var(--accent-danger);
}
.severity-medium {
  background-color: rgba(245, 158, 11, 0.2);
  color: var(--accent-warning);
}
.severity-low {
  background-color: rgba(16, 185, 129, 0.2);
  color: var(--accent-success);
}

.alert-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.alert-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.alert-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Main Panel */
.main-panel {
  background-color: var(--bg-dark);
  padding: 2rem;
  overflow-y: auto;
}

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

.incident-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.incident-title h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.incident-id {
  font-family: var(--font-mono);
  color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.9rem;
}

.action-bar {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: white;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background-color: #2563eb;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.btn-danger {
  background-color: var(--bg-card);
  color: var(--accent-danger);
  border: 1px solid var(--accent-danger);
}

.btn-danger:hover {
  background-color: var(--accent-danger);
  color: white;
}

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

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

/* Data Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.info-card {
  background-color: var(--bg-panel);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.info-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.info-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--text-main);
}

.log-viewer {
  background-color: #000;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-success);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-x: auto;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

/* --- LEARNING PATH STYLES --- */
.learning-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.hero-section {
  text-align: center;
  margin-bottom: 4rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.module-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.module-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-primary);
}

.module-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-primary);
}

.module-card.locked {
  opacity: 0.6;
  pointer-events: none;
}

.module-card.locked::before {
  background: var(--text-muted);
}

.module-number {
  font-size: 3rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.05);
  position: absolute;
  top: 10px;
  right: 20px;
}

.module-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  position: relative;
}

.module-desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* --- MONITORING DASHBOARD (NEW) --- */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: linear-gradient(145deg, var(--bg-panel), var(--bg-dark));
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.world-map-placeholder {
  background-color: var(--bg-panel);
  background-image: url("assets/webp/world-map.webp");
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.map-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
  border-radius: 50%;
  position: absolute;
  box-shadow: 0 0 10px var(--accent-primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* --- UTILITIES --- */
.hidden {
  display: none !important;
}

.modal-overlay.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}
.mt-4 {
  margin-top: 1rem;
}
/* --- MODAL STYLES --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
  overflow: hidden;
}

.modal-content {
  background: var(--bg-dark);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  position: relative;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
  border: 1px solid var(--border);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s;
  line-height: 1;
}

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

.modal-header {
  padding: 1rem 2rem;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: 1.5rem;
}

.modal-body {
  flex: 1;
  padding: 3rem;
  overflow-y: auto;
  line-height: 1.8;
  color: var(--text-main);
}

.modal-body-inner {
  max-width: 900px;
  margin: 0 auto;
}

.modal-body h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.modal-body h4 {
  color: var(--accent-primary);
  margin: 2rem 0 1rem 0;
  font-size: 1.2rem;
}

.modal-body p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.modal-body ul,
.modal-body ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.modal-body li {
  margin-bottom: 0.5rem;
}

.modal-footer {
  padding: 1rem 2rem;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  flex-shrink: 0;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.btn-close:hover {
  color: var(--accent-danger);
}

.lesson-image {
  width: 100%;
  border-radius: 8px;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.pro-tip {
  background: rgba(59, 130, 246, 0.1);
  border-left: 4px solid var(--accent-primary);
  padding: 1rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

.pro-tip strong {
  color: var(--accent-primary);
  display: block;
  margin-bottom: 0.5rem;
}

.lesson-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.lesson-table th,
.lesson-table td {
  border: 1px solid var(--border);
  padding: 10px;
  text-align: left;
}

.lesson-table th {
  background: var(--bg-card);
  color: var(--accent-primary);
}

/* --- Learning Path UI --- */
.learning-path-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding: 2rem 0;
}

/* Vertical Progress Line */
.learning-path-container::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2rem;
  width: 2px;
  background: var(--border);
  z-index: 0;
}

.path-module-card {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  transition: transform 0.2s, border-color 0.2s;
  backdrop-filter: blur(10px);
}

.path-module-card:hover {
  transform: translateX(5px);
  border-color: var(--accent-primary);
}

.module-number {
  width: 40px;
  height: 40px;
  background: var(--bg-dark);
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--accent-primary);
  margin-right: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.module-info {
  flex: 1;
}

.module-info h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--text-light);
}

.module-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.module-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-view {
  padding: 0.6rem 1.2rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-view:hover {
  background: var(--accent-primary);
  color: white;
}

/* Resources Section */
.resources-section {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.resources-section h3 {
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 8px;
  transition: transform 0.2s;
  text-decoration: none;
  display: block;
}

.resource-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-secondary);
}

/* --- NEW LESSON VIEW STYLES --- */
.lesson-layout {
  display: flex;
  height: calc(100vh - 64px); /* Subtract nav height */
  overflow: hidden;
}

.lesson-sidebar {
  width: 320px;
  background-color: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.lesson-content {
  flex: 1;
  overflow-y: auto;
  padding: 3rem 5rem;
  background-color: var(--bg-dark);
}

.chapter-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.chapter-item {
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.chapter-item:hover {
  background-color: var(--bg-hover);
  color: var(--text-main);
}

.chapter-item.active {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  border-color: rgba(59, 130, 246, 0.2);
  font-weight: 500;
}

.chapter-status {
  width: 20px;
  display: flex;
  justify-content: center;
}

.chapter-item.completed .chapter-status {
  color: var(--accent-success);
}

.lesson-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  max-width: 900px;
}

.lesson-badge {
  color: var(--accent-primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: inline-block;
  background: rgba(59, 130, 246, 0.1);
  padding: 4px 10px;
  border-radius: 4px;
}

.lesson-body {
  max-width: 900px;
  margin-bottom: 4rem;
  line-height: 1.8;
  font-size: 1.1rem;
}

.lesson-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  max-width: 900px;
}

.btn-back {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}

.btn-back:hover {
  color: var(--accent-primary);
}

/* Typography Enhancements */
.lesson-body h3 {
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
  color: var(--text-main);
  font-weight: 700;
}
.lesson-body h4 {
  font-size: 1.4rem;
  margin: 1.5rem 0 1rem;
  color: var(--text-main);
}
.lesson-body p {
  margin-bottom: 1.5rem;
  color: #cbd5e1;
}
.lesson-body ul,
.lesson-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: #cbd5e1;
}
.lesson-body li {
  margin-bottom: 0.5rem;
}
.lesson-body code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  color: var(--accent-warning);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.lesson-body pre {
  background: #0f172a;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow-x: auto;
  margin: 1.5rem 0;
}
.lesson-body blockquote {
  border-left: 4px solid var(--accent-primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-muted);
}

.resource-card h4 {
  color: var(--accent-secondary);
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}

.resource-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.4;
}

/* ============================================
   QUIZ STYLES
   ============================================ */
.quiz-container {
  padding: 1rem 0;
}

.quiz-progress {
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-success)
  );
  transition: width 0.3s ease;
}

.quiz-question {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: 1rem;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.1);
}

.quiz-option.correct {
  border-color: var(--accent-success);
  background: rgba(16, 185, 129, 0.2);
}

.quiz-option.incorrect {
  border-color: var(--accent-danger);
  background: rgba(239, 68, 68, 0.2);
}

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

.quiz-results {
  text-align: center;
  padding: 2rem 0;
}

.score-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  border: 6px solid;
}

.score-circle.passed {
  border-color: var(--accent-success);
  background: rgba(16, 185, 129, 0.1);
}

.score-circle.failed {
  border-color: var(--accent-danger);
  background: rgba(239, 68, 68, 0.1);
}

.score-value {
  font-size: 2.5rem;
  font-weight: 800;
}

.score-text {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ============================================
   LABS STYLES
   ============================================ */
.labs-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.lab-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.lab-card h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.4rem;
}

.lab-card > p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.lab-icon {
  font-size: 2.5rem;
}

.lab-container {
  margin-top: 1rem;
}

/* Phishing Sandbox */
.sandbox-header {
  margin-bottom: 1.5rem;
}

.sandbox-header h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.sandbox-score {
  font-size: 1.1rem;
  color: var(--accent-primary);
  font-weight: 600;
  margin-top: 0.75rem;
}

.email-viewer {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.email-header-row {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
}

.email-label {
  color: var(--text-muted);
  font-weight: 500;
  min-width: 80px;
}

.email-body {
  padding: 1.5rem;
  white-space: pre-wrap;
  line-height: 1.7;
}

.phish-element {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  transition: all 0.2s;
  border-bottom: 2px dashed transparent;
}

.phish-element:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--accent-warning);
}

.phish-element.found {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--accent-success);
  color: var(--accent-success);
}

.attachment-badge {
  background: rgba(239, 68, 68, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
}

.phishing-feedback,
.siem-feedback,
.terminal-feedback,
.scenario-feedback {
  margin-top: 1rem;
}

.feedback-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--accent-success);
  color: var(--accent-success);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.feedback-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--accent-danger);
  color: var(--accent-danger);
  padding: 1rem;
  border-radius: 8px;
}

.feedback-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  padding: 1rem;
  border-radius: 8px;
}

.feedback-complete {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.2),
    rgba(59, 130, 246, 0.2)
  );
  border: 1px solid var(--accent-success);
  color: var(--text-main);
  padding: 1rem;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
}

/* SIEM Simulator */
.siem-interface {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.query-input-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.siem-query-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.siem-query-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.hint-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.siem-results {
  max-height: 300px;
  overflow-y: auto;
}

.siem-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.siem-table th,
.siem-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.siem-table th {
  background: var(--bg-card);
  color: var(--accent-primary);
  font-weight: 600;
}

.siem-table tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

.highlight-row {
  background: rgba(16, 185, 129, 0.1) !important;
}

/* Terminal Simulator */
.terminal-window {
  background: #0d1117;
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
}

.terminal-header {
  background: #161b22;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red {
  background: #ff5f57;
}
.terminal-dot.yellow {
  background: #febc2e;
}
.terminal-dot.green {
  background: #28c840;
}

.terminal-title {
  margin-left: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.terminal-body {
  padding: 1rem;
  min-height: 200px;
  max-height: 300px;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}

.terminal-line {
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.terminal-result {
  color: var(--accent-success);
  white-space: pre-wrap;
  margin-bottom: 1rem;
  padding-left: 0;
}

.terminal-hint {
  color: var(--text-muted);
  font-style: italic;
}

.terminal-prompt-text {
  color: var(--accent-primary);
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #161b22;
  border-top: 1px solid var(--border);
}

.terminal-prompt {
  color: var(--accent-primary);
  font-size: 0.9rem;
  white-space: nowrap;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  outline: none;
}

/* ============================================
   SCENARIOS STYLES
   ============================================ */
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.scenario-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.scenario-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-danger);
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.2);
}

.scenario-badge {
  display: inline-block;
  background: var(--accent-danger);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.scenario-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.scenario-card p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.scenario-container {
  margin-top: 2rem;
}

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

.scenario-progress {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.scenario-step {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.step-type {
  color: var(--accent-warning);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.step-content {
  background: var(--bg-dark);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--accent-danger);
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.step-question {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.step-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.scenario-option {
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-size: 1rem;
}

.scenario-option:hover:not(:disabled) {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.1);
}

.scenario-option.correct,
.scenario-option.correct-answer {
  border-color: var(--accent-success);
  background: rgba(16, 185, 129, 0.2);
}

.scenario-option.incorrect {
  border-color: var(--accent-danger);
  background: rgba(239, 68, 68, 0.2);
}

/* Utility */
.mt-4 {
  margin-top: 1rem;
}

/* ============================================
   PROGRESS DASHBOARD
   ============================================ */
.progress-dashboard {
  background: linear-gradient(
    135deg,
    var(--bg-panel) 0%,
    rgba(59, 130, 246, 0.1) 100%
  );
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

.progress-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.level-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.level-number {
  font-size: 2rem;
  font-weight: 800;
  color: white;
}

.level-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 1px;
}

.xp-info {
  flex: 1;
}

.xp-bar {
  height: 12px;
  background: var(--bg-dark);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.xp-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-success)
  );
  transition: width 0.5s ease;
}

.xp-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.progress-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.progress-bar-container {
  margin-bottom: 1rem;
}

.progress-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.course-progress-bar {
  height: 8px;
  background: var(--bg-dark);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.course-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-success), #34d399);
  transition: width 0.5s ease;
}

.progress-percent {
  font-size: 0.85rem;
  color: var(--accent-success);
  font-weight: 600;
}

.badges-earned {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.badges-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.badges-grid {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.badge-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  font-size: 1.5rem;
  background: var(--bg-dark);
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
  cursor: help;
  transition: transform 0.2s, box-shadow 0.2s;
}

.badge-item:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* ============================================
   DIFFICULTY SELECTOR
   ============================================ */
.difficulty-selector {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.diff-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.diff-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-main);
}

.diff-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

/* ============================================
   GAME NOTIFICATIONS
   ============================================ */
.game-notification {
  position: fixed;
  top: 100px;
  right: 20px;
  padding: 1rem 1.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-main);
  font-weight: 600;
  z-index: 9999;
  transform: translateX(120%);
  transition: transform 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 350px;
}

.game-notification.show {
  transform: translateX(0);
}

.game-notification.success {
  border-color: var(--accent-success);
  background: linear-gradient(135deg, var(--bg-panel), rgba(16, 185, 129, 0.1));
}

.game-notification.badge {
  border-color: var(--accent-warning);
  background: linear-gradient(135deg, var(--bg-panel), rgba(245, 158, 11, 0.1));
}

/* ============================================
   CTF FLAG STYLING   
   ============================================ */
.terminal-result span[data-flag] {
  color: var(--accent-success);
  font-weight: 600;
}

/* --- DASHBOARD VIEW STYLES --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}

.sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 2rem;
}

.sidebar-widget {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.sidebar-widget h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

/* Overall Progress Widget */
.overall-progress-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.progress-circle-wrap {
  position: relative;
  width: 120px;
  height: 120px;
}

.progress-ring__circle {
  transition: stroke-dashoffset 0.5s;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  stroke-dasharray: 326.726; /* 2 * PI * r */
  stroke-dashoffset: 326.726;
  stroke-linecap: round;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.progress-stats-text p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.progress-stats-text strong {
  color: var(--text-main);
  font-size: 1.1rem;
}

/* Next Up Card */
.next-up-card {
  background: var(--bg-hover);
  border-radius: 8px;
  padding: 1rem;
  border-left: 4px solid var(--accent-secondary);
}

.next-up-card h4 {
  margin: 0 0 0.5rem 0;
  color: var(--text-main);
}

.next-up-card .btn-sm {
  margin-top: 1rem;
  width: 100%;
}

/* Compact Resource List */
.resource-list-compact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.resource-link-compact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.resource-link-compact:hover {
  background: var(--bg-hover);
  color: var(--accent-primary);
}

/* Timeline/Path Styles */
.phase-header {
  position: relative;
  padding-left: 2rem;
}
.phase-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 12px;
  background: var(--accent-primary);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 10px var(--accent-primary);
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Tablet and below (≤1024px) */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .learning-container {
    padding: 2rem 1.5rem;
  }

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

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

/* Mobile (≤768px) */
@media (max-width: 768px) {
  /* Navigation */
  nav {
    padding: 0 1rem;
    flex-wrap: wrap;
    height: auto;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .logo {
    font-size: 1rem;
  }

  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding: 0.5rem 0;
    gap: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .nav-search {
    order: 2;
  }

  .nav-search input {
    width: 140px;
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .nav-search input:focus {
    width: 180px;
  }

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

  /* Learning Path */
  .learning-hero h1 {
    font-size: 1.5rem;
  }

  .learning-hero p {
    font-size: 0.9rem;
  }

  .learning-container {
    padding: 1rem;
  }

  .dashboard-grid {
    display: flex;
    flex-direction: column;
  }

  .path-column {
    width: 100%;
  }

  .sidebar-column {
    width: 100%;
    margin-top: 1.5rem;
  }

  /* Module Cards */
  .module-card {
    padding: 1.25rem;
  }

  .module-card .card-icon {
    font-size: 1.5rem;
  }

  .module-card h3 {
    font-size: 1rem;
  }

  .module-card p {
    font-size: 0.85rem;
  }

  /* Modal/Lesson View */
  .modal-body {
    padding: 1.5rem;
  }

  .modal-header {
    padding: 0.75rem 1rem;
  }

  .modal-header h2 {
    font-size: 1rem;
  }

  .modal-body h3 {
    font-size: 1.3rem;
  }

  .modal-body h4 {
    font-size: 1rem;
  }

  .modal-body p {
    font-size: 0.95rem;
  }

  .lesson-table {
    font-size: 0.8rem;
  }

  .lesson-table th,
  .lesson-table td {
    padding: 8px 6px;
  }

  /* Stats */
  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  /* Sidebar Widgets */
  .sidebar-widget {
    padding: 1rem;
  }

  /* Buttons */
  .btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  /* Info Grid */
  .info-grid {
    grid-template-columns: 1fr;
  }

  /* World Map */
  .world-map-placeholder {
    height: 250px;
  }
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
  .logo span {
    display: none;
  }

  .nav-search input {
    width: 100px;
  }

  .nav-search input:focus {
    width: 150px;
  }

  .modal-footer {
    flex-direction: column;
    gap: 0.5rem;
  }

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

  .lesson-table {
    display: block;
    overflow-x: auto;
  }

  .war-story {
    padding: 1rem;
  }

  .pro-tip {
    padding: 0.75rem;
  }

  .quiz-container {
    padding: 1rem !important;
  }
}

/* Keyboard Shortcut Hint */
.keyboard-hint {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  z-index: 999;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.keyboard-hint:hover {
  opacity: 1;
}

.keyboard-hint code {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

/* ============================================
   COMMAND PALETTE STYLES
   ============================================ */
.command-palette-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 15vh;
  opacity: 0;
  animation: fadeIn 0.2s forwards;
}

.command-palette {
  width: 600px;
  max-width: 90%;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(-20px);
  animation: slideIn 0.2s forwards;
}

.palette-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.palette-header input {
  width: 100%;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--text-main);
  outline: none;
}

.palette-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.1s;
}

.palette-item.selected,
.palette-item:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.palette-item.selected .palette-chk {
  opacity: 1 !important;
}

.palette-icon {
  font-size: 1.2rem;
}

.palette-footer {
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
@keyframes slideIn {
  to {
    transform: translateY(0);
  }
}

/* ============================================
   INTERACTIVE LABS STYLES
   ============================================ */

/* Lab Cards */
.lab-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.2s, border-color 0.2s;
}

.lab-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-primary);
}

.lab-card .card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.lab-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

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

.lab-meta {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.lab-difficulty {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.lab-difficulty.easy {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-success);
}

.lab-difficulty.medium {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-warning);
}

.lab-difficulty.hard {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-danger);
}

.lab-xp {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-primary);
  font-weight: 600;
}

/* Lab Challenge View */
.lab-challenge {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.lab-progress {
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.lab-progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-success)
  );
  transition: width 0.3s ease;
}

.lab-question {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.lab-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.lab-option {
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.lab-option:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  transform: translateX(5px);
}

/* Lab Results */
.lab-results {
  text-align: center;
  padding: 2rem;
}

.result-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.lab-results h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.result-score {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  border: 4px solid;
}

.score-circle.passed {
  border-color: var(--accent-success);
  color: var(--accent-success);
  background: rgba(16, 185, 129, 0.1);
}

.score-circle.failed {
  border-color: var(--accent-warning);
  color: var(--accent-warning);
  background: rgba(245, 158, 11, 0.1);
}

.xp-earned {
  color: var(--accent-success);
  font-weight: 600;
  font-size: 1.2rem;
}

.lab-score {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Grid for labs container */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ============================================
   BADGE SHARE MODAL STYLES
   ============================================ */
.badge-share-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.badge-share-modal {
  background: linear-gradient(145deg, var(--bg-panel), var(--bg-dark));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 800px;
  width: 90%;
  position: relative;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(59, 130, 246, 0.15);
}

.badge-share-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.badge-share-close:hover {
  background: var(--accent-danger);
  border-color: var(--accent-danger);
  color: white;
}

.badge-share-header {
  text-align: center;
  margin-bottom: 2rem;
}

.badge-share-header h2 {
  font-size: 1.5rem;
  color: var(--text-main);
  font-weight: 600;
}

.badge-share-content {
  margin-bottom: 2rem;
}

.badge-share-certificate {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.1),
    rgba(139, 92, 246, 0.1)
  );
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.badge-certificate-text {
  flex: 1;
}

.badge-certificate-text h3 {
  font-size: 1.8rem;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.certificate-subtitle {
  font-size: 1.2rem;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.certificate-subtitle span {
  font-weight: 600;
}

.certificate-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.certificate-detail {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 1rem;
  color: var(--text-main);
  font-weight: 600;
}

.badge-share-image-container {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.badge-share-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.badge-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.share-btn svg {
  flex-shrink: 0;
}

/* LinkedIn Brand Color */
.share-btn-linkedin {
  background: linear-gradient(135deg, #0a66c2, #004182);
}

.share-btn-linkedin:hover {
  background: linear-gradient(135deg, #0077b5, #0a66c2);
  box-shadow: 0 6px 20px rgba(10, 102, 194, 0.4);
}

/* Facebook Brand Color */
.share-btn-facebook {
  background: linear-gradient(135deg, #1877f2, #0c5dc7);
}

.share-btn-facebook:hover {
  background: linear-gradient(135deg, #2196f3, #1877f2);
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
}

/* Twitter/X Brand Color */
.share-btn-twitter {
  background: linear-gradient(135deg, #1d9bf0, #0c7abf);
}

.share-btn-twitter:hover {
  background: linear-gradient(135deg, #42a5f5, #1d9bf0);
  box-shadow: 0 6px 20px rgba(29, 155, 240, 0.4);
}

/* Copy Link Button */
.share-btn-copy {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-hover));
  border: 1px solid var(--border);
  color: var(--text-main);
}

.share-btn-copy:hover {
  background: linear-gradient(135deg, var(--bg-hover), var(--bg-card));
  border-color: var(--accent-primary);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
}

/* Responsive Design for Badge Share Modal */
@media (max-width: 768px) {
  .badge-share-modal {
    padding: 1.5rem;
    width: 95%;
  }

  .badge-share-certificate {
    flex-direction: column-reverse;
    text-align: center;
    padding: 1.5rem;
  }

  .badge-share-image-container {
    width: 140px;
    height: 140px;
  }

  .badge-certificate-text h3 {
    font-size: 1.4rem;
  }

  .certificate-subtitle {
    font-size: 1rem;
  }

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

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

  .share-btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
    padding: 12px 16px;
    font-size: 0.85rem;
  }

  .badge-share-header h2 {
    font-size: 1.2rem;
  }
}

/* ============================================ */
/* ACHIEVEMENT TOAST NOTIFICATIONS */
/* ============================================ */
.achievement-toast {
  background: linear-gradient(135deg, var(--bg-panel), var(--bg-card));
  border: 1px solid var(--accent-primary);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--accent-glow);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  min-width: 280px;
}

.achievement-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-icon {
  font-size: 2rem;
  animation: bounce 0.5s ease 0.3s;
}

@keyframes bounce {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 2px;
}

.toast-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================ */
/* KEYBOARD SHORTCUTS MODAL */
/* ============================================ */
.shortcuts-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.2s ease;
}

.shortcuts-modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.shortcuts-modal h2 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: 8px;
}

.shortcut-item kbd {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-primary);
}

.shortcut-item span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================ */
/* LAB CARDS */
/* ============================================ */
.lab-card {
  background: linear-gradient(145deg, var(--bg-panel), var(--bg-dark));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.lab-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.lab-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.lab-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.lab-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.lab-meta {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.difficulty-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.difficulty-badge.beginner {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-success);
}

.difficulty-badge.intermediate {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-warning);
}

.difficulty-badge.advanced {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-danger);
}

.xp-badge {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ============================================ */
/* ATTACK PULSE ANIMATION */
/* ============================================ */
.attack-pulse {
  animation: attackPulse 3s ease-out forwards;
}

@keyframes attackPulse {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  30% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

.map-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: absolute;
  pointer-events: none;
}

/* World map background pattern */
.world-map-placeholder {
  background: linear-gradient(
      90deg,
      rgba(59, 130, 246, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    var(--bg-panel);
  background-size: 30px 30px;
}

/* ============================================ */
/* GRID LAYOUTS */
/* ============================================ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

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

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

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

.highlight {
  color: var(--accent-primary);
}

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

.fade-in {
  animation: fadeIn 0.3s ease;
}

/* ============================================ */
/* DAILY CHALLENGE MODAL */
/* ============================================ */
.challenge-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.challenge-modal {
  background: linear-gradient(145deg, var(--bg-panel), var(--bg-dark));
  border: 2px solid var(--accent-primary);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 40px var(--accent-glow);
}

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

.challenge-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
}

.challenge-xp {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 700;
}

.challenge-modal h2 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.challenge-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.challenge-option {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  color: var(--text-main);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.challenge-option:hover:not(:disabled) {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.1);
}

.challenge-option.correct {
  border-color: var(--accent-success);
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-success);
}

.challenge-option.incorrect {
  border-color: var(--accent-danger);
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-danger);
}

.challenge-option:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* ============================================ */
/* LEADERBOARD MODAL */
/* ============================================ */
.leaderboard-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.leaderboard-modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  max-width: 550px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.leaderboard-modal h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: 10px;
  transition: transform 0.2s;
}

.leaderboard-row.top-three {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.15),
    rgba(239, 68, 68, 0.1)
  );
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.leaderboard-row.user-row {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.2),
    rgba(139, 92, 246, 0.15)
  );
  border: 2px solid var(--accent-primary);
}

.lb-rank {
  font-size: 1.5rem;
  width: 40px;
  text-align: center;
}

.lb-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
}

.lb-stats {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
}

.lb-level {
  color: var(--accent-primary);
  font-weight: 600;
}

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

.lb-streak {
  color: #f59e0b;
}

.leaderboard-divider {
  text-align: center;
  color: var(--text-muted);
  padding: 8px 0;
  letter-spacing: 4px;
}

/* ============================================ */
/* QUICK ACTION BUTTONS */
/* ============================================ */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.action-btn:hover {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.1);
  transform: translateX(4px);
}

.action-icon {
  font-size: 1.5rem;
}

.action-text {
  font-weight: 600;
  font-size: 0.95rem;
}

.challenge-btn:hover {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.leaderboard-btn:hover {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
}

/* ============================================ */
/* DIAGRAM PLACEHOLDERS */
/* ============================================ */
.diagram-placeholder {
  border: 2px dashed var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 3rem;
  margin: 2rem 0;
  text-align: center;
  color: var(--text-secondary);
  font-family: "Consolas", monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.diagram-placeholder:hover {
  border-color: var(--primary);
  background: rgba(0, 255, 65, 0.05);
  color: var(--primary);
}

.diagram-placeholder::before {
  content: "📊";
  font-size: 2.5rem;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.diagram-placeholder strong {
  font-size: 1.1rem;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.5rem;
}

.diagram-placeholder span {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ============================================ */
/* CAREER ROADMAP WIDGET */
/* ============================================ */
#career-roadmap-container {
  position: relative;
  padding-left: 10px;
}

.roadmap-line {
  position: absolute;
  left: 28px; /* Center of the icon (36px width / 2 + padding) */
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: var(--border);
  z-index: 0;
}

.roadmap-node {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  position: relative;
  z-index: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.roadmap-node:hover {
  transform: translateX(4px);
  border-color: var(--accent-primary);
}

.node-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-main);
  border-radius: 50%;
  font-size: 1.2rem;
  border: 2px solid var(--border);
}

.role-current .node-icon {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 10px var(--accent-primary-glow);
}

.role-locked {
  opacity: 0.6;
  filter: grayscale(1);
}

.node-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}

.node-salary {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pulse-ring {
  position: absolute;
  left: 10px; /* Aligned with icon */
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
  animation: pulse-ring 2s infinite;
  pointer-events: none;
}

@keyframes pulse-ring {
  0% {
    transform: translateY(-50%) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translateY(-50%) scale(1.6);
    opacity: 0;
  }
}

/* ============================================ */
/* GLOSSARY TOOLTIPS */
/* ============================================ */
.glossary-term {
  border-bottom: 2px dotted var(--accent-primary);
  cursor: help;
  position: relative;
  color: var(--text-main);
  font-weight: 500;
}

/* JS Tooltip used instead to prevent overflow clipping
.glossary-term:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-hover);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  white-space: nowrap;
  z-index: 9999;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  min-width: 200px;
  white-space: normal;
  text-align: center;
} */

/* ============================================ */
/* CERTIFICATION TAGS */
/* ============================================ */
.cert-tag {
  display: inline-block;
  padding: 4px 8px;
  margin-top: 8px;
  background: rgba(147, 51, 234, 0.15); /* Purple tint */
  border: 1px solid rgba(147, 51, 234, 0.4);
  border-radius: 4px;
  color: #c084fc; /* Light purple */
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ============================================ */
/* MOCK INTERVIEW CHAT */
/* ============================================ */
.chat-window {
  height: 300px;
  overflow-y: auto;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-message {
  padding: 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
  max-width: 85%;
}

.bot-message {
  background: var(--bg-card);
  align-self: flex-start;
  border: 1px solid var(--border);
}

.user-message {
  background: rgba(59, 130, 246, 0.2);
  align-self: flex-end;
  color: var(--text-main);
}

.chat-input-area {
  display: flex;
  gap: 10px;
}

.chat-input-area input {
  flex: 1;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
}

.chat-input-area button {
  padding: 8px 16px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* ============================================ */
/* LESSON DIAGRAMS */
/* ============================================ */
.lesson-diagram {
  display: block;
  max-width: 100%;
  margin: 1.5rem auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
}

.lesson-card:hover .lesson-diagram {
  border-color: var(--accent-primary);
}

/* ============================================ */
/* ENHANCED UI ANIMATIONS */
/* ============================================ */

/* Pulse Animation for Notifications */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

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

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px var(--accent-primary);
  }
  50% {
    box-shadow: 0 0 20px var(--accent-primary), 0 0 30px var(--accent-glow);
  }
}

/* Confetti Animation */
@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  z-index: 10000;
  animation: confetti-fall 3s linear forwards;
  pointer-events: none;
}

/* Enhanced Card Hover Effects */
.module-card,
.lab-card,
.ctf-card {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.module-card:hover,
.lab-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--accent-primary),
    0 0 20px rgba(59, 130, 246, 0.2);
}

/* CTF Card Styles */
.ctf-card {
  transition: all 0.3s ease;
}

.ctf-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ctf-card.solved {
  position: relative;
  overflow: hidden;
}

.ctf-card.solved::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(34, 197, 94, 0.1),
    transparent
  );
  animation: shimmer 2s infinite;
}

/* Enhanced Notification Toast */
.notification-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  animation: slideIn 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 400px;
}

.notification-toast.success {
  border-left: 4px solid var(--accent-success);
}

.notification-toast.error {
  border-left: 4px solid var(--accent-danger);
}

.notification-toast.warning {
  border-left: 4px solid var(--accent-warning);
}

.notification-toast.info {
  border-left: 4px solid var(--accent-primary);
}

.notification-toast.hide {
  animation: slideOut 0.3s ease-in forwards;
}

/* XP Gained Animation */
.xp-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, var(--bg-panel), var(--bg-card));
  border: 2px solid var(--accent-primary);
  border-radius: 16px;
  padding: 2rem 3rem;
  z-index: 10000;
  text-align: center;
  animation: pulse 0.5s ease-out, fadeIn 0.3s ease-out;
  box-shadow: 0 0 50px rgba(59, 130, 246, 0.3);
}

.xp-popup .xp-amount {
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent-primary);
  text-shadow: 0 0 20px var(--accent-glow);
}

.xp-popup .xp-reason {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Skills Progress Bar Animation */
.skills-bars > div > div:last-child > div {
  animation: growWidth 1s ease-out;
}

@keyframes growWidth {
  from {
    width: 0;
  }
}

/* Stats Card Hover */
.stat-card {
  transition: all 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary) !important;
  background: rgba(59, 130, 246, 0.05) !important;
}

/* Badge Unlock Animation */
@keyframes badgeUnlock {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.badge-unlocked {
  animation: badgeUnlock 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Loading Skeleton */
.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: 4px;
}

/* Button Ripple Effect */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 10%,
    transparent 10.01%
  );
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 0.5s;
}

.btn:active::after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

/* Responsive Improvements */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .ctf-grid {
    grid-template-columns: 1fr !important;
  }

  .modules-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================ */
/* SCENARIOS PAGE - ENHANCED CARDS */
/* ============================================ */
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.scenario-card-enhanced {
  background: linear-gradient(145deg, var(--bg-panel), var(--bg-card));
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
}

.scenario-card-enhanced:hover {
  transform: translateY(-8px);
  border-color: var(--accent-primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(59, 130, 246, 0.3),
    0 0 30px rgba(59, 130, 246, 0.15);
}

.scenario-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 1.5rem 1rem 1.5rem;
}

.scenario-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.scenario-badges {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.scenario-category,
.scenario-difficulty {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.scenario-card-body {
  padding: 0 1.5rem 1rem 1.5rem;
  flex: 1;
}

.scenario-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.scenario-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

.scenario-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scenario-tool {
  font-size: 0.75rem;
  padding: 5px 10px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 6px;
  color: var(--accent-primary);
  font-weight: 500;
}

.scenario-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.scenario-start-btn {
  padding: 10px 20px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

.scenario-card-enhanced:hover .scenario-start-btn {
  background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .scenarios-grid {
    grid-template-columns: 1fr;
  }

  .scenario-card-header {
    flex-direction: column;
    gap: 1rem;
  }

  .scenario-badges {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* ============================================ */
/* LAB BACK BUTTON */
/* ============================================ */
.btn-back-lab {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-back-lab:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateX(-2px);
}

/* ============================================ */
/* SOC SIMULATION PRACTICE STYLES */
/* ============================================ */

.simulation-container {
  height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  background: #0a0f1a;
}

/* Simulation Header */
.sim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 1px solid #334155;
}

.sim-header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.sim-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sim-logo-icon {
  font-size: 1.5rem;
}

.sim-logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sim-shift-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shift-badge {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.shift-time {
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
}

.sim-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.sim-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.sim-stat-icon {
  font-size: 1rem;
}

.sim-stat.analyst {
  background: rgba(59, 130, 246, 0.1);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Simulation Body */
.sim-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar Navigation */
.sim-sidebar {
  width: 220px;
  background: #0f172a;
  border-right: 1px solid #1e293b;
  padding: 16px 0;
  overflow-y: auto;
}

.sim-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
  position: relative;
}

.sim-nav-item:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-main);
}

.sim-nav-item.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), transparent);
  color: var(--accent-primary);
  border-left: 3px solid var(--accent-primary);
}

.sim-nav-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.sim-nav-text {
  font-size: 0.9rem;
  font-weight: 500;
}

.sim-nav-badge {
  margin-left: auto;
  background: #ef4444;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Main Content Area */
.sim-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: #0a0f1a;
}

.sim-view {
  display: none;
}

.sim-view.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.sim-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 8px 0;
}

.sim-section-desc {
  color: var(--text-muted);
  margin: 0 0 24px 0;
}

/* Dashboard Stats Grid */
.sim-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.sim-stat-card {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
}

.sim-stat-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.sim-stat-card-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.sim-stat-card-icon.critical {
  background: rgba(239, 68, 68, 0.2);
}
.sim-stat-card-icon.high {
  background: rgba(249, 115, 22, 0.2);
}
.sim-stat-card-icon.medium {
  background: rgba(234, 179, 8, 0.2);
}
.sim-stat-card-icon.resolved {
  background: rgba(34, 197, 94, 0.2);
}

.sim-stat-card-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  display: block;
}

.sim-stat-card-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Quick Actions */
.sim-quick-actions {
  margin-bottom: 32px;
}

.sim-quick-actions h3 {
  color: var(--text-main);
  margin: 0 0 16px 0;
  font-size: 1.1rem;
}

.sim-action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sim-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.sim-action-btn:hover {
  background: #334155;
  border-color: var(--accent-primary);
}

.sim-action-btn.primary {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border: none;
  color: white;
  font-weight: 600;
}

.sim-action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* Recent Activity Feed */
.sim-recent-activity h3 {
  color: var(--text-main);
  margin: 0 0 16px 0;
  font-size: 1.1rem;
}

.sim-activity-feed {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 16px;
  max-height: 200px;
  overflow-y: auto;
}

.sim-activity-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #1e293b;
  font-size: 0.85rem;
}

.sim-activity-item:last-child {
  border-bottom: none;
}

.sim-activity-time {
  color: var(--accent-primary);
  font-family: "JetBrains Mono", monospace;
  min-width: 50px;
}

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

/* Alert Queue Filters */
.sim-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.sim-filter-btn {
  padding: 8px 16px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.sim-filter-btn:hover {
  background: #334155;
  color: var(--text-main);
}

.sim-filter-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

/* Alert List */
.sim-alert-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sim-alert-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 16px;
}

.sim-alert-card:hover {
  border-color: var(--accent-primary);
  transform: translateX(4px);
}

.sim-alert-severity {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sim-alert-severity.critical {
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
}
.sim-alert-severity.high {
  background: #f97316;
}
.sim-alert-severity.medium {
  background: #eab308;
}
.sim-alert-severity.low {
  background: #22c55e;
}

.sim-alert-info {
  flex: 1;
}

.sim-alert-title {
  color: var(--text-main);
  font-weight: 600;
  margin-bottom: 4px;
}

.sim-alert-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.sim-alert-time {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: "JetBrains Mono", monospace;
}

/* Tool Tabs */
.sim-tool-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid #334155;
  padding-bottom: 12px;
}

.sim-tool-tab {
  padding: 10px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.sim-tool-tab:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--text-main);
}

.sim-tool-tab.active {
  background: var(--accent-primary);
  color: white;
  font-weight: 600;
}

.sim-tool-content {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  min-height: 400px;
  padding: 20px;
}

.sim-tool-placeholder {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.sim-tool-placeholder span {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
}

.sim-tool-placeholder h3 {
  color: var(--text-main);
  margin: 0 0 8px 0;
}

/* Playbooks Grid */
.sim-playbooks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.sim-playbook-card {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.sim-playbook-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
}

.sim-playbook-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.sim-playbook-title {
  color: var(--text-main);
  font-weight: 600;
  margin-bottom: 8px;
}

.sim-playbook-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Empty State */
.sim-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.sim-empty-state span {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
}

.sim-empty-state h3 {
  color: var(--text-main);
  margin: 0 0 8px 0;
}

/* Guide Sections */
.sim-guide-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sim-guide-section {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 20px;
}

.sim-guide-section h3 {
  color: var(--text-main);
  margin: 0 0 8px 0;
  font-size: 1rem;
}

.sim-guide-section p {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 1024px) {
  .sim-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sim-header {
    flex-direction: column;
    gap: 12px;
  }

  .sim-body {
    flex-direction: column;
  }

  .sim-sidebar {
    width: 100%;
    display: flex;
    overflow-x: auto;
    padding: 8px 12px;
    gap: 8px;
  }

  .sim-nav-item {
    padding: 10px 16px;
    flex-shrink: 0;
  }

  .sim-nav-text {
    display: none;
  }

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

/* Playbook Modal */
.playbook-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.playbook-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.playbook-modal-content {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  width: 600px;
  max-width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.playbook-modal.active .playbook-modal-content {
  transform: translateY(0);
}

.playbook-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 16px;
}

.playbook-header h2 {
  color: var(--text-main);
  margin: 0;
  font-size: 1.5rem;
}

.playbook-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}

.playbook-close:hover {
  color: #ef4444;
}

.playbook-desc {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.playbook-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.playbook-step {
  background: #1e293b;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid #334155;
  transition: all 0.2s;
}

.playbook-step:hover {
  border-color: var(--accent-primary);
}

.playbook-step input[type="checkbox"] {
  display: none;
}

.playbook-step label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  position: relative;
  padding-left: 32px;
}

.playbook-step label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border: 2px solid #64748b;
  border-radius: 4px;
  transition: all 0.2s;
}

.playbook-step input[type="checkbox"]:checked + label::before {
  background: #22c55e;
  border-color: #22c55e;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='16px' height='16px'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
}

.playbook-step input[type="checkbox"]:checked + label .step-title {
  color: #22c55e;
  text-decoration: line-through;
}

.step-title {
  color: var(--text-main);
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.2s;
}

.step-detail {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ============================================ */
/* ANALYST VM (DESKTOP) STYLES */
/* ============================================ */

.vm-desktop {
  width: 100%;
  height: 100%;
  position: relative;
  background: url("https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=2070&auto=format&fit=crop")
    no-repeat center center/cover;
  overflow: hidden;
}

.vm-desktop::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6); /* Overlay for readability */
  pointer-events: none;
}

/* Desktop Icons */
.vm-desktop-icons {
  position: absolute;
  top: 20px;
  left: 20px;
  display: grid;
  grid-template-columns: repeat(2, 90px);
  grid-auto-rows: 100px;
  gap: 10px;
  z-index: 10;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 10px;
}

.vm-icon {
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  transition: background 0.2s;
}

.vm-icon:hover {
  background: rgba(255, 255, 255, 0.1);
}

.vm-icon-img {
  font-size: 2.5rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.vm-icon-label {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
}

/* Taskbar */
.vm-taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 48px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  z-index: 100;
}

.vm-start-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.vm-start-btn:hover,
.vm-start-btn.active {
  background: rgba(255, 255, 255, 0.1);
}

.vm-start-icon {
  font-size: 1.5rem;
}

.vm-taskbar-apps {
  flex: 1;
  display: flex;
  gap: 4px;
}

.vm-taskbar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 40px;
  background: transparent;
  border-radius: 4px;
  color: #94a3b8;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  max-width: 200px;
}

.vm-taskbar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.vm-taskbar-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-bottom: 2px solid var(--accent-primary);
}

.vm-taskbar-clock {
  color: white;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  padding: 0 12px;
}

/* Start Menu */
.vm-start-menu {
  position: absolute;
  bottom: 56px;
  left: 12px;
  width: 300px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 99;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s, opacity 0.2s;
  transform-origin: bottom left;
}

.vm-start-menu.hidden {
  display: none;
}

.vm-start-header {
  padding: 20px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  gap: 16px;
}

.vm-user-avatar {
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.2);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vm-user-info {
  color: white;
}

.vm-username {
  font-weight: 700;
  font-size: 1.1rem;
}

.vm-user-role {
  font-size: 0.8rem;
  opacity: 0.9;
}

.vm-start-items {
  padding: 8px;
}

.vm-start-item {
  padding: 10px 16px;
  color: #e2e8f0;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.vm-start-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* ==================== WINDOW MANAGEMENT ==================== */
.vm-window-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% - 48px); /* Minus taskbar */
  pointer-events: none; /* Allow clicks through to desktop */
  z-index: 50;
}

.vm-window {
  position: absolute;
  background: #1e1e1e;
  border: 1px solid #444;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  pointer-events: all; /* Windows capture clicks */
  overflow: hidden;
}

.vm-window.minimized {
  display: none;
}

.vm-window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
}

.vm-window-titlebar {
  background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
  border-bottom: 1px solid #444;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  user-select: none;
}

.vm-window-titlebar:active {
  cursor: grabbing;
}

.vm-window-title {
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vm-window-controls {
  display: flex;
  gap: 8px;
}

.vm-window-btn {
  width: 32px;
  height: 28px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vm-window-btn:hover {
  transform: scale(1.1);
}

.vm-btn-minimize {
  background: #3b82f6;
  color: white;
}

.vm-btn-minimize:hover {
  background: #2563eb;
}

.vm-btn-maximize {
  background: #10b981;
  color: white;
}

.vm-btn-maximize:hover {
  background: #059669;
}

.vm-btn-close {
  background: #ef4444;
  color: white;
}

.vm-btn-close:hover {
  background: #dc2626;
}

.vm-window-content {
  flex: 1;
  overflow: auto;
  background: #1e1e1e;
  position: relative;
}

.vm-start-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 8px 0;
}

/* Windows */
.vm-window-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% - 48px);
  pointer-events: none; /* Let clicks pass through to icons */
  z-index: 20;
}

.vm-window {
  position: absolute;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  min-width: 400px;
  min-height: 300px;
  resize: both;
  overflow: hidden;
  transition: transform 0.1s, opacity 0.1s;
}

.vm-window.minimized {
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  pointer-events: none;
}

.vm-window-header {
  height: 36px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  cursor: grab;
  user-select: none;
}

.vm-window-header:active {
  cursor: grabbing;
}

.vm-window-title {
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vm-window-controls {
  display: flex;
  gap: 8px;
}

.vm-control-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
}

.vm-control-btn.close {
  background: #ef4444;
}
.vm-control-btn.minimize {
  background: #eab308;
}
.vm-control-btn.maximize {
  background: #22c55e;
}

.vm-window-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: #020617;
}

.browser-url-bar {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  align-items: center;
}

.browser-url-input {
  flex: 1;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 4px;
  color: #e2e8f0;
  padding: 6px 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
}

/* =========================================
   Analyst VM Tool Interiors
   ========================================= */

/* --- Common Tool Layout --- */
.vm-tool-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* --- Terminal App --- */
.vm-terminal-container {
  height: 100%;
  background-color: #0c0c0c;
  color: #22c55e;
  font-family: "Consolas", "Monaco", monospace;
  padding: 10px;
  overflow-y: auto;
  font-size: 0.95rem;
  cursor: text;
}
.vm-term-output {
  margin-bottom: 5px;
}
.vm-term-input-line {
  display: flex;
  align-items: center;
}
.vm-term-prompt {
  color: #f59e0b; /* Orange/Yellow prompt */
  margin-right: 8px;
  white-space: nowrap;
}
.vm-term-input {
  background: transparent;
  border: none;
  color: #22c55e;
  font-family: inherit;
  font-size: inherit;
  flex: 1;
  outline: none;
}
.vm-term-response {
  color: #e2e8f0;
}

/* --- SIEM App --- */
.vm-siem-header {
  padding: 10px 15px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
}
.vm-siem-search {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-main);
  font-family: monospace;
}
.vm-siem-results {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}
.vm-table {
  width: 100%;
  border-collapse: collapse;
}
.vm-table th {
  background: rgba(30, 41, 59, 0.9);
  position: sticky;
  top: 0;
  text-align: left;
  padding: 10px 15px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-bottom: 2px solid var(--border);
}
.vm-table td {
  padding: 10px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 0.9rem;
}
.vm-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* --- Email App --- */
.vm-email-layout {
  display: flex;
  height: 100%;
}
.vm-email-sidebar {
  width: 200px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 10px 0;
}
.vm-email-folder {
  padding: 10px 20px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.vm-email-folder:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}
.vm-email-folder.active {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  border-left: 3px solid var(--accent-primary);
}
.vm-email-list {
  width: 300px;
  background: var(--bg-dark);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.vm-email-item {
  padding: 15px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}
.vm-email-item:hover {
  background: rgba(255, 255, 255, 0.03);
}
.vm-email-item.unread {
  background: rgba(59, 130, 246, 0.05);
  border-left: 3px solid var(--accent-primary);
}
.email-from {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}
.email-subject {
  color: var(--text-muted);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.email-date {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 5px;
  text-align: right;
}
.vm-email-view {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #ffffff; /* White bg for realistic email feel */
  color: #1e293b;
}
.email-detail-header {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 15px;
  margin-bottom: 15px;
}
.email-detail-header h3 {
  margin: 0 0 10px 0;
  color: #0f172a;
}
.email-meta {
  color: #64748b;
  font-size: 0.9rem;
}
.email-detail-body {
  line-height: 1.6;
}

/* --- Browser App Extras --- */
.vm-browser-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.browser-nav-btns button {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 4px;
}
.browser-nav-btns button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.vm-browser-content {
  flex: 1;
  background: #fff;
  overflow-y: auto;
  position: relative;
  color: #334155;
  padding: 0;
}
.ip-hunter-container input {
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
  background: #fff !important;
}
.ip-hunter-container h2 {
  color: #1e293b !important;
}
/* --- Files App --- */
.vm-files-layout {
  display: flex;
  height: 100%;
}

.vm-files-sidebar {
  width: 200px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 10px 0;
  display: flex;
  flex-direction: column;
}

.vm-files-nav-item {
  padding: 8px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.vm-files-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.vm-files-nav-item.active {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  font-weight: 500;
}

.vm-files-content {
  flex: 1;
  background: var(--bg-dark);
  padding: 0;
  display: flex;
  flex-direction: column;
}

.vm-files-toolbar {
  height: 40px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 10px;
}

.vm-files-path {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: monospace;
}

.vm-files-grid {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 20px;
  overflow-y: auto;
}

.vm-file-item {
  width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px;
  border-radius: 4px;
  transition: background 0.2s;
}

.vm-file-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.vm-file-item.selected {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.vm-file-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.vm-file-name {
  color: var(--text-main);
  font-size: 0.85rem;
  text-align: center;
  word-break: break-word;
}

/* ============================================
   NETSHARK TOOL STYLES
   ============================================ */
.vm-netshark-layout {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f0f0f0;
}

.vm-netshark-toolbar {
  padding: 8px;
  background: #e5e5e5;
  border-bottom: 1px solid #ccc;
  display: flex;
  gap: 10px;
  align-items: center;
}

.vm-netshark-packet-list {
  flex: 1;
  overflow-y: auto;
  background: white;
  border-bottom: 1px solid #ccc;
}

.vm-netshark-packet-details {
  height: 250px;
  background: #fdfdfd;
  display: flex;
  flex-direction: column;
  border-top: 2px solid #ccc;
}

.vm-netshark-tabs {
  background: #e5e5e5;
  padding: 0;
  border-bottom: 1px solid #ccc;
  display: flex;
}

.vm-netshark-tab {
  padding: 5px 15px;
  font-size: 0.8rem;
  color: #333;
  cursor: pointer;
  border-right: 1px solid #ccc;
}

.vm-netshark-tab.active {
  background: #fdfdfd;
  font-weight: 600;
  border-bottom: 1px solid #fdfdfd;
  margin-bottom: -1px;
}

.vm-netshark-detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  font-family: "Consolas", monospace;
  font-size: 0.85rem;
  color: #333;
}

/* Wireshark-like Table */
.vm-table-compact th {
  padding: 2px 6px;
  font-size: 0.8rem;
  font-weight: normal;
  border-right: 1px solid #ccc;
  background: #e5e5e5;
  color: #222;
}

.vm-table-compact td {
  padding: 2px 6px;
  font-size: 0.8rem;
  border-right: 1px solid #eee;
  color: #333;
}

.vm-table-compact tr:hover {
  background: #dbeeff !important;
}

.vm-table-compact tr.selected {
  background: #2d69a3 !important;
  color: white !important;
}

/* ============================================
   SVG DIAGRAM STYLES
   ============================================ */

.svg-diagram {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.svg-diagram:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Container for SVG diagrams */
.svg-diagram-container {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 8px;
  margin: 16px 0;
  background: var(--bg-dark);
  border: 1px solid var(--border);
}

.svg-diagram-container img {
  width: 100%;
  height: auto;
  display: block;
}

/* Responsive sizing for different diagram types */
.svg-diagram.tcp-handshake,
.svg-diagram.beaconing,
.svg-diagram.process-tree {
  max-width: 600px;
}

.svg-diagram.kill-chain,
.svg-diagram.mitre-attack,
.svg-diagram.siem-pipeline {
  max-width: 800px;
}

.svg-diagram.phishing-diagram,
.svg-diagram.sqli-diagram,
.svg-diagram.dns-tunneling {
  max-width: 650px;
}

/* Light mode adjustments for SVGs */
[data-theme="light"] .svg-diagram-container {
  background: #ffffff;
  border-color: #e2e8f0;
}

/* Inline SVG wrapper */
.inline-svg-diagram {
  width: 100%;
  max-width: 700px;
  margin: 16px auto;
  display: block;
}

.inline-svg-diagram svg {
  width: 100%;
  height: auto;
}

/* Lesson diagram class (for backward compatibility with img tags) */
.lesson-diagram {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
  display: block;
  border: 1px solid var(--border);
}

/* Clickable diagram for zoom/modal */
.diagram-zoomable {
  cursor: zoom-in;
}

.diagram-zoomable:hover {
  opacity: 0.9;
}

/* Visibility Utilities */
.hidden {
  display: none !important;
}
/* VM Desktop Styles */
.vm-desktop {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

.vm-desktop-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, 100px);
  grid-auto-rows: 100px;
  gap: 20px;
  padding: 30px;
  height: calc(100vh - 200px);
  overflow-y: auto;
}

.vm-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  padding: 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.vm-icon:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.vm-icon-img {
  font-size: 2.5rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.vm-icon-label {
  font-size: 0.85rem;
  color: #f1f5f9;
  text-align: center;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
