/* ========================================================
   MILITIA INC. — La Canción Inmortal
   Estilos Premium para la experiencia de votación en vivo
   ======================================================== */

:root {
  --bg-black:      #080808;
  --bg-darker:     #0d0d0d;
  --bg-card:       #141414;
  --bg-card-hover: #1c1c1c;
  --color-red:     #c41e1e;
  --color-red-h:   #e02020;
  --color-gold:    #c8a951;
  --color-gold-h:  #e3c15d;
  --text-white:    #f5f5f5;
  --text-muted:    #888888;
  --border-color:  rgba(255, 255, 255, 0.06);
  --border-gold:   rgba(200, 169, 81, 0.3);
  --border-red:    rgba(196, 30, 30, 0.3);
  --f-display:     'Orbitron', sans-serif;
  --f-head:        'Bebas Neue', sans-serif;
  --f-body:        'Inter', sans-serif;
  --transition:    0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* === Animaciones === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseRed {
  0% { box-shadow: 0 0 8px rgba(196, 30, 30, 0.3); }
  50% { box-shadow: 0 0 20px rgba(196, 30, 30, 0.6); }
  100% { box-shadow: 0 0 8px rgba(196, 30, 30, 0.3); }
}

@keyframes pulseGold {
  0% { box-shadow: 0 0 8px rgba(200, 169, 81, 0.3); }
  50% { box-shadow: 0 0 20px rgba(200, 169, 81, 0.6); }
  100% { box-shadow: 0 0 8px rgba(200, 169, 81, 0.3); }
}

@keyframes lightningFlash {
  0%, 100% { opacity: 0; }
  12% { opacity: 0; }
  13% { opacity: 0.18; }
  14% { opacity: 0; }
  20% { opacity: 0; }
  21% { opacity: 0.25; }
  23% { opacity: 0; }
}

/* === Layout de la Experiencia === */
.inmortal-body {
  background-color: var(--bg-black);
  background-image: radial-gradient(circle at top, #150505 0%, var(--bg-black) 70%);
  color: var(--text-white);
  font-family: var(--f-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
}

.inmortal-lightning {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  animation: lightningFlash 8s infinite;
}

.inmortal-header {
  text-align: center;
  padding: 30px 20px 15px;
  z-index: 2;
}

.inmortal-header .logo-img {
  max-width: 130px;
  margin: 0 auto 15px;
  filter: drop-shadow(0 0 10px rgba(196, 30, 30, 0.3));
}

.inmortal-header h1 {
  font-family: var(--f-head);
  font-size: 3rem;
  letter-spacing: 0.05em;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.inmortal-header h1 span {
  color: var(--color-red);
}

.inmortal-container {
  max-width: 580px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px 50px;
  box-sizing: border-box;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.inmortal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.6s ease both;
}

/* === Event Details === */
.event-info-box {
  text-align: center;
  margin-bottom: 25px;
}

.event-tag {
  font-family: var(--f-display);
  color: var(--color-gold);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}

.event-title {
  font-family: var(--f-head);
  font-size: 2.2rem;
  margin: 0 0 10px 0;
  letter-spacing: 0.02em;
}

.event-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.event-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.event-flyer {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
  margin: 0 auto 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
  display: block;
}

.event-slogan {
  font-size: 1.15rem;
  color: #fff;
  text-align: center;
  margin: 25px 0;
  font-style: italic;
  font-weight: 300;
  line-height: 1.5;
}

/* === Voting Screen === */
.songs-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 25px 0;
}

.song-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.song-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(196, 30, 30, 0.15);
}

.song-card.selected {
  border-color: var(--color-red);
  background-color: rgba(196, 30, 30, 0.08);
  box-shadow: 0 0 15px rgba(196, 30, 30, 0.25);
}

.song-card.selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: var(--color-red);
}

.song-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.song-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.song-artist {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.song-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.song-card:hover .song-radio {
  border-color: var(--color-red);
}

.song-card.selected .song-radio {
  border-color: var(--color-red);
  background-color: var(--color-red);
}

.song-card.selected .song-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  background-color: #fff;
  border-radius: 50%;
}

/* Buttons */
.btn-block {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.btn-primary.glow {
  animation: pulseRed 3s infinite;
}

.btn-primary:disabled {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: transparent;
  color: var(--text-muted);
  cursor: not-allowed;
  animation: none;
  transform: none;
  box-shadow: none;
}

/* === Leads Form === */
.lead-section {
  text-align: center;
  display: none; /* Controlled by JS */
}

.lead-section h2 {
  font-family: var(--f-head);
  font-size: 2.2rem;
  margin-top: 0;
  color: var(--color-gold);
}

.lead-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 25px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-family: var(--f-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--text-white);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: 2px;
  color: #fff;
  font-family: var(--f-body);
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--color-red);
  outline: none;
  box-shadow: 0 0 10px rgba(196, 30, 30, 0.15);
}

.form-actions-row {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.form-actions-row .btn {
  flex: 1;
  justify-content: center;
}

/* === Confirmation Screen === */
.confirm-section {
  text-align: center;
  display: none; /* Controlled by JS */
}

.confirm-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background-color: rgba(200, 169, 81, 0.1);
  border: 2px solid var(--color-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
  animation: pulseGold 3s infinite;
}

.confirm-section h2 {
  font-family: var(--f-head);
  font-size: 2.5rem;
  margin-top: 0;
  color: var(--color-gold);
}

.confirm-text {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

.social-title {
  font-family: var(--f-display);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 15px;
}

.social-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 35px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  font-size: 0.85rem;
  font-weight: 500;
  background-color: var(--bg-darker);
  transition: var(--transition);
}

.social-btn:hover {
  border-color: var(--color-red);
  background-color: rgba(196, 30, 30, 0.1);
  color: #fff;
}

/* === Timeline (Historial) === */
.timeline-section {
  padding: 40px 0;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background-color: var(--border-color);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

@media screen and (max-width: 768px) {
  .timeline::after {
    left: 31px;
  }
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
  box-sizing: border-box;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  right: -8px;
  background-color: var(--bg-black);
  border: 4px solid var(--color-red);
  top: 25px;
  border-radius: 50%;
  z-index: 1;
}

.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  left: 50%;
}

.timeline-item.right::after {
  left: -8px;
}

@media screen and (max-width: 768px) {
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  .timeline-item.left {
    text-align: left;
    left: 0;
  }
  .timeline-item.right {
    left: 0;
  }
  .timeline-item.left::after, .timeline-item.right::after {
    left: 23px;
  }
}

.timeline-content {
  padding: 20px 24px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  position: relative;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
}

.timeline-date {
  font-family: var(--f-display);
  font-size: 0.8rem;
  color: var(--color-gold);
  margin-bottom: 5px;
  display: block;
}

.timeline-location {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.timeline-winner {
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
  margin-top: 15px;
}

.timeline-winner-label {
  font-family: var(--f-display);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: inherit;
}

.timeline-item.left .timeline-winner-label {
  justify-content: flex-end;
}

.timeline-song-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 5px 0;
}

.timeline-song-artist {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline-votes {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 10px;
}

.timeline-flyer-thumb {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.08);
}

/* === Admin Panel === */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.admin-header h2 {
  font-family: var(--f-head);
  font-size: 2.2rem;
  margin: 0;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media screen and (min-width: 992px) {
  .admin-grid {
    grid-template-columns: 2fr 1.3fr;
  }
}

.admin-section-title {
  font-family: var(--f-head);
  font-size: 1.6rem;
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--color-gold);
  border-left: 3px solid var(--color-gold);
  padding-left: 10px;
}

/* Events table & items */
.event-list-admin {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.event-item-admin {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 16px 20px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.event-item-admin:hover {
  border-color: rgba(255,255,255,0.12);
}

.event-item-admin.active-event {
  border-color: var(--color-red);
}

.admin-item-details h4 {
  font-size: 1.1rem;
  margin: 0 0 5px 0;
}

.admin-item-details p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.admin-badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-family: var(--f-display);
  border-radius: 2px;
  text-transform: uppercase;
  margin-top: 6px;
}

.admin-badge.badge-active {
  background-color: rgba(196, 30, 30, 0.15);
  border: 1px solid var(--color-red);
  color: var(--color-red-h);
}

.admin-badge.badge-inactive {
  background-color: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.admin-badge.badge-current {
  background-color: rgba(200, 169, 81, 0.15);
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  margin-left: 5px;
}

.admin-item-actions {
  display: flex;
  gap: 10px;
}

/* Form Styles Admin */
.admin-form-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 4px;
}

.songs-input-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.song-input-row {
  display: flex;
  gap: 10px;
}

.song-input-row input {
  flex: 1;
}

.song-input-row input:first-child {
  flex: 1.5;
}

/* Results panel styles */
.results-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 4px;
}

.total-votes-count {
  text-align: center;
  margin-bottom: 25px;
  background-color: var(--bg-darker);
  padding: 15px;
  border-radius: 2px;
  border: 1px solid var(--border-color);
}

.total-votes-count .number {
  display: block;
  font-family: var(--f-head);
  font-size: 3rem;
  color: var(--color-gold);
  line-height: 1;
}

.total-votes-count .label {
  font-family: var(--f-display);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.results-chart-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chart-bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chart-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.chart-song-title {
  font-weight: 600;
}

.chart-song-pct {
  color: var(--color-gold);
  font-family: var(--f-display);
  font-size: 0.85rem;
}

.chart-bar-bg {
  height: 10px;
  background-color: var(--bg-darker);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.chart-bar-fill {
  height: 100%;
  background-color: var(--color-red);
  border-radius: 5px;
  width: 0%; /* Dynamic */
  transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chart-bar-fill.winner {
  background-color: var(--color-gold);
}

/* QR Code Section */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 25px;
  padding: 20px;
  background-color: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.qr-code-box {
  background-color: #fff;
  padding: 15px;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.qr-code-box canvas {
  display: block;
}

.qr-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  word-break: break-all;
  text-align: center;
}

/* Participant List Table */
.participant-table-wrapper {
  margin-top: 25px;
  overflow-x: auto;
}

.participant-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.participant-table th, .participant-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.participant-table th {
  font-family: var(--f-display);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.participant-table tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Authentication Login Box */
.login-card {
  max-width: 400px;
  width: 100%;
  margin: 100px auto;
}

.login-title-box {
  text-align: center;
  margin-bottom: 30px;
}

.login-title-box h2 {
  font-family: var(--f-head);
  font-size: 2.5rem;
  margin: 0;
}

/* Status Notifications */
.status-msg {
  padding: 12px 16px;
  border-radius: 2px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: none;
  border: 1px solid transparent;
}

.status-msg.error {
  display: block;
  background-color: rgba(196, 30, 30, 0.1);
  border-color: var(--color-red);
  color: #ff8888;
}

.status-msg.success {
  display: block;
  background-color: rgba(40, 167, 69, 0.1);
  border-color: #28a745;
  color: #88ff88;
}

.status-msg.info {
  display: block;
  background-color: rgba(200, 169, 81, 0.1);
  border-color: var(--color-gold);
  color: #ffdd88;
}
