/* === Base === */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #0a0a0a;
  color: #f0f0f0;
  line-height: 1.6;
}

a {
  color: #e85d3a;
  text-decoration: none;
}

a:hover {
  color: #f4845f;
}

.admin-bar {
  text-align: center;
  padding: 0.5rem;
  background: #1a1a1a;
  border-bottom: 1px solid #c0392b;
}

.admin-bar a {
  color: #f4845f;
  font-size: 0.85rem;
}

/* === Hero / Landing === */

.hero {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0a0a0a;
  overflow: hidden;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: url('/images/grid.png');
  background-repeat: repeat;
  background-size: 400px;
  opacity: 0.4;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  padding: 2rem;
}

.title-text {
  display: block;
  max-width: 500px;
  width: 100%;
  margin: 0 auto 1.5rem;
}

.about-top {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.about-bottom {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
}

.logo {
  width: 180px;
  height: 180px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 20px rgba(232, 93, 58, 0.3));
}

.host-icon {
  width: 150px;
  height: 150px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(0, 100, 0, 0.4);
}

.about-text {
  flex: 1;
  font-size: 1.15rem;
  color: #ddd;
  line-height: 1.8;
}

.about-middle {
  margin: 0.5rem 0;
}

/* === Seasons / Episodes === */

.seasons-wrapper {
  position: relative;
  background-color: #0a0a0a;
}

.seasons-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/images/grid.png');
  background-repeat: repeat;
  background-size: 400px;
  opacity: 0.4;
  pointer-events: none;
}

.seasons-container {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
}

.section-title {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #c0392b;
}

.no-content {
  color: #888;
  font-style: italic;
  padding: 1rem 0;
}

.season {
  margin-bottom: 3rem;
}

.season-header {
  background: linear-gradient(90deg, rgba(200, 50, 30, 0.2), transparent);
  border-left: 4px solid #c0392b;
  padding: 0.75rem 1.25rem;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background 0.2s;
}

.season-header:hover {
  background: linear-gradient(90deg, rgba(200, 50, 30, 0.35), transparent);
}

.season-header h3 {
  font-size: 1.4rem;
  color: #f4845f;
}

.season-toggle {
  font-size: 0.85rem;
  color: #888;
  transition: transform 0.3s;
}

.season-toggle.open {
  transform: rotate(180deg);
}

.season-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.season-body.open {
  max-height: none;
  overflow: visible;
  margin-top: 1.5rem;
}

.share-link {
  font-size: 0.75rem;
  color: #666;
  margin-left: 0.5rem;
  vertical-align: middle;
  transition: color 0.2s;
}

.share-link:hover {
  color: #f4845f;
}

.episode-card.highlight {
  border-color: #f4845f;
  box-shadow: 0 0 15px rgba(244, 132, 95, 0.3);
}

.episodes-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.episode-card {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: #141414;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.episode-player {
  width: 100%;
}

.episode-card:hover {
  border-color: #c0392b;
}

.episode-image {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
}

.episode-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.placeholder-image {
  width: 100%;
  height: 100%;
  background: #222;
  border-radius: 8px;
  background-image: url('/images/grid.png');
  background-size: 40px;
  opacity: 0.4;
}

.episode-info {
  flex: 1;
  min-width: 0;
}

.guest-name {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.recording-date {
  font-size: 0.85rem;
  color: #f4845f;
  margin-bottom: 0.5rem;
}

.episode-description {
  color: #bbb;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.episode-player audio {
  width: 100%;
  height: 36px;
  border-radius: 8px;
}

.episode-player iframe {
  max-width: 100%;
}

/* === Footer === */

footer {
  position: relative;
  padding: 2rem;
  color: #555;
  border-top: 1px solid #1a1a1a;
  background-color: #1f1f1f;
}

footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/images/grid.png');
  background-repeat: repeat;
  background-size: 400px;
  opacity: 0.4;
  pointer-events: none;
}

.footer-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-contact {
  flex: 1;
  text-align: left;
  font-size: 0.85rem;
}

.footer-copy {
  flex: 1;
  text-align: center;
}

.visitor-count {
  flex: 1;
  text-align: right;
  font-size: 0.85rem;
  color: #666;
}

/* === Responsive === */

@media (max-width: 768px) {
  .hero-content {
    padding: 1.25rem;
  }

  .title-text {
    max-width: 280px;
    margin-bottom: 1rem;
  }

  .about-top,
  .about-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .logo {
    max-width: 80px;
    width: 80px;
  }

  .host-icon {
    width: 80px;
    height: 80px;
  }

  .about-text {
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
    line-height: 1.6;
  }

  .seasons-container {
    padding: 1rem;
  }

  .section-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  .season {
    margin-bottom: 2rem;
  }

  .season-header h3 {
    font-size: 1.1rem;
  }

  .episode-card {
    padding: 1rem;
    gap: 0.75rem;
  }

  .episode-image {
    width: 80px;
    height: 80px;
  }

  .guest-name {
    font-size: 1.1rem;
  }

  .episode-description {
    font-size: 0.9rem;
  }

  .episode-player iframe {
    width: 100% !important;
  }

  .footer-content {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .footer-contact,
  .footer-copy,
  .visitor-count {
    text-align: center;
  }

  /* Admin mobile */

  .admin-nav {
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
  }

  .admin-links {
    gap: 0.75rem;
    justify-content: center;
  }

  .admin-content {
    padding: 0 1rem;
  }

  .admin-content h1 {
    font-size: 1.4rem;
  }

  .stats {
    flex-direction: column;
  }

  .quick-links {
    flex-direction: column;
  }

  .inline-form {
    flex-direction: column;
  }

  .inline-form input {
    max-width: 100%;
  }

  .admin-episode-card {
    flex-direction: column;
    text-align: center;
  }

  .admin-episode-actions {
    justify-content: center;
  }

  .admin-table {
    font-size: 0.85rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.5rem;
  }
}

/* ============================
   Admin Styles
   ============================ */

.admin-body {
  background: #111;
}

.admin-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 2rem;
  background: #1a1a1a;
  border-bottom: 2px solid #c0392b;
}

.admin-title {
  font-weight: bold;
  font-size: 1.1rem;
  color: #f4845f;
}

.admin-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.admin-links a {
  color: #ccc;
  font-size: 0.9rem;
}

.admin-links a:hover {
  color: #f4845f;
}

.admin-content {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.admin-content h1 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #fff;
}

.admin-content h2 {
  font-size: 1.3rem;
  margin: 2rem 0 1rem;
  color: #ddd;
}

/* Admin Login */

.admin-login {
  max-width: 400px;
  margin: 10vh auto;
  padding: 2rem;
  background: #1a1a1a;
  border-radius: 12px;
  border: 1px solid #333;
}

.admin-login h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #f4845f;
}

.error {
  background: rgba(200, 50, 30, 0.2);
  color: #e85d3a;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  text-align: center;
}

/* Forms */

label {
  display: block;
  margin-bottom: 0.35rem;
  color: #ccc;
  font-size: 0.9rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  background: #222;
  border: 1px solid #444;
  border-radius: 6px;
  color: #f0f0f0;
  font-size: 0.95rem;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #c0392b;
}

textarea {
  resize: vertical;
}

input[type="file"] {
  margin-bottom: 1rem;
  color: #ccc;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.btn:hover {
  background: #e85d3a;
  color: #fff;
}

.btn-small {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.btn-danger {
  background: #661a1a;
}

.btn-danger:hover {
  background: #992a2a;
}

.inline {
  display: inline;
}

.inline-form {
  display: flex;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 2rem;
}

.inline-form input {
  margin-bottom: 0;
  max-width: 200px;
}

.help-text {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* Stats */

.stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  text-align: center;
  flex: 1;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: bold;
  color: #f4845f;
}

.stat-label {
  color: #888;
  font-size: 0.9rem;
}

.quick-links {
  display: flex;
  gap: 1rem;
}

/* Admin Table */

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #222;
}

.admin-table th {
  color: #888;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.admin-table td {
  color: #ddd;
}

/* Admin Episode List */

.admin-episodes-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-episode-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: #1a1a1a;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 1rem;
}

.admin-episode-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
}

.admin-episode-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.placeholder-image-small {
  width: 100%;
  height: 100%;
  background: #222;
  border-radius: 6px;
}

.admin-episode-info {
  flex: 1;
  min-width: 0;
}

.admin-episode-info strong {
  color: #fff;
}

.admin-episode-info .date {
  color: #f4845f;
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

.admin-episode-info p {
  color: #999;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.admin-episode-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.episode-form {
  background: #1a1a1a;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #222;
  margin-bottom: 2rem;
}

.current-image {
  margin-bottom: 0.5rem;
}
