/* ============================================================
   Honeydew Me Podcast App — Main Stylesheet
   ============================================================ */

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

:root {
  --hdm-blush:   #F2D4CC;
  --hdm-blush-dk:#4A2525;
  --hdm-rose:    #C97A7A;
  --hdm-rose-dk: #E09090;
  --hdm-deep:    #3A1F1F;
  --hdm-muted:   #7A4A4A;
  --hdm-cream:   #FAF7F4;
  --hdm-warm:    #EDE6DE;

  --color-bg:       #FAF7F4;
  --color-surface:  #FFFFFF;
  --color-border:   rgba(0,0,0,0.08);
  --color-text:     #1A1A1A;
  --color-muted:    #6B6B6B;
  --color-subtle:   #9B9B9B;

  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;

  --nav-height:    52px;
  --player-height: 88px;
  --transition:    0.15s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --hdm-blush:  #4A2525;
    --hdm-rose:   #E09090;
    --hdm-deep:   #F2D4CC;
    --hdm-muted:  #C97A7A;
    --color-bg:      #121212;
    --color-surface: #1E1E1E;
    --color-border:  rgba(255,255,255,0.08);
    --color-text:    #F0F0F0;
    --color-muted:   #A0A0A0;
    --color-subtle:  #686868;
  }
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--hdm-rose); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: var(--font-sans); cursor: pointer; }

/* ── Layout ── */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding-bottom: calc(var(--player-height) + 1rem);
}

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--color-surface);
  border-bottom: 0.5px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: 0;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-right: auto;
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.nav-logo span { color: var(--hdm-rose); }

.nav-tabs {
  display: flex;
  gap: 0;
  list-style: none;
}

.nav-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0 10px;
  height: var(--nav-height);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color var(--transition);
  white-space: nowrap;
}
.nav-tab:hover { color: var(--color-text); }
.nav-tab.active { color: var(--hdm-rose); border-bottom-color: var(--hdm-rose); }

/* ── Pages ── */
.page { display: none; padding: 1.25rem; max-width: 860px; margin: 0 auto; width: 100%; }
.page.active { display: block; }

/* ── Hero Banner ── */
.hero {
  background: var(--hdm-blush);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hero-cover {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--hdm-rose);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.hero-cover .icon-fallback { font-size: 2rem; color: white; }
.hero-title { font-family: var(--font-serif); font-size: 22px; color: var(--hdm-deep); font-weight: 700; margin-bottom: 3px; }
.hero-sub { font-size: 12px; color: var(--hdm-muted); margin-bottom: 12px; }
.hero-links { display: flex; gap: 8px; flex-wrap: wrap; }
.platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--hdm-rose);
  color: var(--hdm-deep);
  background: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: background var(--transition);
}
.platform-btn:hover { background: rgba(255,255,255,0.85); text-decoration: none; }
.platform-btn svg { width: 14px; height: 14px; }

/* ── Section Label ── */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 10px;
}

/* ── Search Bar ── */
.search-wrap {
  position: relative;
  margin-bottom: 1rem;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-subtle);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--hdm-rose); }
.search-input::placeholder { color: var(--color-subtle); }
.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-subtle);
  font-size: 18px;
  line-height: 1;
  display: none;
  padding: 2px;
}
.search-clear.visible { display: block; }

/* ── Episode List ── */
.ep-count { font-size: 12px; color: var(--color-subtle); margin-bottom: 10px; }

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

.ep-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.ep-card:hover { background: var(--hdm-blush); }
.ep-card.playing { border-color: var(--hdm-rose); }

.ep-art {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--hdm-blush);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ep-art img { width: 100%; height: 100%; object-fit: cover; }
.ep-art svg { color: var(--hdm-rose); }

.ep-info { flex: 1; min-width: 0; }
.ep-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hdm-rose);
  margin-bottom: 2px;
}
.ep-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.ep-meta { font-size: 11px; color: var(--color-subtle); }

.ep-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0.5px solid var(--color-border);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-muted);
  transition: all var(--transition);
}
.ep-card:hover .ep-play { border-color: var(--hdm-rose); color: var(--hdm-rose); }
.ep-card.playing .ep-play { background: var(--hdm-rose); border-color: var(--hdm-rose); color: white; }

/* ── Load More ── */
.btn-load-more {
  width: 100%;
  margin-top: 12px;
  padding: 11px;
  background: none;
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--color-muted);
  transition: all var(--transition);
}
.btn-load-more:hover { border-color: var(--hdm-rose); color: var(--hdm-rose); }

/* ── About Page ── */
.about-hero {
  background: var(--hdm-blush);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.25rem;
}
.about-logo { font-family: var(--font-serif); font-size: 28px; font-weight: 700; color: var(--hdm-deep); margin-bottom: 6px; }
.about-tagline { font-size: 13px; color: var(--hdm-muted); font-style: italic; }

.host-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 1.25rem; }
.host-card {
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}
.host-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--hdm-blush);
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--hdm-deep);
  overflow: hidden;
}
.host-avatar img { width: 100%; height: 100%; object-fit: cover; }
.host-name { font-size: 15px; font-weight: 600; color: var(--color-text); margin-bottom: 3px; }
.host-handle { font-size: 12px; color: var(--hdm-rose); }

.about-bio {
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.75;
}
.about-bio p + p { margin-top: 12px; }

.social-links { display: flex; gap: 10px; margin-top: 1.25rem; flex-wrap: wrap; }
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-muted);
  padding: 6px 11px;
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}
.social-link:hover { color: var(--hdm-rose); border-color: var(--hdm-rose); text-decoration: none; }
.social-link svg { width: 15px; height: 15px; }

/* ── Announcements ── */
.announce-card {
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 10px;
}
.announce-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hdm-rose);
  margin-bottom: 6px;
}
.announce-title { font-size: 16px; font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.announce-body { font-size: 13px; color: var(--color-muted); line-height: 1.65; }
.announce-date { font-size: 11px; color: var(--color-subtle); margin-top: 10px; }

/* ── Submit Form ── */
.submit-header {
  background: var(--hdm-blush);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.submit-header h2 { font-family: var(--font-serif); font-size: 22px; color: var(--hdm-deep); margin-bottom: 5px; }
.submit-header p { font-size: 13px; color: var(--hdm-muted); }

.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 6px;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 11px 13px;
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--color-text);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--hdm-rose); }
.form-textarea { resize: vertical; min-height: 110px; line-height: 1.6; }

.btn-submit {
  width: 100%;
  padding: 13px;
  background: var(--hdm-rose);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  transition: opacity var(--transition);
}
.btn-submit:hover { opacity: 0.88; }
.btn-submit:active { opacity: 0.75; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.form-success {
  display: none;
  margin-top: 12px;
  padding: 13px 15px;
  background: #EAF6ED;
  border: 0.5px solid #A8D9B4;
  border-radius: var(--radius-md);
  font-size: 13px;
  color: #2D7A45;
}
.form-success.show { display: block; }
.form-error {
  display: none;
  margin-top: 12px;
  padding: 13px 15px;
  background: #FDECEA;
  border: 0.5px solid #F5BCBA;
  border-radius: var(--radius-md);
  font-size: 13px;
  color: #B91C1C;
}
.form-error.show { display: block; }

/* ── Player Bar ── */
.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--color-surface);
  border-top: 0.5px solid var(--color-border);
  padding: 10px 1.25rem;
  display: none;
}
.player-bar.visible { display: block; }

.player-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
.player-art {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--hdm-blush);
}
.player-art img { width: 100%; height: 100%; object-fit: cover; }
.player-info { flex: 1; min-width: 0; }
.player-title { font-size: 13px; font-weight: 500; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-show { font-size: 11px; color: var(--color-subtle); }
.player-controls { display: flex; align-items: center; gap: 6px; }

.ctrl-btn {
  background: none;
  border: none;
  color: var(--color-muted);
  padding: 5px;
  display: flex;
  align-items: center;
  font-size: 20px;
  transition: color var(--transition);
}
.ctrl-btn:hover { color: var(--color-text); }
.ctrl-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--hdm-rose);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition);
}
.ctrl-play:hover { opacity: 0.85; }

.player-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 860px;
  margin: 0 auto;
}
.time-label { font-size: 10px; color: var(--color-subtle); min-width: 32px; }
.time-label:last-child { text-align: right; }
.progress-track {
  flex: 1;
  height: 3px;
  background: var(--color-border);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: var(--hdm-rose);
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s linear;
  pointer-events: none;
}

/* ── Empty / Loading States ── */
.state-loading, .state-empty, .state-error {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-subtle);
  font-size: 14px;
  line-height: 1.7;
}
.state-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.state-loading .state-icon { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:0.3} 50%{opacity:0.8} }
.state-title { font-size: 15px; font-weight: 600; color: var(--color-text); margin-bottom: 6px; }

/* ── Responsive ── */
@media (max-width: 520px) {
  .nav-logo { font-size: 14px; }
  .nav-tab { padding: 0 7px; font-size: 10px; }
  .hero { flex-direction: column; text-align: center; }
  .hero-links { justify-content: center; }
  .host-grid { grid-template-columns: 1fr 1fr; }
}
