/* ══════════════════════════════════════════════════════════════
   CalmTweets Features — ctf.css
   Sleep Timer · Favourites · Lofi Radio · Mood Quiz
   ══════════════════════════════════════════════════════════════ */

:root {
  --ctf-bg:      #0f1419;
  --ctf-surface: #161c25;
  --ctf-border:  rgba(255,255,255,0.08);
  --ctf-accent:  #77c9d3;
  --ctf-text:    #e6edf3;
  --ctf-muted:   #6b7a89;
  --ctf-radius:  12px;
  --ctf-ease:    cubic-bezier(0.22,1,0.36,1);
}

/* ── Features Bar (bottom-right corner) ─────────────────────────────────── */
.ctf-bar {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.ctf-bar__triggers {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: rgba(15,20,25,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--ctf-border);
  border-radius: 2rem;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.ctf-trigger {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  color: var(--ctf-muted);
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 1.5rem;
  transition: color 0.25s, background 0.25s;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.ctf-trigger svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.ctf-trigger__label { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.04em; white-space: nowrap; }
.ctf-trigger:hover  { color: var(--ctf-accent); background: rgba(119,201,211,0.1); }
.ctf-trigger.active { color: var(--ctf-accent); background: rgba(119,201,211,0.12); }

/* ── Panel ──────────────────────────────────────────────────────────────── */
.ctf-panel {
  width: 320px;
  background: var(--ctf-bg);
  border: 1px solid var(--ctf-border);
  border-radius: var(--ctf-radius);
  box-shadow: 0 24px 64px rgba(0,0,0,0.65);
  overflow: hidden;
  animation: ctf-panel-in 0.3s var(--ctf-ease);
}
@keyframes ctf-panel-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.ctf-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ctf-border);
  background: var(--ctf-surface);
}
.ctf-panel__header h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ctf-text);
  margin: 0;
}
.ctf-panel__close {
  background: none;
  border: none;
  color: var(--ctf-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.2s;
}
.ctf-panel__close:hover { color: var(--ctf-text); }

.ctf-panel__body {
  padding: 1.25rem;
  max-height: 380px;
  overflow-y: auto;
}
.ctf-panel__desc { font-size: 0.82rem; color: var(--ctf-muted); margin-bottom: 1.25rem; line-height: 1.6; }

.ctf-panel__footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--ctf-border);
  background: var(--ctf-surface);
}

.ctf-empty { font-size: 0.82rem; color: var(--ctf-muted); text-align: center; padding: 1.5rem 0; }
.ctf-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ctf-muted); display: block; margin-bottom: 0.75rem; }

/* Buttons */
.ctf-btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  background: var(--ctf-accent);
  color: #080c10;
  border: none;
  border-radius: 2rem;
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.ctf-btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.ctf-btn-primary svg { fill: currentColor; }

.ctf-btn-ghost {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--ctf-muted);
  border-radius: 2rem;
  font-size: 0.78rem; font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.ctf-btn-ghost:hover { border-color: var(--ctf-accent); color: var(--ctf-accent); }

/* ── Favourites ─────────────────────────────────────────────────────────── */
.ctf-fav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--ctf-border);
  text-decoration: none;
}
.ctf-fav-item:last-child { border-bottom: none; }
.ctf-fav-thumb {
  width: 44px; height: 44px;
  border-radius: 6px;
  background: var(--ctf-surface) center/cover no-repeat;
  flex-shrink: 0;
}
.ctf-fav-info { flex: 1; min-width: 0; }
.ctf-fav-title {
  font-size: 0.88rem; font-weight: 500;
  color: var(--ctf-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block;
}
.ctf-fav-cat { font-size: 0.7rem; color: var(--ctf-accent); text-transform: uppercase; letter-spacing: 0.08em; }
.ctf-fav-remove {
  background: none; border: none; color: var(--ctf-muted);
  cursor: pointer; font-size: 1rem; padding: 0 4px;
  transition: color 0.2s;
}
.ctf-fav-remove:hover { color: #e05252; }

/* ── Sleep Timer ────────────────────────────────────────────────────────── */
.ctf-timer-options {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem;
  margin-bottom: 1rem;
}
.ctf-timer-btn {
  padding: 0.65rem 0.5rem;
  background: var(--ctf-surface);
  border: 1px solid var(--ctf-border);
  border-radius: 8px;
  color: var(--ctf-muted);
  font-size: 0.82rem; font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.ctf-timer-btn:hover,
.ctf-timer-btn.selected {
  border-color: var(--ctf-accent);
  color: var(--ctf-accent);
  background: rgba(119,201,211,0.08);
}

.ctf-timer-active { text-align: center; padding-top: 0.5rem; }
.ctf-timer-countdown {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 3rem; font-weight: 600;
  color: var(--ctf-accent);
  letter-spacing: 0.05em;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.ctf-timer-msg { font-size: 0.78rem; color: var(--ctf-muted); margin-bottom: 1rem; }

/* ── Radio ──────────────────────────────────────────────────────────────── */
.ctf-radio-cats {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.ctf-cat-btn {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--ctf-border);
  border-radius: 2rem;
  background: var(--ctf-surface);
  color: var(--ctf-muted);
  font-size: 0.75rem; font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.ctf-cat-btn.active,
.ctf-cat-btn:hover { border-color: var(--ctf-accent); color: var(--ctf-accent); }

.ctf-radio-now {
  display: flex; gap: 0.75rem; align-items: center;
  padding: 0.75rem;
  background: var(--ctf-surface);
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid var(--ctf-border);
}
.ctf-radio-thumb {
  width: 48px; height: 48px;
  border-radius: 6px;
  background: var(--ctf-bg) center/cover no-repeat;
  flex-shrink: 0;
}
.ctf-radio-info { min-width: 0; }
.ctf-radio-playing { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ctf-accent); display: block; }
.ctf-radio-title { font-size: 0.9rem; font-weight: 500; color: var(--ctf-text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctf-radio-link { font-size: 0.72rem; color: var(--ctf-muted); text-decoration: none; }
.ctf-radio-link:hover { color: var(--ctf-accent); }

.ctf-radio-controls { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Mood Quiz ──────────────────────────────────────────────────────────── */
.ctf-quiz-q { font-size: 0.95rem; color: var(--ctf-text); margin-bottom: 1rem; font-weight: 500; }
.ctf-quiz-opts { display: flex; flex-direction: column; gap: 0.5rem; }
.ctf-quiz-opt {
  padding: 0.75rem 1rem;
  background: var(--ctf-surface);
  border: 1px solid var(--ctf-border);
  border-radius: 8px;
  color: var(--ctf-text);
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.ctf-quiz-opt:hover { border-color: var(--ctf-accent); background: rgba(119,201,211,0.06); }

.ctf-quiz-result { text-align: center; }
.ctf-quiz-result__label { font-size: 0.82rem; color: var(--ctf-muted); margin-bottom: 1rem; }
.ctf-quiz-tracks { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.ctf-quiz-track {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--ctf-surface);
  border: 1px solid var(--ctf-border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  text-decoration: none;
  transition: border-color 0.2s;
}
.ctf-quiz-track:hover { border-color: var(--ctf-accent); }
.ctf-quiz-track-thumb { width: 40px; height: 40px; border-radius: 6px; background: var(--ctf-bg) center/cover no-repeat; flex-shrink: 0; }
.ctf-quiz-track-title { font-size: 0.85rem; color: var(--ctf-text); text-align: left; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctf-quiz-track-play { flex-shrink: 0; }
.ctf-quiz-track-play svg { width: 16px; height: 16px; fill: var(--ctf-accent); }

/* ── Heart button on single pages ───────────────────────────────────────── */
.ctf-heart-wrap { display: none; /* heart moved to hero section */ }
.ctf-heart-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(15,20,25,0.85);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.25s;
}
.ctf-heart-btn svg { width: 20px; height: 20px; fill: var(--ctf-muted); transition: fill 0.3s; }
.ctf-heart-btn:hover { border-color: #e05252; background: rgba(224,82,82,0.1); transform: scale(1.1); }
.ctf-heart-btn:hover svg { fill: #e05252; }
.ctf-heart-btn.saved { border-color: #e05252; background: rgba(224,82,82,0.15); }
.ctf-heart-btn.saved svg { fill: #e05252; }
.ctf-heart-label { font-size: 0.65rem; color: var(--ctf-muted); text-align: center; font-family: 'DM Sans', system-ui, sans-serif; }

/* ── Landing Page styles ─────────────────────────────────────────────────── */
.ct-landing-page { background: var(--ct-bg, #080c10); }

.ct-landing-hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0f1a26 0%, #0a1520 50%, #10181f 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 8rem 5vw 4rem;
}
.ct-landing-hero__inner { max-width: 700px; }
.ct-landing-h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.08;
  margin-bottom: 1.25rem;
}
.ct-landing-intro {
  color: #8b949e;
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 1.75rem;
  max-width: 580px;
}
.ct-landing-benefits {
  list-style: none;
  display: flex; flex-direction: column; gap: 0.65rem;
}
.ct-landing-benefits li {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.9rem; color: #b0bec8;
}
.ct-landing-benefits svg { width: 16px; height: 16px; fill: #77c9d3; flex-shrink: 0; }

.ct-landing-tracks { padding: 3rem 5vw; max-width: 1240px; margin: 0 auto; }
.ct-landing-section-title { margin-bottom: 2rem; }
.ct-landing-section-title h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #eaf0f6; margin-bottom: 0.35rem;
}
.ct-landing-section-title p { font-size: 0.88rem; color: #6b7a89; }

.ct-landing-content {
  background: #0f1419;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 3.5rem 5vw;
}
.ct-landing-content__inner {
  max-width: 720px; margin: 0 auto;
  color: #b0bec8; line-height: 1.9; font-size: 0.97rem;
}
.ct-landing-content__inner h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.6rem; color: #eaf0f6; margin: 1.5rem 0 0.75rem; }
.ct-landing-content__inner p  { margin-bottom: 1rem; }

.ct-landing-faq { padding: 3rem 5vw; max-width: 720px; margin: 0 auto; }
.ct-landing-faq h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #eaf0f6; margin-bottom: 1.5rem;
}
.ct-faq-list { display: flex; flex-direction: column; }
.ct-faq-item { border-bottom: 1px solid rgba(255,255,255,0.07); }
.ct-faq-q {
  width: 100%; background: none; border: none;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 0;
  font-size: 0.95rem; font-weight: 500;
  color: #eaf0f6;
  cursor: pointer;
  text-align: left;
  gap: 1rem;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.ct-faq-arrow { width: 20px; height: 20px; fill: #6b7a89; flex-shrink: 0; transition: transform 0.3s; }
.ct-faq-q[aria-expanded="true"] .ct-faq-arrow { transform: rotate(180deg); }
.ct-faq-a { padding: 0 0 1rem; }
.ct-faq-a p { font-size: 0.9rem; color: #8b949e; line-height: 1.75; }

.ct-landing-related { padding: 2.5rem 5vw 4rem; border-top: 1px solid rgba(255,255,255,0.06); }
.ct-landing-related h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem; color: #eaf0f6; margin-bottom: 1rem;
}
.ct-landing-related__links { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.ct-landing-related__link {
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(119,201,211,0.3);
  border-radius: 2rem;
  color: #77c9d3;
  font-size: 0.82rem;
  transition: background 0.25s;
  text-decoration: none;
}
.ct-landing-related__link:hover { background: rgba(119,201,211,0.1); color: #77c9d3; }

/* ── All Tracks page ────────────────────────────────────────────────────── */
.ct-tracks-filter {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  justify-content: center;
  padding: 0 2rem 2.5rem;
}
.ct-filter-btn {
  padding: 0.45rem 1.2rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 2rem;
  background: none; color: #6b7a89;
  font-size: 0.82rem; font-weight: 500;
  cursor: pointer; transition: border-color 0.2s, color 0.2s;
  font-family: 'DM Sans', system-ui, sans-serif;
  text-decoration: none; display: inline-block;
}
.ct-filter-btn:hover,
.ct-filter-btn.active { border-color: #77c9d3; color: #77c9d3; }

.ct-tracks-list { max-width: 800px; margin: 0 auto; padding: 0 2rem; }
.ct-track-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.25s;
}
.ct-track-row:hover { background: rgba(255,255,255,0.04); }
.ct-track-row__thumb {
  width: 48px; height: 48px;
  border-radius: 6px;
  background: #141a22 center/cover no-repeat;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.ct-track-row__play { width: 18px; height: 18px; fill: #77c9d3; display: none; }
.ct-track-row:hover .ct-track-row__play { display: block; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.ct-track-row__info { flex: 1; min-width: 0; }
.ct-track-row__title { font-size: 0.95rem; font-weight: 500; color: #eaf0f6; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-track-row__credit { font-size: 0.75rem; color: #6b7a89; }
.ct-track-row__cat { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: #77c9d3; flex-shrink: 0; }
.ct-track-row__arrow { width: 16px; height: 16px; fill: #6b7a89; opacity: 0; transition: opacity 0.2s; flex-shrink: 0; }
.ct-track-row:hover .ct-track-row__arrow { opacity: 1; }

.ct-tracks-pagination { text-align: center; padding: 2rem; }
.ct-tracks-pagination a,
.ct-tracks-pagination span {
  display: inline-block; padding: 0.45rem 0.9rem; margin: 0 3px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; color: #6b7a89; font-size: 0.82rem;
  text-decoration: none; transition: border-color 0.2s, color 0.2s;
}
.ct-tracks-pagination a:hover { border-color: #77c9d3; color: #77c9d3; }
.ct-tracks-pagination .current { border-color: #77c9d3; color: #77c9d3; background: rgba(119,201,211,0.08); }

/* ── Articles page ──────────────────────────────────────────────────────── */
.ct-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px,100%), 1fr));
  gap: 1.25rem;
  padding: 0 2rem 4rem;
  max-width: 1240px;
  margin: 0 auto;
}
.ct-article-card {
  background: #141a22;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.4s, transform 0.4s;
  display: flex; flex-direction: column;
}
.ct-article-card:hover { border-color: rgba(119,201,211,0.25); transform: translateY(-4px); }
.ct-article-card__img {
  height: 180px;
  background: #0f1419 center/cover no-repeat;
}
.ct-article-card__img--no-img {
  background: linear-gradient(135deg, #0f1a28, #141a22);
}
.ct-article-card__body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.ct-article-card__cat { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #77c9d3; margin-bottom: 0.5rem; display: block; }
.ct-article-card__title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.2rem; font-weight: 600; color: #eaf0f6; line-height: 1.2; margin-bottom: 0.6rem; }
.ct-article-card__excerpt { font-size: 0.85rem; color: #6b7a89; line-height: 1.65; flex: 1; }
.ct-article-card__read { font-size: 0.78rem; color: #77c9d3; margin-top: 1rem; display: block; }

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .ctf-trigger__label { display: none; }
  .ctf-bar__triggers { gap: 0.5rem; padding: 0.5rem 0.6rem; }
  .ctf-trigger { padding: 0.4rem; }
  .ctf-panel { width: calc(100vw - 2rem); max-width: 320px; }
  .ctf-bar { bottom: 4rem; right: auto; left: 1rem; align-items: flex-start; }
  .ctf-heart-wrap { bottom: 1rem; left: 1rem; }
}
