* { box-sizing: border-box; touch-action: manipulation; }

:root {
  --bg-1: #05070f;
  --bg-2: #0d1326;
  --accent: #d4af37;
  --accent-2: #7b5cff;
  --accent-3: #00d4b5;
  --text: #f2f3f7;
  --text-dim: #9aa1b9;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.09);
  --danger: #ff5c7a;
  --success: #2ee6a8;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-1);
  color: var(--text);
  font-family: 'Vazirmatn', sans-serif;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  touch-action: pan-y;
  -ms-touch-action: pan-y;
  overscroll-behavior-y: contain;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: relative;
  isolation: isolate;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 12% 8%, rgba(123,92,255,0.38), transparent 42%),
    radial-gradient(circle at 100% 0%, rgba(0,212,181,0.24), transparent 42%),
    radial-gradient(circle at 30% 100%, rgba(212,175,55,0.20), transparent 48%),
    radial-gradient(circle at 90% 85%, rgba(255,90,140,0.14), transparent 40%),
    linear-gradient(160deg, #130c34 0%, #060814 50%, #05110f 100%);
  background-size: 180% 180%, 180% 180%, 180% 180%, 180% 180%, 100% 100%;
  animation: bgDrift 26s ease-in-out infinite;
}

@keyframes bgDrift {
  0%, 100% { background-position: 0% 0%, 100% 0%, 20% 100%, 90% 90%, 0 0; }
  50% { background-position: 25% 30%, 75% 25%, 35% 75%, 70% 70%, 0 0; }
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.app {
  min-height: 100vh;
  padding: 12px 16px 96px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------- Ticker ---------- */
.ticker {
  position: sticky;
  top: 0;
  z-index: 20;
  overflow: hidden;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(120deg, rgba(212,175,55,0.55), rgba(123,92,255,0.5), rgba(0,212,181,0.5), rgba(212,175,55,0.55));
  background-size: 300% 300%;
  animation: tickerBorder 6s ease infinite;
  box-shadow: 0 10px 34px rgba(0,0,0,0.45);
}

@keyframes tickerBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.ticker::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 19px;
  background: linear-gradient(160deg, #171233 0%, #0c0f24 55%, #0a1a22 100%);
  z-index: 0;
}

.ticker-shine {
  position: absolute;
  inset: 1px;
  border-radius: 19px;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.ticker-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.10), transparent);
  animation: tickerShine 5s ease-in-out infinite;
}

@keyframes tickerShine {
  0% { transform: translateX(0); }
  100% { transform: translateX(420%); }
}

.ticker-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 2px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px 1px rgba(46,230,168,0.8);
  animation: livePulse 1.6s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.ticker-header-text {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text-dim);
}

.ticker-items {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 4px 6px 10px;
}

.ticker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 2px;
  text-align: center;
  position: relative;
}

.ticker-item:not(:first-child)::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 10%;
  height: 80%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.12), transparent);
}

.ticker-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 4px currentColor);
}

.ticker-icon svg {
  width: 100%;
  height: 100%;
}

.icon-usdt { color: var(--accent-3); }
.icon-usd { color: #7ea8ff; }
.icon-gold { color: var(--accent); }
.icon-gold-gram { color: #f2c879; }

.ticker-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.ticker-label {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 500;
}

.ticker-value {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(212,175,55,0.45);
  white-space: nowrap;
}

.ticker-unit {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.2px;
}

.ticker-change {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
}

.ticker-change.up {
  color: var(--success);
}

.ticker-change.down {
  color: var(--danger);
}

/* ---------- Brand ---------- */
.brand {
  text-align: center;
  margin-top: -15px;
}

.brand-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(212,175,55,0.35));
}

.brand-sub {
  margin: -44px 0 6px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* ---------- Home background ---------- */
#screen-home {
  position: relative;
  isolation: isolate;
}

.home-bg {
  position: absolute;
  inset: -20px -16px auto -16px;
  height: 560px;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.home-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5,7,15,0) 0%, rgba(5,7,15,0.75) 100%);
}

.home-bg .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(54px);
  opacity: 0.4;
  will-change: transform;
}

.home-bg .blob-1 {
  width: 260px;
  height: 260px;
  top: -60px;
  right: -60px;
  background: radial-gradient(circle, rgba(212,175,55,0.55), transparent 70%);
  animation: floatA 13s ease-in-out infinite;
}

.home-bg .blob-2 {
  width: 220px;
  height: 220px;
  top: 140px;
  left: -70px;
  background: radial-gradient(circle, rgba(46,230,168,0.32), transparent 70%);
  animation: floatB 16s ease-in-out infinite;
}

.home-bg .blob-3 {
  width: 200px;
  height: 200px;
  top: 320px;
  right: 20px;
  background: radial-gradient(circle, rgba(123,92,255,0.28), transparent 70%);
  animation: floatC 19s ease-in-out infinite;
}

.home-bg .grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 50% 15%, black, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 15%, black, transparent 78%);
}

@keyframes floatA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-18px, 24px) scale(1.08); }
}

@keyframes floatB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -16px) scale(1.1); }
}

@keyframes floatC {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-14px, -18px) scale(1.06); }
}

/* ---------- Menu grid ---------- */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: -16px;
}

.menu-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px 10px;
  min-height: 130px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.menu-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120px circle at 50% 0%, rgba(123,92,255,0.25), transparent 70%);
  opacity: 0;
  transition: opacity .2s ease;
}

.menu-card:active {
  transform: scale(0.96);
  border-color: var(--accent);
}

.menu-card:active::before {
  opacity: 1;
}

.menu-icon-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, rgba(255,255,255,0.16), rgba(255,255,255,0.02) 45%, rgba(0,0,0,0.25)),
              linear-gradient(135deg, var(--accent-2), #4b2fbf);
  box-shadow:
    0 10px 20px rgba(0,0,0,0.45),
    0 2px 0 rgba(255,255,255,0.18) inset,
    0 -10px 18px rgba(0,0,0,0.35) inset;
  transform: perspective(300px) rotateX(6deg);
  transition: transform .2s ease;
}

.menu-card:active .menu-icon-wrap {
  transform: perspective(300px) rotateX(6deg) scale(0.92);
}

.menu-icon-wrap::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 9px;
  width: 46%;
  height: 30%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.55), transparent 70%);
  filter: blur(1px);
}

.menu-icon {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.45));
}

.menu-card:nth-child(1) .menu-icon-wrap {
  background: linear-gradient(155deg, rgba(255,255,255,0.16), rgba(255,255,255,0.02) 45%, rgba(0,0,0,0.25)),
              linear-gradient(135deg, #ff6b8b, #b0264f);
}

.menu-card:nth-child(2) .menu-icon-wrap {
  background: linear-gradient(155deg, rgba(255,255,255,0.16), rgba(255,255,255,0.02) 45%, rgba(0,0,0,0.25)),
              linear-gradient(135deg, #f7d774, #b8860b);
}

.menu-card:nth-child(3) .menu-icon-wrap {
  background: linear-gradient(155deg, rgba(255,255,255,0.16), rgba(255,255,255,0.02) 45%, rgba(0,0,0,0.25)),
              linear-gradient(135deg, #7b5cff, #3d2494);
}

.menu-card:nth-child(4) .menu-icon-wrap {
  background: linear-gradient(155deg, rgba(255,255,255,0.16), rgba(255,255,255,0.02) 45%, rgba(0,0,0,0.25)),
              linear-gradient(135deg, #00d4b5, #027d6b);
}

.menu-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.menu-title small {
  font-weight: 500;
  color: var(--text-dim);
  font-size: 11px;
}

/* ---------- Screens ---------- */
.screen {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn .25s ease;
}

.screen.active {
  display: flex;
}

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

.screen-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.screen-header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}

.back-btn {
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
}

.card {
  border-radius: 20px;
  padding: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.intro-text {
  margin: 0;
  font-size: 14px;
  line-height: 2;
  color: var(--text);
}

.academy-heading {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
}

.benefit-list {
  margin: 0;
  padding-inline-start: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--text);
}

.benefit-list > li::marker {
  color: transparent;
}

.benefit-sublist {
  margin: 8px 0 0;
  padding-inline-start: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-dim);
  font-size: 13px;
}

.benefit-sublist > li::marker {
  color: transparent;
}

.academy-goal {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  color: var(--accent);
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.25);
}

.divider {
  height: 1px;
  background: var(--glass-border);
  margin: 2px 0;
}

.referral-link {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: #1a1300;
  background: linear-gradient(120deg, var(--accent), #f7e08a);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12px;
  color: var(--text-dim);
}

.field input {
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  direction: ltr;
  text-align: right;
}

.field input:focus {
  outline: none;
  border-color: var(--accent-2);
}

.primary-btn {
  padding: 14px;
  border-radius: 14px;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(120deg, var(--accent-2), #9b7bff);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(123,92,255,0.35);
  transition: transform .15s ease;
}

.primary-btn:active {
  transform: scale(0.97);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.result-box {
  display: none;
  padding: 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.9;
}

.result-box.show {
  display: block;
}

.result-box.success {
  background: rgba(46,230,168,0.1);
  border: 1px solid rgba(46,230,168,0.35);
  color: var(--success);
}

.result-box.error {
  background: rgba(255,92,122,0.1);
  border: 1px solid rgba(255,92,122,0.35);
  color: var(--danger);
}

.membership-root {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.warning-box {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,92,122,0.12);
  border: 1px solid rgba(255,92,122,0.4);
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.9;
}

.member-active-box {
  padding: 14px;
  border-radius: 14px;
  background: rgba(46,230,168,0.1);
  border: 1px solid rgba(46,230,168,0.35);
  color: var(--success);
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  line-height: 1.9;
}

.result-box a.join-link {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--success);
  color: #052b1f;
  font-weight: 800;
  text-decoration: none;
}

.analysis-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.analysis-card {
  gap: 10px;
}

.analysis-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
}

.analysis-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.analysis-date-g {
  font-size: 11px;
  color: var(--text-dim);
  direction: ltr;
}

.analysis-box {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 2.1;
  color: var(--text);
}

/* ---------- 30-day challenge ---------- */
.challenge-progress {
  gap: 10px;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
}

.progress-percent {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(212,175,55,0.45);
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7b5cff, var(--accent), #f7e08a);
  background-size: 200% 100%;
  animation: progressFlow 2.5s linear infinite;
  transition: width .4s ease;
}

@keyframes progressFlow {
  to { background-position: -200% 0; }
}

.progress-day {
  font-size: 12.5px;
  color: var(--text-dim);
  text-align: center;
}

.challenge-item-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.challenge-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
}

.challenge-item-label {
  font-size: 13.5px;
  font-weight: 600;
}

.challenge-item-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ci-btn {
  padding: 9px 6px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}

.ci-btn.ci-yes.active {
  background: rgba(46,230,168,0.16);
  border-color: rgba(46,230,168,0.5);
  color: var(--success);
}

.ci-btn.ci-no.active {
  background: rgba(255,92,122,0.14);
  border-color: rgba(255,92,122,0.45);
  color: var(--danger);
}

.challenge-special {
  border-color: rgba(123,92,255,0.3);
}

.special-toggle {
  width: 100%;
}

.challenge-submit-btn {
  margin-top: 10px;
  margin-bottom: 4px;
}

/* ---------- Education ---------- */
.course-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.course-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-family: inherit;
  text-align: right;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}

.course-card:active {
  transform: scale(0.98);
  border-color: var(--accent);
}

.course-icon {
  font-size: 26px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(212,175,55,0.12);
  flex-shrink: 0;
}

.course-body h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.course-status {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}

/* ---------- Live trade row (top, above logo) ---------- */
.live-trade-row {
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 0;
}

.live-trade-btn {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 14px 10px;
  border: none;
  border-radius: 20px;
  background: radial-gradient(120% 160% at 50% 0%, #3a2c06 0%, #1a1403 65%, #0d0a02 100%);
  color: #ffe9b8;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(212,175,55,0.28);
  isolation: isolate;
  transition: transform .15s ease, box-shadow 1.6s ease;
  animation: chBreathe 2.6s ease-in-out infinite;
}

.live-trade-btn:active {
  transform: scale(0.97);
}

.lt-profile-box {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(12px);
  cursor: default;
}

.lt-avatar-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.lt-avatar,
.lt-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.lt-avatar {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(212,175,55,0.6);
}

.lt-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff9a3c, #d4af37);
  color: #2b1400;
  font-weight: 800;
  font-size: 16px;
  border: 1.5px solid rgba(212,175,55,0.6);
}

.lt-username {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}

.lt-border {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1.5px;
  background: conic-gradient(from var(--lt-angle, 0deg), #ff2e4d, #ff9a3c, #ffd23c, #ff2e4d 50%, #ff2e4d);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ltBorderSpin 3.5s linear infinite;
  z-index: 0;
}

@property --lt-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes ltBorderSpin {
  to { --lt-angle: 360deg; }
}

.lt-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110px;
  height: 46px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  background: radial-gradient(circle, rgba(255,60,80,0.5), transparent 70%);
  animation: ltPulse 2.2s ease-out infinite;
  z-index: 0;
}

.lt-ring-2 {
  animation-delay: 1.1s;
}

@keyframes ltPulse {
  0% { transform: translate(-50%, -50%) scale(0.7); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(1.7); opacity: 0; }
}

.lt-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.3px;
  background: linear-gradient(120deg, #fff, #ffc9cf 60%, #fff);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: ltShimmer 3s linear infinite;
}

@keyframes ltShimmer {
  to { background-position: -220% 0; }
}

.lt-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3a4e;
  box-shadow: 0 0 10px 2px rgba(255,58,78,0.9);
  animation: livePulse 1.2s ease-in-out infinite;
}

/* ---------- Wide buttons (below menu grid) ---------- */
.wide-btn-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: -4px;
}

.wide-btn {
  position: relative;
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,60,80,0.4);
  background: linear-gradient(120deg, #2b0c14, #1d0410);
  color: #ffd6dd;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(255,60,80,0.16);
  transition: transform .15s ease;
}

.wide-btn:active {
  transform: scale(0.97);
}

@keyframes chBreathe {
  0%, 100% { box-shadow: 0 10px 30px rgba(212,175,55,0.16); }
  50% { box-shadow: 0 10px 38px rgba(212,175,55,0.4); }
}

.ch-shine {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ch-shine::after {
  content: '';
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -30%;
  width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  animation: chShineSweep 3.4s ease-in-out infinite;
}

@keyframes chShineSweep {
  0% { left: -30%; }
  35%, 100% { left: 130%; }
}

.ch-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.spark {
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f7e08a;
  box-shadow: 0 0 6px 1px rgba(247,224,138,0.9);
  animation: chSparkRise 2.4s ease-in infinite;
}

.spark-1 { left: 22%; animation-delay: 0s; }
.spark-2 { left: 52%; animation-delay: 0.8s; }
.spark-3 { left: 78%; animation-delay: 1.6s; }

@keyframes chSparkRise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(-34px) scale(0.3); opacity: 0; }
}

.ch-icon {
  display: inline-block;
  animation: chIconBounce 1.6s ease-in-out infinite;
}

@keyframes chIconBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(-6deg); }
}

.tb-text {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* ---------- Episodes ---------- */
.episode-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.episode-item {
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}

.episode-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  text-align: right;
  cursor: pointer;
}

.episode-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent);
  background: rgba(212,175,55,0.12);
}

.episode-title {
  flex: 1;
  font-size: 13.5px;
  font-weight: 700;
}

.episode-chevron {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-dim);
  transition: transform .2s ease;
}

.episode-item.open .episode-chevron {
  transform: rotate(180deg);
}

.episode-body {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 0 14px 16px;
}

.episode-item.open .episode-body {
  display: flex;
}

.episode-body video {
  width: 100%;
  border-radius: 12px;
  background: #000;
}

.episode-caption {
  margin: 0;
  font-size: 13px;
  line-height: 2;
  color: var(--text-dim);
  white-space: pre-line;
}

.episode-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,212,181,0.08);
  border: 1px solid rgba(0,212,181,0.25);
}

.episode-link-text {
  flex: 1;
  font-size: 12px;
  direction: ltr;
  text-align: left;
  color: var(--accent-3);
  overflow-x: auto;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.episode-copy-btn {
  flex-shrink: 0;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #052b26;
  background: var(--accent-3);
  cursor: pointer;
}

.episode-copy-btn.copied {
  background: var(--success);
}

/* ---------- Bottom bar ---------- */
.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg-1) 60%, transparent);
  z-index: 30;
}

.bottom-bar-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bottom-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 8px;
  border-radius: 18px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
  overflow: hidden;
}

.support-btn {
  border: 1px solid rgba(255,92,122,0.4);
  background: linear-gradient(120deg, #2b0c16, #1d0410);
  color: #ffc2d1;
  box-shadow: 0 10px 30px rgba(255,92,122,0.16);
}

.technicalist-btn {
  border: 1px solid rgba(0,212,181,0.4);
  background: linear-gradient(120deg, #062b28, #041d2e);
  color: #b8fff0;
  box-shadow: 0 10px 30px rgba(0,212,181,0.18);
}

.bb-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
