/* ===== California Roots Wild Card - Theme ===== */
:root {
  --purple-deep: #2D1B4E;
  --purple-mid: #5B2D8E;
  --purple-light: #8B5CC2;
  --purple-glow: #A855F7;
  --orange-fire: #F97316;
  --orange-bright: #FB923C;
  --orange-deep: #EA580C;
  --orange-gold: #FBBF24;
  --white: #FFFFFF;
  --white-soft: #F8F5FF;
  --black: #0A0A0A;
  --black-light: #1A1A2E;
  --gray-dark: #374151;
  --gray-mid: #6B7280;
  --gray-light: #E5E7EB;
  --danger: #EF4444;
  --success: #22C55E;
  --card-bg: rgba(45, 27, 78, 0.6);
  --card-border: rgba(139, 92, 194, 0.3);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--black);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Effects */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(249, 115, 22, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(91, 45, 142, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(45, 27, 78, 0.3) 0%, transparent 70%),
    linear-gradient(180deg, var(--black) 0%, var(--black-light) 100%);
  z-index: 0;
}

.bg-flames {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(0deg, rgba(249, 115, 22, 0.08) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.bg-lightning {
  position: fixed;
  top: 0;
  width: 300px;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
}
.bg-lightning.left {
  left: 0;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.3) 0%, transparent 100%);
}
.bg-lightning.right {
  right: 0;
  background: linear-gradient(-90deg, rgba(168, 85, 247, 0.3) 0%, transparent 100%);
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  text-align: center;
  padding: 30px 20px 20px;
}

.logo-wrapper { margin-bottom: 15px; }

.logo {
  max-width: 320px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 30px rgba(249, 115, 22, 0.3));
}

.contest-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--orange-fire) 0%, var(--orange-gold) 50%, var(--orange-fire) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  line-height: 1.1;
}

.contest-description {
  font-size: 1.1rem;
  color: var(--white-soft);
  max-width: 600px;
  margin: 0 auto 20px;
  line-height: 1.6;
  opacity: 0.9;
}

.contest-status {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 1px;
}
.contest-status.active {
  background: linear-gradient(135deg, var(--success), #16A34A);
  color: var(--white);
  animation: pulse-glow 2s ease-in-out infinite;
}
.contest-status.ended { background: var(--gray-dark); color: var(--gray-light); }
.contest-status.upcoming { background: linear-gradient(135deg, var(--purple-mid), var(--purple-light)); color: var(--white); }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(34, 197, 94, 0.3); }
  50% { box-shadow: 0 0 25px rgba(34, 197, 94, 0.5); }
}

/* ===== Band Grid - Redesigned ===== */
.bands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  padding: 30px 0;
}

.band-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  display: flex;
  flex-direction: column;
}

.band-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple-glow);
  box-shadow: 0 12px 40px rgba(168, 85, 247, 0.2), 0 0 0 1px rgba(168, 85, 247, 0.1);
}

.band-card.voted {
  border-color: var(--orange-fire);
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.2);
}

.band-card.voted::after {
  content: 'YOUR VOTE TODAY';
  position: absolute;
  top: 50px;
  right: 12px;
  background: var(--orange-fire);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  z-index: 2;
}

/* Artist Name - ON TOP */
.band-name-header {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 2px;
  color: var(--white);
  text-align: center;
  padding: 16px 16px 12px;
  background: linear-gradient(180deg, rgba(45, 27, 78, 0.8) 0%, rgba(45, 27, 78, 0.4) 100%);
  border-bottom: 1px solid rgba(249, 115, 22, 0.2);
}

/* Hero Area - Photo or YouTube */
.band-hero-wrapper {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--black-light);
  position: relative;
}

.band-hero-video {
  aspect-ratio: 16/9;
}

.band-hero-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.band-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.band-card:hover .band-image {
  transform: scale(1.03);
}

/* YouTube Thumbnail Play Overlay */
.band-yt-thumbnail {
  cursor: pointer;
  position: relative;
}

.yt-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  transition: background 0.3s ease;
}

.band-yt-thumbnail:hover .yt-play-overlay {
  background: rgba(0, 0, 0, 0.15);
}

.yt-play-btn {
  width: 68px;
  height: 48px;
  background: rgba(255, 0, 0, 0.85);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--white);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.band-yt-thumbnail:hover .yt-play-btn {
  background: rgba(255, 0, 0, 1);
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(255, 0, 0, 0.4);
}

.band-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--purple-deep) 0%, var(--black-light) 100%);
  font-size: 3rem;
  color: var(--purple-light);
  aspect-ratio: 16/9;
}

/* Actions area under hero */
.band-actions {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
}

.band-buttons {
  display: flex;
  gap: 10px;
}

.vote-count-badge {
  font-size: 0.8rem;
  color: var(--orange-bright);
  font-weight: 600;
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-vote {
  flex: 1;
  background: linear-gradient(135deg, var(--orange-fire) 0%, var(--orange-deep) 100%);
  color: var(--white);
  font-size: 0.95rem;
  padding: 14px;
}

.btn-vote:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--orange-bright) 0%, var(--orange-fire) 100%);
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4);
  transform: translateY(-1px);
}

.btn-vote:disabled {
  background: var(--gray-dark);
  color: var(--gray-mid);
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-vote.voted-btn {
  background: linear-gradient(135deg, var(--purple-mid), var(--purple-light));
  cursor: default;
}

.btn-info {
  background: rgba(139, 92, 194, 0.2);
  border: 1px solid var(--card-border);
  color: var(--purple-light);
  font-size: 0.8rem;
  padding: 14px 18px;
  white-space: nowrap;
}

.btn-info:hover {
  background: rgba(139, 92, 194, 0.35);
  border-color: var(--purple-glow);
  color: var(--white);
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange-fire) 0%, var(--orange-deep) 100%);
  color: var(--white);
}
.btn-primary:hover { box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4); }
.btn-full { width: 100%; }

/* ===== Artist Detail Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal {
  background: linear-gradient(145deg, var(--purple-deep), var(--black-light));
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 40px;
  max-width: 440px;
  width: 100%;
  position: relative;
}

.artist-detail-modal {
  max-width: 600px;
  padding: 0;
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
}

.artist-detail-modal .modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 10;
  background: rgba(0,0,0,0.5);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-hero-image {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  display: block;
}

.detail-video-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
}

.detail-video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.detail-content {
  padding: 28px;
}

.detail-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  letter-spacing: 2px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--orange-fire), var(--orange-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.detail-bio {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 20px;
  white-space: pre-line;
}

.detail-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 50px;
  background: rgba(139, 92, 194, 0.15);
  border: 1px solid var(--card-border);
  color: var(--purple-light);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}

.detail-social-link:hover {
  background: rgba(249, 115, 22, 0.2);
  border-color: var(--orange-fire);
  color: var(--orange-bright);
}

.detail-social-link svg {
  width: 18px;
  height: 18px;
}

/* Modal close button */
.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.modal-close:hover { opacity: 1; }

.modal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 2px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--orange-fire), var(--orange-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-subtitle {
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
}

/* Registration form elements */
.form-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  padding: 4px;
}

.form-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}
.form-tab.active {
  background: var(--purple-mid);
  color: var(--white);
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--purple-glow);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.form-note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

.error-msg {
  margin-top: 12px;
  padding: 10px 16px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  color: #FCA5A5;
  font-size: 0.9rem;
}

/* Winner Section */
.winner-section { text-align: center; padding: 40px 20px; }

.winner-badge {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  letter-spacing: 6px;
  background: linear-gradient(135deg, var(--orange-gold), var(--orange-fire), var(--orange-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  animation: winner-shimmer 3s ease-in-out infinite;
}

@keyframes winner-shimmer {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}

.winner-card {
  max-width: 400px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 2px solid var(--orange-fire);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(249, 115, 22, 0.3);
}

.winner-image { width: 100%; aspect-ratio: 1; object-fit: cover; }

.winner-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 2px;
  padding: 20px 20px 8px;
  color: var(--orange-gold);
}

.winner-bio {
  padding: 0 20px 24px;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--success), #16A34A);
  color: white;
  padding: 16px 32px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.3);
  z-index: 200;
  animation: toast-in 0.3s ease;
}

@keyframes toast-in {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.toast-icon { font-size: 1.2rem; }

/* Loading Spinner */
.loading-spinner {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--card-border);
  border-top-color: var(--orange-fire);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

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

/* Footer */
.footer {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 40px;
}

/* Responsive */
@media (max-width: 640px) {
  .bands-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .modal { padding: 28px; }
  .artist-detail-modal { padding: 0; }
  .header { padding: 20px 10px 10px; }
  .contest-title { font-size: 1.8rem; letter-spacing: 2px; }
  .contest-description { font-size: 0.95rem; }
  .band-buttons { flex-direction: column; }
  .btn-vote, .btn-info { width: 100%; }
}
