/*
Theme Name: English Challenges
Theme URI: https://englishchallenges.com
Author: Code Blue Security / Robbie
Author URI: https://englishchallenges.com
Description: A modern, challenge-based English learning platform theme. Dark, premium, and motivating.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: english-challenges
Tags: dark, education, modern, challenge, learning
*/

/* ============================================================
   ENGLISH CHALLENGES THEME — v1.0.0
   Brand: #1B1B1D bg | #F3F3F0 text | #F58220 orange
   Fonts: Syne (headings) + DM Mono (code/meta)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Mono:ital,wght@0,400;0,500;1,400&display=swap');

/* ── CSS Variables ────────────────────────────── */
:root {
  --ec-bg:          #1B1B1D;
  --ec-surface:     #242426;
  --ec-surface2:    #2D2D30;
  --ec-border:      rgba(255,255,255,0.08);
  --ec-border2:     rgba(255,255,255,0.14);
  --ec-text:        #F3F3F0;
  --ec-muted:       rgba(243,243,240,0.55);
  --ec-faint:       rgba(243,243,240,0.25);
  --ec-orange:      #F58220;
  --ec-orange-dim:  rgba(245,130,32,0.15);
  --ec-orange-dim2: rgba(245,130,32,0.25);
  --ec-green:       #4CAF7D;
  --ec-green-dim:   rgba(76,175,125,0.15);
  --ec-blue:        #5B9CF6;
  --ec-blue-dim:    rgba(91,156,246,0.15);
  --ec-purple:      #A78BFA;
  --ec-purple-dim:  rgba(167,139,250,0.15);
  --ec-red:         #F87171;
  --ec-red-dim:     rgba(248,113,113,0.15);

  --font-main:  'Syne', sans-serif;
  --font-mono:  'DM Mono', monospace;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;

  --nav-height: 62px;
}

/* ── Reset & Base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ec-bg);
  color: var(--ec-text);
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ec-orange); text-decoration: none; transition: opacity 0.15s; }
a:hover { opacity: 0.8; }

/* ── Typography ───────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--ec-text);
}

h1 { font-size: clamp(28px, 5vw, 48px); }
h2 { font-size: clamp(22px, 4vw, 36px); }
h3 { font-size: clamp(18px, 3vw, 24px); }
h4 { font-size: 18px; }

p { color: var(--ec-text); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.text-muted    { color: var(--ec-muted); }
.text-orange   { color: var(--ec-orange); }
.text-mono     { font-family: var(--font-mono); }
.text-center   { text-align: center; }

.label-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ec-orange);
}

/* ── Layout ───────────────────────────────────── */
.ec-container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.ec-container--narrow {
  max-width: 780px;
}

.ec-container--wide {
  max-width: 1400px;
}

.ec-section {
  padding: 80px 0;
}

.ec-section--sm {
  padding: 48px 0;
}

/* ── Header / Navigation ──────────────────────── */
#ec-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(27, 27, 29, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ec-border);
}

.ec-nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo */
.ec-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.ec-logo__hex {
  width: 34px;
  height: 34px;
}

.ec-logo__text {
  font-size: 16px;
  font-weight: 800;
  color: var(--ec-text);
  letter-spacing: -0.3px;
}

.ec-logo__text span { color: var(--ec-orange); }

/* Nav menu */
.ec-nav__menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.ec-nav__menu a {
  font-size: 13px;
  font-weight: 600;
  color: var(--ec-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  text-decoration: none;
}

.ec-nav__menu a:hover,
.ec-nav__menu .current-menu-item a {
  color: var(--ec-text);
  background: var(--ec-surface);
}

.ec-nav__menu .current-menu-item a { color: var(--ec-orange); }

/* CTA button in nav */
.ec-nav__cta {
  background: var(--ec-orange);
  color: #1B1B1D !important;
  padding: 7px 16px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 700 !important;
}

.ec-nav__cta:hover { background: #ff9940 !important; opacity: 1 !important; }

/* Mobile hamburger */
.ec-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.ec-nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ec-text);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ── Buttons ──────────────────────────────────── */
.ec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  letter-spacing: 0.3px;
  line-height: 1;
  white-space: nowrap;
}

.ec-btn--primary {
  background: var(--ec-orange);
  color: #1B1B1D;
}

.ec-btn--primary:hover {
  background: #ff9940;
  transform: translateY(-1px);
  color: #1B1B1D;
  opacity: 1;
}

.ec-btn--ghost {
  background: var(--ec-surface);
  color: var(--ec-text);
  border: 1px solid var(--ec-border2);
}

.ec-btn--ghost:hover {
  border-color: var(--ec-orange);
  color: var(--ec-orange);
  opacity: 1;
}

.ec-btn--outline {
  background: transparent;
  color: var(--ec-orange);
  border: 1px solid var(--ec-orange);
}

.ec-btn--outline:hover {
  background: var(--ec-orange-dim);
  opacity: 1;
}

.ec-btn--sm {
  font-size: 12px;
  padding: 7px 14px;
}

.ec-btn--lg {
  font-size: 16px;
  padding: 15px 32px;
}

.ec-btn--full { width: 100%; }

.ec-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Cards ────────────────────────────────────── */
.ec-card {
  background: var(--ec-surface);
  border: 1px solid var(--ec-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.15s, transform 0.15s;
}

.ec-card:hover {
  border-color: var(--ec-border2);
}

.ec-card--clickable {
  cursor: pointer;
}

.ec-card--clickable:hover {
  transform: translateY(-2px);
}

.ec-card--orange-border { border-top: 2px solid var(--ec-orange); }
.ec-card--blue-border   { border-top: 2px solid var(--ec-blue); }
.ec-card--green-border  { border-top: 2px solid var(--ec-green); }
.ec-card--purple-border { border-top: 2px solid var(--ec-purple); }

/* ── Badges / Pills ───────────────────────────── */
.ec-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
}

.ec-badge--orange  { background: var(--ec-orange-dim);  color: var(--ec-orange); }
.ec-badge--blue    { background: var(--ec-blue-dim);    color: var(--ec-blue); }
.ec-badge--green   { background: var(--ec-green-dim);   color: var(--ec-green); }
.ec-badge--purple  { background: var(--ec-purple-dim);  color: var(--ec-purple); }
.ec-badge--red     { background: var(--ec-red-dim);     color: var(--ec-red); }
.ec-badge--muted   { background: var(--ec-surface2);    color: var(--ec-muted); }

.ec-diff--beginner     { background: var(--ec-green-dim);  color: var(--ec-green);  font-family: var(--font-mono); font-size: 10px; padding: 3px 9px; border-radius: 20px; }
.ec-diff--intermediate { background: var(--ec-orange-dim); color: var(--ec-orange); font-family: var(--font-mono); font-size: 10px; padding: 3px 9px; border-radius: 20px; }
.ec-diff--advanced     { background: var(--ec-red-dim);    color: var(--ec-red);    font-family: var(--font-mono); font-size: 10px; padding: 3px 9px; border-radius: 20px; }

/* ── Hero Section ─────────────────────────────── */
.ec-hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ec-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(245,130,32,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.ec-hero__tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ec-orange);
  margin-bottom: 20px;
  display: block;
}

.ec-hero__title {
  font-size: clamp(32px, 6vw, 58px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.ec-hero__title em {
  font-style: normal;
  color: var(--ec-orange);
}

.ec-hero__subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--ec-muted);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.65;
  font-weight: 400;
}

.ec-hero__cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Stats Bar ────────────────────────────────── */
.ec-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  max-width: 600px;
  margin: 48px auto 0;
}

.ec-stat {
  background: var(--ec-surface);
  border: 1px solid var(--ec-border);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
}

.ec-stat__num {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  color: var(--ec-orange);
  line-height: 1;
  margin-bottom: 5px;
}

.ec-stat__label {
  font-size: 11px;
  color: var(--ec-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ── How It Works ─────────────────────────────── */
.ec-how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  counter-reset: steps;
}

.ec-how-card {
  background: var(--ec-surface);
  border: 1px solid var(--ec-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  counter-increment: steps;
  position: relative;
}

.ec-how-card::before {
  content: "0" counter(steps);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ec-orange);
  letter-spacing: 1px;
  display: block;
  margin-bottom: 14px;
}

.ec-how-card__icon {
  font-size: 24px;
  margin-bottom: 12px;
  display: block;
}

.ec-how-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ec-how-card p {
  font-size: 13px;
  color: var(--ec-muted);
  line-height: 1.6;
}

/* ── Category Grid ────────────────────────────── */
.ec-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.ec-cat-card {
  background: var(--ec-surface);
  border: 1px solid var(--ec-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

.ec-cat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}

.ec-cat-card[data-cat="speaking"]::after { background: var(--ec-orange); }
.ec-cat-card[data-cat="grammar"]::after  { background: var(--ec-blue); }
.ec-cat-card[data-cat="words"]::after    { background: var(--ec-green); }
.ec-cat-card[data-cat="slang"]::after    { background: var(--ec-purple); }

.ec-cat-card:hover {
  border-color: var(--ec-border2);
  transform: translateY(-3px);
  opacity: 1;
}

.ec-cat-card__icon {
  font-size: 28px;
  margin-bottom: 14px;
  display: block;
}

.ec-cat-card__name {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--ec-text);
}

.ec-cat-card__desc {
  font-size: 13px;
  color: var(--ec-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.ec-cat-card__count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ec-muted);
}

/* ── Challenge List ───────────────────────────── */
.ec-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ec-border);
}

.ec-filter-btn {
  background: var(--ec-surface);
  border: 1px solid var(--ec-border);
  color: var(--ec-muted);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ec-filter-btn:hover { border-color: var(--ec-border2); color: var(--ec-text); }

.ec-filter-btn.active[data-filter="all"]      { background: var(--ec-orange); color: #1B1B1D; border-color: var(--ec-orange); }
.ec-filter-btn.active[data-filter="speaking"] { background: var(--ec-orange); color: #1B1B1D; border-color: var(--ec-orange); }
.ec-filter-btn.active[data-filter="grammar"]  { background: var(--ec-blue);   color: #fff;    border-color: var(--ec-blue); }
.ec-filter-btn.active[data-filter="words"]    { background: var(--ec-green);  color: #fff;    border-color: var(--ec-green); }
.ec-filter-btn.active[data-filter="slang"]    { background: var(--ec-purple); color: #fff;    border-color: var(--ec-purple); }
.ec-filter-btn.active[data-filter="daily"]    { background: var(--ec-blue);   color: #fff;    border-color: var(--ec-blue); }

.ec-challenge-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ec-chal-card {
  background: var(--ec-surface);
  border: 1px solid var(--ec-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: all 0.15s;
}

.ec-chal-card:hover {
  border-color: var(--ec-border2);
  background: var(--ec-surface2);
  opacity: 1;
}

.ec-chal-card.is-completed {
  border-left: 3px solid var(--ec-green);
}

.ec-chal-card__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ec-chal-card[data-cat="speaking"] .ec-chal-card__dot { background: var(--ec-orange); }
.ec-chal-card[data-cat="grammar"]  .ec-chal-card__dot { background: var(--ec-blue); }
.ec-chal-card[data-cat="words"]    .ec-chal-card__dot { background: var(--ec-green); }
.ec-chal-card[data-cat="slang"]    .ec-chal-card__dot { background: var(--ec-purple); }

.ec-chal-card__info { flex: 1; min-width: 0; }

.ec-chal-card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ec-text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ec-chal-card__meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.ec-chal-card__cat {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ec-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.ec-chal-card__arrow {
  color: var(--ec-faint);
  font-size: 18px;
  flex-shrink: 0;
}

.ec-chal-card.is-completed .ec-chal-card__arrow { color: var(--ec-green); }

/* ── Challenge Detail ─────────────────────────── */
.ec-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.ec-detail-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ec-border);
}

.ec-detail-header__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.ec-detail-header__title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 10px;
}

/* Scenario / Task boxes */
.ec-scenario-box {
  background: var(--ec-surface2);
  border-left: 3px solid var(--ec-orange);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.ec-box-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ec-scenario-box .ec-box-label { color: var(--ec-orange); }

.ec-task-box {
  background: var(--ec-surface);
  border: 1px solid var(--ec-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.ec-task-box .ec-box-label { color: var(--ec-muted); }

.ec-task-box__text {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

/* Requirements checklist */
.ec-requirements {
  background: var(--ec-surface);
  border: 1px solid var(--ec-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.ec-requirements .ec-box-label { color: var(--ec-muted); }

.ec-req-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ec-border);
  cursor: pointer;
  transition: opacity 0.15s;
}

.ec-req-item:last-child { border-bottom: none; padding-bottom: 0; }
.ec-req-item:first-child { padding-top: 0; }

.ec-req-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--ec-green);
  cursor: pointer;
}

.ec-req-item label {
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
  transition: color 0.15s;
}

.ec-req-item.is-checked label {
  color: var(--ec-muted);
  text-decoration: line-through;
}

/* Completion progress bar */
.ec-completion-wrap {
  margin-bottom: 4px;
}

.ec-completion-bar {
  height: 6px;
  background: var(--ec-border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.ec-completion-fill {
  height: 100%;
  background: var(--ec-green);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.ec-completion-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ec-muted);
}

/* Bonus box */
.ec-bonus-box {
  background: var(--ec-orange-dim);
  border: 1px solid var(--ec-orange-dim2);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 16px;
}

.ec-bonus-box .ec-box-label { color: var(--ec-orange); }

.ec-bonus-box__text {
  font-size: 13px;
  line-height: 1.6;
}

/* ── Audio Recorder ───────────────────────────── */
.ec-recorder {
  background: var(--ec-surface);
  border: 1px solid var(--ec-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.ec-recorder__label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ec-muted);
  margin-bottom: 16px;
}

.ec-recorder__controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ec-rec-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--ec-orange);
  background: var(--ec-orange-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.ec-rec-btn:hover { background: var(--ec-orange); }

.ec-rec-btn.is-recording {
  background: var(--ec-red);
  border-color: var(--ec-red);
  animation: ec-pulse 1.2s infinite;
}

@keyframes ec-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(248,113,113,0); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 8px rgba(248,113,113,0); }
}

.ec-rec-btn__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ec-orange);
  transition: all 0.2s;
}

.ec-rec-btn.is-recording .ec-rec-btn__dot {
  border-radius: 3px;
  width: 13px;
  height: 13px;
  background: white;
}

.ec-rec-status { flex: 1; }

.ec-rec-status__text {
  font-size: 13px;
  color: var(--ec-muted);
  font-weight: 500;
  margin-bottom: 2px;
}

.ec-rec-status__text.is-active { color: var(--ec-red); }

.ec-rec-status__time {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 500;
  color: var(--ec-text);
  line-height: 1;
}

/* Saved recordings list */
.ec-recordings-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ec-rec-item {
  background: var(--ec-surface2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ec-play-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--ec-border2);
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ec-text);
  font-size: 11px;
  transition: all 0.15s;
  flex-shrink: 0;
}

.ec-play-btn:hover { border-color: var(--ec-orange); color: var(--ec-orange); }
.ec-play-btn.is-playing { background: var(--ec-orange-dim); border-color: var(--ec-orange); color: var(--ec-orange); }

.ec-rec-item__info { flex: 1; min-width: 0; }
.ec-rec-item__name { font-size: 12px; font-weight: 600; margin-bottom: 1px; }
.ec-rec-item__date { font-family: var(--font-mono); font-size: 10px; color: var(--ec-muted); }

.ec-waveform {
  flex: 1;
  height: 22px;
  display: flex;
  align-items: center;
  gap: 1.5px;
  overflow: hidden;
}

.ec-wave-bar {
  width: 2.5px;
  border-radius: 2px;
  background: var(--ec-orange-dim2);
  transition: background 0.15s;
}

.ec-rec-item__dur {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ec-muted);
  flex-shrink: 0;
}

/* ── Model Answer ─────────────────────────────── */
.ec-model-answer {
  background: var(--ec-surface);
  border: 1px solid var(--ec-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.ec-model-answer__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ec-model-answer__locked {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--ec-orange-dim);
  color: var(--ec-orange);
  padding: 3px 8px;
  border-radius: 4px;
}

.ec-model-answer__teacher {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--ec-surface2);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.ec-model-answer__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ec-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #1B1B1D;
  flex-shrink: 0;
}

.ec-model-answer__teacher-info { flex: 1; }
.ec-model-answer__teacher-name { font-size: 13px; font-weight: 700; margin-bottom: 1px; }
.ec-model-answer__teacher-role { font-size: 11px; color: var(--ec-muted); }

.ec-model-answer__text {
  font-size: 13px;
  color: var(--ec-muted);
  line-height: 1.7;
  font-style: italic;
  border-left: 2px solid var(--ec-border2);
  padding-left: 14px;
}

.ec-model-answer__locked-msg {
  font-size: 13px;
  color: var(--ec-muted);
  text-align: center;
  padding: 20px;
  border: 1px dashed var(--ec-border2);
  border-radius: var(--radius-md);
}

/* ── Sidebar (challenge detail) ───────────────── */
.ec-detail-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 20px);
}

.ec-sidebar-card {
  background: var(--ec-surface);
  border: 1px solid var(--ec-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 14px;
}

.ec-sidebar-card__title {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ec-muted);
  margin-bottom: 14px;
}

.ec-sidebar-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--ec-border);
  font-size: 13px;
}

.ec-sidebar-info-row:last-child { border-bottom: none; }
.ec-sidebar-info-row__label { color: var(--ec-muted); }
.ec-sidebar-info-row__val { font-weight: 600; }

/* ── Progress / Profile ───────────────────────── */
.ec-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--ec-surface);
  border: 1px solid var(--ec-border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.ec-profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ec-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: #1B1B1D;
  flex-shrink: 0;
}

.ec-profile-name {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
}

.ec-streak-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--ec-orange-dim);
  border: 1px solid var(--ec-orange-dim2);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.ec-streak-num {
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 500;
  color: var(--ec-orange);
  line-height: 1;
}

.ec-streak-label { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.ec-streak-sub   { font-size: 12px; color: var(--ec-muted); }

.ec-progress-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.ec-prog-card {
  background: var(--ec-surface);
  border: 1px solid var(--ec-border);
  border-radius: var(--radius-md);
  padding: 16px 10px;
  text-align: center;
}

.ec-prog-card__num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 5px;
}

.ec-prog-card__label {
  font-size: 10px;
  color: var(--ec-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Category progress bars */
.ec-cat-prog-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.ec-cat-prog-label {
  font-size: 12px;
  font-weight: 600;
  width: 80px;
  flex-shrink: 0;
}

.ec-cat-prog-bar {
  flex: 1;
  height: 6px;
  background: var(--ec-border);
  border-radius: 3px;
  overflow: hidden;
}

.ec-cat-prog-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.ec-cat-prog-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ec-muted);
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}

/* Recording history */
.ec-history-item {
  background: var(--ec-surface);
  border: 1px solid var(--ec-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 10px;
  transition: border-color 0.15s;
}

.ec-history-item:hover { border-color: var(--ec-border2); }

.ec-history-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ec-history-item__title { font-size: 14px; font-weight: 700; }

.ec-history-item__player {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ec-hist-waveform {
  flex: 1;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 1.5px;
  background: var(--ec-surface2);
  border-radius: 6px;
  padding: 0 10px;
  overflow: hidden;
}

/* ── Footer ───────────────────────────────────── */
#ec-footer {
  background: var(--ec-surface);
  border-top: 1px solid var(--ec-border);
  padding: 48px 0 24px;
  margin-top: 80px;
}

.ec-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.ec-footer-brand p {
  font-size: 13px;
  color: var(--ec-muted);
  line-height: 1.7;
  margin-top: 12px;
  max-width: 240px;
}

.ec-footer-col h5 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ec-muted);
  margin-bottom: 14px;
}

.ec-footer-col ul { list-style: none; }

.ec-footer-col ul li { margin-bottom: 8px; }

.ec-footer-col ul li a {
  font-size: 13px;
  color: var(--ec-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.ec-footer-col ul li a:hover { color: var(--ec-text); opacity: 1; }

.ec-footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--ec-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ec-footer-bottom p {
  font-size: 12px;
  color: var(--ec-muted);
  margin: 0;
}

/* ── Section Title Block ──────────────────────── */
.ec-section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 48px;
}

.ec-section-head__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ec-orange);
  margin-bottom: 12px;
  display: block;
}

.ec-section-head h2 {
  margin-bottom: 14px;
}

.ec-section-head p {
  font-size: 15px;
  color: var(--ec-muted);
  line-height: 1.7;
}

/* ── Toast Notification ───────────────────────── */
.ec-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ec-green);
  color: #fff;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 9999;
  white-space: nowrap;
}

.ec-toast.is-visible {
  transform: translateX(-50%) translateY(0);
}

/* ── Separator ────────────────────────────────── */
.ec-divider {
  height: 1px;
  background: var(--ec-border);
  margin: 40px 0;
}

/* ── Daily Challenge Banner ───────────────────── */
.ec-daily-banner {
  background: var(--ec-surface);
  border: 1px solid var(--ec-orange);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.ec-daily-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at top left, rgba(245,130,32,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.ec-daily-banner__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ec-orange);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ec-daily-banner__tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ec-orange);
  animation: ec-blink 1.5s infinite;
}

@keyframes ec-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.ec-daily-banner__title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.ec-daily-banner__desc {
  font-size: 13px;
  color: var(--ec-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 900px) {
  .ec-detail-layout {
    grid-template-columns: 1fr;
  }

  .ec-detail-sidebar {
    position: static;
  }

  .ec-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .ec-progress-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .ec-nav__menu { display: none; }
  .ec-nav__menu.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--ec-bg);
    border-bottom: 1px solid var(--ec-border);
    padding: 12px 16px;
    gap: 2px;
  }
  .ec-nav__toggle { display: flex; }
  .ec-hero { padding: 60px 0 50px; }
  .ec-footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .ec-footer-brand { display: none; }
  .ec-progress-grid { grid-template-columns: repeat(2, 1fr); }
  .ec-cat-grid { grid-template-columns: 1fr; }
}

/* ── WordPress Overrides ──────────────────────── */
.wp-block-image { margin: 1.5rem 0; }
.aligncenter { text-align: center; }
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
}

/* ── Homepage two-column daily row ───────────── */
.ec-homepage-daily-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .ec-homepage-daily-row {
    grid-template-columns: 1fr;
  }
}

/* ── Word of the Day Card (theme layer) ──────── */
.ec-wotd-card {
  background: var(--ec-surface);
  border: 1px solid var(--ec-orange);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}

.ec-wotd-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ec-orange);
}

.ec-wotd-card.is-completed { border-color: var(--ec-green); }
.ec-wotd-card.is-completed::before { background: var(--ec-green); }

.ec-wotd-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ec-wotd-card__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ec-orange);
  display: flex;
  align-items: center;
  gap: 7px;
}

.ec-wotd-card__pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ec-orange);
  flex-shrink: 0;
  animation: ec-blink 1.6s infinite;
}

.ec-wotd-card__word-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.ec-wotd-card__word {
  font-size: 30px;
  font-weight: 800;
  color: var(--ec-text);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.ec-wotd-card__pos {
  font-size: 12px;
  font-style: italic;
  color: var(--ec-muted);
  font-family: var(--font-mono);
}

.ec-wotd-card__pronunciation {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ec-orange);
  margin-bottom: 14px;
  opacity: 0.85;
}

.ec-wotd-card__definition {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ec-text);
  background: var(--ec-surface2);
  border-left: 3px solid var(--ec-orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.ec-wotd-card__example {
  font-size: 13px;
  color: var(--ec-muted);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 12px;
  padding-left: 4px;
}

.ec-wotd-card__collocation {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ec-orange-dim);
  border: 1px solid var(--ec-orange-dim2);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--ec-text);
  margin-bottom: 16px;
}

.ec-wotd-card__coll-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ec-orange);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.ec-wotd-card__checklist { margin-bottom: 18px; }

.ec-wotd-card__checklist-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ec-muted);
  margin-bottom: 8px;
}

.ec-wotd-card__req {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  color: var(--ec-text);
  line-height: 1.5;
  margin-bottom: 6px;
}

.ec-wotd-card__req-box {
  width: 14px; height: 14px;
  border: 1.5px solid var(--ec-border2);
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 1px;
  display: inline-block;
}
