/* ===== LEARN PAGE STYLES ===== */

.learn-container {
  position: relative; z-index: 10;
  display: flex;
  min-height: calc(100vh - 60px);
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px 24px;
  gap: 32px;
}

/* ---- SIDEBAR ---- */
.learn-sidebar {
  width: 220px;
  flex-shrink: 0;
}

.sidebar-header {
  font-size: 0.6rem;
  letter-spacing: 4px;
  color: var(--text-dim);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201,168,76,0.2);
}

.lesson-nav { display: flex; flex-direction: column; gap: 4px; }

.lesson-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 1px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.lesson-link:hover {
  color: var(--gold-light);
  background: rgba(201,168,76,0.08);
  border-color: rgba(201,168,76,0.2);
}

.lesson-link.active {
  color: var(--gold-light);
  background: rgba(201,168,76,0.12);
  border-color: rgba(201,168,76,0.3);
}

.lesson-num {
  font-size: 0.6rem;
  color: var(--gold-dim);
  font-family: 'DM Mono', monospace;
  flex-shrink: 0;
}

/* ---- MAIN CONTENT ---- */
.learn-main {
  flex: 1;
  max-width: 780px;
}

.lesson { display: block; }
.lesson.hidden { display: none; }

.lesson-header {
  margin-bottom: 32px;
}

.lesson-tag {
  font-size: 0.6rem;
  letter-spacing: 4px;
  color: var(--gold-dim);
  display: block;
  margin-bottom: 8px;
}

.lesson-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--gold-light);
  margin-bottom: 12px;
  line-height: 1.1;
}

.lesson-intro {
  font-family: 'Crimson Pro', serif;
  font-size: 1.15rem;
  color: var(--cream);
  line-height: 1.7;
  opacity: 0.9;
}

.lesson-content { display: flex; flex-direction: column; gap: 20px; }

/* ---- CONCEPT CARDS ---- */
.concept-card {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 10px;
  padding: 24px;
}

.concept-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.concept-card p {
  font-family: 'Crimson Pro', serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--cream);
}

.highlight-card {
  border-color: rgba(201,168,76,0.4);
  background: rgba(20,40,20,0.4);
}

/* ---- EDGE TABLE ---- */
.edge-table {
  margin-top: 16px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(201,168,76,0.15);
}

.edge-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  padding: 8px 12px;
  font-size: 0.78rem;
  gap: 8px;
  align-items: center;
}

.edge-row.header {
  background: rgba(0,0,0,0.4);
  color: var(--text-dim);
  font-size: 0.65rem;
  letter-spacing: 2px;
}

.edge-row.good { background: rgba(20,60,20,0.4); color: #88cc88; }
.edge-row.ok { background: rgba(40,40,10,0.4); color: #cccc66; }
.edge-row.bad { background: rgba(60,15,15,0.4); color: #cc8888; }

/* ---- PROBABILITY VIZ ---- */
.probability-viz { margin: 16px 0; }
.prob-bar-container { display: flex; gap: 4px; align-items: flex-end; height: 100px; }

.prob-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.prob-bar::before {
  content: '';
  width: 100%;
  background: rgba(201,168,76,0.3);
  height: calc(var(--w) * 5);
  border-radius: 3px 3px 0 0;
  transition: background 0.2s;
}

.prob-bar:hover::before { background: rgba(201,168,76,0.6); }

.prob-bar.highlight::before { background: rgba(220,80,80,0.6); }

.prob-num { font-size: 0.7rem; color: var(--gold-light); }
.prob-count { font-size: 0.55rem; color: var(--text-dim); white-space: nowrap; }

.note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-style: italic;
}

/* ---- QUIZ ---- */
.quiz-card {
  background: rgba(0,20,40,0.5);
  border: 1px solid rgba(100,150,255,0.25);
  border-radius: 10px;
  padding: 24px;
}

.quiz-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: #88aaff;
  margin-bottom: 10px;
}

.quiz-card p {
  font-family: 'Crimson Pro', serif;
  font-size: 1rem;
  color: var(--cream);
  margin-bottom: 16px;
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quiz-options button {
  padding: 8px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--cream);
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.quiz-options button:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); }
.quiz-options button.correct { background: rgba(50,150,50,0.4); border-color: #44aa44; color: #88ee88; }
.quiz-options button.wrong { background: rgba(150,50,50,0.4); border-color: #aa4444; color: #ee8888; }

.quiz-result {
  margin-top: 12px;
  font-size: 0.85rem;
  font-family: 'Crimson Pro', serif;
  line-height: 1.5;
  min-height: 24px;
}

/* ---- FLOW DIAGRAM ---- */
.flow-diagram {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
}

.flow-node.start {
  display: inline-block;
  padding: 12px 32px;
  background: rgba(201,168,76,0.2);
  border: 2px solid var(--gold);
  border-radius: 8px;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--gold-light);
  letter-spacing: 3px;
  margin-bottom: 24px;
}

.flow-arrows {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.flow-branch { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.flow-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  padding: 4px 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
}

.flow-outcome {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
}

.flow-outcome.win { background: rgba(20,80,20,0.5); border: 1px solid #3a9a3a; color: #88ee88; }
.flow-outcome.lose { background: rgba(80,20,20,0.5); border: 1px solid #9a3a3a; color: #ee8888; }
.flow-outcome.point { background: rgba(20,20,80,0.5); border: 1px solid #3a3a9a; color: #8888ee; }

/* ---- PUCK DEMO ---- */
.puck-demo {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 16px;
}

.puck-demo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.demo-puck {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
}

.demo-puck.off {
  background: radial-gradient(circle, #2a2a2a, #0a0a0a);
  border: 3px solid #555;
  color: #888;
}

.demo-puck.on {
  background: radial-gradient(circle at 35% 35%, #ffffff, #e0e0e0);
  border: 3px solid #ffffff;
  color: #000;
  box-shadow: 0 0 20px rgba(255,255,255,0.4);
}

/* ---- RULES GRID ---- */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.rule-box {
  padding: 12px;
  border-radius: 8px;
  text-align: center;
}

.rule-box.win { background: rgba(20,80,20,0.4); border: 1px solid #2a7a2a; }
.rule-box.lose { background: rgba(80,20,20,0.4); border: 1px solid #7a2a2a; }
.rule-box.neutral { background: rgba(20,20,60,0.4); border: 1px solid #2a2a7a; }

.rule-roll {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.rule-box.win .rule-roll { color: #66ee66; }
.rule-box.lose .rule-roll { color: #ee6666; }
.rule-box.neutral .rule-roll { color: #8888ff; }

.rule-desc { font-size: 0.75rem; color: var(--cream); line-height: 1.4; }

.payout-line {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.payout-line strong { color: var(--gold-light); }

.win-text { color: #66ee66; }
.lose-text { color: #ee6666; }

/* ---- EXAMPLE ROLL SEQUENCE ---- */
.example-roll-sequence {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.ex-roll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 8px;
  min-width: 80px;
}

.ex-roll.win { border-color: #3a9a3a; background: rgba(20,80,20,0.3); }

.ex-dice { font-size: 1.3rem; }
.ex-sum { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; color: var(--gold-light); }
.ex-desc { font-size: 0.65rem; color: var(--text-dim); text-align: center; }
.ex-roll.win .ex-desc { color: #88ee88; }

/* ---- ODDS TABLE ---- */
.odds-table { margin-top: 12px; border-radius: 8px; overflow: hidden; }
.odds-row {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  padding: 10px 14px;
  font-size: 0.8rem;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.odds-row.header { background: rgba(0,0,0,0.4); color: var(--text-dim); font-size: 0.65rem; letter-spacing: 2px; }
.odds-row:not(.header) { background: rgba(0,30,0,0.3); color: var(--cream); }
.odds-row:not(.header) span:nth-child(2) { color: var(--gold-light); font-weight: 600; }

/* ---- TIP BOX ---- */
.tip-box {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 8px;
  margin-top: 12px;
}

.tip-box.warning {
  background: rgba(200,80,30,0.08);
  border-color: rgba(200,80,30,0.25);
}

.tip-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }

.tip-box p {
  font-family: 'Crimson Pro', serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--cream);
}

/* ---- PLACE BETS GRID ---- */
.place-bets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.place-card {
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  border: 2px solid transparent;
}

.place-card.best { background: rgba(20,60,20,0.5); border-color: #3a9a3a; }
.place-card.good { background: rgba(40,40,20,0.5); border-color: #8a8a3a; }
.place-card.ok { background: rgba(40,20,20,0.5); border-color: #6a3a3a; }

.pc-num { font-family: 'Playfair Display', serif; font-size: 2.5rem; font-weight: 900; }
.place-card.best .pc-num { color: var(--gold-light); }
.place-card.good .pc-num { color: #cccc66; }
.place-card.ok .pc-num { color: #cc8888; }

.pc-pays { font-size: 1rem; font-weight: 600; color: var(--cream); margin: 4px 0; }
.pc-edge { font-size: 0.7rem; color: var(--text-dim); margin-bottom: 4px; }
.pc-note { font-size: 0.7rem; }
.place-card.best .pc-note { color: #88ee88; }
.place-card.good .pc-note { color: #cccc66; }
.place-card.ok .pc-note { color: #cc8888; }

/* ---- LESSON LIST ---- */
.lesson-list {
  padding-left: 20px;
  margin-top: 12px;
}

.lesson-list li {
  font-family: 'Crimson Pro', serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--cream);
}

/* ---- HARDWAYS CARDS ---- */
.hardways-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.hw-card {
  background: rgba(40,0,40,0.4);
  border: 1px solid rgba(180,100,220,0.25);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.hw-dice { font-size: 2rem; margin-bottom: 8px; }
.hw-name { font-family: 'Playfair Display', serif; font-size: 1rem; color: var(--gold-light); margin-bottom: 8px; }
.hw-detail { font-size: 0.7rem; color: var(--text-dim); line-height: 1.4; margin-bottom: 8px; }
.hw-pays { font-size: 0.75rem; color: #cc88cc; }

/* ---- PROPS TABLE ---- */
.props-table { border-radius: 8px; overflow: hidden; }
.prop-row-learn {
  display: grid;
  grid-template-columns: 1.5fr 1.5fr 1fr 1fr 1fr;
  padding: 8px 12px;
  font-size: 0.75rem;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.prop-row-learn.header { background: rgba(0,0,0,0.5); color: var(--text-dim); font-size: 0.6rem; letter-spacing: 2px; }
.prop-row-learn.bad { background: rgba(60,15,15,0.4); color: #ee9999; }
.prop-row-learn.ok { background: rgba(40,30,10,0.4); color: #ccaa66; }

/* ---- STRATEGY CARDS ---- */
.strategy-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.strat-card {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 10px;
  padding: 20px;
}

.strat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold-dim);
  margin-bottom: 8px;
}

.strat-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.strat-body {
  font-family: 'Crimson Pro', serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--cream);
}

/* ---- PLAY NOW BUTTON ---- */
.play-now-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold), var(--gold-dim));
  color: #000;
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
}

.play-now-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(201,168,76,0.4); }

/* ---- LESSON FOOTER NAV ---- */
.lesson-nav-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(201,168,76,0.2);
}

.lesson-prev, .lesson-next {
  padding: 10px 24px;
  background: transparent;
  border: 1px solid var(--gold-dim);
  color: var(--gold-light);
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
}

.lesson-prev:hover, .lesson-next:hover {
  background: rgba(201,168,76,0.1);
  border-color: var(--gold);
}

.lesson-prev:disabled, .lesson-next:disabled { opacity: 0.3; pointer-events: none; }

.lesson-progress {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 2px;
}

@media (max-width: 800px) {
  .learn-container { flex-direction: column; }
  .learn-sidebar { width: 100%; }
  .lesson-nav { flex-direction: row; flex-wrap: wrap; }
  .flow-arrows, .hardways-cards, .strategy-cards { grid-template-columns: 1fr; }
  .rules-grid { grid-template-columns: 1fr; }
  .place-bets-grid { grid-template-columns: repeat(2, 1fr); }
}
