/**
 * Created by 11Hopem
 * Copyright (c) 2026 11Hopem. All rights reserved.
 * Licensed under 11Hopem Proprietary License.
 */

:root {
  --bg-dark: #070913;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(6, 182, 212, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --cyan-glow: #06b6d4;
  --purple-glow: #8b5cf6;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --gradient-primary: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 50%, #ec4899 100%);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(6, 182, 212, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(139, 92, 246, 0.12) 0%, transparent 45%);
  background-attachment: fixed;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Nav */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(7, 9, 19, 0.85);
  border-bottom: 1px solid var(--border-subtle);
}

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

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cyan-glow);
}

.user-hud-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 0.85rem;
}

.xp-pill {
  color: var(--amber);
  font-weight: 700;
}

.level-tag {
  color: var(--cyan-glow);
  font-size: 0.78rem;
  background: rgba(6, 182, 212, 0.12);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

/* Hero Section */
section.hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 999px;
  color: #c084fc;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero h2 {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-primary);
  color: #fff;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(6, 182, 212, 0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Stats Bar */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  backdrop-filter: blur(12px);
}

.stat-item h3 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--cyan-glow);
}

.stat-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Sections Common */
section {
  padding: 5rem 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-head span.badge {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan-glow);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 0.8rem;
}

.section-head h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

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

/* Track Cards Grid */
.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.75rem;
}

.track-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2rem;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.track-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.1);
}

.track-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.track-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.track-xp {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--amber);
}

.track-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  line-height: 1.3;
}

.track-card p.track-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.module-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.module-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.module-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.module-item .mod-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.module-item.completed .mod-title {
  color: var(--emerald);
}

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

/* Prompt Evaluator Playground */
.playground-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2.5rem;
  backdrop-filter: blur(16px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.input-column h3,
.results-column h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.input-column p,
.results-column p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

textarea.prompt-input {
  width: 100%;
  height: 220px;
  background: rgba(7, 9, 19, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.95rem;
  padding: 1rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea.prompt-input:focus {
  border-color: var(--cyan-glow);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
}

.playground-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.score-badge-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  margin-bottom: 1.25rem;
}

.score-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--cyan-glow);
  font-weight: 800;
}

.score-circle .score-num {
  font-size: 1.5rem;
  line-height: 1;
}

.score-circle .score-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.score-meta h4 {
  font-size: 1.1rem;
  font-weight: 700;
}

.metric-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.metric-bar-item {
  font-size: 0.78rem;
}

.metric-bar-item .metric-head {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  width: 0%;
  transition: width 0.4s ease;
}

.critique-box {
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--purple-glow);
  padding: 0.85rem 1rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-bottom: 1.25rem;
}

.enhanced-box {
  background: rgba(7, 9, 19, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 1rem;
}

.enhanced-box h5 {
  font-size: 0.82rem;
  text-transform: uppercase;
  color: #c084fc;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.enhanced-box pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #94a3b8;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 140px;
  overflow-y: auto;
}

/* Cheatsheets Grid */
.cheatsheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.cheat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cheat-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.cheat-card span.category-pill {
  font-size: 0.72rem;
  color: var(--cyan-glow);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
  display: inline-block;
}

.cheat-card pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #cbd5e1;
  white-space: pre-wrap;
  max-height: 150px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

/* Quiz & Certification */
.quiz-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.quiz-card {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.quiz-card:last-child {
  border-bottom: none;
}

.quiz-q-num {
  font-size: 0.8rem;
  color: var(--cyan-glow);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.quiz-q-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.quiz-options {
  display: grid;
  gap: 0.65rem;
}

.quiz-opt-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s;
}

.quiz-opt-label:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.quiz-opt-label input[type="radio"] {
  accent-color: var(--cyan-glow);
}

/* Certificate Render View */
.certificate-view {
  background: linear-gradient(135deg, #090d16 0%, #111a2e 100%);
  border: 4px double #06b6d4;
  border-radius: 24px;
  padding: 3.5rem 2.5rem;
  text-align: center;
  position: relative;
  box-shadow: 0 0 40px rgba(6, 182, 212, 0.2);
  margin-top: 2rem;
}

.cert-header h3 {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.cert-recipient {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin: 1.5rem 0 0.5rem;
  text-decoration: underline;
  text-decoration-color: var(--cyan-glow);
}

.cert-meta {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 1.5rem;
}

/* Modal for Lesson Content */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal-content {
  background: #0d121f;
  border: 1px solid var(--border-focus);
  border-radius: 20px;
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-content pre code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: block;
  background: #060911;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  color: #38bdf8;
  margin: 1rem 0;
  overflow-x: auto;
}

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(5, 7, 15, 0.95);
  padding: 3rem 0;
  margin-top: 5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand a {
  color: var(--cyan-glow);
  text-decoration: none;
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: #0f172a;
  color: #fff;
  border: 1px solid var(--cyan-glow);
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  font-size: 0.88rem;
  animation: slideIn 0.3s ease;
}

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

/* Responsive */
@media (max-width: 900px) {
  .hero h2 {
    font-size: 2.3rem;
  }
  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .playground-box {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}
