/* ============================================================
   flj-modern.css — 2026 site-wide visual refresh
   Glass surfaces, mesh headers, bento cards, focus rings
   ============================================================ */

html { color-scheme: dark; }

/* ── Enhanced tokens ── */
:root {
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --shadow-card-hover: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 101, 132, 0.12);
  --gradient-brand: linear-gradient(135deg, var(--red) 0%, var(--sakura) 50%, var(--mint) 100%);
  --gradient-mesh: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(230, 57, 70, 0.18), transparent),
                   radial-gradient(ellipse 50% 40% at 100% 0%, rgba(168, 85, 247, 0.12), transparent),
                   radial-gradient(ellipse 40% 30% at 0% 50%, rgba(0, 245, 212, 0.08), transparent);
}

/* ── Navigation — always glass ── */
#main-nav {
  background: rgba(13, 15, 18, 0.72) !important;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
#main-nav.scrolled {
  background: rgba(10, 10, 14, 0.92) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.btn-nav-red,
.btn-nav-ghost,
.nav-drop-trigger,
.nav-hamburger {
  border-radius: var(--radius-sm) !important;
}
.btn-nav-red {
  box-shadow: 0 2px 12px rgba(230, 57, 70, 0.35);
}
.nav-pill,
.nav-rank-pill {
  backdrop-filter: blur(8px);
  border-radius: 100px !important;
}

.nav-dropdown {
  border-radius: var(--radius-lg) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55) !important;
}

/* ── Page headers — mesh band ── */
.page-header {
  position: relative;
  background: var(--gradient-mesh) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 8px;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(200px, 40%);
  height: 1px;
  background: var(--gradient-brand);
  opacity: 0.5;
}
.page-sub {
  color: var(--text3) !important;
}

/* ── Bento cards (site-wide) ── */
.stat-card,
.skill-card,
.content-card,
.lesson-card,
.pricing-card,
.hub-card,
.tool-card,
.login-box,
.quiz-wrap,
.fc-card,
.struct-card {
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-card) !important;
}
.stat-card:hover,
.skill-card:hover,
.content-card:hover,
.lesson-card:hover,
.hub-card:hover,
.tool-card:hover {
  box-shadow: var(--shadow-card-hover) !important;
}

.skill-card {
  position: relative;
  overflow: hidden;
}
.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.skill-card:hover::before { opacity: 1; }

/* ── Buttons ── */
.btn-hero-primary,
.btn-red,
.btn-primary,
.login-btn,
.quiz-btn-primary {
  border-radius: var(--radius-md) !important;
  letter-spacing: 0.02em;
}
.btn-hero-primary {
  background: linear-gradient(135deg, var(--red), #ff4d5a) !important;
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
}
.btn-hero-primary:hover {
  box-shadow: 0 12px 36px rgba(230, 57, 70, 0.5) !important;
}
.btn-hero-ghost {
  border-radius: var(--radius-md) !important;
  backdrop-filter: blur(8px);
}

/* ── Forms ── */
.login-input,
.quiz-blank-input,
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  border-radius: var(--radius-sm) !important;
  background: rgba(0, 0, 0, 0.25) !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}
.login-input:focus,
.quiz-blank-input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 101, 132, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15) !important;
  outline: none;
}

/* ── Footer — modern grid ── */
footer {
  background: linear-gradient(180deg, var(--bg2) 0%, #0a0c14 100%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding: 56px 48px !important;
}
.footer-brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.footer-brand-jp {
  font-family: var(--font-jp, 'Noto Sans JP', sans-serif);
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--red);
}
.footer-brand-en {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}
.footer-brand-en span { color: var(--red); }
.footer-tagline {
  font-size: 0.78rem;
  color: var(--text3);
  line-height: 1.5;
  max-width: 280px;
}
.footer-links {
  gap: 8px 20px !important;
}
.footer-links a {
  font-size: 0.8rem !important;
  color: var(--text3) !important;
  padding: 6px 0;
  position: relative;
}
.footer-links a:hover {
  color: #fff !important;
}
.footer-copy {
  font-size: 0.72rem !important;
  color: rgba(154, 163, 192, 0.5) !important;
}

/* ── Dashboard daily goal ── */
#dash-daily-block {
  border-radius: var(--radius-xl) !important;
  background: linear-gradient(145deg, rgba(20, 22, 43, 0.9), rgba(13, 15, 18, 0.95)) !important;
  box-shadow: var(--shadow-card) !important;
}

/* ── Learning hub ── */
.hub-pathway {
  border-radius: var(--radius-xl) !important;
  background: linear-gradient(160deg, rgba(20, 22, 43, 0.85), rgba(13, 15, 18, 0.9)) !important;
}
.hub-card {
  border-radius: var(--radius-lg) !important;
  transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1), box-shadow 0.35s ease, border-color 0.25s !important;
}
.hub-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: var(--shadow-card-hover) !important;
}
.hub-flow-mini {
  border-radius: var(--radius-lg) !important;
  background: rgba(20, 22, 43, 0.6) !important;
  backdrop-filter: blur(12px);
}

/* ── Rank picker cards — dark bento (replaces beige) ── */
.rank-card-btn {
  background: linear-gradient(165deg, rgba(26, 29, 54, 0.95), rgba(13, 15, 18, 0.98)) !important;
  color: var(--text) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-card);
}
.rank-card-btn:hover {
  border-color: rgba(255, 101, 132, 0.25) !important;
  box-shadow: var(--shadow-card-hover) !important;
}
.rank-card-btn--tutoring {
  border-color: rgba(168, 85, 247, 0.35) !important;
  background: linear-gradient(165deg, rgba(30, 15, 45, 0.95), rgba(13, 15, 18, 0.98)) !important;
}
.rank-card-body,
.rank-card-quote {
  color: var(--text3) !important;
}
.rank-card-body li { color: var(--text2) !important; }
.rank-card-btn--unlocked {
  border-color: rgba(0, 245, 212, 0.25) !important;
}

/* ── Path steps (home) ── */
.path-step {
  border-radius: var(--radius-lg) !important;
  background: rgba(20, 22, 43, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(8px);
  transition: all 0.35s cubic-bezier(0.34, 1.2, 0.64, 1) !important;
}
.path-step:hover {
  border-color: rgba(230, 57, 70, 0.35) !important;
  box-shadow: var(--shadow-card-hover) !important;
  transform: translateY(-4px) !important;
}

/* ── Focus accessibility ── */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
.rank-card-btn:focus-visible {
  outline: 2px solid var(--sakura);
  outline-offset: 3px;
}

/* ── Lesson cards ── */
.lesson-card .lesson-embed-wrap {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
}

@media (max-width: 768px) {
  footer { padding: 40px 24px !important; }
  .page-header { padding: 48px 24px 32px !important; }
  .page-body { padding: 0 24px 64px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .skill-card:hover,
  .hub-card:hover,
  .path-step:hover { transform: none !important; }
}

/* ── Flash banners (global) ── */
.flj-flash-stack {
  max-width: 720px;
  margin: 12px auto 0;
  padding: 0 24px;
}
.flj-flash-banner {
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.35);
  color: #b8fff5;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.88rem;
  margin-bottom: 8px;
}
.flj-flash-banner--err {
  background: rgba(230, 57, 70, 0.12);
  border-color: rgba(230, 57, 70, 0.4);
  color: #ffb4b4;
}

/* ── Account & legal pages ── */
.account-card {
  background: var(--bg2, #141820);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 22px 24px;
  margin-bottom: 18px;
}
.account-card--muted { border-color: rgba(255, 255, 255, 0.05); }
.account-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 14px;
}
.account-dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 16px;
  margin: 0;
  font-size: 0.88rem;
}
.account-dl dt { color: var(--muted, #888); margin: 0; }
.account-dl dd { color: #e8eaf4; margin: 0; }
.account-actions { margin-top: 18px; }
.account-hint {
  font-size: 0.78rem;
  color: var(--muted, #888);
  line-height: 1.6;
  margin: 12px 0 0;
}
.account-hint a { color: var(--red, #e63946); }
.legal-body section { max-width: 720px; margin: 0 auto; }
.legal-body h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  color: #fff;
  margin: 28px 0 10px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p,
.legal-body li {
  color: var(--muted, #aaa);
  font-size: 0.9rem;
  line-height: 1.75;
}
.legal-body ul { padding-left: 1.2rem; }
.legal-body a { color: var(--red, #e63946); }

.dash-upgrade-banner {
  background: linear-gradient(135deg, rgba(74, 144, 217, 0.12), rgba(230, 57, 70, 0.08));
  border: 1px solid rgba(74, 144, 217, 0.35);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 24px;
  text-align: center;
}
.dash-upgrade-banner strong { color: #fff; }