    :root {
      --primary: #F7F3EF;
      --accent: #007acc;
      --bg-light: #F7F3EF;
      --card-bg: #ffffff;
      --text: #1c1c1c;
      --muted: #6e6e6e;
    }
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Inter', sans-serif;
    }
    body {
      background: var(--primary);
      color: var(--text);
      line-height: 1.7;
    }
    header {
      background: var(--primary);
      padding: 1.5rem 2rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .logo {
      display: flex;
      align-items: center;
    }
    .logo img {
      width: 300px;
      height: 100px;
      object-fit: contain;
      margin-right: 0.75rem;
    }
    .logo span {
      font-size: 1.6rem;
      font-weight: 700;
    }
    nav a {
      color: white;
      margin-left: 2rem;
      text-decoration: none;
      font-weight: 500;
    }
    .hero {
      background: url('https://source.unsplash.com/1600x600/?writing,author') no-repeat center center/cover;
      color: white;
      padding: 1rem 2rem;
      text-align: center;
      position: relative;
    }
    .hero::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.4);
    }
    .hero > div {
      position: relative;
      z-index: 1;
    }
    .hero img.hero-logo {
      width: 80px;
      height: auto;
      margin-bottom: 1rem;
    }
    .hero h2 {
      font-size: 2.8rem;
      font-weight: 700;
      margin-bottom: 1rem;
    }
    .hero p {
      font-size: 1.25rem;
      max-width: 700px;
      margin: 0 auto 2rem;
    }
    .btn {
  background: var(--accent);
  color: white;
  padding: 0.8rem 1.8rem;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  margin: 0 0.5rem;
  transition: background 0.3s;
  display: inline-block;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.3;
}
    .btn:hover {
      background: #005fa3;
    }
    .cards {
      display: flex;
      flex-wrap: nowrap;
      gap: 2rem;
      justify-content: center;
      margin-top: 2rem;
    }
    .card {
      background: var(--card-bg);
      padding: 2rem;
      border-radius: 10px;
      box-shadow: 0 4px 14px rgba(0,0,0,0.08);
      flex: 0 1 300px;
      max-width: 300px;
      min-width: 220px;
    }
    @media (max-width: 900px) {
      .cards {
        flex-wrap: wrap;
      }
    }
    @media (max-width: 700px) {
      .cards {
        flex-direction: column;
        gap: 1.2em;
        align-items: center;
      }
      .card {
        max-width: 98vw;
        min-width: 0;
      }
    }
    .card h4 {
      font-size: 1.2rem;
      margin-bottom: 0.5rem;
    }
    .card p {
      font-size: 0.95rem;
      color: var(--muted);
    }
    .highlight, .card_of_card {
      background: var(--card-bg);
      border-radius: 10px;
      box-shadow: 0 4px 10px rgba(0,0,0,0.06);
      padding: 3rem 2rem;
      margin: 2rem auto;
      max-width: 1000px;
    }
    .card_of_card .testimonial {
      margin: 2rem 0;
    }
    .testimonial img {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      margin-bottom: 0.5rem;
    }
    .testimonial-name {
      font-weight: 600;
      margin-top: 0.5rem;
    }
	.card_of_retos {
      background: var(--card-bg);
      border-radius: 10px;
      box-shadow: 0 4px 10px rgba(0,0,0,0.06);
      padding: 3rem 2rem;
      margin: 0rem auto;
      max-width: auto;
    }
    .card_of_retos {
      margin: 0rem 0;
    }
	
    footer {
      background: rgba(0,0,0,0.4);
      color: #ccc;
      padding: 2rem;
      text-align: center;
      font-size: 0.9rem;
    }
    footer a {
      color: #aaa;
      text-decoration: none;
      margin: 0 0.5rem;
    }
  
  
  nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  background: #bdbdbd;
  padding: 1rem 2rem;
}

nav a, nav button {
  color: white;
  margin-left: 1rem;
  text-decoration: none;
  font-weight: 500;
}

nav button {
  background: none;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  position: relative;
}

#notificaciones-contador {
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 0.7em;
  background: #e53935;
  color: #fff;
  border-radius: 50%;
  padding: 2px 6px;
  min-width: 18px;
  height: 18px;
  text-align: center;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  line-height: 14px;
}

#notificaciones-btn {
  position: relative;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

#notificaciones-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

#notificaciones-panel {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 300px;
  max-width: 400px;
  z-index: 1000;
  padding: 1rem;
  margin-top: 0.5rem;
}

.notificacion-item {
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}

.notificacion-item:hover {
  background-color: #f5f5f5;
}

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

/* Menú hamburguesa responsive */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  margin-left: 1rem;
  z-index: 1001;
  background: none;
  border: none;
}
.hamburger span {
  height: 4px;
  width: auto;
  background: #bdbdbd;
  margin: 5px 0;
  border-radius: 2px;
  display: flex;
  transition: 0.3s;
}

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  background: #bdbdbd;
  padding: 1rem 2rem;
  position: relative;
}

@media (max-width: 900px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    background: #222 !important;
    color: #fff;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    z-index: 1000;
  }
  nav.open {
    display: flex;
    background: #222 !important;
    color: #fff;
  }
  .hamburger {
    display: flex;
  }
  nav a, nav button {
    color: #fff !important;
    margin: 1rem 0 0 0;
    width: 100%;
    text-align: left;
  }
}

.hamburger span {
  background: #222 !important;
}

@media (max-width: 700px) {
  .logo img {
    width: 180px;
    height: 60px;
  }
}


/* Estilos para el buscador de historias */
.explorar-main {
  padding: 2em 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.explorar-main h2 {
  text-align: center;
  color: #007acc;
  font-size: 2.2em;
  margin-bottom: 1.5em;
  font-weight: 700;
}

/* Buscador de historias - estilo sincronizado */
.buscador-container {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px #bdbdbd33;
  padding: 2em;
  margin-bottom: 2.5em;
  border: 1.5px solid #bdbdbd;
}

.buscador-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  align-items: end;
}

.filtro-grupo {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  min-width: 200px;
  flex: 1;
}

.filtro-grupo label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: #1c1c1c;
  font-size: 0.95em;
  margin-bottom: 0.2em;
}

.filtro-input, .filtro-select {
  font-family: 'Inter', sans-serif;
  font-size: 1em;
  padding: 0.8em 1em;
  border: 1.5px solid #bdbdbd;
  border-radius: 8px;
  background: #fafafa;
  color: #232323;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.filtro-input:focus, .filtro-select:focus {
  border-color: #007acc;
  box-shadow: 0 0 0 2px #007acc22;
}
.filtro-input::placeholder {
  color: #888;
  font-style: italic;
}

.btn-buscar {
  background: #007acc;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1.1em;
  font-weight: 700;
  padding: 0.8em 2em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px #bdbdbd33;
  display: flex;
  align-items: center;
  gap: 0.5em;
  min-width: 140px;
  justify-content: center;
}
.btn-buscar:hover {
  background: #005fa3;
  box-shadow: 0 4px 24px #007acc33;
}

/* Responsive para el buscador */
@media (max-width: 768px) {
  .buscador-form {
    flex-direction: column;
    gap: 1em;
  }
  
  .filtro-grupo {
    min-width: 100%;
  }
  
  .btn-buscar {
    width: 100%;
    margin-top: 0.5em;
  }
  
  .explorar-main h2 {
    font-size: 1.8em;
  }
  
  .buscador-container {
    padding: 1.5em;
  }
}
/* FIN Estilos para el buscador de historias */


/*Estilos para el listado de historias*/
/* Tarjeta de historia - estilo neutro */
.historia-card {
  background: #fff;
  color: #232323;
  border-radius: 14px;
  box-shadow: 0 4px 16px #bdbdbd22;
  padding: 1.5em 1.7em 1.2em 1.7em;
  margin-bottom: 1.7em;
  border: 1.5px solid #bdbdbd;
  transition: box-shadow 0.2s, border-color 0.2s;
  position: relative;
  min-width: 220px;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.historia-card .titulo {
  font-size: 1.25em;
  color: #007acc;
  font-weight: 700;
  margin-bottom: 0.2em;
}
.historia-card .tema {
  font-size: 1em;
  color: #005fa3;
  font-weight: 600;
  margin-bottom: 0.5em;
}
.historia-card .resumen-historia {
  font-size: 1.08em;
  margin-bottom: 0.7em;
  color: #232323;
  min-height: 2.2em;
}
.historia-card .autor-historia {
  font-size: 1em;
  color: #888;
  margin-bottom: 0.3em;
}
.historia-card .fecha-ultima {
  font-size: 0.97em;
  color: #007acc;
  margin-bottom: 0.2em;
}
.historia-card .botones-historia {
  display: flex;
  gap: 0.5em;
  margin-top: 1em;
}
.historia-card button {
  background: #fff;
  color: #007acc;
  border: 1.5px solid #007acc;
  border-radius: 8px;
  font-size: 1.13em;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  box-shadow: 0 1px 4px #007acc11;
  display: flex;
  align-items: center;
  justify-content: center;
}
.historia-card button:hover {
  background: #f3e6ff;
  color: #005fa3;
  border-color: #005fa3;
}

.historias-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5em;
}

@media (max-width: 1100px) {
  .historias-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .historias-grid {
    grid-template-columns: 1fr;
  }
}
/*Estilos para el listado de historias*/

/* Tarjetas de retos - estilo unificado */
.retos-grid .card,
.card_of_retos .card {
  background: #fff;
  color: #232323;
  border-radius: 14px;
  box-shadow: 0 4px 16px #bdbdbd22;
  padding: 1.5em 1.7em 1.2em 1.7em;
  margin-bottom: 1.7em;
  border: 1.5px solid #bdbdbd;
  transition: box-shadow 0.2s, border-color 0.2s;
  min-width: 220px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.retos-grid .card .btn-buscar,
.card_of_retos .card .btn-buscar {
  background: #007acc;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1.1em;
  font-weight: 700;
  padding: 0.8em 2em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px #bdbdbd33;
  display: flex;
  align-items: center;
  gap: 0.5em;
  min-width: 140px;
  justify-content: center;
}
.retos-grid .card .btn-buscar:hover,
.card_of_retos .card .btn-buscar:hover {
  background: #005fa3;
  box-shadow: 0 4px 24px #007acc33;
}

.retos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5em;
}

@media (max-width: 1100px) {
  .retos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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



.card {
  background: #fff;
  color: #232323;
  border-radius: 14px;
  box-shadow: 0 4px 16px #bdbdbd22;
  padding: 1.5em 1.7em 1.2em 1.7em;
  border: 1.5px solid #bdbdbd;
  transition: box-shadow 0.2s, border-color 0.2s;
  min-width: 220px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  text-align: center;
}
.hall-reto{
	background: var(--card-bg);
      padding: 2rem;
      border-radius: 10px;
      box-shadow: 0 4px 14px rgba(0,0,0,0.08);
      flex: 0 1 300px;
}
.card .btn-buscar {
  background: #007acc;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1.1em;
  font-weight: 700;
  padding: 0.8em 2em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px #bdbdbd33;
  display: flex;
  align-items: center;
  gap: 0.5em;
  min-width: 140px;
  justify-content: center;
  margin-top: 0.7em;
}
.card .btn-buscar:hover {
  background: #005fa3;
  box-shadow: 0 4px 24px #007acc33;
}
.card .puesto {
  font-size: 2em;
  margin-bottom: 0.3em;
}
.card .likes {
  color: #007acc;
  font-size: 0.95em;
  margin-top: 0.3em;
}
.hall-reto-title {
  font-size: 1.15em;
  font-weight: 700;
  color: #007acc;
  margin-bottom: 0.3em;
}
.hall-reto-desc {
  color: #888;
  margin-bottom: 0.7em;
}
.hall-reto-tipo {
  color: #1976d2;
  font-size: 0.98em;
  margin-bottom: 0.5em;
}

/* Hall of Fame */
.hall-main-title {
  text-align: center;
  color: rgba(0,0,0,0.6);
  font-size: 2.3em;
  font-weight: 800;
  margin: 0.5em 0 0.5em 0;
  letter-spacing: 0.01em;
}
.hall-reto {
  background: #faf8ff;
  border-radius: 18px;
  box-shadow: 0 4px 24px #007acc11;
  padding: 2.2em 2em 2em 2em;
  margin-bottom: 3.5em;
  border: 1.5px solid #007acc22;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.hall-reto .card {
  margin-bottom: 0;
}
.hall-reto-title {
  font-size: 1.3em;
  font-weight: 700;
  color: #007acc;
  margin-bottom: 0.3em;
  text-align: center;
}
.hall-reto-desc {
  color: #888;
  margin-bottom: 0.7em;
  text-align: center;
}
.hall-reto-tipo {
  color: #1976d2;
  font-size: 1em;
  margin-bottom: 0.5em;
  text-align: center;
}
.hall-reto .cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5em;
  margin-top: 1.5em;
}
@media (max-width: 1100px) {
  .hall-reto .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .hall-reto .cards {
    grid-template-columns: 1fr;
  }
  .hall-main-title {
    font-size: 1.3em;
  }
  .hall-reto {
    padding: 1.2em 0.7em 1em 0.7em;
  }
}
.hall-reto .card {
  align-items: center;
  text-align: center;
  min-width: 0;
  max-width: 100%;
}
.hall-reto .puesto {
  font-size: 2.2em;
  margin-bottom: 0.3em;
}
.hall-reto .likes {
  color: #007acc;
  font-size: 0.98em;
  margin-top: 0.3em;
}

.dashboard-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2em 1em;
}
.dashboard-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px #bdbdbd33;
  padding: 2em 2em 1.5em 2em;
  margin-bottom: 2em;
  border: 1.5px solid #bdbdbd;
}
.dashboard-resumen {
  display: flex;
  gap: 2em;
  justify-content: center;
  align-items: stretch;
  margin-bottom: 1em;
}
.resumen-card {
  background: #faf8ff;
  border-radius: 12px;
  box-shadow: 0 2px 8px #007acc11;
  padding: 1.2em 2em;
  min-width: 160px;
  text-align: center;
  border: 1.5px solid #007acc22;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.resumen-titulo {
  color: #007acc;
  font-weight: 700;
  font-size: 1.1em;
  margin-bottom: 0.5em;
}
.resumen-numero {
  color: #232323;
  font-size: 2.1em;
  font-weight: 800;
}
.dashboard-section h3 {
  color: #005fa3;
  font-size: 1.3em;
  margin-bottom: 1em;
  text-align: left;
}
.dashboard-alert {
  background: #fffbe7;
  color: #007acc;
  border-radius: 10px;
  padding: 1em 1.2em;
  margin: 1em 0;
  border: 1.5px solid #007acc44;
  text-align: center;
  font-size: 1.08em;
}
.btn-nueva-historia {
  background: #007acc;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1.1em;
  font-weight: 700;
  padding: 0.8em 2em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px #bdbdbd33;
  display: inline-block;
  margin: 0.5em 0;
}
.btn-nueva-historia:hover {
  background: #005fa3;
  box-shadow: 0 4px 24px #007acc33;
}
@media (max-width: 900px) {
  .dashboard-resumen {
    flex-direction: column;
    gap: 1em;
    align-items: stretch;
  }
  .resumen-card {
    min-width: 0;
    width: 100%;
  }
}

.kindle-reader {
  background: #f6ecd9;
  border-radius: 18px;
  box-shadow: 0 4px 24px #bdbdbd33;
  padding: 2.5em 2.5em 2em 2.5em;
  margin: 2.5em auto 2em auto;
  max-width: auto;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1.18em;
  color: #3a2c13;
  line-height: 1.8;
  text-align: justify;
  border: 1.5px solid #e0d3b8;
}
.kindle-reader h1 {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 2.1em;
  color: #937465;
  text-align: center;
  margin-bottom: 0.7em;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.kindle-reader .autor {
  text-align: right;
  font-size: 1em;
  color: #007acc;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}
.kindle-reader .fechas {
  text-align: right;
  font-size: 0.98em;
  color: #888;
  margin-bottom: 1.2em;
}
.kindle-reader .acciones-historia {
  display: flex;
  gap: 1em;
  justify-content: flex-end;
  margin-bottom: 1em;
}
.kindle-reader .btn-square {
  background: #fff;
  border: 1.5px solid #007acc;
  border-radius: 8px;
  color: #007acc;
  font-size: 1.2em;
  padding: 0.5em 0.9em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  margin-left: 0.2em;
}
.kindle-reader .btn-square:hover {
  background: #f3e6ff;
  color: #005fa3;
  border-color: #005fa3;
}
.kindle-reader .msg-reto {
  background: #fffbe7;
  color: #007acc;
  border-radius: 10px;
  padding: 0.7em 1em;
  margin-bottom: 1em;
  border: 1.5px solid #007acc44;
  text-align: center;
  font-size: 1.08em;
}
.kindle-reader .tema {
  color: #87630d;
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 0.7em;
  text-align: center;
}
.kindle-reader .historia-box {
	border-radius: 20px;
  margin-bottom: 1.5em;
  min-height: 180px;
  padding: 1.5em 10.2em;
  box-shadow: 0 2px 12px #16161533; 
}
/* Ajustes responsivos para lectura en móviles */
@media (max-width: 900px) {
  .kindle-reader .historia-box {
    padding: 1.2em 1.2em;
  }
}
@media (max-width: 700px) {
  .kindle-reader .historia-box {
    padding: 1em 0.9em;
  }
  .kindle-reader h1 {
    font-size: 1.6em;
  }
}
.kindle-reader .historia-box p, .kindle-reader .historia-box div, .kindle-reader .historia-box span {
  text-indent: 2em;
  margin-bottom: 1em;
  display: block;
}
.kindle-reader .comentarios-section {
  margin-top: 2.5em;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px #bdbdbd22;
  padding: 1.5em 1.2em 1em 1.2em;
  border: 1.5px solid #e0d3b8;
}
.kindle-reader .comentarios-section h3 {
  color: #007acc;
  font-size: 1.2em;
  margin-bottom: 1em;
  text-align: left;
}
.kindle-reader .comentario-item {
  border-bottom: 1px solid #eee;
  padding: 0.7em 0;
  font-size: 1em;
  color: #3a2c13;
}
.kindle-reader .comentario-item:last-child {
  border-bottom: none;
}
.kindle-reader .comentario-item .autor {
  font-weight: 600;
  color: #007acc;
}
.kindle-reader .comentario-item .fecha {
  color: #888;
  font-size: 0.95em;
}
.kindle-reader .form-comentario input,
.kindle-reader .form-comentario textarea {
  width: 100%;
  margin-bottom: 0.7em;
  border-radius: 8px;
  border: 1.5px solid #bdbdbd;
  padding: 0.7em 1em;
  font-size: 1em;
  font-family: 'Inter', sans-serif;
  background: #faf8f2;
  color: #3a2c13;
}
.kindle-reader .form-comentario button {
  background: #007acc;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1.1em;
  font-weight: 700;
  padding: 0.7em 2em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px #bdbdbd33;
  display: inline-block;
}
.kindle-reader .form-comentario button:hover {
  background: #005fa3;
  box-shadow: 0 4px 24px #007acc33;
}

.kindle-reader select, .kindle-reader input[type="text"] {
  width: 100%;
  padding: 0.9em 1.2em;
  border-radius: 10px;
  border: 1.5px solid #bdbdbd;
  background: #faf8f2;
  color: #3a2c13;
  font-size: 1.08em;
  font-family: 'Inter', sans-serif;
  margin-bottom: 1em;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px #bdbdbd11;
  appearance: none;
}
.kindle-reader select:focus, .kindle-reader input[type="text"]:focus {
  border-color: #007acc;
  box-shadow: 0 0 0 2px #007acc22;
  outline: none;
}
.kindle-reader label {
  font-weight: 600;
  color: #005fa3;
  font-size: 1.08em;
  margin-bottom: 0.3em;
  display: block;
}
/* Flecha personalizada para select */
.kindle-reader select {
  background-image: url('data:image/svg+xml;utf8,<svg fill="%237c2ae8" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7.293 7.293a1 1 0 011.414 0L10 8.586l1.293-1.293a1 1 0 111.414 1.414l-2 2a1 1 0 01-1.414 0l-2-2a1 1 0 010-1.414z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 1em center;
  background-size: 1.2em;
}

.kindle-reader .form-comentario {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  align-items: flex-end;
}

.kindle-reader .continuacion-section {
  margin-top: 2em;
  padding: 1.5em;
  background: #f8f8f8;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.kindle-reader .continuacion-section h3 {
  margin: 0 0 1em 0;
  color: #007acc;
  font-size: 1.2em;
  font-weight: 600;
}

.kindle-reader .form-continuacion {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.kindle-reader .form-continuacion > div {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.kindle-reader .form-continuacion label {
  font-weight: 600;
  color: #333;
  font-size: 0.95em;
}

.kindle-reader .form-continuacion textarea {
  width: 100%;
  padding: 1em;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1em;
  line-height: 1.5;
  resize: vertical;
  min-height: 120px;
}

.kindle-reader .form-continuacion .subinfo {
  font-size: 0.85em;
  color: #666;
  margin-top: 0.3em;
}

.kindle-reader .form-continuacion .btn {
  align-self: flex-start;
  margin-top: 0.5em;
}
.kindle-reader .form-comentario > div {
  flex: 1 1 180px;
  min-width: 180px;
  margin-bottom: 0;
}
.kindle-reader .form-comentario .btn-agregar-reto {
  flex: 1 1 100%;
  min-width: 180px;
  max-width: 100%;
  margin-top: 0;
  font-size: 1.15em;
  font-weight: 700;
  padding: 1em 0;
  background: #007acc;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px #bdbdbd33;
  display: block;
  text-align: center;
  align-self: stretch;
}
@media (max-width: 900px) {
  .kindle-reader .form-comentario {
    flex-direction: column;
    gap: 0.7em;
    align-items: stretch;
  }
  .kindle-reader .form-comentario > div, .kindle-reader .form-comentario .btn-agregar-reto {
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
  }
}

.kindle-reader table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px #bdbdbd22;
  overflow: hidden;
  margin-top: 1.5em;
}
.kindle-reader th, .kindle-reader td {
  padding: 0.7em 0.8em;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: middle;
  font-size: 1em;
}
.kindle-reader th {
  background: #f6ecd9;
  color: #005fa3;
  font-weight: 700;
}
.kindle-reader tr:last-child td {
  border-bottom: none;
}
.kindle-reader tr:nth-child(even) td {
  background: #faf8f2;
}
.kindle-reader td input, .kindle-reader td select {
  width: 100%;
  padding: 0.6em 1em;
  border-radius: 8px;
  border: 1.5px solid #bdbdbd;
  background: #faf8f2;
  color: #3a2c13;
  font-size: 1em;
  font-family: 'Inter', sans-serif;
  margin-bottom: 0;
  box-sizing: border-box;
}
.kindle-reader td input:focus, .kindle-reader td select:focus {
  border-color: #007acc;
  box-shadow: 0 0 0 2px #007acc22;
  outline: none;
}

/* === MODO OSCURO === */
.dark-mode body,
.dark-mode .kindle-reader,
.dark-mode .dashboard-card,
.dark-mode .card,
.dark-mode .retos-grid .card,
.dark-mode .buscador-container,
.dark-mode .historia-card,
.dark-mode .ayuda-main,
.dark-mode .faq,
.dark-mode .faq-item,
.dark-mode .comentarios-section,
.dark-mode .footer,
.dark-mode footer {
  background: #181818 !important;
  color: #f3f3f3 !important;
}
.dark-mode header,
.dark-mode nav {
  background: #23232b !important;
  color: #f3f3f3 !important;
}
.dark-mode nav a,
.dark-mode nav button {
  color: #f3f3f3 !important;
}
.dark-mode .btn,
.dark-mode .btn-buscar,
.dark-mode .btn-nueva-historia {
  background: #005fa3 !important;
  color: #fff !important;
}
.dark-mode .card,
.dark-mode .dashboard-card,
.dark-mode .historia-card,
.dark-mode .retos-grid .card {
  border-color: #333 !important;
  box-shadow: 0 2px 12px #0004 !important;
}
.dark-mode input,
.dark-mode textarea,
.dark-mode select {
  background: #23232b !important;
  color: #f3f3f3 !important;
  border-color: #444 !important;
}
.dark-mode .form-comentario input,
.dark-mode .form-comentario textarea {
  background: #23232b !important;
  color: #f3f3f3 !important;
  border-color: #444 !important;
}

.dark-mode .continuacion-section {
  background: #23232b !important;
  border-color: #444 !important;
}

.dark-mode .continuacion-section h3 {
  color: #ffd700 !important;
}

.dark-mode .form-continuacion label {
  color: #f3f3f3 !important;
}

.dark-mode .form-continuacion textarea {
  background: #23232b !important;
  color: #f3f3f3 !important;
  border-color: #444 !important;
}

.dark-mode .form-continuacion .subinfo {
  color: #aaa !important;
}
.dark-mode .form-comentario button {
  background: #005fa3 !important;
  color: #fff !important;
}
.dark-mode .dashboard-alert {
  background: #23232b !important;
  color: #ffd700 !important;
  border-color: #444 !important;
}
.dark-mode .msg-reto {
  background: #23232b !important;
  color: #ffd700 !important;
  border-color: #444 !important;
}
.dark-mode .card .titulo,
.dark-mode .historia-card .titulo,
.dark-mode .hall-reto-title {
  color: #ffd700 !important;
}
.dark-mode .card .tema,
.dark-mode .historia-card .tema {
  color: #007acc !important;
}
.dark-mode .card .likes,
.dark-mode .historia-card .likes {
  color: #007acc !important;
}

/* Dark mode para index.php */
.dark-mode .hero {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
}

.dark-mode .section {
  background: #1a1a1a !important;
}

.dark-mode .section h2,
.dark-mode .section h3 {
  color: #f3f3f3 !important;
}

.dark-mode .valor-item,
.dark-mode .testimonio,
.dark-mode .faq-item {
  background: #2a2a2a !important;
  color: #f3f3f3 !important;
}

.dark-mode .valor-item h4,
.dark-mode .faq-item h4 {
  color: #f3f3f3 !important;
}

.dark-mode .valor-item p,
.dark-mode .faq-item p {
  color: #ccc !important;
}

.dark-mode .testimonio blockquote {
  color: #f3f3f3 !important;
}

.dark-mode .autor-testimonio {
  color: #007acc !important;
}

.dark-mode .info-registro {
  background: #2a2a2a !important;
}

.dark-mode .info-registro p {
  color: #ccc !important;
}

.dark-mode .cta-secundario {
  background: #2a2a2a !important;
}

.dark-mode .social-icon {
  background: #2a2a2a !important;
  color: #f3f3f3 !important;
}

.dark-mode .footer,
.dark-mode footer {
  background: #181818 !important;
  color: #aaa !important;
}
.dark-mode .faq-item b {
  color: #ffd700 !important;
}
.dark-mode .comentario-item {
  color: #f3f3f3 !important;
}
.dark-mode .comentario-item .autor {
  color: #ffd700 !important;
}
.dark-mode .comentario-item .fecha {
  color: #aaa !important;
}

/* === RESPONSIVE GLOBAL === */
@media (max-width: 1100px) {
  .kindle-reader, .dashboard-card, .card, .hall-reto, .buscador-container {
    max-width: 98vw;
    padding-left: 1.2em;
    padding-right: 1.2em;
  }
  .hall-reto .cards, .historias-grid, .retos-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 700px) {
  .kindle-reader, .dashboard-card, .card, .hall-reto, .buscador-container {
    max-width: 100vw;
    padding: 1em 0.3em !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .hall-reto .cards, .historias-grid, .retos-grid {
    grid-template-columns: 1fr !important;
    gap: 1em !important;
  }
  .btn, .btn-buscar, .btn-nueva-historia, .btn-agregar-reto {
    width: 100% !important;
    min-width: 0 !important;
    font-size: 1em !important;
    padding: 1em 0 !important;
  }
  .form-comentario, .buscador-form {
    flex-direction: column !important;
    gap: 0.7em !important;
    align-items: stretch !important;
  }
  .form-comentario > div, .buscador-form > div {
    width: 100% !important;
    min-width: 0 !important;
    margin-bottom: 0 !important;
  }
  table, .kindle-reader table {
    font-size: 0.95em !important;
    display: block;
    overflow-x: auto;
    width: 100% !important;
  }
  th, td {
    padding: 0.5em 0.4em !important;
    font-size: 1em !important;
  }
  .logo img {
    width: 120px !important;
    height: 40px !important;
  }
  .hero h2 {
    font-size: 1.3em !important;
  }
  
  .hero .btn {
    display: block !important;
    margin: 0.5rem auto !important;
    max-width: 280px !important;
    padding: 0.7rem 1.5rem !important;
    font-size: 0.95rem !important;
    text-align: center !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    line-height: 1.3 !important;
  }
}

/* ===== ESTILOS PARA INDEX.PHP ===== */

/* Hero section mejorado */
.hero {
  color: white;
  padding: 1rem 2rem;
  text-align: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img {
  width: 120px;
  height: auto;
  margin-bottom: 2rem;
  filter: brightness(0) invert(1);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }
}

/* CTA Buttons */
.cta-hero {
  background: #007acc;
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 122, 204, 0.3);
  margin: 0.5rem;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.3;
}

.cta-hero:hover {
  background: #005fa3;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 122, 204, 0.4);
}

.cta-secundario {
  text-align: center;
  padding: 3rem 2rem;
  background: #f8f9fa;
}

/* Sections */
.section {
  padding: 4rem 2rem;
}

.section h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: #1c1c1c;
}

.section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1c1c1c;
}

/* Valor diferencial */
.valor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.valor-item {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.valor-item:hover {
  transform: translateY(-5px);
}

.valor-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.valor-item h4 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1c1c1c;
}

.valor-item p {
  color: #666;
  line-height: 1.6;
}

/* Group layout */
.group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Testimonios */
.testimonios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

.testimonio {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.avatar-testimonio {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 1rem;
  background: #f0f0f0;
  padding: 10px;
}

.testimonio blockquote {
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #333;
  line-height: 1.6;
}

.autor-testimonio {
  font-weight: 600;
  color: #007acc;
}

/* Redes sociales */
.redes-sociales {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.social-icon {
  font-size: 1.5rem;
  padding: 0.5rem;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  text-decoration: none;
}

.social-icon:hover {
  transform: scale(1.1);
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.faq-item {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.faq-item h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1c1c1c;
}

.faq-item p {
  color: #666;
  line-height: 1.6;
}

/* Info registro */
.info-registro {
  background: #f8f9fa;
  text-align: center;
}

.info-registro p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #666;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .hero {
    padding: 2rem 1rem;
    min-height: 50vh;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-content p {
    font-size: 1.1rem;
  }
  
  .hero-img {
    width: 80px;
  }
  
  .section {
    padding: 2rem 1rem;
  }
  
  .section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  
  .valor-grid,
  .group,
  .testimonios-grid,
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .valor-item,
  .testimonio,
  .faq-item {
    padding: 1.5rem;
  }
  
  .cta-hero {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    display: block;
    margin: 0.5rem auto;
    max-width: 280px;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
  }
  
  .cta-secundario {
    padding: 2rem 1rem;
  }
  
  .info-registro p {
    font-size: 1rem;
    padding: 0 1rem;
  }
  
  .redes-sociales {
    gap: 0.5rem;
  }
  
  .social-icon {
    font-size: 1.2rem;
    padding: 0.4rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
  
  .section h2 {
    font-size: 1.8rem;
  }
  
  .valor-item h4,
  .faq-item h4 {
    font-size: 1.1rem;
  }
  
  .testimonio blockquote {
    font-size: 1rem;
  }
  
  .cta-hero {
    padding: 0.7rem 1.2rem;
    font-size: 0.95rem;
  }
}
