﻿:root {
  --bg: #090c10;
  --bg-soft: #121720;
  --card: rgba(15, 22, 32, 0.72);
  --text: #f3f6f9;
  --text-soft: #aebccf;
  --primary: #34d399;
  --secondary: #f97316;
  --stroke: rgba(174, 188, 207, 0.24);
  --shadow: 0 30px 80px rgba(5, 9, 15, 0.5);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 10%, #15202d 0, transparent 45%),
    radial-gradient(circle at 85% 20%, #3f1d0f 0, transparent 35%), var(--bg);
  overflow-x: hidden;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    130deg,
    rgba(52, 211, 153, 0.08),
    rgba(249, 115, 22, 0.05),
    rgba(99, 102, 241, 0.06)
  );
  filter: blur(60px);
  animation: flow 14s linear infinite alternate;
}

@keyframes flow {
  from {
    transform: translate3d(-2%, -2%, 0) scale(1);
  }
  to {
    transform: translate3d(2%, 2%, 0) scale(1.1);
  }
}

.wrapper {
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
}

.hero {
  padding: 4.5rem 0 2.2rem;
  text-align: center;
}

.hero-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.hero-logo {
  width: min(240px, 52vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.35));
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #0d1f16;
  background: linear-gradient(120deg, var(--primary), #6ee7b7);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-weight: 800;
}

h1,
h2,
h3 {
  font-family: "Sora", sans-serif;
  margin: 0;
}

h1 {
  margin-top: 0.95rem;
  margin-inline: auto;
  font-size: clamp(2rem, 3.8vw, 3.7rem);
  line-height: 1.05;
  max-width: 16ch;
}

.hero p {
  color: var(--text-soft);
  max-width: 70ch;
  margin: 1rem auto 0;
  line-height: 1.7;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.65rem 1rem;
  border-radius: 0.8rem;
  font-weight: 700;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.38);
}

.btn-primary {
  color: #032214;
  border-color: transparent;
  background: linear-gradient(120deg, var(--primary), #6ee7b7);
}

.btn-primary:hover {
  background: linear-gradient(120deg, #10b981, #6ee7b7);
}

.section {
  margin: 2rem 0;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 1rem;
}

.section-title h2 {
  font-size: clamp(1.25rem, 2.2vw, 2rem);
}

#rssStatus {
  font-size: 0.92rem;
  color: var(--text-soft);
}

.latest-card,
.channel-card,
.episode-list li {
  border: 1px solid var(--stroke);
  background: var(--card);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  border-radius: 1.1rem;
}

.latest-card {
  display: grid;
  grid-template-columns: minmax(210px, 300px) minmax(0, 1fr);
  gap: 1.15rem;
  padding: 1rem;
}

.cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.9rem;
  border: 1px solid var(--stroke);
}

.latest-content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.latest-content h3 {
  font-size: clamp(1.15rem, 2vw, 1.7rem);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  color: var(--text-soft);
  font-size: 0.92rem;
}

#latestDescription {
  margin: 0;
  line-height: 1.65;
  color: #d7deea;
}

#latestAudio {
  width: 100%;
  margin-top: 0.3rem;
}

.episode-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.channel-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.channel-card {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.channel-card p {
  margin: 0;
  color: var(--text-soft);
}

.media-frame {
  width: 100%;
  border: 0;
  border-radius: 0.8rem;
  min-height: 220px;
}

.music-panel {
  border-radius: 0.8rem;
  border: 1px dashed var(--stroke);
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: linear-gradient(
    150deg,
    rgba(52, 211, 153, 0.12),
    rgba(249, 115, 22, 0.11)
  );
}

.episode-list {
  display: grid;
  gap: 0.7rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.episode-list li {
  padding: 0.9rem;
  display: grid;
  gap: 0.35rem;
}

.episode-list li a {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

.episode-list li a:hover {
  color: var(--primary);
}

.item-meta {
  font-size: 0.9rem;
  color: var(--text-soft);
}

.story-intro {
  margin: 0 0 1rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.story-form {
  border: 1px solid var(--stroke);
  background: var(--card);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  border-radius: 1.1rem;
  padding: 1rem;
}

.form-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #d7deea;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--stroke);
  border-radius: 0.7rem;
  background: rgba(11, 16, 24, 0.8);
  color: var(--text);
  padding: 0.7rem 0.75rem;
  font: inherit;
  outline: none;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
}

.form-field textarea {
  resize: vertical;
}

.form-field-full {
  grid-column: 1 / -1;
}

.form-feedback {
  min-height: 1.3rem;
  margin: 0.8rem 0 0.9rem;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.form-feedback.success {
  color: #6ee7b7;
}

.form-feedback.error {
  color: #fca5a5;
}

.footer {
  padding: 1rem 0 2rem;
  color: var(--text-soft);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.reveal {
  opacity: 0;
  transform: translateY(14px) scale(0.99);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 980px) {
  .channel-grid {
    grid-template-columns: 1fr;
  }

  .latest-card {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .wrapper {
    width: min(1120px, calc(100% - 1.4rem));
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-logo {
    width: min(200px, 60vw);
  }

  .btn {
    width: 100%;
  }
}
