/* ══════════════════════════════════════════
   Speech Club — Public Speaking Page
   ══════════════════════════════════════════ */

.speaking-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ── Next Session Banner ── */
.sp-next-banner {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.sp-next-banner h2 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 4px;
}
.sp-next-banner p {
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  margin: 0;
}
.sp-countdown-chip {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  border-radius: 30px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ── Two-column layout ── */
.sp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 680px) {
  .sp-grid { grid-template-columns: 1fr; }
}

/* ── Topic Card ── */
.sp-topic-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sp-topic-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #6366f1;
}
.sp-topic-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  min-height: 56px;
}
.sp-topic-category {
  display: inline-block;
  background: #6366f115;
  color: #6366f1;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.sp-spin-btn {
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.sp-spin-btn:hover { background: #4f46e5; transform: translateY(-1px); }
.sp-spin-btn:active { transform: translateY(0); }

/* ── Timer Card ── */
.sp-timer-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.sp-ring-wrap {
  position: relative;
  width: 130px;
  height: 130px;
}
.sp-ring-svg {
  transform: rotate(-90deg);
  width: 130px;
  height: 130px;
}
.sp-ring-bg { fill: none; stroke: var(--border); stroke-width: 8; }
.sp-ring-fg {
  fill: none;
  stroke: #6366f1;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 339.3;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .5s linear, stroke .3s;
}
.sp-ring-time {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.sp-timer-status {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.sp-timer-btns {
  display: flex;
  gap: 10px;
}
.sp-timer-btn {
  padding: 9px 20px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: .15s;
}
.sp-timer-btn--start {
  background: #10b981;
  color: #fff;
}
.sp-timer-btn--start:hover { background: #059669; }
.sp-timer-btn--pause {
  background: #f59e0b;
  color: #fff;
}
.sp-timer-btn--pause:hover { background: #d97706; }
.sp-timer-btn--reset {
  background: var(--border);
  color: var(--text);
}
.sp-timer-btn--reset:hover { background: var(--text-muted); color: #fff; }

/* ── Tips ── */
.sp-tips-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 24px;
  scrollbar-width: none;
}
.sp-tips-row::-webkit-scrollbar { display: none; }
.sp-tip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 200px;
  flex-shrink: 0;
}
.sp-tip-icon { font-size: 1.3rem; margin-bottom: 6px; }
.sp-tip-title { font-size: 0.8rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.sp-tip-body { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }

/* ── Topic Bank ── */
.sp-section-head {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 12px;
}
.sp-bank-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.sp-filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: .15s;
}
.sp-filter-btn.active,
.sp-filter-btn:hover {
  background: #6366f1;
  color: #fff;
  border-color: #6366f1;
}
.sp-bank-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}
@media (max-width: 680px) {
  .sp-bank-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .sp-bank-grid { grid-template-columns: 1fr; }
}
.sp-bank-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: 0.83rem;
  color: var(--text);
  line-height: 1.4;
  position: relative;
}
.sp-bank-item:hover {
  border-color: #6366f1;
  background: #6366f108;
}
.sp-bank-item.used {
  opacity: 0.45;
}
.sp-bank-cat-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── Session History ── */
.sp-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sp-history-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sp-history-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 90px;
}
.sp-history-topic {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
  flex: 1;
}
.sp-history-badge {
  font-size: 0.7rem;
  background: #6366f115;
  color: #6366f1;
  border-radius: 10px;
  padding: 2px 10px;
  font-weight: 600;
}
.sp-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 30px 0;
}

/* Timer states */
.sp-ring-fg.warning { stroke: #f59e0b; }
.sp-ring-fg.danger  { stroke: #ef4444; }
.sp-ring-time.danger { color: #ef4444; }
