/* ==========================================================================
   AgentOS — Website Stylesheet (Spekra / PulseOps Design Language)
   ========================================================================== */

:root {
  --bg-dark: #070b14;
  --bg-card: #0d1527;
  --bg-card-hover: #121c33;
  --border: #1e293b;
  --border-glow: rgba(99, 102, 241, 0.4);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --secondary: #38bdf8;
  --accent: #a855f7;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
}

body {
  font-family: var(--font);
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(56, 189, 248, 0.1) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(168, 85, 247, 0.08) 0px, transparent 50%);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 1. Announcement Banner */
.top-banner {
  background: linear-gradient(90deg, #1e1838 0%, #111a36 50%, #0d1e38 100%);
  border-bottom: 1px solid rgba(99, 102, 241, 0.25);
  text-align: center;
  padding: 10px 16px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.top-banner-pill {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 2px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.top-banner-link {
  color: var(--secondary);
  font-weight: 600;
  margin-left: 6px;
  transition: opacity 0.2s;
}

.top-banner-link:hover {
  opacity: 0.85;
}

/* 2. Navigation Header */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

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

.nav-link {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text-main);
}

.btn-github {
  background: #1e293b;
  border: 1px solid #334155;
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-github:hover {
  background: #273549;
  border-color: #475569;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 40%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  max-width: 780px;
  margin: 0 auto 36px;
  font-size: 1.18rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 10px;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: #334155;
}

/* Quickstart code terminal */
.hero-terminal {
  max-width: 600px;
  margin: 0 auto 40px;
  background: #090e1c;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #38bdf8;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.btn-copy {
  background: #1e293b;
  border: 1px solid #334155;
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-copy:hover {
  background: #334155;
}

/* Status live badge */
.status-bar-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 8px 18px;
  border-radius: 999px;
  color: #6ee7b7;
  font-size: 0.84rem;
  font-weight: 700;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* 4. Section Headers */
section {
  padding: 64px 0;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-head .badge {
  color: var(--secondary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: block;
}

.section-head h2 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* 5. Interactive Simulator */
.simulator-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  margin-bottom: 24px;
}

.sim-nav {
  display: flex;
  background: #090e1c;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.sim-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.sim-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.sim-tab-btn.active {
  color: #fff;
  border-bottom-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.sim-panel {
  display: none;
  padding: 32px;
}

.sim-panel.active {
  display: block;
}

.sim-split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
}

@media (max-width: 900px) {
  .sim-split {
    grid-template-columns: 1fr;
  }
}

.sim-config {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sim-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.sim-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.sim-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.sim-stat-box {
  background: #090e1c;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.sim-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sim-stat-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-top: 4px;
}

.btn-trigger {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-trigger:hover {
  opacity: 0.92;
}

.sim-output-box {
  background: #090e1c;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 380px;
}

.sim-output-header {
  background: #0f172a;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.pill-idle {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

.pill-working {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.pill-success {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.sim-terminal {
  flex: 1;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  overflow-y: auto;
  line-height: 1.5;
  color: #94a3b8;
}

.log-line {
  display: block;
  margin-bottom: 4px;
}

.log-info { color: #38bdf8; }
.log-verifier { color: #a855f7; }
.log-memory { color: #f59e0b; }
.log-success { color: #10b981; font-weight: 700; }

.sim-result-data {
  max-height: 160px;
  overflow-y: auto;
  background: #070b14;
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #a5b4fc;
}

/* 6. Core OS Engines Grid */
.engines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.engine-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

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

.engine-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.engine-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
}

.engine-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.engine-tag {
  font-size: 0.75rem;
  color: var(--secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.engine-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.engine-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.engine-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.engine-bullets li span.check {
  color: var(--success);
  font-weight: 900;
}

/* 7. The 7 Autonomous Agents Showcase */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s;
}

.agent-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  border-color: #334155;
}

.agent-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.agent-name {
  font-size: 1.35rem;
  font-weight: 800;
}

.agent-domain {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.agent-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
}

.badge-green { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid var(--success); }
.badge-blue { background: rgba(56, 189, 248, 0.15); color: var(--secondary); border: 1px solid var(--secondary); }
.badge-purple { background: rgba(168, 85, 247, 0.15); color: var(--accent); border: 1px solid var(--accent); }
.badge-orange { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid var(--warning); }
.badge-pink { background: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid #ec4899; }

.agent-body {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

.agent-metrics-row {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.agent-metric {
  flex: 1;
}

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

.agent-metric-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
}

/* 8. Interactive ROI Calculator */
.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
}

@media (max-width: 900px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

.slider-group {
  margin-bottom: 24px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.slider-label {
  font-size: 0.95rem;
  font-weight: 700;
}

.slider-val-badge {
  background: #1e293b;
  color: var(--secondary);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 4px 12px;
  border-radius: 8px;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #1e293b;
  outline: none;
  accent-color: var(--primary);
  cursor: pointer;
}

.calc-summary-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(56, 189, 248, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.calc-result-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 1px;
}

.calc-result-number {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 900;
  color: #10b981;
  margin: 12px 0 20px;
}

.calc-submetrics {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
}

.calc-submetric-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

/* 9. FAQ Section */
.faq-list {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item.active {
  border-color: var(--primary);
}

.faq-question {
  padding: 20px 24px;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.faq-arrow {
  transition: transform 0.2s;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  display: none;
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  display: block;
}

/* 10. Footer */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  background: #050810;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 24px;
  font-size: 0.8rem;
}

/* ==========================================================================
   11. Interactive Gamification & Animation Systems
   ========================================================================== */

/* Background Particle Neural Canvas */
#neural-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* Foreground Confetti Canvas */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* Floating Gamification HUD */
.gamification-hud {
  background: rgba(13, 21, 39, 0.92);
  border: 1px solid rgba(99, 102, 241, 0.35);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 16px 24px;
  margin: 0 auto 36px;
  max-width: 960px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.15);
  position: relative;
  overflow: hidden;
}

.gamification-hud::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, #818cf8, transparent);
  animation: hud-shimmer 3s infinite linear;
}

@keyframes hud-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.hud-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hud-rank-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.5);
  animation: float-slow 3s ease-in-out infinite;
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.hud-rank-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #fff;
}

.hud-rank-sub {
  font-size: 0.76rem;
  color: var(--secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hud-xp-container {
  flex: 1;
  max-width: 380px;
}

.hud-xp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.hud-xp-bar-outer {
  width: 100%;
  height: 10px;
  background: #090e1c;
  border-radius: 999px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.hud-xp-bar-inner {
  height: 100%;
  width: 15%;
  background: linear-gradient(90deg, #6366f1, #38bdf8, #10b981);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
}

.hud-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-audio-toggle {
  background: #1e293b;
  border: 1px solid #334155;
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-audio-toggle:hover {
  background: #334155;
  border-color: #475569;
}

.btn-audio-toggle.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--success);
  color: #6ee7b7;
}

/* 12. Trophy & Achievement Showcase */
.trophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.trophy-card {
  background: #090e1c;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.trophy-card.locked {
  opacity: 0.5;
  filter: grayscale(0.85);
}

.trophy-card.unlocked {
  opacity: 1;
  filter: none;
  border-color: #f59e0b;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.12) 0%, #090e1c 70%);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
  animation: badge-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badge-pop {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.trophy-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}

.trophy-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.trophy-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.trophy-xp-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

.trophy-card.unlocked .trophy-xp-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

/* 13. Cyber Adversarial Defense Simulator */
.defense-arena {
  background: #090e1c;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.defense-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

@media (max-width: 900px) {
  .defense-grid {
    grid-template-columns: 1fr;
  }
}

.attack-menu {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.btn-attack {
  background: #10172a;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 14px 18px;
  text-align: left;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.88rem;
  transition: all 0.2s;
}

.btn-attack:hover {
  background: #172036;
  border-color: #ef4444;
  transform: translateX(4px);
}

.attack-label-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.attack-pill-threat {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 999px;
}

.defense-radar-box {
  background: #050812;
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 280px;
}

.radar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.shield-status-active {
  color: #10b981;
  font-weight: 800;
}

.radar-terminal {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #94a3b8;
  overflow-y: auto;
}

.log-threat { color: #ef4444; font-weight: 700; }
.log-shield { color: #10b981; font-weight: 700; }

/* Level-Up Celebration Modal / Notification */
.levelup-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #1e1b4b 0%, #0d1527 100%);
  border: 2px solid #f59e0b;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 10px 40px rgba(245, 158, 11, 0.4);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: toast-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 400px;
}

@keyframes toast-in {
  0% { transform: translateY(60px) scale(0.8); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.levelup-icon {
  font-size: 2.2rem;
  animation: float-slow 2s infinite ease-in-out;
}

.levelup-text h4 {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fbbf24;
  margin-bottom: 2px;
}

.levelup-text p {
  font-size: 0.8rem;
  color: #e2e8f0;
}

