/* ============================================================
   SITE SETTINGS — Edit colors, fonts, and branding here
   All pages share this file so changes apply everywhere.
============================================================ */
:root {
  --brand-primary: #FF5722;
  --brand-secondary: #00E5FF;
  --brand-dark: #0A0A0F;
  --brand-card: #13131C;
  --brand-card-border: #ffffff18;
  --brand-text: #F0EEE8;
  --brand-muted: #888899;
  --brand-yellow: #FFD600;
  --font-display: 'Archivo Black', sans-serif;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 16px;
  --section-pad: 6rem 2rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--brand-dark);
  color: var(--brand-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 1000;
}

/* ============================================================
   NAV
============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2.5rem;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--brand-card-border);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--brand-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-logo span { color: var(--brand-primary); }

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

.nav-links a {
  color: var(--brand-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

.nav-cta {
  background: var(--brand-primary) !important;
  color: #fff !important;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-weight: 700 !important;
  transition: transform 0.15s, box-shadow 0.15s !important;
}

.nav-cta:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 24px rgba(255,87,34,0.4) !important;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--brand-text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn-primary {
  background: var(--brand-primary);
  color: #fff;
  padding: 0.85rem 2.2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255,87,34,0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--brand-text);
  padding: 0.85rem 2.2rem;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.2);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

/* ============================================================
   LAYOUT HELPERS
============================================================ */
.container {
  max-width: 1140px;
  margin: 0 auto;
}

section { padding: var(--section-pad); position: relative; }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-sub {
  color: var(--brand-muted);
  max-width: 480px;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ============================================================
   PAGE HERO (inner pages — not the full-screen home hero)
============================================================ */
.page-hero {
  padding: 10rem 2rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  width: 500px; height: 500px;
  background: rgba(255,87,34,0.14);
  top: -100px; left: 50%;
  transform: translateX(-50%);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.page-hero h1 span { color: var(--brand-primary); }

.page-hero p {
  color: var(--brand-muted);
  font-size: 1.15rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================================
   TICKER
============================================================ */
.ticker-wrap {
  overflow: hidden;
  border-top: 1px solid var(--brand-card-border);
  border-bottom: 1px solid var(--brand-card-border);
  background: rgba(255,87,34,0.06);
  padding: 0.9rem 0;
  white-space: nowrap;
}

.ticker-track {
  display: inline-block;
  animation: ticker 28s linear infinite;
}

.ticker-track span {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-muted);
  padding: 0 2.5rem;
}

.ticker-track span.accent { color: var(--brand-primary); }

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   CARDS — Topic Cards
============================================================ */
.topic-card {
  background: var(--brand-card);
  border: 1px solid var(--brand-card-border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: block;
  color: var(--brand-text);
}

.topic-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,87,34,0.35);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.topic-icon {
  font-size: 2.5rem;
  margin-bottom: 1.2rem;
  display: block;
}

.topic-name {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.topic-desc {
  color: var(--brand-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.topic-level {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-secondary);
  background: rgba(0,229,255,0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
}

.topic-level.intermediate { color: var(--brand-yellow); background: rgba(255,214,0,0.1); }
.topic-level.beginner     { color: var(--brand-secondary); background: rgba(0,229,255,0.1); }
.topic-level.all          { color: #b98eff; background: rgba(185,142,255,0.12); }

/* ============================================================
   CARDS — Tutorial Cards
============================================================ */
.tut-card {
  background: var(--brand-card);
  border: 1px solid var(--brand-card-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--brand-text);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}

.tut-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,87,34,0.35);
}

.tut-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: #1a1a28;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  position: relative;
  overflow: hidden;
}

/* Replace tut-thumb content with a YouTube embed or image:
   <iframe width="100%" height="100%" src="https://www.youtube.com/embed/VIDEO_ID"
   frameborder="0" allowfullscreen style="position:absolute;inset:0;"></iframe>
*/

.tut-thumb .play-btn {
  position: absolute;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(255,87,34,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  bottom: 1rem; left: 1rem;
}

.tut-meta {
  padding: 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tut-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.tut-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brand-primary);
  background: rgba(255,87,34,0.12);
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
}

.tut-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.tut-excerpt {
  color: var(--brand-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  flex: 1;
}

.tut-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--brand-card-border);
  font-size: 0.8rem;
  color: var(--brand-muted);
}

.tut-footer .watch-link {
  color: var(--brand-primary);
  font-weight: 600;
  text-decoration: none;
}

/* ============================================================
   TOOL CARDS
============================================================ */
.tool-card {
  background: var(--brand-card);
  border: 1px solid var(--brand-card-border);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
  text-decoration: none;
  display: block;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0,229,255,0.3);
}

.tool-logo {
  font-size: 2.4rem;
  margin-bottom: 0.8rem;
}

.tool-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--brand-text);
  margin-bottom: 0.3rem;
}

.tool-desc {
  font-size: 0.82rem;
  color: var(--brand-muted);
  line-height: 1.45;
}

/* ============================================================
   NEWSLETTER
============================================================ */
.newsletter-inner {
  background: linear-gradient(135deg, rgba(255,87,34,0.1), rgba(0,229,255,0.07));
  border: 1px solid rgba(255,87,34,0.25);
  border-radius: 24px;
  padding: 4rem;
  text-align: center;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 440px;
  margin: 2rem auto 0;
}

.newsletter-form input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50px;
  padding: 0.75rem 1.4rem;
  color: var(--brand-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input:focus { border-color: rgba(255,87,34,0.6); }
.newsletter-form input::placeholder { color: var(--brand-muted); }

/* ============================================================
   FOOTER
============================================================ */
footer {
  padding: 2.5rem 2.5rem;
  border-top: 1px solid var(--brand-card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--brand-text);
  text-decoration: none;
}

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

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

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

.footer-links a:hover { color: var(--brand-text); }

.footer-copy {
  color: var(--brand-muted);
  font-size: 0.82rem;
}

/* ============================================================
   DARK SECTION VARIANT
============================================================ */
.section-dark {
  background: var(--brand-card);
  border-top: 1px solid var(--brand-card-border);
  border-bottom: 1px solid var(--brand-card-border);
}

/* ============================================================
   GRIDS
============================================================ */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.tutorials-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(10,10,15,0.97);
    padding: 1.5rem 2.5rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--brand-card-border);
  }
  .nav-hamburger { display: flex; }
  footer { flex-direction: column; text-align: center; }
  .newsletter-inner { padding: 2.5rem 1.5rem; }
  .newsletter-form { flex-direction: column; }
  .page-hero { padding: 8rem 1.5rem 4rem; }
}

/* ============================================================
   XP & LEVELING SYSTEM
============================================================ */

/* --- Nav XP Widget --- */
#nav-xp-widget {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--brand-card-border);
  border-radius: 50px;
  padding: 0.35rem 0.9rem 0.35rem 0.5rem;
  transition: border-color 0.2s, background 0.2s;
  margin-left: 0.5rem;
}

#nav-xp-widget:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.07);
}

.nav-xp-badge { font-size: 1.2rem; line-height: 1; }

.nav-xp-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-xp-rank {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brand-text);
  white-space: nowrap;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-xp-bar-wrap {
  display: block;
  width: 90px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.nav-xp-bar-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.nav-xp-total {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--brand-muted);
  white-space: nowrap;
}

/* --- Complete Button on Tutorial Cards --- */
.xp-complete-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
  background: rgba(255,87,34,0.1);
  border: 1px solid rgba(255,87,34,0.35);
  color: var(--brand-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.xp-complete-btn:hover:not(:disabled) {
  background: rgba(255,87,34,0.2);
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}

.xp-complete-btn.xp-done {
  background: rgba(29,185,84,0.1);
  border-color: rgba(29,185,84,0.35);
  color: #1db954;
  cursor: default;
}

.tut-card-done {
  border-color: rgba(29,185,84,0.3) !important;
}

.tut-card-done .tut-thumb::after {
  content: '✓';
  position: absolute;
  top: 0.7rem; right: 0.7rem;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #1db954;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- XP Toast --- */
#xp-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--brand-card);
  border: 1px solid var(--brand-card-border);
  border-radius: 14px;
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  z-index: 9999;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s;
  max-width: 340px;
}

#xp-toast.toast-show {
  opacity: 1;
  transform: translateY(0);
}

.toast-xp {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--brand-primary);
  white-space: nowrap;
}

.toast-msg {
  font-size: 0.88rem;
  color: var(--brand-muted);
  line-height: 1.4;
}

.toast-msg a {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 600;
}

/* Level-up toast */
#xp-toast.toast-levelup {
  border-color: rgba(255,214,0,0.4);
  background: #13131C;
}

.toast-rank-up {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.toast-badge { font-size: 2.5rem; }

.toast-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--brand-yellow);
  margin-bottom: 0.1rem;
}

.toast-rank {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand-text);
  margin-bottom: 0.2rem;
}

.toast-sub {
  font-size: 0.8rem;
  color: var(--brand-muted);
  line-height: 1.4;
}

/* ============================================================
   PROGRESS PAGE
============================================================ */
.progress-hero {
  text-align: center;
  padding: 9rem 2rem 3rem;
  position: relative;
  overflow: hidden;
}

.progress-rank-badge {
  font-size: 5rem;
  display: block;
  margin-bottom: 1rem;
}

.progress-rank-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.progress-xp-count {
  font-size: 1.1rem;
  color: var(--brand-muted);
  margin-bottom: 2rem;
}

.progress-bar-wrap {
  max-width: 520px;
  margin: 0 auto 0.6rem;
  height: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 1s ease;
}

.progress-bar-label {
  font-size: 0.8rem;
  color: var(--brand-muted);
  text-align: center;
}

/* Stats row */
.progress-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 600px;
  margin: 2.5rem auto 0;
}

.progress-stat {
  background: var(--brand-card);
  border: 1px solid var(--brand-card-border);
  border-radius: 14px;
  padding: 1.2rem;
  text-align: center;
}

.progress-stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--brand-primary);
}

.progress-stat-label {
  font-size: 0.78rem;
  color: var(--brand-muted);
  margin-top: 0.2rem;
}

/* Rank ladder */
.rank-ladder {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--brand-card);
  border: 1px solid var(--brand-card-border);
  border-radius: 14px;
  padding: 1rem 1.4rem;
  transition: border-color 0.2s;
}

.rank-row.rank-current {
  border-color: var(--brand-primary);
  background: rgba(255,87,34,0.06);
}

.rank-row.rank-unlocked {
  border-color: rgba(29,185,84,0.3);
  background: rgba(29,185,84,0.04);
}

.rank-row.rank-locked {
  opacity: 0.45;
}

.rank-row-badge { font-size: 1.8rem; flex-shrink: 0; }

.rank-row-info { flex: 1; }

.rank-row-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.rank-row-desc {
  font-size: 0.82rem;
  color: var(--brand-muted);
}

.rank-row-xp {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-muted);
  white-space: nowrap;
}

.rank-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
}

.rank-status-current {
  background: rgba(255,87,34,0.15);
  color: var(--brand-primary);
}

.rank-status-done {
  background: rgba(29,185,84,0.12);
  color: #1db954;
}

.rank-status-locked {
  background: rgba(255,255,255,0.06);
  color: var(--brand-muted);
}

/* Completed tutorials list */
.completed-list {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.completed-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--brand-card);
  border: 1px solid rgba(29,185,84,0.2);
  border-radius: 12px;
  padding: 0.85rem 1.2rem;
  font-size: 0.92rem;
}

.completed-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #1db954;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.completed-name { flex: 1; }

.completed-xp {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--brand-muted);
  background: var(--brand-card);
  border: 1px dashed var(--brand-card-border);
  border-radius: var(--radius);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; display: block; }

@media (max-width: 600px) {
  .progress-stats { grid-template-columns: 1fr 1fr; }
  #nav-xp-widget .nav-xp-rank { max-width: 80px; }
  #nav-xp-widget .nav-xp-bar-wrap { width: 60px; }
}

/* ============================================================
   LEVEL-UP FULL SCREEN OVERLAY
============================================================ */
#levelup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 10, 0.92);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.5s ease;
}

#levelup-overlay.levelup-show { opacity: 1; }

#levelup-overlay.levelup-out {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.levelup-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.levelup-particle {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  animation: particle-rise linear forwards;
  opacity: 0;
}

@keyframes particle-rise {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  80%  { opacity: 0.8; }
  100% { transform: translateY(-110vh) rotate(720deg); opacity: 0; }
}

.levelup-card {
  position: relative;
  background: #13131C;
  border: 1px solid rgba(255, 214, 0, 0.3);
  border-radius: 28px;
  padding: 3.5rem 4rem;
  text-align: center;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
  overflow: hidden;
  animation: card-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes card-pop {
  from { transform: scale(0.7) translateY(30px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.levelup-glow {
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.12; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 0.22; transform: translate(-50%, -50%) scale(1.15); }
}

.levelup-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--brand-yellow);
  margin-bottom: 1.2rem;
  animation: flicker 0.1s steps(1) 0.4s 6 alternate;
}

@keyframes flicker {
  from { opacity: 1; }
  to   { opacity: 0.3; }
}

.levelup-badge {
  font-size: 5.5rem;
  line-height: 1;
  margin-bottom: 1rem;
  animation: badge-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
  display: block;
}

@keyframes badge-bounce {
  from { transform: scale(0.3) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

.levelup-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  animation: slide-up 0.4s ease 0.6s both;
}

.levelup-desc {
  color: var(--brand-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
  animation: slide-up 0.4s ease 0.75s both;
}

.levelup-xp-pill {
  display: inline-block;
  background: rgba(255,87,34,0.15);
  border: 1px solid rgba(255,87,34,0.4);
  color: var(--brand-primary);
  font-family: var(--font-display);
  font-size: 0.88rem;
  padding: 0.35rem 1.1rem;
  border-radius: 50px;
  margin-bottom: 2rem;
  animation: slide-up 0.4s ease 0.85s both;
}

@keyframes slide-up {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.levelup-dismiss {
  display: block;
  width: 100%;
  background: var(--brand-primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.9rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  animation: slide-up 0.4s ease 1s both;
}

.levelup-dismiss:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255,87,34,0.45);
}

/* ============================================================
   VIDEO MODAL (embedded player)
============================================================ */
#video-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(5,5,10,0.92);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

#video-modal.modal-open {
  opacity: 1;
  pointer-events: all;
}

.video-modal-inner {
  width: min(860px, 94vw);
  position: relative;
}

.video-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.video-modal-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 50px);
}

.video-modal-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--brand-text);
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.video-modal-close:hover { background: rgba(255,255,255,0.2); }

.video-modal-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.video-modal-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Clicking the thumbnail thumbnail triggers the modal */
.tut-thumb.has-video {
  cursor: pointer;
}

.tut-thumb.has-video:hover .play-btn {
  opacity: 1;
}


/* Thumb link wrapper (replaces <a> for embedded video) */
.tut-thumb-link {
  cursor: pointer;
  display: block;
}

.tut-thumb-link:hover .play-btn {
  opacity: 1;
}

/* ── Logo image replacements ── */
.nav-logo-img {
  height: 65px;
  width: auto;
  display: block;
  object-fit: contain;
}

.footer-logo-img {
  height: 65px;
  width: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto 1rem;
}
