:root {
  --bg-light: #f5f5f5;
  --text-light: #222;
  --card-light: #ffffff;
  --primary: #5c6bc0;
  --accent: #ffa726;
  --bg-dark: #121212;
  --text-dark: #ffffff;
  --card-dark: #1e1e1e;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  font-size: 1em;
  transition: background-color 0.3s ease, color 0.3s ease;
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

body.light {
  background-color: var(--bg-light);
  color: var(--text-light);
}

.card {
  background-color: var(--card-dark);
  padding: 20px;
  margin: 20px auto;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  transition: background-color 0.3s ease;
  text-align: center;
}

body.light .card {
  background-color: var(--card-light);
}

.wall {
  width: 100%;
  border-radius: 15px;
}

.title {
  font-size: 2em;
  text-align: center;
  color: var(--accent);
}

.verse {
  font-size: 1em;
  text-align: center;
  margin: 10px 0;
}

hr.divider {
  border: none;
  border-top: 2px solid var(--accent);
  margin: 10px auto;
  width: 80%;
}

.button {
  background-color: transparent;
  color: #ffa726;
  border: 2px solid var(--accent);
  padding: 12px 16px;
  border-radius: 12px;
  margin: 10px;
  font-size: 1em;
  cursor: pointer;
  width: calc(80% - 40px);
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #7986cb;
}

.nav-bar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--card-dark);
  padding: 10px;
  display: flex;
  justify-content: center;
  z-index: 999;
  transition: background-color 0.3s ease;
}

body.light .nav-bar {
  background-color: var(--card-light);
}

.nav-button {
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.content-view {
  padding: 20px;
  max-width: 1200px;
  margin: auto;
  text-align: center;
}

.tema-title,
.estudio-title {
  text-align: center;
  color: var(--accent);
  font-size: 1.5em;
  margin-top: 50px;
  margin-bottom: 10px;
}

.tema-grid,
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 10px;
}

.study-button,
.grid-item {
  background-color: var(--card-dark);
  color: inherit;
  border: 2px solid red;
  padding: 15px;
  border-radius: 15px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

body.light .study-button,
body.light .grid-item {
  background-color: var(--card-light);
}

.study-button:hover,
.grid-item:hover {
  transform: scale(1.03);
}

.grid-item img {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: 10px;
}

.favorite-btn {
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent);
}

.welcome-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black url('https://static.wixstatic.com/media/d292ed_72a7b497330443a8b4fb8ffc1d0ed529~mv2.gif') no-repeat center center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  font-size: 1.2em;
  font-weight: bold;
  opacity: 1;
  transition: opacity 2s ease-in-out;
  z-index: 1000;
}

.welcome-text {
  white-space: normal;
  word-wrap: break-word;
  max-width: 80vw;
  padding: 20px 30px;
  text-align: center;
  font-size: 1.4em;
  line-height: 1.6;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
}

.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background-color: var(--card-dark);
  color: inherit;
  padding: 20px;
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 0 10px #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

body.light .modal-content {
  background-color: var(--card-light);
}

.theme-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 2001;
}

.theme-toggle input[type="checkbox"] {
  transform: scale(1.5);
  margin-left: 10px;
}

.color-options {
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-section {
  margin-top: 20px;
  text-align: center;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.share-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease;
}

.share-button img {
  width: 20px;
  height: 20px;
}

.share-button:hover {
  transform: scale(1.1);
}

.arrow-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin-top: 30px;
}

.arrow-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease;
}

.arrow-button img {
  width: 40px;
  height: 40px;
}

.arrow-button:hover {
  transform: scale(1.1);
}

.title-with-arrows {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.title-with-arrows h2.tema-central {
  margin: 0;
  flex-grow: 1;
  text-align: center;
  color: var(--accent);
  font-size: 1.5em;
}

.title-with-arrows .arrow-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
}

.title-with-arrows .arrow-button img {
  width: 100%;
  height: auto;
}

.topic-filter {
  padding: 10px;
  font-size: 1em;
  border-radius: 10px;
  border: 1px solid var(--accent);
  margin: 10px auto 20px;
  display: block;
  max-width: 300px;
  width: 100%;
  background-color: var(--card-dark);
  color: inherit;
  text-align: center;
  text-align-last: center;
}

body.light .topic-filter {
  background-color: var(--card-light);
  color: var(--text-light);
}

.voz-btn {
  font-size: 0.9em;
  padding: 8px 12px;
  width: auto;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.voz-btn:hover {
  background-color: #fb8c00; 
}

.voz-btn:active,
.voz-btn.leyendo {
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.4), inset -2px -2px 5px rgba(255,255,255,0.1);
  transform: translateY(2px);
}

.initial-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 1;
  transition: opacity 2s ease-in-out;
}

.initial-loader img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@keyframes fadeLoop {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.fade-loop img {
  animation: fadeLoop 4s infinite ease-in-out;
}

#enter-button {
  position: absolute;
  bottom: 60px;
  padding: 12px 24px;
  font-size: 1.2em;
  border: none;
  border-radius: 10px;
  background-color: #ffa726;
  color: white;
  cursor: pointer;
  animation: fadeLoop 4s infinite ease-in-out;
  z-index: 10;
}

#enter-button:hover {
  background-color: #fb8c00;
}

/* Estilos especiales para botones de estudio */
.voz-btn.estudios {
  background-color: #d32f2f !important;
  border: none;
  color: white;
}

.voz-btn.estudios:hover {
  background-color: #b71c1c !important;
}

/* 🔽 Estilos del menú desplegable (☰) */
#top-menu {
  position: fixed;
  top: 10px;
  left: 10px;  /* 👈 Esto lo pone a la derecha */
  z-index: 2002;
}

.menu-toggle {
  background: transparent;
  border: none;
  font-size: 1.6em;
  color: var(--accent);
  cursor: pointer;
}

.menu-content {
  margin-top: 10px;
  background-color: var(--card-dark);
  color: inherit;
  border-radius: 10px;
  box-shadow: 0 0 10px #000;
  padding: 10px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-content a {
  text-decoration: none;
  color: var(--accent);
  font-size: 0.95em;
}

body.light .menu-content {
  background-color: var(--card-light);
}

.paypal-section {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 5px;
  font-size: 0.95em;
  color: var(--accent);
}

.paypal-section img.paypal-icon {
  width: 90px;
  height: auto;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.paypal-section img.paypal-icon:hover {
  transform: scale(1.05);
}

.card {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.card a {
  display: inline-block;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  text-decoration: underline;
  color: #42a5f5; /* color azul enlace */
}

.app-version-inside {
  margin-top: 5px;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

#app-version {
  font-size: 0.9em;
  color: var(--accent);
  font-weight: bold;
}

#refresh-link {
  font-size: 0.9em;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

#refresh-link:hover {
  color: #fb8c00;
}