/* ── Mayte Sueños IA — Intérprete ── */
.mdi-wrap {
  max-width: 720px;
  margin: 0 auto 3rem;
  font-family: 'Inter', sans-serif;
}

/* ── Tarjeta principal ── */
.mdi-card {
  position: relative;
  background: linear-gradient(145deg, #0a0a1e 0%, #12082a 50%, #0d0d1a 100%);
  border: 1px solid #2a1a4a;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(123, 47, 190, 0.15), 0 0 120px rgba(201, 168, 76, 0.05);
}

/* ── Estrellas decorativas ── */
.mdi-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.mdi-stars span {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #C9A84C;
  border-radius: 50%;
  animation: mdi-twinkle 3s infinite;
  opacity: 0;
}
.mdi-stars span:nth-child(1)  { top:8%;  left:12%; animation-delay:0s;    width:3px; height:3px; }
.mdi-stars span:nth-child(2)  { top:15%; left:80%; animation-delay:0.7s; }
.mdi-stars span:nth-child(3)  { top:5%;  left:50%; animation-delay:1.4s;  width:3px; height:3px; }
.mdi-stars span:nth-child(4)  { top:90%; left:20%; animation-delay:0.3s; }
.mdi-stars span:nth-child(5)  { top:85%; left:75%; animation-delay:1.1s;  width:3px; height:3px; }
.mdi-stars span:nth-child(6)  { top:30%; left:5%;  animation-delay:2.0s; }
.mdi-stars span:nth-child(7)  { top:70%; left:92%; animation-delay:0.5s; }
.mdi-stars span:nth-child(8)  { top:50%; left:3%;  animation-delay:1.8s;  width:3px; height:3px; }
.mdi-stars span:nth-child(9)  { top:20%; left:95%; animation-delay:0.9s; }
.mdi-stars span:nth-child(10) { top:60%; left:50%; animation-delay:2.3s; }

@keyframes mdi-twinkle {
  0%, 100% { opacity: 0; transform: scale(1); }
  50%       { opacity: 1; transform: scale(1.5); }
}

/* ── Header ── */
.mdi-header { text-align: center; margin-bottom: 2rem; position: relative; z-index: 1; }
.mdi-moon-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.8rem;
  filter: drop-shadow(0 0 12px rgba(201, 168, 76, 0.6));
  animation: mdi-float 4s ease-in-out infinite;
}
@keyframes mdi-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.mdi-title {
  font-family: 'Cinzel', serif !important;
  color: #C9A84C !important;
  font-size: 1.6rem !important;
  margin: 0 0 0.7rem !important;
  text-shadow: 0 0 20px rgba(201, 168, 76, 0.3);
}
.mdi-subtitle {
  color: #b0a8c0;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  max-width: 520px;
  margin-inline: auto;
}

/* ── Formulario ── */
.mdi-form { position: relative; z-index: 1; }
.mdi-field { margin-bottom: 1rem; position: relative; }

.mdi-field textarea,
.mdi-field input[type="text"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #3a2a5a;
  border-radius: 12px;
  color: #F0EDE6;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  padding: 1rem 1.1rem;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
  line-height: 1.6;
}
.mdi-field textarea::placeholder,
.mdi-field input::placeholder { color: #6a5a8a; }
.mdi-field textarea:focus,
.mdi-field input:focus {
  outline: none;
  border-color: #7B2FBE;
  box-shadow: 0 0 0 3px rgba(123, 47, 190, 0.2), 0 0 20px rgba(123, 47, 190, 0.1);
}
.mdi-char-count {
  text-align: right;
  font-size: 0.75rem;
  color: #5a4a7a;
  margin-top: 0.3rem;
}
.mdi-field-name input { height: 48px; }

.mdi-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  background: linear-gradient(135deg, #7B2FBE, #C9A84C);
  border: none;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 1rem 2rem;
  transition: opacity 0.3s, transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 4px 20px rgba(123, 47, 190, 0.4);
  margin-top: 0.5rem;
}
.mdi-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(123, 47, 190, 0.5);
}
.mdi-btn:active { transform: translateY(0); }
.mdi-btn-moon { font-size: 1.2rem; }
.mdi-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.mdi-disclaimer {
  text-align: center;
  color: #5a4a7a;
  font-size: 0.75rem;
  margin: 0.8rem 0 0;
}

/* ── Loading ── */
.mdi-loading {
  text-align: center;
  padding: 2.5rem 1rem;
  position: relative;
  z-index: 1;
}
.mdi-loading-moons {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
}
.mdi-loading-moons span {
  display: inline-block;
  animation: mdi-phase 1.5s steps(1, end) infinite;
  opacity: 0;
}
.mdi-loading-moons span:nth-child(1) { animation-delay: 0s; }
.mdi-loading-moons span:nth-child(2) { animation-delay: 0.3s; }
.mdi-loading-moons span:nth-child(3) { animation-delay: 0.6s; }
.mdi-loading-moons span:nth-child(4) { animation-delay: 0.9s; }
.mdi-loading-moons span:nth-child(5) { animation-delay: 1.2s; }

@keyframes mdi-phase {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  30%  { opacity: 0; }
  100% { opacity: 0; }
}

.mdi-loading-text {
  color: #b0a8c0;
  font-size: 0.95rem;
  font-style: italic;
}
.mdi-dots::after {
  content: '';
  animation: mdi-dot-anim 1.5s steps(4, end) infinite;
}
@keyframes mdi-dot-anim {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
}

/* ── Resultado ── */
.mdi-result {
  position: relative;
  margin-top: 1.5rem;
  border-radius: 20px;
  overflow: hidden;
}
.mdi-result-glow {
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #7B2FBE, #C9A84C, #7B2FBE);
  border-radius: 22px;
  z-index: 0;
  animation: mdi-glow-spin 4s linear infinite;
  background-size: 200% 200%;
}
@keyframes mdi-glow-spin {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.mdi-result-inner {
  position: relative;
  z-index: 1;
  background: linear-gradient(145deg, #0e0e22, #160a2e);
  border-radius: 19px;
  padding: 2rem;
  margin: 2px;
}
.mdi-result-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid #2a1a4a;
}
.mdi-crystal {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 10px rgba(201, 168, 76, 0.5));
  flex-shrink: 0;
}
.mdi-result-title {
  font-family: 'Cinzel', serif !important;
  color: #C9A84C !important;
  font-size: 1.1rem !important;
  margin: 0 0 0.2rem !important;
}
.mdi-result-sub {
  color: #8a7aaa;
  font-size: 0.82rem;
  margin: 0;
  font-style: italic;
}
.mdi-result-text {
  color: #F0EDE6;
  line-height: 1.85;
  font-size: 0.97rem;
  white-space: pre-wrap;
}
.mdi-result-text p { margin: 0 0 1rem; }
.mdi-result-text p:last-child { margin-bottom: 0; }

.mdi-result-footer {
  margin-top: 1.8rem;
  text-align: center;
}
.mdi-reset-btn {
  background: transparent;
  border: 1px solid #3a2a5a;
  border-radius: 8px;
  color: #9a8ab0;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.6rem 1.4rem;
  transition: all 0.2s;
}
.mdi-reset-btn:hover {
  border-color: #C9A84C;
  color: #C9A84C;
}

/* ── Utilidades ── */
.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .mdi-card { padding: 1.8rem 1.2rem; }
  .mdi-title { font-size: 1.3rem !important; }
  .mdi-result-inner { padding: 1.4rem; }
}
