/* ============================================================
   TOCAYJUEGA — Live Page Styles
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  width: 100vw; height: 100vh; overflow: hidden;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
}

#live-wrap {
  position: fixed;
  width: 480px; height: 854px;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  background: #07071a;
  overflow: hidden;
}

/* ============================================================
   HOROSCOPE BACKGROUND
   ============================================================ */

#horo-stage { position: absolute; inset: 0; z-index: 1; }

/* Sign cover */
#sign-cover {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; text-align: center; padding: 32px;
  opacity: 0; pointer-events: none;
  transform: scale(.95) translateY(14px);
  transition: opacity .45s ease, transform .45s ease;
}
#sign-cover.visible { opacity: 1; transform: scale(1) translateY(0); }

.cover-pre  { font-family: 'Orbitron', sans-serif; font-size: .75rem; letter-spacing: 6px; color: rgba(255,255,255,.5); }
.cover-emoji{ font-size: 8rem; line-height: 1; animation: floatSign 2.6s ease-in-out infinite; }
.cover-name { font-family: 'Orbitron', sans-serif; font-size: 3.4rem; font-weight: 900; letter-spacing: 4px; line-height: 1; }
.cover-sub  { font-family: 'Rajdhani', sans-serif; font-size: 1.05rem; letter-spacing: 2px; color: rgba(255,255,255,.5); margin-top: 4px; }

/* Reel stage */
.reel-stage {
  position: absolute; inset: 0;
  padding: 28px 24px 22px;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(124,58,237,.42), transparent 38%),
    radial-gradient(circle at 20% 78%, rgba(34,211,238,.16), transparent 32%),
    #07071a;
}
.reel-stage::after {
  content: '';
  position: absolute; inset: -10%;
  background:
    radial-gradient(circle at 16% 22%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 82% 18%, #67e8f9 0 1px, transparent 2px),
    radial-gradient(circle at 70% 72%, #f0abfc 0 1px, transparent 2px),
    linear-gradient(115deg, transparent 0 46%, rgba(103,232,249,.08) 47%, transparent 48%);
  opacity: .48;
  animation: starsMove 12s ease-in-out infinite alternate;
  pointer-events: none;
}
.reel-stage > * { position: relative; z-index: 1; }

.brand-row {
  width: 100%;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 10px;
  color: #d8b4fe;
  font-family: 'Orbitron', sans-serif; font-size: .84rem; letter-spacing: 3px;
  text-shadow: 0 0 18px rgba(168,85,247,.75);
}
.brand-row span { height: 1px; background: linear-gradient(90deg, transparent, #67e8f9); }
.brand-row span:last-child { background: linear-gradient(90deg, #f0abfc, transparent); }

.date-line {
  margin-top: 14px;
  font-family: 'Orbitron', sans-serif; font-size: .64rem; letter-spacing: 2px;
  color: #67e8f9; text-shadow: 0 0 12px rgba(103,232,249,.65);
}

.sign-shell {
  width: 100%; margin-top: 24px;
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}
.sign-shell.enter { animation: slideEnter .72s cubic-bezier(.2,.8,.15,1) both; }

.sign-orbit {
  position: absolute; width: 190px; height: 190px;
  border-radius: 50%;
  border: 1px solid rgba(103,232,249,.28);
  box-shadow: 0 0 34px rgba(168,85,247,.32), inset 0 0 28px rgba(103,232,249,.12);
  animation: orbitPulse 2.8s ease-in-out infinite;
}
.sign-emoji {
  width: 118px; height: 118px; margin-top: 34px;
  display: flex; align-items: center; justify-content: center;
  font-size: 4.8rem; border-radius: 50%;
  background: linear-gradient(145deg, rgba(124,58,237,.9), rgba(14,14,42,.92));
  border: 3px solid rgba(196,181,253,.8);
  box-shadow: 0 0 32px rgba(124,58,237,.62);
  animation: floatSign 2.6s ease-in-out infinite;
}

h1#sign-name {
  margin-top: 18px;
  font-family: 'Orbitron', sans-serif; font-size: 2.65rem;
  line-height: 1; letter-spacing: 1px;
  text-shadow: 0 0 28px currentColor;
}
#sign-title {
  width: 100%; max-width: 410px; margin-top: 10px;
  color: #ddd6fe; font-size: 1.02rem; line-height: 1.35; font-style: italic;
}

.axis-list { width: 100%; margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.axis-card {
  background: linear-gradient(145deg, rgba(14,14,42,.96), rgba(22,13,53,.96));
  border: 1px solid rgba(124,58,237,.5);
  border-radius: 8px; padding: 12px 14px; text-align: left;
  box-shadow: 0 0 18px rgba(0,0,0,.22);
  animation: cardIn .7s ease both;
}
.axis-card:nth-child(2) { animation-delay: .08s; }
.axis-card:nth-child(3) { animation-delay: .16s; }
.axis-head { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 8px; margin-bottom: 7px; }
.axis-head span  { font-size: 1.35rem; }
.axis-head strong{ font-family: 'Orbitron', sans-serif; font-size: .72rem; letter-spacing: 2px; color: #c4b5fd; text-align: center; }
.axis-head em {
  font-family: 'Orbitron', sans-serif; font-size: .68rem;
  font-style: normal; font-weight: 900; letter-spacing: 1px;
  padding: 3px 11px; border-radius: 999px;
  border: 1px solid #ffaa00; color: #ffaa00; box-shadow: 0 0 10px #ffaa0044;
}
.axis-card p {
  font-size: .96rem; line-height: 1.42; color: #f3e8ff; text-align: center;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.estado-bien .axis-head em { color: #00ff66; border-color: #00ff66; box-shadow: 0 0 10px #00ff6644; }
.estado-mal  .axis-head em { color: #ff0055; border-color: #ff0055; box-shadow: 0 0 10px #ff005544; }

/* ============================================================
   TIKTOK LIVE OVERLAY
   ============================================================ */

/* Topbar */
#live-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 44px;
  background: linear-gradient(to bottom, rgba(0,0,0,.78) 0%, transparent 100%);
  pointer-events: none;
}
.host-pill {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,.42); border-radius: 999px;
  padding: 5px 12px 5px 5px; pointer-events: auto;
}
.host-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #ff2d55, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; border: 2px solid #ff2d55; flex-shrink: 0;
}
.host-name { font-family: 'Orbitron', sans-serif; font-size: .7rem; font-weight: 700; letter-spacing: 1px; display: block; }
.host-sub  { font-size: .65rem; color: rgba(255,255,255,.55); display: block; }

.live-badge {
  background: #ff2d55; color: #fff;
  font-family: 'Orbitron', sans-serif; font-size: .6rem; font-weight: 700; letter-spacing: 1px;
  padding: 4px 9px; border-radius: 6px;
  animation: livePulse 1.5s ease-in-out infinite; flex-shrink: 0;
}
.viewer-pill {
  display: flex; align-items: center; gap: 5px;
  background: rgba(0,0,0,.5); border-radius: 999px;
  padding: 6px 14px;
  font-family: 'Orbitron', sans-serif; font-size: .74rem; font-weight: 700;
  pointer-events: auto;
}

/* Botón jugar desde live */
#play-game-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: rgba(0,0,0,.5); border-radius: 50%;
  font-size: 1.1rem; text-decoration: none;
  border: 1px solid rgba(255,255,255,.15);
  transition: background .15s, transform .15s;
  pointer-events: auto;
}
#play-game-btn:hover { background: rgba(255,45,85,.5); transform: scale(1.12); }

/* Chat */
#chat-area {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 20;
  padding: 0 12px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.25) 62%, transparent 100%);
}
#chat-messages {
  height: 200px; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 5px;
  padding-bottom: 8px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 28%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 28%);
}
#chat-messages::-webkit-scrollbar { display: none; }

.chat-msg {
  font-size: .84rem; line-height: 1.3;
  padding: 4px 10px; border-radius: 12px;
  background: rgba(0,0,0,.38);
  max-width: 90%; width: fit-content; word-break: break-word;
  animation: msgIn .3s ease;
}
.chat-username { font-weight: 700; margin-right: 4px; }
.chat-text     { color: rgba(255,255,255,.9); }

#chat-footer   { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
#chat-input-wrap {
  flex: 1; display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: 22px; padding: 8px 8px 8px 14px;
}
#chat-input {
  flex: 1; background: none; border: none; outline: none;
  color: #fff; font-family: 'Rajdhani', sans-serif; font-size: .9rem;
}
#chat-input::placeholder { color: rgba(255,255,255,.4); }
#send-btn {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: #ff2d55; color: #fff; font-size: 1rem;
  cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

#action-btns { display: flex; gap: 8px; flex-shrink: 0; }
.act-btn {
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.15); font-size: 1.5rem;
  cursor: pointer; transition: transform .12s;
  display: flex; align-items: center; justify-content: center;
}
.tap-btn { background: rgba(255,45,85,.25); border: 1px solid rgba(255,45,85,.5); }
.tap-btn.tapped  { transform: scale(1.38) !important; }
.act-btn:active  { transform: scale(.88); }

/* Floating hearts */
#floaters {
  position: absolute; bottom: 90px; right: 16px;
  width: 60px; height: 300px; z-index: 25; pointer-events: none;
}
.floater {
  position: absolute; bottom: 0; right: 0;
  font-size: 1.8rem; pointer-events: none;
  animation: floatUp 2.2s ease-out forwards;
}

/* Username modal */
#username-modal {
  position: absolute; inset: 0; z-index: 50;
  background: rgba(0,0,0,.9);
  display: flex; align-items: center; justify-content: center;
}
#username-modal.hidden { display: none; }
.modal-box {
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border: 1px solid rgba(255,45,85,.5); border-radius: 24px;
  padding: 36px 28px; width: 82%; max-width: 300px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  box-shadow: 0 0 60px rgba(255,45,85,.2);
}
.modal-emoji { font-size: 3.5rem; animation: floatSign 2.6s ease-in-out infinite; }
.modal-title { font-family: 'Orbitron', sans-serif; font-size: 1rem; color: #ff2d55; text-align: center; letter-spacing: 2px; }
.modal-sub   { font-size: .88rem; color: rgba(255,255,255,.5); text-align: center; }
#username-input {
  width: 100%; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25); border-radius: 12px;
  padding: 12px 16px; color: #fff; font-size: 1rem;
  font-family: 'Rajdhani', sans-serif; outline: none; text-align: center;
}
#username-input:focus { border-color: #ff2d55; }
#username-confirm {
  width: 100%; background: linear-gradient(90deg, #ff2d55, #c92042);
  color: #fff; border: none; border-radius: 12px; padding: 13px;
  font-family: 'Orbitron', sans-serif; font-size: .78rem; letter-spacing: 2px;
  cursor: pointer; box-shadow: 0 0 24px rgba(255,45,85,.4);
  transition: opacity .2s;
}
#username-confirm:disabled {
  opacity: .35; cursor: not-allowed; box-shadow: none;
}

/* Checkbox de reglas */
.modal-check-wrap {
  display: flex; align-items: center; gap: 10px;
  width: 100%; cursor: pointer;
}
.modal-check-wrap input[type="checkbox"] {
  width: 20px; height: 20px; flex-shrink: 0;
  accent-color: #ff2d55; cursor: pointer;
  border-radius: 4px;
}
.modal-check-label {
  font-size: .82rem; color: rgba(255,255,255,.65); line-height: 1.35;
}
.modal-check-label a { color: #ff2d55; text-decoration: none; }
.modal-check-label a:hover { text-decoration: underline; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes floatSign   { 0%,100%{ transform:translateY(0); }       50%{ transform:translateY(-8px); } }
@keyframes starsMove   { from{ transform:translate(-8px,-8px); }   to{ transform:translate(10px,12px); } }
@keyframes orbitPulse  { 0%,100%{ transform:scale(.95); opacity:.55; } 50%{ transform:scale(1.08); opacity:.95; } }
@keyframes slideEnter  { from{ opacity:0; transform:translateX(80px) scale(.92); filter:blur(8px); } to{ opacity:1; transform:translateX(0) scale(1); filter:blur(0); } }
@keyframes cardIn      { from{ opacity:0; transform:translateY(18px); } to{ opacity:1; transform:translateY(0); } }
@keyframes livePulse   { 0%,100%{ opacity:1; } 50%{ opacity:.65; } }
@keyframes msgIn       { from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:translateY(0); } }
@keyframes floatUp {
  0%   { opacity:1;  transform:translateY(0)     scale(1)   rotate(0deg);  }
  40%  { opacity:.9; transform:translateY(-75px)  scale(1.15) rotate(-8deg); }
  70%  { opacity:.5; transform:translateY(-140px) scale(.9)  rotate(12deg); }
  100% { opacity:0;  transform:translateY(-210px) scale(.4)  rotate(-4deg); }
}

/* Mobile / responsive — el escalado real lo hace JS (applyScale) */
@media (max-width: 520px) {
  .reel-stage { padding-left: 18px; padding-right: 18px; }
}
