/*
Theme Name: Pipcraft Homepage
Theme URI: https://example.com
Author: Siren
Description: Forex & digital finance education homepage, converted from a Lovable/React build.
Version: 1.0
*/

/* ---------- Design tokens ---------- */
:root {
  --background: #0a0e17;
  --surface: #111726;
  --surface-2: #161d2f;
  --card: #131a2b;
  --border: #232b40;
  --foreground: #f5f6f8;
  --muted-foreground: #9aa3b8;
  --primary: #d4af37;
  --primary-foreground: #0a0e17;
  --destructive: #e5484d;
  --radius: 14px;
  --shadow-elevated: 0 20px 50px -20px rgba(0,0,0,0.6);
  --shadow-gold: 0 10px 30px -10px rgba(212,175,55,0.45);
  --gradient-gold: linear-gradient(135deg, #f3d477 0%, #d4af37 55%, #a8842a 100%);
}

* { box-sizing: border-box; }

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

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.font-display { font-family: "Inter", sans-serif; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

.text-gradient-gold {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bg-gradient-gold { background: var(--gradient-gold); }
.text-primary { color: var(--primary); }
.shadow-gold { box-shadow: var(--shadow-gold); }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.btn-hero {
  background: var(--gradient-gold);
  color: var(--primary-foreground);
  padding: 14px 28px;
  box-shadow: var(--shadow-gold);
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(212,175,55,0.6); }
.btn-xl { padding: 16px 34px; font-size: 15px; }
.btn-outline-gold {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(212,175,55,0.5);
  padding: 12px 24px;
}
.btn-outline-gold:hover { background: rgba(212,175,55,0.1); border-color: var(--primary); }

/* ---------- Navbar ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
  background: transparent;
}
.site-header.scrolled {
  background: rgba(10,14,23,0.85);
  backdrop-filter: blur(20px);
  border-bottom-color: rgba(35,43,64,0.7);
  box-shadow: var(--shadow-elevated);
}
.nav-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.site-logo { min-width: 0; max-width: 55vw; overflow: hidden; }
.site-logo img { max-height: 44px; max-width: 100%; width: auto; display: block; }
.brand-mark {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--gradient-gold);
  color: var(--primary-foreground);
}
.brand-name { font-size: 18px; font-weight: 700; }

.nav-links { display: flex; align-items: center; gap: 10px; }
.nav-links li { list-style: none; }
.nav-links a {
  display: inline-block;
  font-size: 14px; font-weight: 500; color: var(--muted-foreground);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 18px;
  transition: all 0.3s ease;
}
.nav-links a:hover {
  color: var(--foreground);
  border-color: rgba(212,175,55,0.5);
  background: var(--card);
}

.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-login-link { font-size: 14px; font-weight: 600; color: var(--muted-foreground); transition: color 0.3s ease; padding: 0 4px; }
.nav-login-link:hover { color: var(--foreground); }
.nav-account-link { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted-foreground); transition: color 0.3s ease; }
.nav-account-link:hover { color: var(--foreground); }

.pipcraft-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; color: #fff; font-weight: 700; font-family: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease; flex-shrink: 0;
}
.pipcraft-avatar:hover { transform: scale(1.1) rotate(-4deg); box-shadow: 0 0 0 3px rgba(212,175,55,0.35); }
.menu-toggle { display: none; background: none; border: none; color: var(--foreground); cursor: pointer; padding: 8px; }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  background: rgba(10,14,23,0.97);
  backdrop-filter: blur(20px);
}
.mobile-menu.open { display: block; }
.mobile-menu ul { display: flex; flex-direction: column; padding: 12px 20px; }
.mobile-menu a { display: block; padding: 12px 0; font-size: 14px; font-weight: 500; color: var(--muted-foreground); }
.mobile-menu .btn { width: 100%; justify-content: center; margin-top: 8px; }

@media (max-width: 900px) {
  .nav-links, .nav-actions .btn-hero, .nav-actions .btn-outline-gold, .nav-login-link, .nav-account-link { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; opacity: 0.45;
}
.hero-fade {
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at 50% 20%, transparent, var(--background) 78%);
}
.hero-inner {
  max-width: 860px; margin: 0 auto; padding: 160px 20px 180px; text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(212,175,55,0.3);
  background: rgba(17,23,38,0.6);
  border-radius: 999px; padding: 7px 16px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--primary);
  backdrop-filter: blur(6px);
}
.hero h1 {
  margin: 28px 0 0; font-size: 56px; line-height: 1.05; font-weight: 800;
}
.hero p.lede {
  max-width: 560px; margin: 24px auto 0; color: var(--muted-foreground); font-size: 17px; line-height: 1.6;
}
.hero-cta { margin-top: 40px; display: flex; justify-content: center; }

@media (max-width: 640px) {
  .hero h1 { font-size: 38px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 30px; }
  .hero-inner { padding: 140px 16px 140px; }
  .calc-card { padding: 20px; }
  .page-header h1 { font-size: 30px; }
  .page-header { padding: 140px 0 48px; }
  .feature-copy h2 { font-size: 26px; }
  .trust-heading h2, .tools-heading h2, .calc-heading h2 { font-size: 26px; }
}

/* Candlestick strip */
.candles {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: -1;
  display: flex; align-items: flex-end; justify-content: center; gap: 12px;
  height: 220px; padding: 0 16px; opacity: 0.6; pointer-events: none;
}
.candle { display: flex; flex-direction: column; align-items: center; width: 10px; opacity: 0; transform: translateY(16px); animation: candleRise 0.7s ease forwards; }
.candle .wick { width: 1px; flex: 1; background: rgba(154,163,184,0.4); }
.candle .wick.up { background: rgba(212,175,55,0.6); }
.candle .body { width: 100%; border-radius: 3px; }
.candle .body.up { background: var(--gradient-gold); box-shadow: var(--shadow-gold); }
.candle .body.down { background: rgba(22,29,47,0.7); border: 1px solid rgba(212,175,55,0.4); }
@keyframes candleRise { to { opacity: 1; transform: translateY(0); } }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal[data-visible="true"] { opacity: 1; transform: translateY(0); }

/* ---------- Features ---------- */
.features { padding: 100px 0; }
.feature-row {
  display: grid; gap: 40px; align-items: center;
  margin-bottom: 110px;
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row.reversed .feature-media { order: 2; }
.feature-row.reversed .feature-copy { order: 1; }

.feature-media {
  position: relative; overflow: hidden; border-radius: 18px;
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow-elevated);
  transition: all 0.5s ease;
}
.feature-media:hover { transform: translateY(-4px); border-color: rgba(212,175,55,0.5); }
.feature-media img { width: 100%; transition: transform 0.7s ease; }
.feature-media:hover img { transform: scale(1.03); }
.feature-media .placeholder-img {
  width: 100%; aspect-ratio: 4/3;
  background: linear-gradient(140deg, var(--surface-2), var(--card));
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-foreground); font-size: 13px;
}

.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--primary); margin: 0; }
.feature-copy h2 { font-size: 32px; font-weight: 700; line-height: 1.2; margin: 14px 0 0; }
.feature-copy p { max-width: 480px; margin: 18px 0 0; color: var(--muted-foreground); font-size: 16px; line-height: 1.6; }
.feature-copy .btn { margin-top: 28px; }

@media (min-width: 1024px) {
  .feature-row { grid-template-columns: 1fr 1fr; gap: 70px; }
}

/* ---------- Trust ---------- */
.trust { padding: 100px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(17,23,38,0.4); }
.trust-heading { max-width: 620px; margin: 0 auto; text-align: center; }
.trust-heading h2 { font-size: 32px; font-weight: 700; margin: 0; }
.trust-heading p { margin: 14px 0 0; color: var(--muted-foreground); }
.trust-grid { display: grid; gap: 22px; margin-top: 54px; grid-template-columns: 1fr; }
.trust-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 28px;
  transition: all 0.3s ease;
}
.trust-card:hover { transform: translateY(-6px); border-color: rgba(212,175,55,0.6); box-shadow: var(--shadow-gold); }
.trust-icon {
  width: 48px; height: 48px; border-radius: 12px;
  border: 1px solid rgba(212,175,55,0.3); background: rgba(212,175,55,0.1); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease;
}
.trust-card:hover .trust-icon { background: var(--gradient-gold); color: var(--primary-foreground); }
.trust-card h3 { font-size: 17px; font-weight: 600; margin: 18px 0 0; }
.trust-card p { font-size: 14px; color: var(--muted-foreground); margin: 8px 0 0; line-height: 1.6; }

@media (min-width: 640px) { .trust-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Tools teaser ---------- */
.tools-teaser { position: relative; padding: 100px 0; overflow: hidden; }
.tools-glow {
  position: absolute; top: 33%; left: 50%; transform: translateX(-50%); z-index: -1;
  width: 640px; height: 320px; border-radius: 999px; background: rgba(212,175,55,0.15); filter: blur(140px);
}
.tools-heading { max-width: 620px; margin: 0 auto; text-align: center; }
.tools-heading h2 { font-size: 32px; font-weight: 700; margin: 14px 0 0; }
.tools-heading p { margin: 14px 0 0; color: var(--muted-foreground); }

.dashboard-frame {
  max-width: 920px; margin: 54px auto 0; border-radius: 22px; border: 1px solid var(--border);
  background: var(--surface); padding: 8px; box-shadow: var(--shadow-elevated);
  transition: transform 0.5s ease;
}
.dashboard-frame:hover { transform: translateY(-6px); }
.dashboard-dots { display: flex; align-items: center; gap: 6px; padding: 12px 16px; }
.dashboard-dots span { width: 10px; height: 10px; border-radius: 50%; }
.dashboard-dots span:nth-child(1) { background: rgba(229,72,77,0.7); }
.dashboard-dots span:nth-child(2) { background: rgba(212,175,55,0.7); }
.dashboard-dots span:nth-child(3) { background: rgba(154,163,184,0.5); }
.dashboard-frame img, .dashboard-frame .placeholder-img { border-radius: 14px; }

.tools-bullets { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 48px 0 0; }
.tools-bullets li {
  border: 1px solid var(--border); background: var(--card); border-radius: 999px;
  transition: all 0.3s ease; padding: 0;
}
.tools-bullets li a {
  display: flex; align-items: center; gap: 8px; padding: 9px 16px; font-size: 14px; color: var(--muted-foreground);
}
.tools-bullets li:hover { border-color: rgba(212,175,55,0.5); }
.tools-bullets li:hover a { color: var(--foreground); }
.tools-cta { display: flex; justify-content: center; margin-top: 32px; }

/* ---------- Calculator ---------- */
.calculator-section { padding: 100px 0; border-top: 1px solid var(--border); }
.calc-heading { max-width: 620px; margin: 0 auto; text-align: center; }
.calc-heading h2 { font-size: 32px; font-weight: 700; margin: 14px 0 0; }
.calc-heading p { margin: 14px 0 0; color: var(--muted-foreground); }

.calc-card {
  max-width: 820px; margin: 54px auto 0;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 36px; box-shadow: var(--shadow-elevated);
}
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 20px; min-width: 0; }
.calc-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.calc-field label { font-size: 13px; font-weight: 600; color: var(--muted-foreground); }
.calc-field input, .calc-field select {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; color: var(--foreground); font-size: 15px; font-family: inherit;
  transition: border-color 0.3s ease; width: 100%; min-width: 0; max-width: 100%;
}
.calc-field input:focus, .calc-field select:focus { outline: none; border-color: var(--primary); }

.calc-run { width: 100%; justify-content: center; margin-top: 28px; }

.calc-results {
  display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 32px;
}
@media (min-width: 480px) {
  .calc-results { grid-template-columns: 1fr 1fr; }
}
.calc-result-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.calc-result-item.highlight { border-color: rgba(212,175,55,0.5); box-shadow: var(--shadow-gold); }
.calc-result-label { font-size: 12px; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.08em; }
.calc-result-value { font-size: 22px; font-weight: 700; }
.calc-result-item.highlight .calc-result-value { color: var(--primary); }

.calc-note { margin-top: 24px; font-size: 12px; color: rgba(154,163,184,0.8); line-height: 1.6; }

@media (min-width: 640px) {
  .calc-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .calc-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Page header (generic, reused for inner pages) ---------- */
.page-header { padding: 160px 0 60px; text-align: center; border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: 40px; font-weight: 800; margin: 0; }
.page-header p { margin: 16px auto 0; max-width: 560px; color: var(--muted-foreground); font-size: 16px; }

/* ---------- Economic Calendar ---------- */
.calendar-section { padding: 60px 0 100px; }

.calendar-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 32px; }
.calendar-stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.calendar-stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-foreground); }
.calendar-stat-value { font-size: 20px; font-weight: 700; }
.calendar-countdown { color: var(--primary); }

.calendar-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.calendar-filters select {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; color: var(--foreground); font-size: 14px; font-family: inherit;
  min-width: 0; max-width: 100%; flex: 1 1 160px;
}

.calendar-empty {
  text-align: center; padding: 60px 20px; border: 1px dashed var(--border); border-radius: 16px;
  color: var(--muted-foreground); font-size: 15px;
}

.calendar-date-group { margin-bottom: 40px; }
.calendar-date-label { font-size: 15px; font-weight: 700; color: var(--primary); margin: 0 0 14px; text-transform: uppercase; letter-spacing: 0.06em; }

.calendar-table-wrap { overflow-x: auto; }
.calendar-table {
  width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; min-width: 680px;
}
.calendar-table th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted-foreground); padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.calendar-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.calendar-table tr:last-child td { border-bottom: none; }
.calendar-table tr:hover { background: rgba(212,175,55,0.05); }
.calendar-event-name { font-weight: 600; }
.calendar-row[hidden] { display: none; }

.impact-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.impact-dot.impact-high { background: var(--destructive); }
.impact-dot.impact-medium { background: var(--primary); }
.impact-dot.impact-low { background: var(--muted-foreground); }

.calendar-disclaimer { margin-top: 32px; font-size: 12px; color: rgba(154,163,184,0.8); line-height: 1.6; text-align: center; }

@media (min-width: 640px) {
  .calendar-stats { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Blog cards ---------- */
.blog-section { padding: 60px 0 100px; }
.post-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.post-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  transition: all 0.3s ease; display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); border-color: rgba(212,175,55,0.5); box-shadow: var(--shadow-elevated); }
.post-card-media { display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--surface); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card-media .placeholder-img { aspect-ratio: 16/10; }
.post-card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card-date { font-size: 12px; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.06em; }
.post-card-body h2 { font-size: 19px; font-weight: 700; margin: 0; }
.post-card-body h2 a { transition: color 0.3s ease; }
.post-card-body h2 a:hover { color: var(--primary); }
.post-card-body p { font-size: 14px; color: var(--muted-foreground); line-height: 1.6; margin: 0; flex: 1; }
.post-card-body .btn { align-self: flex-start; margin-top: 6px; }
.post-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.post-pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; color: var(--muted-foreground); }
.post-pagination .page-numbers.current { border-color: var(--primary); color: var(--primary); }
.blog-empty { text-align: center; padding: 60px 20px; color: var(--muted-foreground); }

@media (min-width: 640px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Single post / generic page content ---------- */
.single-post-section { padding: 60px 0 100px; }
.single-post-thumb { max-width: 860px; margin: 0 auto 40px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.single-post-nav { max-width: 720px; margin: 40px auto 0; }
.course-complete-row { max-width: 720px; margin: 40px auto 0; text-align: center; }

.prose { max-width: 720px; margin: 0 auto; font-size: 16px; line-height: 1.75; color: var(--foreground); }
.prose h2 { font-size: 26px; font-weight: 700; margin: 40px 0 16px; }
.prose h3 { font-size: 20px; font-weight: 700; margin: 32px 0 14px; }
.prose p { margin: 0 0 20px; color: rgba(245,246,248,0.9); }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 22px; color: rgba(245,246,248,0.9); }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: 12px; margin: 24px 0; }
.prose blockquote { border-left: 3px solid var(--primary); padding-left: 20px; margin: 24px 0; color: var(--muted-foreground); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.prose th { text-align: left; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; }
.prose td { padding: 10px 14px; border: 1px solid var(--border); }
.prose strong { color: var(--foreground); }
.prose .risk-note { background: rgba(212,175,55,0.08); border: 1px solid rgba(212,175,55,0.3); border-radius: 10px; padding: 16px 20px; margin: 24px 0; font-size: 14px; }
.prose .risk-note strong { color: var(--primary); }

/* ---------- Courses ---------- */
.courses-section { padding: 60px 0 100px; }
.course-list { display: flex; flex-direction: column; gap: 16px; max-width: 860px; margin: 0 auto; }
.course-row {
  display: flex; align-items: center; gap: 20px;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px;
  transition: all 0.3s ease;
}
.course-row:hover { border-color: rgba(212,175,55,0.5); transform: translateY(-2px); box-shadow: var(--shadow-elevated); }
.course-number { font-size: 20px; font-weight: 800; color: var(--primary); min-width: 34px; }
.course-info { flex: 1; min-width: 0; }
.course-info h3 { font-size: 17px; font-weight: 700; margin: 0; }
.course-info p { font-size: 14px; color: var(--muted-foreground); margin: 6px 0 0; }
.course-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; white-space: nowrap; }
.course-level { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 10px; border-radius: 999px; }
.course-level-beginner { background: rgba(212,175,55,0.15); color: var(--primary); }
.course-level-intermediate { background: rgba(154,163,184,0.15); color: var(--muted-foreground); }
.course-level-advanced { background: rgba(229,72,77,0.15); color: var(--destructive); }
.course-duration { font-size: 12px; color: var(--muted-foreground); }
.course-arrow { color: var(--muted-foreground); flex-shrink: 0; transition: transform 0.3s ease; }
.course-row:hover .course-arrow { transform: translateX(4px); color: var(--primary); }

.course-row-done { border-color: rgba(74,124,89,0.5); }
.course-row-done .course-number { color: #6fcf8e; display: inline-flex; }

.course-progress-summary { max-width: 400px; margin: 24px auto 0; }
.course-progress-bar { height: 8px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.course-progress-fill { height: 100%; background: var(--gradient-gold); transition: width 0.4s ease; }
.course-progress-summary p { margin: 10px 0 0; font-size: 13px; color: var(--muted-foreground); }

@media (max-width: 640px) {
  .course-row { flex-wrap: wrap; }
  .course-meta { align-items: flex-start; }
}

/* ---------- Get Started / Auth ---------- */
.auth-section { padding: 60px 0 100px; }
.auth-card { max-width: 480px; margin: 0 auto; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.auth-tab-btn {
  flex: 1; background: none; border: none; color: var(--muted-foreground); font-size: 15px; font-weight: 600;
  padding: 12px 0; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.3s ease; font-family: inherit;
}
.auth-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-panel { display: none; flex-direction: column; gap: 18px; }
.auth-panel.active { display: flex; }
.auth-welcome { text-align: center; font-size: 16px; margin: 0 0 24px; }
.auth-actions { display: flex; flex-direction: column; gap: 12px; }
.auth-actions .btn { width: 100%; justify-content: center; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.auth-alert {
  background: rgba(229,72,77,0.1); border: 1px solid rgba(229,72,77,0.4); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 16px; width: 100%;
}
.auth-alert p { margin: 0; font-size: 13px; color: #f3a3a6; }
.auth-alert p + p { margin-top: 6px; }
.account-success {
  background: rgba(74,124,89,0.12); border: 1px solid rgba(74,124,89,0.4); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 20px; color: #9fdab3; font-size: 14px;
}
.account-logout-row { margin-top: 24px; text-align: center; }
.account-card { max-width: 820px; margin: 0 auto; }

/* ---------- Sidebar dashboard layout ---------- */
.dash-layout { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
.dash-sidebar {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 16px; display: flex; flex-direction: column; gap: 16px;
}
.dash-nav.auth-tabs { flex-direction: column; border-bottom: none; gap: 4px; margin-bottom: 0; }
.dash-nav .auth-tab-btn,
.dash-nav-link {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px 14px; border-radius: 10px; font-size: 14px; font-weight: 600;
  color: var(--muted-foreground); border-bottom: none;
}
.dash-nav .auth-tab-btn:hover,
.dash-nav-link:hover { background: var(--surface); color: var(--foreground); }
.dash-nav .auth-tab-btn.active { background: rgba(212,175,55,0.12); color: var(--primary); }
.dash-logout-link {
  text-align: center; font-size: 13px; color: var(--muted-foreground);
  padding-top: 12px; border-top: 1px solid var(--border);
}
.dash-logout-link:hover { color: var(--destructive); }
.dash-main { min-width: 0; }

.dash-stat-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 28px; }
.dash-overview-cards { display: grid; grid-template-columns: 1fr; gap: 20px; }
.dash-overview-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px;
}
.dash-overview-card h3 { font-size: 17px; font-weight: 700; margin: 10px 0 16px; }
.dash-overview-meta { font-size: 13px; color: var(--muted-foreground); margin: -10px 0 16px; }

@media (min-width: 480px) { .dash-stat-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px) {
  .dash-layout { grid-template-columns: 220px 1fr; }
  .dash-overview-cards { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) { .dash-stat-grid { grid-template-columns: repeat(4, 1fr); } }

.watchlist-star {
  background: none; border: none; cursor: pointer; color: var(--muted-foreground);
  padding: 4px; display: flex; transition: color 0.3s ease, transform 0.2s ease;
}
.watchlist-star:hover { color: var(--primary); transform: scale(1.15); }
.watchlist-star.is-watched { color: var(--primary); }

.wallet-demo-notice {
  background: rgba(212,175,55,0.1); border: 1px solid rgba(212,175,55,0.3);
  border-radius: 10px; padding: 14px 18px; font-size: 13px; color: var(--foreground);
  margin-bottom: 24px; line-height: 1.6;
}

.profile-view-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 8px 20px; margin-bottom: 20px;
}
.profile-view-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.profile-view-row:last-child { border-bottom: none; }
.profile-view-row span { color: var(--muted-foreground); flex-shrink: 0; padding-top: 1px; }
.profile-view-row strong {
  color: var(--foreground); font-weight: 600; text-align: right;
  min-width: 0; flex: 1 1 auto; overflow-wrap: break-word; word-break: break-word;
}

/* ---------- Journal (live, in-account) ---------- */
.journal-stats { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 24px; }
@media (min-width: 480px) { .journal-stats { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .journal-stats { grid-template-columns: repeat(4, 1fr); } }

.journal-add-details { margin-bottom: 24px; }
.journal-add-details summary { list-style: none; cursor: pointer; display: inline-flex; }
.journal-add-details summary::-webkit-details-marker { display: none; }
.journal-add-details[open] summary { margin-bottom: 20px; }
.journal-add-form { display: flex; flex-direction: column; gap: 16px; }

.journal-table-wrap { overflow-x: auto; }
.journal-table { min-width: 760px; }
.journal-notes-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-foreground); }
.journal-pl-positive { color: #6fcf8e; font-weight: 600; }
.journal-pl-negative { color: #e5848a; font-weight: 600; }
.journal-delete-btn {
  background: none; border: 1px solid var(--border); color: var(--muted-foreground);
  width: 26px; height: 26px; border-radius: 50%; font-size: 16px; line-height: 1; cursor: pointer;
  transition: all 0.3s ease;
}
.journal-delete-btn:hover { border-color: var(--destructive); color: var(--destructive); }

/* ---------- Sliding sign-in / sign-up panel ---------- */
.auth-slider-container {
  position: relative; width: 100%; max-width: 1000px; margin: 40px auto 100px;
  min-height: 640px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-elevated);
}

.auth-slide-forms-wrap { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }

.auth-slide-forms-inner {
  position: absolute; top: 50%; left: 75%; width: 50%; transform: translate(-50%, -50%);
  transition: 1s 0.7s ease-in-out; display: grid; grid-template-columns: 1fr; z-index: 5;
}

.auth-slide-form {
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  padding: 0 2.5rem; transition: all 0.2s 0.7s; overflow: hidden;
  grid-column: 1 / 2; grid-row: 1 / 2; min-width: 0;
}
.auth-slide-signup { opacity: 0; z-index: 1; }
.auth-slide-signin { z-index: 2; }

.auth-slide-title { font-size: 26px; font-weight: 700; margin-bottom: 4px; color: var(--foreground); text-align: center; }
.auth-slide-subtitle { font-size: 14px; color: var(--muted-foreground); margin-bottom: 18px; }

.auth-slide-field {
  max-width: 340px; width: 100%; min-width: 0; background: var(--card);
  border: 1px solid var(--border); margin: 8px 0; height: 52px; border-radius: 52px;
  display: flex; align-items: center; gap: 10px; padding: 0 1.2rem;
}
.auth-slide-field svg { color: var(--muted-foreground); flex-shrink: 0; }
.auth-slide-field input {
  background: none; border: none; outline: none; width: 100%; min-width: 0;
  font-family: inherit; font-size: 15px; color: var(--foreground);
}
.auth-slide-field input::placeholder { color: rgba(154,163,184,0.6); }

.auth-slide-remember {
  max-width: 340px; width: 100%; display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--muted-foreground); margin: 6px 0 4px;
}
.auth-slide-remember label { display: flex; align-items: center; gap: 6px; }
.auth-slide-remember a { color: var(--primary); }

.auth-slide-btn-solid {
  width: 170px; background: var(--gradient-gold); border: none; height: 48px;
  border-radius: 48px; color: var(--primary-foreground); text-transform: uppercase;
  font-weight: 700; font-size: 13px; letter-spacing: 0.04em; margin: 16px 0 0; cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease; box-shadow: var(--shadow-gold);
}
.auth-slide-btn-solid:hover { transform: translateY(-2px); }

.auth-slide-panels-wrap {
  position: absolute; height: 100%; width: 100%; top: 0; left: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); pointer-events: none;
}

.auth-slider-container::before {
  content: ""; position: absolute; height: 1600px; width: 1600px; top: -10%; right: 48%;
  transform: translateY(-50%); background: var(--gradient-gold); transition: 1.8s ease-in-out;
  border-radius: 50%; z-index: 6;
}

.auth-slide-panel {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
  text-align: center; z-index: 6; position: relative;
}
.auth-slide-panel-left { pointer-events: all; padding: 3rem 15% 2rem 10%; }
.auth-slide-panel-right { pointer-events: none; padding: 3rem 10% 2rem 15%; }

.auth-slide-panel-content { color: var(--primary-foreground); transition: transform 0.9s ease-in-out; transition-delay: 0.6s; max-width: 260px; }
.auth-slide-panel-content h3 { font-weight: 700; font-size: 22px; margin: 0; }
.auth-slide-panel-content p { font-size: 14px; padding: 12px 0; opacity: 0.9; }

.auth-slide-btn-ghost {
  margin: 0; background: none; border: 2px solid var(--primary-foreground); width: 140px; height: 42px;
  border-radius: 42px; color: var(--primary-foreground); font-weight: 700; font-size: 12px;
  text-transform: uppercase; cursor: pointer; transition: all 0.3s ease;
}
.auth-slide-btn-ghost:hover { background: rgba(10,14,23,0.15); }

.auth-slide-panel-right .auth-slide-panel-content { transform: translateX(600px); }

/* Sliding animation state */
.auth-slider-container.sign-up-mode::before { transform: translate(100%, -50%); right: 52%; }
.auth-slider-container.sign-up-mode .auth-slide-panel-left .auth-slide-panel-content { transform: translateX(-600px); }
.auth-slider-container.sign-up-mode .auth-slide-forms-inner { left: 25%; }
.auth-slider-container.sign-up-mode .auth-slide-signup { opacity: 1; z-index: 2; }
.auth-slider-container.sign-up-mode .auth-slide-signin { opacity: 0; z-index: 1; }
.auth-slider-container.sign-up-mode .auth-slide-panel-right .auth-slide-panel-content { transform: translateX(0); }
.auth-slider-container.sign-up-mode .auth-slide-panel-left { pointer-events: none; }
.auth-slider-container.sign-up-mode .auth-slide-panel-right { pointer-events: all; }

@media (max-width: 870px) {
  .auth-slider-container { min-height: 780px; margin: 20px auto 80px; border-radius: 18px; }
  .auth-slide-forms-inner {
    width: 100%; top: 95%; left: 50%; transform: translate(-50%, -100%);
    transition: 1s 0.8s ease-in-out;
  }
  .auth-slider-container.sign-up-mode .auth-slide-forms-inner { left: 50%; }
  .auth-slide-panels-wrap { grid-template-columns: 1fr; grid-template-rows: 1fr 2fr 1fr; }
  .auth-slide-panel { flex-direction: row; justify-content: center; align-items: center; padding: 2rem 6%; grid-column: 1 / 2; }
  .auth-slide-panel-right { grid-row: 3 / 4; }
  .auth-slide-panel-left { grid-row: 1 / 2; }
  .auth-slide-panel-content { transition-delay: 0.8s; max-width: 100%; }
  .auth-slide-panel-content h3 { font-size: 18px; }
  .auth-slide-panel-content p { font-size: 12px; padding: 8px 0; }
  .auth-slide-btn-ghost { width: 120px; height: 36px; font-size: 11px; }

  .auth-slider-container::before {
    width: 1200px; height: 1200px; transform: translateX(-50%); left: 30%; bottom: 68%;
    right: auto; top: auto; transition: 2s ease-in-out;
  }
  .auth-slider-container.sign-up-mode::before { transform: translate(-50%, 100%); bottom: 32%; right: auto; }
  .auth-slider-container.sign-up-mode .auth-slide-panel-left .auth-slide-panel-content { transform: translateY(-260px); }
  .auth-slide-panel-right .auth-slide-panel-content { transform: translateY(260px); }
  .auth-slider-container.sign-up-mode .auth-slide-panel-right .auth-slide-panel-content { transform: translateY(0); }
  .auth-slider-container.sign-up-mode .auth-slide-forms-inner { top: 5%; transform: translate(-50%, 0); }
}

@media (max-width: 570px) {
  .auth-slide-form { padding: 0 1.2rem; }
  .auth-slide-panel-content { padding: 0.5rem 0.5rem; }
  .auth-slider-container { padding: 0; }
  .auth-slider-container::before { bottom: 72%; left: 50%; }
  .auth-slider-container.sign-up-mode::before { bottom: 28%; left: 50%; }
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--gradient-gold); color: var(--primary-foreground);
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; box-shadow: var(--shadow-gold);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); }

/* --- Neon sign glow, recolored to the site's gold identity --- */
.neon-text {
  font-family: "Bebas Neue", sans-serif;
  font-size: 34px;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow:
    0 0 2px #fff,
    0 0 8px #fff,
    0 0 16px #f3d477,
    0 0 32px #d4af37,
    0 0 48px rgba(212, 175, 55, 0.75),
    0 0 72px rgba(161, 116, 42, 0.45);
}
@media (min-width: 640px) {
  .neon-text { font-size: 42px; }
}

@keyframes neonFlicker {
  0%, 18%, 22%, 55%, 58%, 100% { opacity: 1; }
  20%, 57% { opacity: 0.12; }
}
.neon-sign { animation: neonFlicker 2.8s infinite; }

@media (prefers-reduced-motion: reduce) {
  .neon-sign { animation: none; }
}

/* ---------- OTP verification boxes ---------- */
.otp-widget { display: flex; justify-content: center; }
.otp-card {
  position: relative; width: min(100%, 440px); min-width: 0;
  border: 1px solid var(--border); border-radius: 24px;
  background: var(--card); box-shadow: var(--shadow-elevated); overflow: hidden;
}
.drag-handle { width: 45px; height: 3px; margin: 17px auto 0; border-radius: 999px; background: var(--border); }
.otp-content { min-height: 0; padding: 30px 24px 32px; text-align: center; position: relative; min-width: 0; }
.otp-content h2 {
  margin: 0; font-size: 22px; font-weight: 700; color: var(--foreground);
  transition: color 0.45s ease, transform 0.45s ease, opacity 0.45s ease;
}
.otp-content > p {
  margin: 10px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted-foreground);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.otp-content > p strong { color: var(--foreground); font-weight: 600; }

.otp-boxes {
  height: 74px; margin-top: 30px; display: flex; flex-wrap: nowrap; justify-content: center;
  gap: clamp(6px, 2vw, 10px); position: relative; min-width: 0;
}
.otp-box {
  width: clamp(38px, 12vw, 54px); height: clamp(42px, 13vw, 54px); min-width: 0;
  display: flex; align-items: center; justify-content: center; position: relative;
  border-radius: 13px; border: 1px solid var(--border); background: var(--surface);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.03), 0 8px 18px rgba(0,0,0,0.18);
  transition: transform 0.3s ease, opacity 0.45s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.otp-box-input {
  width: 100%; height: 100%; min-width: 0; text-align: center; border: none; background: none;
  outline: none; font-size: clamp(16px, 4vw, 20px); font-weight: 600; color: var(--foreground);
  font-family: inherit; padding: 0;
}
.otp-box.active { border-color: rgba(212,175,55,0.85); box-shadow: 0 0 0 1px rgba(212,175,55,0.15), 0 0 22px rgba(212,175,55,0.25); }
.otp-box.filled { border-color: rgba(212,175,55,0.5); }

.otp-checking-indicator {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.6);
  width: 56px; height: 56px; border-radius: 13px; border: 1px solid rgba(212,175,55,0.85);
  background: var(--surface-2); box-shadow: 0 0 0 1px rgba(212,175,55,0.15), 0 0 30px rgba(212,175,55,0.3);
  opacity: 0; transition: opacity 0.3s ease;
}
.otp-widget.checking .otp-boxes .otp-box { opacity: 0; }
.otp-widget.checking .otp-checking-indicator { opacity: 1; animation: otpCheckingPulse 1.05s ease-in-out infinite; }
@keyframes otpCheckingPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.6); }
  50% { transform: translate(-50%, -50%) scale(0.7); }
}

.verification-box {
  position: absolute; left: 50%; top: 30px; width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center; opacity: 0;
  border-radius: 15px; border: 2px solid rgba(111,207,142,0.85);
  background: linear-gradient(145deg, rgba(74,124,89,0.5), rgba(15,29,20,0.9));
  box-shadow: 0 0 15px rgba(111,207,142,0.35), 0 0 45px rgba(111,207,142,0.18);
  transform: translateX(-50%) scale(0.35);
  transition: opacity 0.45s ease, transform 0.7s cubic-bezier(.2,1.5,.35,1);
}
.verification-box svg { width: 28px; height: 28px; fill: none; stroke: #6fcf8e; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.otp-widget.verified #otp-boxes { opacity: 0; transform: scale(0.5); transition: opacity 0.3s ease, transform 0.4s ease; }
.otp-widget.verified .verification-box { opacity: 1; transform: translateX(-50%) scale(1); }
.otp-widget.verified .otp-content h2 { color: #6fcf8e; }
.otp-widget.verified #otp-form button,
.otp-widget.verified .otp-resend-form { opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }

.otp-footer { margin-top: 18px; font-size: 12px; color: var(--muted-foreground); }
.otp-footer button {
  border: 0; padding: 0; margin-left: 6px; color: var(--primary); font-size: 12px;
  font-weight: 700; background: transparent; cursor: pointer;
}
.otp-resend-form { transition: opacity 0.3s ease; }

@media (max-width: 480px) {
  .otp-card { min-width: 0; }
  .otp-content { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: rgba(17,23,38,0.5); }
.footer-top { padding: 64px 0; display: grid; gap: 48px; text-align: center; }
.footer-brand { display: flex; flex-direction: column; align-items: center; }
.footer-brand .brand { justify-content: center; }
.footer-brand p { max-width: 320px; margin: 16px auto 0; font-size: 14px; color: var(--muted-foreground); line-height: 1.6; }
.footer-socials { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.footer-socials a {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--muted-foreground);
  transition: all 0.3s ease;
}
.footer-socials a:hover { transform: translateY(-2px); border-color: rgba(212,175,55,0.6); color: var(--primary); }

.footer-cols { display: grid; grid-template-columns: repeat(2,1fr); gap: 32px; text-align: center; }
.footer-cols h3 { font-size: 14px; font-weight: 600; margin: 0; }
.footer-cols ul { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.footer-cols a { font-size: 14px; color: var(--muted-foreground); transition: color 0.3s ease; }
.footer-cols a:hover { color: var(--primary); }

.footer-legal { border-top: 1px solid var(--border); padding: 32px 0; text-align: center; }
.footer-legal h4 { font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-foreground); margin: 0; }
.footer-legal p { font-size: 11px; line-height: 1.7; color: rgba(154,163,184,0.8); margin: 12px auto 0; max-width: 900px; }
.footer-legal .copyright { margin-top: 24px; color: rgba(154,163,184,0.7); }

@media (min-width: 640px) { .footer-cols { grid-template-columns: repeat(4,1fr); } }
@media (min-width: 1024px) { .footer-top { grid-template-columns: 1.4fr 3fr; } }
