/* Variables y reset */
:root {
  --primary: #8c1c13; /* Rojo imperial chino */
  --primary-dark: #5c120c;
  --secondary: #e8d8c5; /* Beige suave (papel antiguo) */
  --dark: #2c1e16; /* Marrón oscuro */
  --light: #f5f2e9; /* Beige claro */
  --accent: #d4b483; /* Dorado suave */
  --accent-dark: #a88b5f;
  --font-title: "Noto Serif SC", serif;
  --font-body: "Noto Sans SC", sans-serif;
  --font-calligraphy: "Ma Shan Zheng", cursive;
}

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

body {
  font-family: var(--font-body);
  line-height: 1.6;
  background: var(--light);
  color: var(--dark);
  background-image: url('image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f5f2e9"/><path d="M0 0L100 100M100 0L0 100" stroke="%23e8d8c5" stroke-width="0.5"/></svg>');
  background-attachment: fixed;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  position: relative;
}

.container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" opacity="0.03"><path d="M20,20 Q40,5 60,20 T100,20 M20,50 Q40,35 60,50 T100,50 M20,80 Q40,65 60,80 T100,80" stroke="%238c1c13" fill="none"/></svg>');
  pointer-events: none;
}

/* Header */
header {
  text-align: center;
  padding: 45px 20px 35px;
  background: var(--primary);
  color: var(--light);
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--accent);
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%23a88b5f" stroke-width="0.5" opacity="0.3"/></svg>');
  opacity: 0.2;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 15px;
}

.logo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
}

.yin-yang {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--dark) 50%, var(--light) 50%);
  position: relative;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
  border: 2px solid var(--accent);
}

.yin-yang::before,
.yin-yang::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  border: 17px solid;
}

.yin-yang::before {
  background: var(--dark);
  border-color: var(--light);
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
}

.yin-yang::after {
  background: var(--light);
  border-color: var(--dark);
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
}

h1 {
  font-family: var(--font-title);
  font-size: 2.9rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 10px;
}

h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent,
    var(--accent),
    transparent
  );
}

header p {
  font-size: 1.25rem;
  max-width: 650px;
  margin: 0 auto 10px;
  font-style: italic;
  font-family: var(--font-calligraphy);
  letter-spacing: 0.5px;
  color: var(--accent);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Navegación */
nav {
  background: var(--dark);
  padding: 16px 0;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--accent),
    var(--primary),
    var(--accent)
  );
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  flex-wrap: wrap;
  gap: 5px;
}

nav li {
  margin: 0 5px;
}

nav a {
  color: var(--light);
  text-decoration: none;
  font-size: 1.12rem;
  padding: 9px 18px;
  border-radius: 30px;
  transition: all 0.35s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

nav a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: width 0.35s ease;
}

nav a:hover::before {
  width: 100%;
}

nav a:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Estilos específicos para iconos de Font Awesome */
nav a i {
  font-size: 1.2rem;
  min-width: 18px;
  color: var(--accent);
  transition: color 0.3s ease;
}

/* Secciones */
section {
  padding: 70px 45px 55px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: relative;
}

section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(
    to right,
    transparent,
    var(--accent),
    transparent
  );
}

.section-header {
  text-align: center;
  margin-bottom: 45px;
}

.section-header h2 {
  color: var(--primary);
  font-family: var(--font-title);
  font-size: 2.4rem;
  margin-bottom: 18px;
  position: relative;
  display: inline-block;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.section-header h2::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
}

.section-header p {
  font-size: 1.15rem;
  color: var(--accent-dark);
  max-width: 650px;
  margin: 0 auto;
  font-family: var(--font-calligraphy);
}

/* Introducción */
.intro-content {
  max-width: 850px;
  margin: 0 auto;
  font-size: 1.12rem;
  line-height: 1.8;
  position: relative;
}

.intro-content::before,
.intro-content::after {
  content: "";
  position: absolute;
  top: 0;
  width: 15px;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(222, 200, 165, 0.3));
}

.intro-content::after {
  right: 0;
  background: linear-gradient(to left, transparent, rgba(222, 200, 165, 0.3));
}

.intro-content p {
  margin-bottom: 22px;
  text-align: justify;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.intro-content .highlight {
  background: var(--secondary);
  padding: 32px 40px;
  border-radius: 10px;
  margin: 35px 0;
  border-left: 4px solid var(--primary);
  font-style: normal;
  text-align: center;
  font-size: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.intro-content .highlight::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 15px;
  font-size: 3.5rem;
  color: var(--accent-dark);
  opacity: 0.3;
  line-height: 1;
  font-family: var(--font-calligraphy);
}

.intro-content .highlight::after {
  content: "";
  position: absolute;
  bottom: 5px;
  right: 15px;
  font-size: 3.5rem;
  color: var(--accent-dark);
  opacity: 0.3;
  line-height: 1;
  font-family: var(--font-calligraphy);
}

/* Consultor */
.consultation-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 45px;
  max-width: 850px;
  margin: 0 auto;
}

.instructions {
  text-align: left;
  background: var(--secondary);
  padding: 32px;
  border-radius: 12px;
  width: 100%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(212, 180, 131, 0.3);
  position: relative;
  overflow: hidden;
}

.instructions::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--primary));
}

.instructions h3 {
  color: var(--primary);
  margin-bottom: 20px;
  font-family: var(--font-title);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.55rem;
}

/* Añadido: Estilos específicos para iconos de Font Awesome */
.instructions h3 i {
  color: var(--accent-dark);
  font-size: 1.4rem;
}

.method-description {
  margin-bottom: 25px;
  font-size: 1.1rem;
  color: var(--dark);
  line-height: 1.7;
}

.consultation-steps {
  text-align: left;
  margin-top: 18px;
  padding-left: 25px;
  position: relative;
}

.consultation-steps::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 3px;
}

.consultation-steps li {
  margin-bottom: 20px;
  position: relative;
  padding-left: 25px;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Valores de las monedas */
.coin-values {
  margin-top: 35px;
  padding-top: 25px;
  border-top: 1px dashed var(--accent);
}

.coin-values h4 {
  color: var(--primary);
  margin-bottom: 20px;
  font-family: var(--font-title);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
}

/* Añadido: Estilos específicos para iconos de Font Awesome */
.coin-values h4 i {
  color: var(--accent-dark);
  font-size: 1.3rem;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.value-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.value-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.coin-value {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.coin-line {
  width: 90%;
  height: 8px;
  border-radius: 2px;
  background: var(--dark);
}

.yin-line {
  background: linear-gradient(
    to right,
    var(--dark) 45%,
    transparent 45%,
    transparent 55%,
    var(--dark) 55%
  );
}

.changing {
  background-color: var(--primary);
  box-shadow: 0 0 8px rgba(140, 28, 19, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(140, 28, 19, 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(140, 28, 19, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(140, 28, 19, 0);
  }
}

.value-label {
  text-align: center;
  font-size: 0.95rem;
}

.value-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-weight: bold;
  margin-right: 5px;
}

.view-all-values {
  margin-top: 20px;
  text-align: center;
}

.view-values-btn {
  background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(140, 28, 19, 0.2);
}

/* Añadido: Estilos específicos para iconos de Font Awesome */
.view-values-btn i {
  font-size: 1.1rem;
  color: white;
}

.view-values-btn:hover {
  background: linear-gradient(to bottom, #a32218, var(--primary-dark));
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(140, 28, 19, 0.3);
}

/* Consulta simplificada */
.main-value {
  background: var(--secondary);
  border-radius: 8px;
  padding: 15px;
  box-shadow: none;
  transform: none;
  transition: none;
}

/* Consultation box */
.consultation-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 35px;
  padding: 45px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(212, 180, 131, 0.2);
}

.consult-btn {
  background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 16px 45px;
  font-family: var(--font-body);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.35s ease;
  border-radius: 50px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 6px 15px rgba(140, 28, 19, 0.3);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

/* Añadido: Estilos específicos para iconos de Font Awesome */
.consult-btn i {
  font-size: 1.3rem;
  color: white;
}

.consult-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20px;
  height: 200%;
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(30deg);
  transition: all 0.8s;
}

.consult-btn:hover::after {
  left: 120%;
}

.consult-btn:hover {
  background: linear-gradient(to bottom, #a32218, var(--primary-dark));
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(140, 28, 19, 0.4);
}

.consult-tooltip {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: white;
  padding: 5px 15px;
  border-radius: 5px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.consult-btn:hover .consult-tooltip {
  opacity: 1;
}

.coins-animation {
  display: flex;
  gap: 25px;
  margin: 25px 0;
}

.coin {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: linear-gradient(145deg, #d4b483, #f5d9a5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  border: 2px solid var(--accent-dark);
  color: var(--dark);
  font-family: var(--font-calligraphy);
}

.hexagram-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: 220px;
  justify-content: center;
  width: 100%;
  margin: 25px 0;
  padding: 0 20px;
}

.line {
  width: 270px;
  height: 14px;
  background: var(--dark);
  margin: 10px 0;
  border-radius: 2px;
  transition: all 0.3s ease;
  position: relative;
}

.broken {
  background: linear-gradient(
    to right,
    var(--dark) 45%,
    transparent 45%,
    transparent 55%,
    var(--dark) 55%
  );
}

.changing {
  background-color: var(--primary);
  box-shadow: 0 0 10px rgba(140, 28, 19, 0.5);
  animation: pulse 2s infinite;
}

/* Resultados */
.result-container {
  max-width: 850px;
  margin: 0 auto;
  background: white;
  padding: 35px;
  border-radius: 12px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(212, 180, 131, 0.25);
  position: relative;
  overflow: hidden;
}

.result-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(
    to right,
    var(--accent),
    var(--primary),
    var(--accent)
  );
}

.result-header {
  text-align: center;
  margin-bottom: 35px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--accent);
  position: relative;
}

.result-header::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--primary);
}

.hexagram-info {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 18px;
  font-family: var(--font-calligraphy);
  font-size: 1.35rem;
  color: var(--primary);
  letter-spacing: 1px;
}

.result-content h3 {
  text-align: center;
  color: var(--primary);
  margin-bottom: 28px;
  font-family: var(--font-title);
  font-size: 1.9rem;
}

.judgment,
.image {
  margin-bottom: 28px;
  padding: 20px;
  border-radius: 8px;
  background: var(--secondary);
  position: relative;
  overflow: hidden;
}

.judgment::before,
.image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.judgment h4,
.image h4 {
  font-family: var(--font-title);
  margin-bottom: 12px;
  color: var(--primary-dark);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Añadido: Estilos específicos para iconos de Font Awesome */
.judgment h4 i,
.image h4 i {
  color: var(--primary);
  font-size: 1.4rem;
}

.changing-lines {
  margin: 35px 0;
  padding: 25px;
  background: var(--secondary);
  border-radius: 10px;
  border: 1px dashed var(--accent-dark);
}

.changing-line {
  margin: 18px 0;
  padding-left: 20px;
  border-left: 3px solid var(--primary);
  font-family: var(--font-calligraphy);
  font-size: 1.05rem;
}

.interpretation-guide {
  font-style: italic;
  padding: 20px;
  background: #f8f5f0;
  border-radius: 10px;
  border: 1px dashed var(--accent);
  margin-top: 35px;
  position: relative;
}

.interpretation-guide::before {
  content: "ℹ️";
  position: absolute;
  top: -15px;
  left: 15px;
  background: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Botón de compartir */
.compartir-container {
  margin-top: 25px;
  display: flex;
  justify-content: center;
}

.compartir-btn {
  background: var(--accent);
  color: var(--dark);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 3px 8px rgba(140, 28, 19, 0.15);
}

.compartir-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(140, 28, 19, 0.25);
}

.compartir-btn:active {
  transform: translateY(0);
}

.compartir-btn i {
  font-size: 1.2rem;
}

/* Historial de consultas */
.historial-container {
  max-width: 850px;
  margin: 35px auto 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(212, 180, 131, 0.25);
  overflow: hidden;
}

.historial-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--secondary);
  background: var(--secondary);
}

.historial-header h3 {
  color: var(--primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
}

/* Añadido: Estilos específicos para iconos de Font Awesome */
.historial-header h3 i {
  color: var(--accent-dark);
  font-size: 1.3rem;
}

.historial-header p {
  color: var(--dark);
  margin: 0;
  font-size: 0.95rem;
}

.historial-list {
  padding: 15px 25px;
}

.historial-item {
  padding: 15px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.25s ease;
}

.historial-item:hover {
  background: var(--secondary);
  border-radius: 8px;
  padding: 15px 15px;
}

.historial-date {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 5px;
  font-size: 0.95rem;
}

.historial-question {
  font-style: italic;
  margin-bottom: 8px;
  color: var(--dark);
  line-height: 1.5;
}

.historial-hexagram {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.95rem;
}

/* Modal historial */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: white;
  margin: auto;
  padding: 30px;
  border-radius: 10px;
  width: 80%;
  max-width: 650px;
  position: relative;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: var(--dark);
  opacity: 0.7;
  transition: opacity 0.3s;
}

.close-modal:hover {
  opacity: 1;
}

.modal-historial-item {
  padding: 15px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.25s ease;
}

.modal-historial-item:hover {
  background: var(--secondary);
  border-radius: 8px;
  padding: 15px 15px;
}

/* === MODAL SIMPLIFICADO === */
.modal.show {
  opacity: 1;
}

.modal-content.simplified {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  animation: modalAppear 0.3s ease;
  border: 1px solid rgba(212, 180, 131, 0.3);
}

@keyframes modalAppear {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: var(--dark);
  opacity: 0.7;
  transition: all 0.2s;
  z-index: 10;
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--secondary);
}

.close-modal:hover {
  opacity: 1;
  background: var(--accent);
  color: white;
  transform: rotate(90deg);
}

.modal-header {
  padding: 20px 20px 15px;
  text-align: center;
}

.modal-header h2 {
  font-family: var(--font-title);
  font-size: 1.7rem;
  color: var(--primary);
  margin-bottom: 5px;
}

.modal-header p {
  font-size: 1.05rem;
  color: var(--accent-dark);
  font-family: var(--font-calligraphy);
  margin: 0;
}

.modal-body {
  padding: 15px 25px 20px;
  max-height: 60vh;
  overflow-y: auto;
}

/* Estilos para mejorar el scroll en móviles */
.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--secondary);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

.question-instructions {
  margin-bottom: 20px;
}

.question-instructions p {
  color: var(--dark);
  line-height: 1.5;
  font-size: 0.95rem;
  text-align: center;
}

.question-form {
  margin-bottom: 15px;
}

#oracleQuestion {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(212, 180, 131, 0.5);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  resize: none;
  min-height: 100px;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

#oracleQuestion:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(212, 180, 131, 0.2);
}

.question-controls {
  position: relative;
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.voice-btn {
  background: var(--secondary);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--dark);
  z-index: 2;
}

/* Añadido: Estilos específicos para iconos de Font Awesome */
.voice-btn i {
  font-size: 1.1rem;
  color: var(--dark);
}

.voice-btn:hover {
  background: var(--accent);
  color: white;
}

.voice-btn.listening {
  background: var(--primary);
  color: white;
}

.voice-status {
  margin-top: 8px;
  padding: 5px 10px;
  background: var(--secondary);
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--dark);
  justify-content: center;
  width: 100%;
}

.voice-status i {
  color: var(--primary);
}

.modal-footer {
  padding: 15px 25px 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.modal-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Añadido: Estilos específicos para iconos de Font Awesome */
.modal-btn i {
  font-size: 1.1rem;
}

.cancel {
  background: var(--secondary);
  color: var(--dark);
}

.cancel:hover {
  background: #d8c8b5;
}

.consult {
  background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
  color: white;
}

.consult:hover {
  background: linear-gradient(to bottom, #a32218, var(--primary-dark));
}

/* === MODAL VALORES DE MONEDAS === */
.modal-content.values-modal {
  max-width: 700px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  animation: modalAppear 0.3s ease;
  border: 1px solid rgba(212, 180, 131, 0.3);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.value-description {
  font-size: 0.9rem;
  color: var(--dark);
  margin-top: 8px;
  line-height: 1.5;
  text-align: center;
  font-style: italic;
  color: var(--accent-dark);
}

/* Estilos para el modal de compartir */
.share-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.share-modal.show {
  display: flex;
  opacity: 1;
}

.share-modal .modal-content {
  max-width: 900px;
  width: 90%;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: modalAppear 0.3s ease;
}

.share-modal-content h2 {
  color: var(--primary);
  margin-bottom: 15px;
  font-family: var(--font-title);
}

.share-instructions {
  background: var(--secondary);
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.share-container {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.share-card {
  flex: 1;
  min-width: 300px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(212, 180, 131, 0.3);
  position: relative;
  padding: 25px;
}

/* Estilos específicos para la tarjeta cuando se genera como imagen */
.share-card.screenshot {
  width: 1200px;
  height: 630px;
  padding: 60px;
  transform: scale(1);
  transform-origin: top left;
}

.share-card.screenshot .share-card-header {
  margin-bottom: 30px;
}

.share-card.screenshot .hexagram-visual {
  scale: 1.5;
  margin: 20px 0;
}

.share-card.screenshot .hexagram-info {
  scale: 1.3;
}

.share-card.screenshot .result-section {
  margin: 15px 0;
}

.share-card.screenshot .share-card-changing-lines {
  margin-top: 25px;
}

.share-card.screenshot .share-card-footer {
  position: absolute;
  bottom: 40px;
}

.share-card-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--accent);
}

.yin-yang-mini {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--dark) 50%, var(--light) 50%);
  position: relative;
  flex-shrink: 0;
}

.yin-yang-mini .yin {
  position: absolute;
  top: 50%;
  left: 0;
  width: 50%;
  height: 50%;
  border-radius: 50% 0 0 50%;
  background: var(--dark);
  transform: translateY(-50%);
}

.yin-yang-mini .yang {
  position: absolute;
  top: 50%;
  right: 0;
  width: 50%;
  height: 50%;
  border-radius: 0 50% 50% 0;
  background: var(--light);
  transform: translateY(-50%);
}

.share-card-header h3 {
  color: var(--primary);
  font-family: var(--font-title);
  font-size: 1.5rem;
  margin: 0;
}

.share-card-question {
  background: var(--secondary);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  border-left: 3px solid var(--primary);
}

.share-card-question h4 {
  color: var(--primary-dark);
  margin-bottom: 8px;
  font-family: var(--font-title);
}

.share-card-question p {
  font-style: italic;
  line-height: 1.5;
}

.share-card-hexagram {
  text-align: center;
  margin: 20px 0;
}

.hexagram-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}

.hexagram-line {
  width: 180px;
  height: 10px;
  background: var(--dark);
  border-radius: 2px;
}

.hexagram-line.broken {
  background: linear-gradient(
    to right,
    var(--dark) 45%,
    transparent 45%,
    transparent 55%,
    var(--dark) 55%
  );
}

.hexagram-info {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.hexagram-number {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: var(--primary);
  background: var(--secondary);
  padding: 5px 15px;
  border-radius: 30px;
}

.hexagram-name {
  font-family: var(--font-calligraphy);
  font-size: 1.6rem;
  color: var(--primary-dark);
}

.share-card-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 20px 0;
}

.result-section {
  padding: 15px;
  background: var(--secondary);
  border-radius: 8px;
}

.result-section h5 {
  color: var(--primary-dark);
  margin-bottom: 8px;
  font-family: var(--font-title);
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-card-changing-lines {
  background: rgba(212, 180, 131, 0.1);
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  border: 1px dashed var(--accent-dark);
}

.share-card-changing-lines h5 {
  color: var(--primary);
  margin-bottom: 12px;
  font-family: var(--font-title);
  text-align: center;
}

.changing-line-item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

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

.share-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  margin-top: 15px;
  border-top: 1px solid var(--accent);
}

.share-date {
  color: var(--accent-dark);
  font-style: italic;
}

.share-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 600;
}

.logo-mini {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--dark) 50%, var(--light) 50%);
  position: relative;
  border: 1px solid var(--accent);
}

/* Estilos para los botones de compartir */
.share-options {
  width: 300px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.share-platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.share-btn {
  padding: 12px;
  border-radius: 8px;
  border: none;
  color: white;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.share-btn i {
  font-size: 1.1rem;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.whatsapp {
  background: #25d366;
}

.twitter {
  background: #000000;
}

.facebook {
  background: #1877f2;
}

.telegram {
  background: #0088cc;
}

.download {
  background: var(--primary);
  grid-column: 1 / -1;
}

.share-warning {
  background: var(--secondary);
  padding: 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Utilidades */
.hidden {
  display: none;
}

.error-message {
  text-align: center;
  padding: 25px;
  background: #fff5f5;
  color: #d32f2f;
  border-radius: 8px;
  border: 1px solid #ffcdd2;
  margin: 20px 0;
}

.error-message-share {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #d32f2f;
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  animation: fadeInOut 3s forwards;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  20% {
    opacity: 1;
    transform: translateY(0);
  }
  80% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Animaciones */
@keyframes flip {
  0% {
    transform: rotateY(0) scale(1);
  }
  50% {
    transform: rotateY(180deg) scale(1.1);
  }
  100% {
    transform: rotateY(360deg) scale(1);
  }
}

.flip {
  animation: flip 1.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.03);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Corrección para imágenes faltantes */
img {
  object-fit: cover;
  transition: all 0.3s ease;
}

/* Estilo para imágenes que fallan al cargar */
img[src*="default.jpg"] {
  background-color: var(--secondary);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  font-family: var(--font-calligraphy);
  font-size: 1.2rem;
}

img[src*="default.jpg"]::before {
  content: "Imagen no disponible";
}

/* === BIBLIOTECA DE HEXAGRAMAS === */
.hexagram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 35px;
}

.hexagram-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(212, 180, 131, 0.25);
  transition: all 0.35s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.hexagram-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--accent), var(--primary));
  transform: scaleX(0);
  transition: transform 0.35s ease;
}

.hexagram-card:hover::before {
  transform: scaleX(1);
}

.hexagram-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
}

.card-hexagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 15px 0;
}

.card-line {
  width: 180px;
  height: 10px;
  background: var(--dark);
  border-radius: 2px;
  margin: 4px 0;
  transition: all 0.3s ease;
}

.card-broken {
  background: linear-gradient(
    to right,
    var(--dark) 45%,
    transparent 45%,
    transparent 55%,
    var(--dark) 55%
  );
}

.hexagram-card:hover .card-line {
  background: var(--primary);
}

.hexagram-card:hover .card-broken {
  background: linear-gradient(
    to right,
    var(--primary) 45%,
    transparent 45%,
    transparent 55%,
    var(--primary) 55%
  );
}

.card-number {
  font-family: var(--font-title);
  font-size: 1.35rem;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 700;
}

.card-name {
  font-family: var(--font-calligraphy);
  font-size: 1.25rem;
  color: var(--primary-dark);
  margin-bottom: 12px;
  text-align: center;
}

.card-judgment {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--dark);
  text-align: center;
  margin-bottom: 18px;
  font-style: italic;
}

.view-details-btn {
  display: inline-block;
  background: linear-gradient(to bottom, var(--accent), var(--accent-dark));
  color: var(--dark);
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  text-align: center;
}

.view-details-btn:hover {
  background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(140, 28, 19, 0.3);
}

.library-footer {
  margin-top: 45px;
  text-align: center;
  padding: 30px;
  background: var(--secondary);
  border-radius: 12px;
  border: 1px solid rgba(212, 180, 131, 0.3);
}

.library-footer p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: var(--dark);
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
  color: white;
  padding: 14px 32px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.35s ease;
  box-shadow: 0 5px 15px rgba(140, 28, 19, 0.25);
}

.view-all-btn i {
  font-size: 1.2rem;
}

.view-all-btn:hover {
  background: linear-gradient(to bottom, #a32218, var(--primary-dark));
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(140, 28, 19, 0.35);
}

.library-intro {
  max-width: 850px;
  margin: 0 auto 35px;
  font-size: 1.1rem;
  line-height: 1.7;
}

.library-intro p {
  margin-bottom: 18px;
  text-align: justify;
}

/* === HISTORIA === */
.history-timeline {
  position: relative;
  max-width: 850px;
  margin: 0 auto;
  padding: 25px 0;
}

.history-timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--primary), var(--accent));
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  width: 45%;
  padding: 25px;
  margin-bottom: 45px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(212, 180, 131, 0.25);
  transition: all 0.35s ease;
}

.timeline-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even) {
  left: 55%;
}

.timeline-item::after {
  content: "";
  position: absolute;
  top: 30px;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border: 4px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--accent);
}

.timeline-item:nth-child(odd)::after {
  right: -60px;
}

.timeline-item:nth-child(even)::after {
  left: -60px;
}

.timeline-content h4 {
  color: var(--primary);
  font-family: var(--font-title);
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.timeline-content p {
  line-height: 1.7;
  color: var(--dark);
  font-size: 1.05rem;
}

/* === FILOSOFÍA === */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 35px;
  max-width: 1000px;
  margin: 0 auto;
}

.philosophy-card {
  background: white;
  padding: 35px 28px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(212, 180, 131, 0.25);
  text-align: center;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.philosophy-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--accent), var(--primary));
  transform: scaleX(0);
  transition: transform 0.35s ease;
}

.philosophy-card:hover::before {
  transform: scaleX(1);
}

.philosophy-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
}

.philosophy-card i {
  font-size: 3.5rem;
  color: var(--primary);
  margin-bottom: 20px;
  display: block;
  transition: all 0.35s ease;
}

.philosophy-card:hover i {
  transform: scale(1.1) rotate(5deg);
  color: var(--accent-dark);
}

.philosophy-card h3 {
  color: var(--primary);
  font-family: var(--font-title);
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.philosophy-card p {
  line-height: 1.7;
  color: var(--dark);
  font-size: 1.05rem;
}

/* === RECURSOS === */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 35px;
  max-width: 1100px;
  margin: 0 auto;
}

.resource-card {
  background: white;
  padding: 32px 28px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(212, 180, 131, 0.25);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.resource-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--accent), var(--primary));
  transform: scaleX(0);
  transition: transform 0.35s ease;
}

.resource-card:hover::before {
  transform: scaleX(1);
}

.resource-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
}

.resource-card h3 {
  color: var(--primary);
  font-family: var(--font-title);
  font-size: 1.4rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.resource-card h3 i {
  color: var(--accent-dark);
  font-size: 1.5rem;
}

.resource-card ul {
  list-style: none;
  padding: 0;
}

.resource-card li {
  padding: 12px 0;
  border-bottom: 1px dashed rgba(212, 180, 131, 0.3);
  color: var(--dark);
  font-size: 1.05rem;
  line-height: 1.6;
  position: relative;
  padding-left: 25px;
  transition: all 0.25s ease;
}

.resource-card li:last-child {
  border-bottom: none;
}

.resource-card li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
  transition: all 0.25s ease;
}

.resource-card li:hover {
  padding-left: 30px;
  color: var(--primary);
}

.resource-card li:hover::before {
  left: 5px;
}

/* === FOOTER === */
footer {
  background: var(--dark);
  color: var(--light);
  padding: 55px 45px 25px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--accent),
    var(--primary),
    var(--accent)
  );
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 45px;
  max-width: 1200px;
  margin: 0 auto 35px;
}

.footer-section h3 {
  color: var(--accent);
  font-family: var(--font-title);
  font-size: 1.4rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 12px;
}

.footer-section h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--primary);
}

.footer-section p {
  line-height: 1.7;
  color: var(--secondary);
  font-size: 1.05rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section li {
  margin-bottom: 12px;
}

.footer-section a {
  color: var(--secondary);
  text-decoration: none;
  font-size: 1.05rem;
  transition: all 0.25s ease;
  display: inline-block;
  position: relative;
  padding-left: 18px;
}

.footer-section a::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  transition: all 0.25s ease;
}

.footer-section a:hover {
  color: var(--accent);
  padding-left: 23px;
}

.footer-section a:hover::before {
  left: 5px;
}

.copyright {
  text-align: center;
  padding-top: 25px;
  margin-top: 35px;
  border-top: 1px solid rgba(212, 180, 131, 0.2);
}

.copyright p {
  color: var(--accent);
  font-size: 0.95rem;
  margin: 0;
}

/* Responsive */
@media (max-width: 992px) {
  .container {
    max-width: 95%;
  }

  section {
    padding: 60px 30px 45px;
  }

  .section-header h2 {
    font-size: 2.1rem;
  }
}

@media (max-width: 768px) {
  :root {
    --font-title: "Noto Serif SC", serif;
    --font-body: "Noto Sans SC", sans-serif;
  }

  header {
    padding: 40px 15px 30px;
  }

  h1 {
    font-size: 2.4rem;
  }

  .section-header {
    margin-bottom: 35px;
  }

  .section-header h2 {
    font-size: 1.9rem;
  }

  .history-timeline::before {
    left: 30px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
    left: 0 !important;
  }

  .timeline-item:nth-child(odd)::after,
  .timeline-item:nth-child(even)::after {
    left: 20px;
  }

  .consultation-box {
    padding: 35px 25px;
  }

  .consult-btn {
    width: 100%;
    font-size: 1.15rem;
  }

  .hexagram-display {
    min-height: 180px;
  }

  .line {
    width: 220px;
  }

  .card-line {
    width: 170px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  /* Corrección para el modal en móviles */
  .modal-content.simplified {
    max-width: 95%;
    height: auto;
  }

  .modal-body {
    max-height: 65vh;
  }

  .close-modal {
    top: 15px;
    right: 15px;
    font-size: 24px;
  }

  .modal-header {
    padding: 25px 20px 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-footer {
    padding: 15px 20px 25px;
    flex-direction: column;
  }

  .modal-btn {
    width: 100%;
  }

  /* Ajustes para el modal de valores */
  .modal-content.values-modal {
    max-width: 95%;
  }

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

  /* Ajustes para el modal de compartir */
  .share-container {
    flex-direction: column;
  }

  .share-options {
    width: 100%;
    min-width: auto;
  }

  .share-platforms {
    grid-template-columns: 1fr;
  }

  .share-card.screenshot {
    width: 100%;
    height: auto;
    padding: 30px 20px;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 2rem;
  }

  header p {
    font-size: 1.1rem;
  }

  .section-header h2 {
    font-size: 1.7rem;
  }

  .section-header p {
    font-size: 1.05rem;
  }

  section {
    padding: 50px 20px 35px;
  }

  .consultation-container {
    gap: 30px;
  }

  .instructions {
    padding: 22px 15px;
  }

  .consultation-box {
    padding: 30px 20px;
    gap: 25px;
  }

  .hexagram-display {
    min-height: 160px;
  }

  .line {
    width: 190px;
    height: 12px;
    margin: 8px 0;
  }

  .coins-animation {
    gap: 15px;
  }

  .coin {
    width: 45px;
    height: 45px;
    font-size: 22px;
  }

  .result-container {
    padding: 28px 20px;
  }

  .hexagram-info {
    flex-direction: column;
    gap: 8px;
    font-size: 1.15rem;
  }

  .card-hexagram {
    margin-bottom: 18px;
  }

  .card-line {
    width: 150px;
    height: 9px;
    margin: 5px 0;
  }

  .card-number {
    font-size: 1.2rem;
  }

  .card-name {
    font-size: 1.1rem;
  }
}

/* Estilos para cuando la PWA está instalada */
.pwa-installed {
  padding-top: env(safe-area-inset-top, 20px);
  padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* Animaciones de carga para PWA */
.app-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #8c1c13;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.app-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.yin-yang-loader {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(90deg, #2c1e16 50%, #f5f2e9 50%);
  position: relative;
  animation: rotate 3s linear infinite;
}

.yin-yang-loader::before,
.yin-yang-loader::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  border: 10px solid;
}

.yin-yang-loader::before {
  background: #2c1e16;
  border-color: #f5f2e9;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.yin-yang-loader::after {
  background: #f5f2e9;
  border-color: #2c1e16;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Corrección para imágenes faltantes en móviles */
@media (max-width: 768px) {
  img[src*="default.jpg"] {
    font-size: 1rem;
  }

  img[src*="default.jpg"]::before {
    content: "Img no disp.";
  }
}
/* ========== SKELETON SCREENS - PWA UX ========== */
.skeleton {
  background: linear-gradient(90deg, #e0e0e0, #f0f0f0, #e0e0e0);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  min-height: 1em;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 0.8em;
  margin: 8px 0;
  max-width: 100%;
}

.skeleton-title {
  height: 1.2em;
  margin: 12px 0;
  max-width: 80%;
}

.skeleton-image {
  width: 100%;
  min-height: 250px;
  border-radius: 8px;
  margin: 15px 0;
}

.skeleton-card {
  background: rgba(224, 224, 224, 0.3);
  padding: 15px;
  border-radius: 8px;
  margin: 10px 0;
}

.skeleton-card .skeleton-title {
  margin-bottom: 10px;
}

.skeleton-card .skeleton-text {
  margin: 5px 0;
}

/* Loading state utilities */
.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(140, 28, 19, 0.2);
  border-radius: 50%;
  border-top-color: #8c1c13;
  animation: spin 1s linear infinite;
}

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

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Fade animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

/* Pulse animation para elementos importantes */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Skeleton for blog */
.blog-post-skeleton {
  padding: 20px;
}

.blog-post-skeleton .skeleton-title {
  max-width: 100%;
  margin-bottom: 20px;
}

.blog-post-skeleton .skeleton-image {
  margin-bottom: 20px;
}

.blog-post-skeleton .skeleton-text {
  margin: 12px 0;
}