/* ===== SHARED STYLES FOR INNER PAGES ===== */

/* FONDO GLOBAL CON IMAGEN */
body {
  background: url("assets/fondo-login.png") no-repeat center center fixed;
  background-size: cover;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.7);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  z-index: -1;
}

/* ===== TEXTO DORADO BRILLANTE ===== */
.page-title,
.section-title,
.featured-subtitle,
.logo,
.profile-badge,
.stat-number,
.story-card strong,
.poll-pct {
  color: #f5b942;
  text-shadow:
    0 0 8px rgba(255,215,0,0.6),
    0 0 20px rgba(255,185,56,0.4);
}

/* Page title */
.page-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-subtitle {
  color: rgba(255,255,255,0.6);
  font-size: 15px;
  margin-bottom: 32px;
  max-width: 600px;
  line-height: 1.5;
}

.section-title {
  font-size: 18px;
  margin: 30px 0 16px;
}

/* ===== CTA BOTONES UNIFICADOS ===== */
.write-btn,
.vote-btn,
.featured button,
.poll-option:not(.voted) {
  transition: all 0.3s ease;
}

.write-btn:hover,
.featured button:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 15px 40px rgba(255,185,56,0.6),
    0 0 30px rgba(255,215,0,0.6);
}

/* ===== ESCRIBIR ===== */
.write-box {
  background: rgba(15, 12, 10, 0.85);
  border-radius: 14px;
  padding: 28px;
  border: 1px solid rgba(245,185,66,0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.write-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: white;
  font-size: 18px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  outline: none;
  margin-bottom: 16px;
}

.write-input:focus { border-color: #f5b942; box-shadow: 0 0 15px rgba(255,215,0,0.2); }

.write-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 260px;
  padding: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: white;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  outline: none;
  resize: vertical;
  line-height: 1.7;
  margin-bottom: 16px;
}

.write-textarea:focus { border-color: #f5b942; box-shadow: 0 0 15px rgba(255,215,0,0.2); }

.write-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.char-count {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

.write-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(120deg, #f5d487, #e0b45c, #a6782c);
  background-size: 200% 200%;
  animation: goldShine 3s linear infinite;
  color: black;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  font-size: 14px;
}

.publish-message {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
}

/* Mis relatos */
.my-stories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.story-card {
  background: rgba(15, 12, 10, 0.85);
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(245,185,66,0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.story-card p {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  margin: 0;
}

.story-date {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* ===== VOTAR ===== */
.poll-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
}

.poll-option {
  position: relative;
  background: rgba(15, 12, 10, 0.85);
  border-radius: 12px;
  padding: 18px 20px;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid rgba(245,185,66,0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: 0.3s;
}

.poll-option:not(.voted):hover {
  border-color: #f5b942;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245,185,66,0.3);
}

.poll-option.voted { cursor: default; }

.poll-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(245,185,66,0.25), rgba(245,185,66,0.08));
  border-radius: 12px;
  transition: width 1s ease;
}

.poll-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}

.poll-emoji { font-size: 22px; }
.poll-name { flex: 1; font-weight: 500; font-size: 15px; }
.poll-pct { font-weight: 700; font-size: 15px; }

.poll-total {
  margin-top: 20px;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}

.poll-results { max-width: 600px; }

/* ===== PERFIL ===== */
.profile-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(15, 12, 10, 0.85);
  padding: 30px;
  border-radius: 16px;
  border: 1px solid rgba(245,185,66,0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  margin-bottom: 28px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5d487, #a6782c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  color: black;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(255,215,0,0.4);
}

.profile-info h3 {
  font-size: 22px;
  margin-bottom: 4px;
  color: white;
}

.profile-info p {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  margin: 0 0 8px;
}

.profile-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(245,185,66,0.15);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.profile-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.stat-box {
  flex: 1;
  text-align: center;
  background: rgba(15, 12, 10, 0.85);
  padding: 22px 16px;
  border-radius: 14px;
  border: 1px solid rgba(245,185,66,0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.stat-number {
  display: block;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

.logout-page-btn {
  padding: 12px 28px;
  border: 1px solid rgba(255,70,70,0.4);
  border-radius: 10px;
  background: transparent;
  color: #ff6b6b;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  font-size: 14px;
  transition: 0.3s;
}

.logout-page-btn:hover {
  background: rgba(255,70,70,0.1);
  border-color: #ff6b6b;
  transform: translateY(-2px);
}

/* ===== ESTRELLITAS DORADAS ===== */
.spark {
  position: fixed;
  bottom: -10px;
  background: #ffb938;
  border-radius: 50%;
  box-shadow: 0 0 8px #ffd700, 0 0 16px #ffb938;
  pointer-events: none;
  z-index: 9999;
  animation: sparkFloat linear forwards;
}

@keyframes sparkFloat {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 0.8; }
  100% { transform: translateY(-110vh) scale(0); opacity: 0; }
}

@keyframes goldShine {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
