:root {
      --card-bg: #000000;
      --card-hover: #070707;
      --title-color: #f7f0f0;
      --card-title-color: #080808;
      --link-color: #fff8f8;
      --progress-bg: #ccc;
      --progress-fill: #d3e4d9;
    }
    body {
      font-family: 'Lora', serif;
      background-image: url('patron-texto-manjar.png');
      background-repeat: repeat;
      background-position: top center;
      background-size: auto;
      margin: 0;
      padding: 20px;
    }
    .playlist-header {
      text-align: center;
      margin-bottom: 24px;
    }
    .playlist-logo {
      display: block;
      margin: 0 auto;
      max-width: 220px;
      height: auto;
    }
    .playlist-title {
      font-family: 'Montserrat', sans-serif;
      font-weight: 700;
      font-size: clamp(20px, 2.6vw, 32px);
      color: var(--card-title-color);
      text-transform: uppercase;
      margin: 25px 0 0;
      letter-spacing: 1px;
    }
    .playlist-subtitle {
      font-family: 'Montserrat', sans-serif;
      font-size: clamp(13px, 1.6vw, 16px);
      font-style: italic;
      text-transform: capitalize;
      color: var(--card-title-color);
      margin: 0.5rem 0 25px;
    }
    .episodes-grid {
      display: flex;
      flex-direction: column;
      gap: 26px;
      max-width: 800px;
      margin: 0 auto;
    }
    .spotify-card {
      display: flex;
      background: var(--card-bg);
      border-radius: 15px;
      padding: 8px;
      overflow: hidden;
      transition: background 0.2s;
      position: relative;
      height: 150px;
    }
    .spotify-card:hover { background: var(--card-hover); }
    .spotify-cover {
      flex: 0 0 30px;
      height: 100%;
      object-fit: cover;
      align-self: stretch;
    }
    .spotify-info {
      padding: 18px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      width: 100%;
      position: relative;
    }
    .play-btn {
      position: absolute;
      top: 50%;
      left: 16px;
      transform: translateY(-50%);
      width: 32px;
      height: 32px;
      background: transparent;
      color: #fff9f9;
      border-radius: 50%;
      border: none;
      font-size: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 2;
    }
    .title {
      font-family: 'Montserrat', sans-serif;
      font-weight: 700;
      font-size: clamp(14px, 2.2vw, 18px);
      color: var(--title-color);
      text-transform: uppercase;
      margin: 0;
      padding-left: 40px;
    }
    .progress-container {
      position: relative;
      margin: 12px 0 -12px 48px;
      background: var(--progress-bg);
      height: 6px;
      border-radius: 3px;
      width: calc(100% - 64px);
    }
    .progress-bar {
      width: 0%;
      height: 100%;
      background: var(--progress-fill);
      transition: width 0.1s;
    }
    .progress-knob {
      position: absolute;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: var(--progress-fill);
      border: 2px solid #fff;
      box-shadow: 0 0 2px rgba(0,0,0,0.5);
      z-index: 2;
    }
    .time-info {
      font-family: 'Montserrat', sans-serif;
      font-size: clamp(10px, 1.8vw, 12px);
      color: var(--link-color);
      text-align: right;
      margin: 0 18px;
    }
    .link {
      font-family: 'Montserrat', sans-serif;
      font-size: clamp(10px, 1.8vw, 12px);
      text-transform: uppercase;
      color: var(--link-color);
      opacity: 0.8;
      text-decoration: underline;
      padding-left: 40px;
      margin: 0;
    }
    .audio-player { display: none; }
    
  @media (max-width: 600px) {
  /* 1) Tarjeta vertical y a 100% de ancho, sin altura fija */
  .spotify-card {
    flex-direction: column;
    width: 100%;       /* ocupar todo el contenedor */
    max-width: 100%;   /* asegurarse de que no crezca más */
    height: auto;      /* eliminar la altura de 150px */
    padding: 12px;
  }

  .episodes-grid {
    padding-top:    0;
    padding-bottom: 0;
    padding-left:  0px;
    padding-right: 25px;
}

   /* 2) Imagen a todo ancho */
  .spotify-cover {
    width: 100%;
    height: auto;
    margin-bottom: 12px;
  }

  /* 3) Contenido centrado */
  .spotify-info {
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* 4) Barra de progreso con espacio debajo */
  .progress-container {
    width: 95%;
    margin: 12px auto 8px;  /* 8px de margen inferior para el time-info */
  }

  /* 5) Tiempo siempre debajo, sin superponerse */
  .time-info {
    margin-top: 0;           /* dejar que se coloquen naturalmente */
    padding-top: 4px;        /* un poco de separacion */
    position: static;        /* asegurar que no flote sobre la barra */
    font-size: 12px;
  }

  /* 6) Botón y enlaces centrados */
  .play-btn {
    margin: 16px auto 12px;
    position: static;
   
  }
  .title,
  .link {
    padding-left: 0;
    text-align: center;
  }
}

/* === ADMIN PANEL === */
#admin-panel, #login-section { max-width: 800px; margin: 20px auto; padding: 20px; background: white; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
#login-section { text-align: center; }
#admin-panel h2 { border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 20px; }
.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; }
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="file"] { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
button { padding: 10px 20px; background-color: #ba5d4d; color: white; border: none; border-radius: 4px; cursor: pointer; font-family: 'Montserrat', sans-serif; font-size: 1em; }
button:hover { background-color: #a04f40; }
#logout-button { background-color: #555; margin-left: 15px; }
#logout-button:hover { background-color: #333; }
#upload-status, #metrics-status, #login-error { margin-top: 15px; font-style: italic; }
#login-error { color: red; }
#metrics-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
#metrics-table th, #metrics-table td { border: 1px solid #ddd; padding: 8px; text-align: left; }
#metrics-table th { background-color: #f2f2f2; }
#export-csv { margin-top: 20px; background-color: #4CAF50; }
#export-csv:hover { background-color: #45a049; }
/* Estilos para edición de episodios */
#episodes-list .episode-item { display: flex; justify-content: space-between; align-items: center; padding: 10px; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 8px; background: #fafafa; cursor: grab; }
#episodes-list .episode-item.dragging { opacity: 0.5; }
#episodes-list .actions button { margin-left: 8px; }