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

:root {
    --primary: #55baf0;
    --primary-dark: #3da8e0;
    --secondary: #dce6f0;
    --background: #0f152a;
    --surface: #1a2240;
    --surface-elevated: #232d4a;
    --text: #fefefe;
    --text-muted: #a0aec0;
    --border: #dce6f0;
    --border-subtle: rgba(220, 230, 240, 0.2);
    --error: #f87171;
    --error-bg: rgba(248, 113, 113, 0.15);
    --success: #4ade80;
    --success-bg: rgba(74, 222, 128, 0.15);
    --header-height: 72px;
    --main-padding-top: 2rem;
    --main-padding-x: 1rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    font-weight: 400;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
}

h1 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

h2, h3 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
}

.hero-logo {
    max-width: 800px;
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-email {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.main {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.footer {
    background: var(--surface);
    border-top: 1px solid var(--border-subtle);
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.landing {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
}

.landing-banner {
    position: absolute;
    top: calc(-1 * var(--main-padding-top));
    right: calc(-1 * (50vw - 50%));
    width: 200px;
    height: auto;
    pointer-events: none;
    z-index: 10;
}

.landing .container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.landing .section {
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.landing .section:last-child {
    margin-bottom: 0;
}

.hero {
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.tagline {
    font-size: 3rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: .05rem;
}

.tagline-alt {
    font-size: 3rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 1rem;
}

.description {
    color: var(--text-muted);
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.subscriber-episodes-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem auto 0.5rem;
    gap: 0.25rem;
}

.subscriber-label-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.subscriber-label-subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.episode-cards{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px auto 18px;
  max-width: 860px;
}

@media (max-width: 720px){
  .episode-cards{
    grid-template-columns: 1fr;
  }

  .episode-subtitle{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;

    min-height: calc(2 * 1.3em);
    max-width: none;
  }
}

.episode-card{
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  text-align: left;

  /* subtle depth */
  box-shadow: 0 10px 30px rgba(0,0,0,0.10);
  backdrop-filter: blur(8px);

  display: flex;
  flex-direction: column;
}

.episode-top{
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.episode-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-width: 44px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  opacity: 0.95;

  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
}

.episode-title{
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.2;
}

.episode-subtitle{
  margin-top: 4px;
  font-size: 0.92rem;
  line-height: 1.3;
  opacity: 0.88;
  max-width: 300px;
}

.episode-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  align-items: center;
  justify-content: center;
}

.meta-chip{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  line-height: 1;
  opacity: 0.92;

  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
}


.cta-microcopy{
  margin-top: 10px;
  font-size: 0.95rem;
  opacity: 0.85;
  line-height: 1.35;
  text-align: center;
}

.cta-secondary{
  margin-top: 8px;
  font-size: 0.95rem;
  opacity: 0.9;
  text-align: center;
}

.cta-secondary-link{
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--text);
}

.cta-secondary-link:hover{
  opacity: 0.9;
}

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

.feature {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    text-align: center;
}

.feature h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.sample-episode {
    text-align: center;
    padding: 2rem 0;
}

.sample-episode h2 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.sample-audio-player {
    width: 100%;
    max-width: 500px;
    height: 48px;
    border-radius: 24px;
}

@media (max-width: 600px) {
    .sample-audio-player {
        max-width: 100%;
    }
}

.pair-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.how-it-works {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1.5rem;
}

.how-it-works h2 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
}

.how-it-works .steps {
    list-style: none;
    counter-reset: step;
}

.how-it-works .steps li {
    counter-increment: step;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    color: var(--text);
    font-size: 1rem;
}

.how-it-works .steps li::before {
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.episode-content {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1.5rem;
}

.episode-content h2 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.content-item {
    background: var(--surface-elevated);
    border-radius: 6px;
    padding: 0.75rem;
    text-align: left;
}

.content-item h3 {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.content-item p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
}

.cta-band {
    background: var(--surface);
    border-top: 1px solid var(--border-subtle);
}

.cta-center {
    display: flex;
    justify-content: center;
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    .pair-grid {
        grid-template-columns: 1fr;
    }
    .content-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    margin: 2rem auto;
}

.card h2 {
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--primary);
}

.card-subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
}

.card-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.card-footer a {
    color: var(--primary);
    text-decoration: none;
}

.card-footer a:hover {
    text-decoration: underline;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    letter-spacing: 0;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--surface-elevated);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(85, 186, 240, 0.2);
}

.form-group input#code {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    font-family: monospace;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.generate-btn-wrapper {
    display: inline-block;
}

.generate-btns-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.generate-btns-wrapper .btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--background);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.btn-primary-sub {
    background: var(--success);
    color: var(--background);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

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

.btn-secondary:hover:not(:disabled) {
    background: rgba(220, 230, 240, 0.1);
    color: var(--text);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.error-message {
    background: var(--error-bg);
    color: var(--error);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.roster-page {
    max-width: 900px;
    margin: 0 auto;
}

.roster-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.roster-header h1 {
    font-size: 1.75rem;
    color: var(--text);
    margin: 0;
}

.roster-title-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.roster-name-input {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.25rem 0.5rem;
    margin: 0;
    min-width: 200px;
    max-width: 400px;
    transition: border-color 0.2s ease;
}

.roster-name-input:hover {
    border-bottom-color: var(--border);
}

.roster-name-input:focus {
    outline: none;
    border-bottom-color: var(--accent);
}

.roster-name-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.roster-name-status.visible {
    opacity: 1;
}

.roster-name-status.saving {
    color: var(--text-muted);
}

.roster-name-status.saved {
    color: var(--success, #4caf50);
}

.roster-name-status.error {
    color: var(--error, #dc3545);
}

.roster-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#save-status {
    font-size: 0.875rem;
    font-weight: 500;
}

.status-saving {
    color: var(--secondary);
}

.status-success {
    color: var(--success);
}

.status-error {
    color: var(--error);
}

.roster-section {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.roster-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.starters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.slot-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1rem;
}

.slot-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.slot-input-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slot-input-container .player-search {
    flex: 1;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--background);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.slot-input-container .player-search::placeholder {
    color: var(--text-muted);
}

.slot-input-container .player-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(85, 186, 240, 0.2);
}

.slot-input-container .player-search.valid-selection {
    border-color: var(--success);
    background-color: var(--success-bg);
}

.slot-input-container .player-search.invalid-selection {
    border-color: var(--error);
    background-color: var(--error-bg);
}

.slot-input-container .player-search.invalid-selection:focus {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}

.section-save-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.section-save-status {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.section-save-status.saving {
    color: var(--primary);
}

.section-save-status.saved {
    color: var(--success);
}

.section-save-status.error {
    color: var(--error);
}

.clear-btn {
    background: transparent;
    border: none;
    color: var(--secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.clear-btn:hover {
    color: var(--error);
    background: var(--error-bg);
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    margin-top: 4px;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    transition: background-color 0.15s;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--surface-elevated);
}

.dropdown-item-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--surface-elevated);
}

.dropdown-item-disabled:hover {
    background: var(--surface-elevated);
}

.player-name-text {
    font-weight: 500;
    color: var(--text);
}

.player-meta {
    font-size: 0.8rem;
    color: var(--secondary);
}

.duplicate-warning {
    font-size: 0.75rem;
    color: var(--error);
    background: var(--error-bg);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    margin-left: auto;
}

.dropdown-empty {
    padding: 0.75rem 1rem;
    color: var(--secondary);
    font-style: italic;
    text-align: center;
}

.bench-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.bench-row {
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.bench-row .slot-input-container {
    flex-wrap: wrap;
}

.remove-bench-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.remove-bench-btn:hover {
    color: var(--error);
    border-color: var(--error);
    background: var(--error-bg);
}

#add-bench-btn {
    width: 100%;
}

.episode-section {
    margin-top: 1.5rem;
}

.episode-message {
    color: var(--text-muted);
    padding: 1rem;
    text-align: center;
    font-style: italic;
}

.episode-message.etl-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--primary);
    font-style: normal;
    font-weight: 500;
}

.etl-spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border-subtle);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.episode-status-area {
    margin-bottom: 1rem;
}

.episode-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 0;
}

.episode-status .status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 1rem;
}

.episode-status.status-ready {
    color: var(--success);
}

.episode-status.status-ready .status-icon {
    color: var(--success);
}

.episode-status.status-failed {
    color: var(--error);
}

.episode-status.status-failed .status-icon {
    color: var(--error);
}

.episode-status.status-generating {
    color: var(--primary);
}

.episode-status.status-limit {
    color: var(--text-muted);
}

.episode-status.status-limit .status-icon {
    color: var(--text-muted);
}

.episode-status.status-pending {
    color: var(--text-muted);
}

.episode-status.status-pending .status-icon {
    color: var(--text-muted);
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border-subtle);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.episode-progress {
    padding: 0.5rem 0;
}

.progress-bar {
    height: 6px;
    background: var(--border-subtle);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
    animation: progress-pulse 2s ease-in-out infinite;
}

@keyframes progress-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.progress-step {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.episode-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    align-items: center;
}

.episode-actions .btn {
    min-width: 150px;
}

.admin-options {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 6px;
    margin-right: 0.5rem;
}

.admin-options .toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #b58900;
}

.admin-options .toggle-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #b58900;
}

.admin-options .toggle-text {
    font-weight: 500;
}

.episode-preferences {
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    background: transparent;
    opacity: 0.85;
}

.episode-preferences-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.episode-preferences-header::-webkit-details-marker {
    display: none;
}

.episode-preferences-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.episode-preferences-chevron {
    width: 0.875rem;
    height: 0.875rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.episode-preferences[open] .episode-preferences-chevron {
    transform: rotate(180deg);
}

.episode-preferences-content {
    padding: 0 0.75rem 0.5rem 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

.episode-preferences-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin: 0.5rem 0 0.25rem 0;
    opacity: 0.8;
}

.host-format-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    flex-wrap: wrap;
}

.host-format-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.host-format-options {
    display: flex;
    gap: 0.5rem;
}

.host-format-option {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    transition: all 0.15s ease;
}

.host-format-option:hover {
    border-color: var(--primary);
}

.host-format-option:has(input:checked) {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}

.host-format-option input[type="radio"] {
    width: 0.75rem;
    height: 0.75rem;
    accent-color: var(--primary);
    margin: 0;
}

.host-format-saved {
    font-size: 0.7rem;
    color: var(--success);
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.host-format-saved.visible {
    opacity: 1;
}

.episode-error {
    background: var(--error-bg);
    color: var(--error);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.episode-info {
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1rem;
}

.episode-detail {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.episode-detail:last-of-type {
    margin-bottom: 0;
}

.episode-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.episode-buttons .btn {
    flex: 1;
    text-align: center;
}

@media (max-width: 480px) {
    .episode-buttons {
        flex-direction: column;
    }
}

.episode-detail strong {
    color: var(--text);
}

.episode-detail span {
    color: var(--text-muted);
}

.email-notification {
    background: var(--success-bg);
    color: var(--success);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-top: 1rem;
    border: 1px solid var(--success);
}

.current-episode {
    margin-top: 1.5rem;
}

.current-episode h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.episode-card-roster {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    gap: 1rem;
}

.current-episode-card {
    border-color: var(--primary);
    border-width: 2px;
}

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

.episode-card-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.episode-card-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.episode-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.episode-type-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.episode-type-recap {
    background: var(--primary);
    color: white;
}

.episode-type-decisions {
    background: #4a9d5b;
    color: white;
}

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

.episode-card-actions .btn {
    white-space: nowrap;
    align-items: right;
}


.past-episodes-section {
    margin-top: 1.5rem;
}

.accordion-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text);
    font-weight: 500;
    transition: background 0.2s, border-color 0.2s;
}

.accordion-toggle:hover {
    background: var(--surface-elevated);
    border-color: var(--primary);
}

.accordion-toggle.expanded {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}

.accordion-icon {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.accordion-content {
    border: 1px solid var(--border-subtle);
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 0.5rem;
    background: var(--surface);
}

.past-episodes-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.past-episode-card {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border-color: var(--border-subtle);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

@media (max-width: 480px) {
    .episode-card {
        flex-direction: column;
        align-items: stretch;
    }
    
    .episode-card-actions {
        justify-content: stretch;
    }
    
    .episode-card-actions .btn {
        flex: 1;
        text-align: center;
    }
    
    .past-episode-card {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .past-episode-card .episode-card-info {
        width: 100%;
    }
    
    .past-episode-card .episode-card-title {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        word-wrap: break-word;
    }
    
    .past-episode-card .episode-card-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .past-episode-card .episode-card-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }
    
    .past-episode-card .episode-card-actions .btn {
        flex: 1;
        text-align: center;
    }
    
    .episode-card-roster,
    .current-episode-card {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .episode-card-roster .episode-card-info,
    .current-episode-card .episode-card-info {
        width: 100%;
    }
    
    .episode-card-roster .episode-card-title,
    .current-episode-card .episode-card-title {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        word-wrap: break-word;
    }
    
    .episode-card-roster .episode-card-meta,
    .current-episode-card .episode-card-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .episode-card-roster .episode-card-actions,
    .current-episode-card .episode-card-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }
    
    .episode-card-roster .episode-card-actions .btn,
    .current-episode-card .episode-card-actions .btn {
        flex: 1;
        text-align: center;
    }
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #15803d;
}

.gamecast-progress {
    padding: 1rem 0;
}

.gamecast-field {
    display: flex;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.75rem;
    position: relative;
}

.field-endzone {
    width: 8%;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.field-endzone-left {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
}

.field-endzone-right {
    background: linear-gradient(135deg, #166534 0%, #22c55e 100%);
}

.field-playing-area {
    flex: 1;
    background: linear-gradient(to bottom, #2d7d46 0%, #228b22 50%, #2d7d46 100%);
    position: relative;
    display: flex;
    align-items: center;
}

.yard-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 5%;
}

.yard-line {
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
}

.yard-line-50 {
    background: rgba(255, 255, 255, 0.5);
    width: 3px;
}

.yard-labels {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 4%;
    font-size: 0.6rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

.yard-labels .yard-50 {
    color: rgba(255, 255, 255, 0.9);
}

.football-icon {
    position: absolute;
    width: 28px;
    height: 28px;
    left: 5%;
    top: 50%;
    transform: translateY(-50%) rotate(-30deg);
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.football-icon svg {
    width: 100%;
    height: 100%;
}

.football-icon.waiting {
    animation: football-pulse 1s ease-in-out infinite;
}

.football-icon.touchdown {
    animation: football-bounce 0.4s ease-out;
}

@keyframes football-pulse {
    0%, 100% {
        transform: translateY(-50%) rotate(-30deg) scale(1);
    }
    50% {
        transform: translateY(-50%) rotate(-30deg) scale(1.1);
    }
}

@keyframes football-bounce {
    0% {
        transform: translateY(-50%) rotate(-30deg) scale(1);
    }
    50% {
        transform: translateY(-70%) rotate(-15deg) scale(1.15);
    }
    100% {
        transform: translateY(-50%) rotate(-30deg) scale(1);
    }
}

.gamecast-status {
    text-align: center;
}

.gamecast-status-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.gamecast-status-text::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: status-dot-pulse 1.5s ease-in-out infinite;
}

.gamecast-status.complete .gamecast-status-text::before {
    background: var(--success);
    animation: none;
}

.gamecast-status.complete .gamecast-status-text {
    color: var(--success);
}

@keyframes status-dot-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

.swap-bench-btn {
    background: var(--primary);
    border: none;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.swap-bench-btn:hover {
    background: var(--primary-dark);
}

.swap-bench-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.swap-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.swap-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.swap-modal-content {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: modal-slide-up 0.2s ease-out;
}

@keyframes modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.swap-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.swap-modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--primary);
}

.swap-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.swap-modal-close:hover {
    color: var(--text);
    background: var(--surface-elevated);
}

.swap-modal-body {
    padding: 1.25rem;
}

.swap-modal-description {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.swap-modal-description strong {
    color: var(--text);
}

.swap-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.swap-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    min-height: 60px;
}

.swap-option:hover {
    border-color: var(--primary);
    background: rgba(85, 186, 240, 0.1);
}

.swap-option:active {
    background: rgba(85, 186, 240, 0.15);
}

.swap-option-slot {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 50px;
}

.swap-option-player {
    flex: 1;
    margin-left: 1rem;
    text-align: left;
}

.swap-option-player-name {
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
}

.swap-option-player-meta {
    font-size: 0.8rem;
    color: var(--secondary);
    margin-top: 0.125rem;
}

.swap-option-empty {
    flex: 1;
    margin-left: 1rem;
    font-style: italic;
    color: var(--secondary);
    font-size: 0.9rem;
}

.swap-option-arrow {
    color: var(--secondary);
    font-size: 1.25rem;
    margin-left: 0.5rem;
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 2rem;
    }

    .tagline-alt {
        font-size: 2rem;
    }
    
    .card {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    .roster-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .slot-input-container {
        flex-wrap: wrap;
    }

    .slot-input-container .player-search {
        width: 100%;
        flex: none;
    }

    .bench-row .slot-input-container .player-search {
        margin-bottom: 0.5rem;
    }

    .episode-actions {
        flex-direction: column;
    }

    .episode-actions .btn {
        width: 100%;
    }

    .gamecast-field {
        height: 50px;
    }

    .football-icon {
        width: 22px;
        height: 22px;
    }

    .yard-labels {
        font-size: 0.5rem;
    }

    .sample-slots-grid {
        grid-template-columns: 1fr;
    }
}

.sample-roster-page .roster-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
}

.sample-roster-page .roster-header h1 {
    margin-bottom: 0.5rem;
}

.sample-roster-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.sample-roster-page .roster-actions {
    margin-top: 0.5rem;
}

.sample-slots-section {
    max-width: 700px;
    margin: 0 auto 2rem;
}

.sample-slots-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.sample-roster-page .episode-section {
    max-width: 700px;
    margin: 0 auto 2rem;
    text-align: center;
}

.sample-roster-page .episode-actions {
    justify-content: center;
}

.sample-roster-page .generate-btns-wrapper {
    justify-content: center;
}

.upgrade-cta-section {
    max-width: 700px;
    margin: 0 auto;
}

.upgrade-cta-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.upgrade-cta-box h3 {
    color: var(--text);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.upgrade-cta-box p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero .upgrade-cta-section {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.hero .upgrade-cta-box {
    padding: 1.25rem 1.5rem;
}

.week-limit-notice {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    color: var(--text);
    text-align: center;
}

.week-limit-notice strong {
    color: #eab308;
}

#current-episode-container,
#past-episodes-container {
    margin-top: 1.5rem;
}

#current-episode-container h3,
#past-episodes-container h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.sample-roster-page .episode-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.sample-roster-page .episode-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.sample-roster-page .episode-week-badge {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sample-roster-page .episode-season {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.sample-roster-page .episode-duration {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-left: auto;
}

.sample-roster-page .sample-audio {
    width: 100%;
    height: 40px;
}

.sample-roster-page .audio-not-ready {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-style: italic;
}

.sample-roster-page .current-episode-card {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

#past-episodes-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.subscribe-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 60vh;
    padding: 2rem 1rem;
}

.subscribe-container {
    max-width: 700px;
    width: 100%;
    text-align: center;
}

.subscribe-logo {
    max-width: 400px;
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
}

.subscribe-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2.5rem 2rem;
}

.subscribe-card h2 {
    color: var(--text);
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.subscribe-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.subscribe-card .subscriber-episodes-label {
    margin: 1.5rem auto 1rem;
}

.subscribe-episode-cards {
    margin-bottom: 2rem;
}

.subscribe-cta {
    display: inline-block;
    margin-bottom: 2rem;
}

.subscribe-disclaimer {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: left;
}

.subscribe-disclaimer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

.subscribe-disclaimer p:last-child {
    margin-bottom: 0;
}

.subscribe-disclaimer strong {
    color: var(--text);
}

.already-subscribed {
    text-align: center;
}

.already-subscribed h2 {
    color: var(--success);
}

.subscribe-card .error-message {
    margin-bottom: 1.5rem;
}

.spotlight-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.spotlight-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.spotlight-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.spotlight-card-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(59, 130, 246, 0.12);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.spotlight-player-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    flex: 1;
    min-width: 0;
    text-align: left;
}

.spotlight-lean-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.spotlight-lean-badge.lean-strong {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.spotlight-lean-badge.lean-positive {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.spotlight-lean-badge.lean-neutral {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

.spotlight-lean-badge.lean-negative {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.spotlight-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
}

.spotlight-trend {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.4;
}

.spotlight-matchup {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.sample-roster-page .episode-spotlights {
    margin-top: 1.25rem;
}

.sample-roster-page .episode-spotlights h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
    .spotlight-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .spotlight-card-header {
        flex-wrap: wrap;
    }
}
