/* ==========================================================================
   MindS - Stylesheet Refactored
   ========================================================================== */

:root {
  /* Paleta moderna y cohesiva */
  --azul-claro: #3b82f6;
  --azul-oscuro: #1e3a8a;
  --azul-fondo: #f0f9ff;
  --azul-hover: #e0f2fe;
  
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-card: #e2e8f0;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  
  --verde: #10b981;
  --verde-hover: #059669;
  --rojo: #ef4444;
  --rojo-hover: #dc2626;

  --radius-card: 16px;
  --radius-btn: 10px;
  --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

/* --- Base & Tipografía --- */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 20px 12px;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
}

main {
  max-width: 720px;
  margin: 0 auto;
}

/* Encabezados */
h1 {
  text-align: center;
  font-size: 2rem;
  font-family: "Baloo 2", cursive, sans-serif;
  font-weight: 800;
  padding: 12px 20px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  border-radius: var(--radius-card);
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
  margin: 0 auto 24px auto;
}

h1 a {
  color: white !important;
}

h2 {
  font-family: "Baloo 2", cursive, sans-serif;
  font-size: 1.35rem;
  color: var(--text-main);
  margin-top: 0;
  margin-bottom: 12px;
}

label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  gap: 6px;
  font-size: 15px;
}

.center {
  text-align: center;
}

#p1 {
  text-align: center;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 8px;
}

#p2 {
  font-family: 'Baloo 2', cursive, sans-serif;
  text-align: center;
  color: #ec4899;
  font-weight: 600;
}

.sin-subrayado {
  text-decoration: none;
}

/* --- Secciones (Tarjetas) --- */
main > section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-soft);
}

/* --- Inputs & Textareas --- */
input:not([type="radio"]),
textarea {
  width: 100%;
  font-size: 15px;
  padding: 12px;
  font-family: inherit;
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-btn);
  background-color: #f8fafc;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea {
  height: 100px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--azul-claro);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background-color: #ffffff;
}

input[type="radio"] {
  margin: 0;
  height: 16px;
  width: 16px;
  accent-color: var(--azul-claro);
}

/* --- Botones Generales --- */
button {
  margin-top: 10px;
  padding: 10px 20px;
  background-color: var(--azul-claro);
  color: white;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

button:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.btn-verde {
  background-color: var(--verde);
}
.btn-verde:hover {
  background-color: var(--verde-hover);
}

.btn-salir {
  background-color: var(--rojo);
}
.btn-salir:hover {
  background-color: var(--rojo-hover);
}

/* --- Renderizado de Notas e Hilos --- */
#listaNotas,
#notaDelDia,
#notareciente,
#listaHP,
#listaMsc {
  margin-top: 12px;
  border: none;
  background: transparent;
}

.nota,
#listaNotas > div,
#notareciente > div,
#notaDelDia > div,
#listaHP > div,
#listaMsc > div {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-left: 5px solid var(--azul-claro);
  padding: 16px;
  border-radius: var(--radius-btn);
  margin-bottom: 12px;
  box-shadow: var(--shadow-soft);
  font-size: 16px;
}

/* Respuestas internas */
.respuestas {
  margin-top: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--border-card);
  font-size: 14px;
  color: var(--text-muted);
}

.respuesta-linea,
.me-gusta-linea {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.respuesta-linea input {
  flex: 1;
  padding: 8px 12px;
  font-size: 14px;
}

.respuesta-linea button {
  margin-top: 0;
  padding: 8px 14px;
  font-size: 14px;
}

.me-gusta-linea button {
  margin-top: 0;
  background-color: var(--verde);
  padding: 6px 12px;
}

.me-gusta-linea button:hover {
  background-color: var(--verde-hover);
}

/* --- Test del Día --- */
#opcionesTest button {
  display: block;
  width: 100%;
  margin: 8px 0;
  padding: 12px;
  font-size: 15px;
  border: 1.5px solid var(--border-card);
  background-color: var(--azul-fondo);
  color: var(--azul-oscuro);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-weight: 600;
  text-align: left;
}

#opcionesTest button:hover {
  background-color: var(--azul-hover);
  border-color: var(--azul-claro);
}

/* --- Pregunta del día --- */
.pregunta-dia h2 + p {
  margin-top: -8px;
  font-size: 0.85em;
  color: var(--text-muted);
}

/* --- Listas Bonitas (Comunidades, Minders, FanFav) --- */
.lista-bonita ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lista-bonita li {
  margin-bottom: 8px;
}

.lista-bonita a {
  display: block;
  padding: 10px 14px;
  background-color: var(--azul-fondo);
  color: var(--azul-oscuro);
  text-decoration: none;
  border-radius: var(--radius-btn);
  font-weight: 600;
  transition: all 0.2s ease;
}

.lista-bonita a:hover {
  background-color: var(--azul-hover);
  transform: translateX(3px);
}

/* --- Perfil y Componentes Específicos --- */
#nombreReal,
#nombreUsuario,
#enlaceRedSocial {
  font-size: 16px;
  margin: 10px 0;
  padding: 12px;
  background: #f1f5f9;
  border-radius: var(--radius-btn);
  font-weight: 600;
}

.SCPhoto {
  height: 180px;
  width: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--azul-claro);
  margin: 0 auto;
  display: block;
}

/* --- Layout del Encabezado & Footer --- */
header.botones-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 720px;
  margin: 0 auto 16px auto;
}

.espaciador {
  flex: 1;
}

#contadorVisitas {
  margin: 20px auto;
  width: fit-content;
  background-color: #f1f5f9;
  color: var(--text-main);
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
}

/* --- Responsivo --- */
@media (max-width: 600px) {
  body {
    padding: 12px 8px;
  }
  
  main > section {
    padding: 14px;
  }
  
  button {
    width: 100%;
  }

  .respuesta-linea {
    flex-direction: column;
    align-items: stretch;
  }
  
  .respuesta-linea button {
    width: 100%;
  }
}