/* 
  styles.css - Sing With Musichorn Stylesheet
  Features a premium dark maroon-magenta theme, glowing accents, and a clean portal layout.
*/

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700&family=Playfair+Display:ital,wght@0,500;0,700;1,400&family=Outfit:wght@300;400;600;700&display=swap');

/* --- Design Tokens --- */
:root {
  --color-bg-dark: hsl(340, 80%, 4%);         /* Extremely Dark Maroon-Black */
  --color-bg-panel: hsl(340, 70%, 7%);        /* Deep Maroon Panel Background */
  --color-magenta: hsl(340, 85%, 45%);        /* Rich Magenta */
  --color-magenta-glow: hsl(340, 95%, 60%);   /* Glowing Light Magenta */
  --color-gold: hsl(43, 100%, 50%);           /* Premium Marigold Gold */
  --color-gold-glow: hsl(43, 100%, 65%);      /* Glowing Golden Yellow */
  --color-cream-light: #FFF5F7;               /* Warm Soft White for main text */
  --color-rose-muted: hsl(340, 30%, 75%);     /* Muted Dusty Rose for labels/secondary text */
  --color-glass-bg: rgba(30, 3, 10, 0.75);
  --color-glass-border: rgba(233, 30, 99, 0.18);
  --color-gold-border: rgba(255, 196, 0, 0.2);
  --font-title: 'Playfair Display', serif;
  --font-logo: 'Cinzel Decorative', serif;
  --font-body: 'Outfit', sans-serif;
  --shadow-glow-magenta: 0 0 25px rgba(233, 30, 99, 0.25);
  --shadow-glow-gold: 0 0 25px rgba(255, 196, 0, 0.25);
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.25);
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: all 0.2s ease;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-dark);
  color: var(--color-cream-light);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background Mandala Decoration (Dark Mode Adaptations) */
.bg-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.mandala-bg {
  position: absolute;
  width: 900px;
  height: 900px;
  opacity: 0.08;
  color: var(--color-magenta);
  animation: spin-slow 120s linear infinite;
  transform-origin: center;
}

.mandala-top-right {
  top: -200px;
  right: -200px;
}

.mandala-bottom-left {
  bottom: -300px;
  left: -300px;
  animation-direction: reverse;
}

.gradient-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: radial-gradient(circle at 80% 20%, rgba(233, 30, 99, 0.12) 0%, rgba(30, 3, 10, 0) 60%),
              radial-gradient(circle at 10% 80%, rgba(255, 196, 0, 0.07) 0%, rgba(30, 3, 10, 0) 50%);
  pointer-events: none;
}

/* --- Layout & Typography --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--color-cream-light);
}

h1 {
  font-size: 3rem;
  line-height: 1.2;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

/* Elegant traditional divider underline for headings */
h2::after {
  content: '';
  display: block;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-magenta) 50%, transparent 100%);
  margin: 8px auto 0 0;
  border-radius: 2px;
}

h2.center-title {
  display: block;
  text-align: center;
}
h2.center-title::after {
  margin: 8px auto 0 auto;
}

a {
  color: var(--color-magenta-glow);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-gold);
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: var(--font-body);
  transition: var(--transition-smooth);
}

/* --- Navigation Header --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 1, 5, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-glass-border);
  padding: 16px 0;
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  color: var(--color-gold);
  filter: drop-shadow(0 2px 8px rgba(233, 30, 99, 0.4));
}

.logo-text h1 {
  font-family: var(--font-logo);
  font-size: 1.6rem;
  color: var(--color-cream-light);
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(233, 30, 99, 0.3);
}

.logo-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-gold);
  font-weight: 700;
  margin-top: -2px;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Ambiance Player Widget */
.ambiance-control {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(233, 30, 99, 0.08);
  border: 1px solid var(--color-glass-border);
  padding: 8px 16px;
  border-radius: 30px;
}

.ambiance-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-rose-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.wave-animation {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  width: 14px;
}

.wave-bar {
  width: 2px;
  background-color: var(--color-magenta-glow);
  border-radius: 1px;
  height: 3px;
}

.wave-animation.playing .wave-bar {
  animation: audio-wave 1s ease infinite alternate;
}

.wave-animation.playing .wave-bar:nth-child(1) { animation-delay: 0.1s; }
.wave-animation.playing .wave-bar:nth-child(2) { animation-delay: 0.3s; }
.wave-animation.playing .wave-bar:nth-child(3) { animation-delay: 0.5s; }
.wave-animation.playing .wave-bar:nth-child(4) { animation-delay: 0.2s; }

.btn-audio-toggle {
  background: var(--color-magenta);
  color: var(--color-cream-light);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.btn-audio-toggle:hover {
  background: var(--color-gold);
  color: var(--color-bg-dark);
  transform: scale(1.05);
}

.btn-audio-toggle svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.audio-slider-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 4px;
  border-radius: 2px;
  background: rgba(233, 30, 99, 0.2);
  outline: none;
  transition: var(--transition-fast);
}

.audio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-magenta-glow);
  cursor: pointer;
}

.audio-slider::-webkit-slider-thumb:hover {
  background: var(--color-gold);
}

.tuning-select {
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-cream-light);
  cursor: pointer;
  outline: none;
}

.tuning-select option {
  background-color: var(--color-bg-panel);
  color: var(--color-cream-light);
}

/* --- Portal Tabs Controller --- */
.portal-tabs-wrapper {
  background: rgba(30, 3, 10, 0.5);
  border-bottom: 1px solid var(--color-glass-border);
  padding: 8px 0;
}

.portal-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.portal-tab-btn {
  background: transparent;
  color: var(--color-rose-muted);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 12px 28px;
  position: relative;
  border-radius: 8px;
}

.portal-tab-btn:hover {
  color: var(--color-cream-light);
  background: rgba(233, 30, 99, 0.05);
}

.portal-tab-btn.active {
  color: var(--color-gold);
  background: rgba(233, 30, 99, 0.1);
  text-shadow: 0 0 10px rgba(255, 196, 0, 0.2);
}

.portal-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  width: 70%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-magenta));
  border-radius: 2px;
}

/* Portal Views Visibility Toggle */
.portal-view {
  display: none;
  animation: fade-in 0.4s ease-out forwards;
}

.portal-view.active {
  display: block;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Hero Section --- */
.hero {
  padding: 60px 0 40px 0;
  position: relative;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-subtitle {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 5px;
  color: var(--color-gold);
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(255, 196, 0, 0.2);
}

.hero h1 {
  margin-bottom: 20px;
  color: var(--color-cream-light);
  text-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--color-rose-muted);
  margin-bottom: 32px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Global Vote Banner --- */
.vote-banner-container {
  margin-top: 10px;
  margin-bottom: 24px;
}

.vote-banner {
  background: linear-gradient(135deg, rgba(255, 196, 0, 0.12) 0%, rgba(233, 30, 99, 0.12) 100%);
  border: 1px dashed var(--color-gold);
  border-radius: 12px;
  padding: 14px 20px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-gold-glow);
  box-shadow: var(--shadow-glow-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.vote-banner svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* --- Main Layout Grid --- */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 80px;
}

@media (min-width: 992px) {
  .main-grid {
    grid-template-columns: 2.2fr 1fr;
    align-items: start;
  }
}

/* --- Gallery & Search --- */
.gallery-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.filter-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background: var(--color-glass-bg);
  border: 1px solid var(--color-glass-border);
  padding: 16px 20px;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.search-input-wrapper {
  position: relative;
  flex-grow: 1;
  max-width: 320px;
}

.search-input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border-radius: 30px;
  border: 1px solid var(--color-glass-border);
  background: rgba(30, 3, 10, 0.6);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-cream-light);
  outline: none;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: var(--color-magenta-glow);
  box-shadow: 0 0 10px rgba(233, 30, 99, 0.3);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-rose-muted);
}

.category-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-chip {
  padding: 6px 14px;
  background: rgba(30, 3, 10, 0.4);
  border: 1px solid var(--color-glass-border);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-rose-muted);
  white-space: nowrap;
}

.filter-chip.active, .filter-chip:hover {
  background: var(--color-magenta);
  color: var(--color-cream-light);
  border-color: var(--color-magenta);
  box-shadow: 0 0 8px rgba(233, 30, 99, 0.3);
}

/* Contestant Grid */
.contestant-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 600px) {
  .contestant-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Contestant Card */
.contestant-card {
  background: var(--color-glass-bg);
  border: 1px solid var(--color-glass-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
}

.contestant-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-magenta) 100%);
  z-index: 2;
}

.contestant-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(233, 30, 99, 0.15);
  border-color: rgba(233, 30, 99, 0.35);
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 75%; /* 4:3 Aspect Ratio */
  overflow: hidden;
  background: #1C020A;
}

.card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
  opacity: 0.85;
}

.contestant-card:hover .card-img {
  transform: scale(1.05);
  opacity: 1;
}

/* Floating Badges */
.card-raga-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(30, 3, 10, 0.85);
  backdrop-filter: blur(4px);
  color: var(--color-gold);
  border: 1px solid var(--color-glass-border);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 10;
}

.card-rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--color-gold) 0%, #D88B00 100%);
  color: var(--color-bg-dark);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 10;
}

/* Video unavailable badge */
.video-pending-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(183, 28, 28, 0.9);
  color: #FFFFFF;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px;
  border-radius: 8px;
  z-index: 10;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.play-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 3, 10, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 5;
}

.contestant-card:hover .play-video-overlay {
  opacity: 1;
}

.play-btn-circle {
  width: 56px;
  height: 56px;
  background: var(--color-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-bg-dark);
  box-shadow: 0 4px 15px rgba(255,196,0,0.4);
  transform: scale(0.8);
  transition: var(--transition-smooth);
}

.play-btn-circle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  margin-left: 4px;
}

.contestant-card:hover .play-btn-circle {
  transform: scale(1);
}

.play-btn-circle:hover {
  background: var(--color-cream-light);
  color: var(--color-magenta);
  transform: scale(1.1) !important;
}

/* Card Body */
.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-name {
  font-size: 1.35rem;
  margin-bottom: 4px;
  color: var(--color-cream-light);
}

.card-hometown {
  font-size: 0.8rem;
  color: var(--color-rose-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.card-bio {
  font-size: 0.88rem;
  color: var(--color-rose-muted);
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Action Footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(233, 30, 99, 0.1);
}

.votes-count-wrapper {
  display: flex;
  flex-direction: column;
}

.votes-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-rose-muted);
  opacity: 0.7;
}

.votes-count {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-gold);
  font-family: var(--font-title);
}

.btn-upvote {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 30px;
  background: rgba(233, 30, 99, 0.1);
  border: 1px solid var(--color-glass-border);
  color: var(--color-magenta-glow);
  font-weight: 700;
  font-size: 0.85rem;
}

.btn-upvote svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.btn-upvote:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-magenta) 0%, var(--color-gold) 100%);
  color: var(--color-bg-dark);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.btn-upvote:hover:not(:disabled) svg {
  transform: scale(1.2);
}

/* Strict Voted Locked Button styling */
.btn-upvote:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(30, 3, 10, 0.5) !important;
  color: var(--color-rose-muted) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

.btn-upvote.voted {
  opacity: 1 !important;
  background: linear-gradient(135deg, var(--color-gold) 0%, #E69D00 100%) !important;
  color: var(--color-bg-dark) !important;
  border-color: transparent !important;
  cursor: default;
  box-shadow: var(--shadow-glow-gold);
}

.btn-upvote.voted svg {
  animation: heart-pop 0.4s ease-out;
}

/* --- Student Portal Panel Styles --- */
.student-portal-layout {
  max-width: 600px;
  margin: 0 auto 80px auto;
}

.portal-form-panel {
  background: var(--color-glass-bg);
  border: 1px solid var(--color-glass-border);
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  position: relative;
}

.portal-form-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-magenta) 0%, var(--color-gold) 100%);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

.portal-form-panel h3 {
  font-size: 1.7rem;
  margin-bottom: 8px;
  color: var(--color-cream-light);
}

.portal-form-panel p.form-subtitle {
  font-size: 0.9rem;
  color: var(--color-rose-muted);
  margin-bottom: 28px;
  line-height: 1.4;
}

.id-preview-panel {
  margin-top: 20px;
  padding: 16px;
  background: rgba(255, 196, 0, 0.05);
  border: 1px solid var(--color-gold-border);
  border-radius: 12px;
}

.id-preview-panel h5 {
  font-size: 0.85rem;
  color: var(--color-gold);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.id-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.id-chip {
  font-size: 0.8rem;
  padding: 4px 10px;
  background: rgba(30, 3, 10, 0.6);
  border: 1px solid rgba(255, 196, 0, 0.2);
  border-radius: 6px;
  font-family: monospace;
  color: var(--color-cream-light);
  cursor: pointer;
}

.id-chip:hover {
  border-color: var(--color-gold);
  background: rgba(255, 196, 0, 0.1);
}

/* --- Sidebar Leaderboard & Info --- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-panel {
  background: var(--color-glass-bg);
  border: 1px solid var(--color-glass-border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
}

.sidebar-panel h3 {
  font-size: 1.4rem;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(233, 30, 99, 0.15);
  padding-bottom: 8px;
  color: var(--color-cream-light);
}

/* Leaderboard List */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.leaderboard-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.leaderboard-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.leaderboard-name-rank {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.leaderboard-rank {
  width: 20px;
  height: 20px;
  background: rgba(233, 30, 99, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--color-magenta-glow);
}

.leaderboard-rank.rank-1 { background: var(--color-gold); color: var(--color-bg-dark); font-weight: 700; }
.leaderboard-rank.rank-2 { background: #DFD5C6; color: var(--color-bg-dark); font-weight: 700; }
.leaderboard-rank.rank-3 { background: #CD7F32; color: var(--color-cream-light); font-weight: 700; }

.leaderboard-votes {
  font-weight: 700;
  color: var(--color-gold);
}

.leaderboard-bar-outer {
  width: 100%;
  height: 8px;
  background: rgba(233, 30, 99, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.leaderboard-bar-inner {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-magenta), var(--color-gold));
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Musichorn Info Panel */
.organizer-panel {
  text-align: center;
  background: linear-gradient(135deg, hsl(340, 80%, 6%) 0%, hsl(340, 70%, 10%) 100%);
  border-color: var(--color-glass-border);
}

.organizer-panel h3 {
  color: var(--color-gold);
  border-bottom-color: rgba(255, 196, 0, 0.15);
}

.organizer-logo {
  font-family: var(--font-logo);
  font-size: 1.4rem;
  letter-spacing: 2px;
  margin-bottom: 8px;
  color: var(--color-gold);
  text-shadow: 0 0 10px rgba(255, 196, 0, 0.3);
}

.organizer-desc {
  font-size: 0.85rem;
  color: var(--color-rose-muted);
  margin-bottom: 16px;
}

.organizer-footer-brand {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-gold);
  font-weight: 600;
}

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(12, 1, 4, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-glass-border);
  border-radius: 24px;
  width: 90%;
  max-width: 768px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: var(--transition-smooth);
  position: relative;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(233, 30, 99, 0.1);
  color: var(--color-cream-light);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  font-size: 1.2rem;
  font-weight: bold;
}

.modal-close:hover {
  background: var(--color-magenta);
  color: var(--color-cream-light);
}

/* Video Player Modal Content */
.video-modal-content {
  padding: 0;
}

.modal-video-wrapper {
  position: relative;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #000;
  border-top-left-radius: 23px;
  border-top-right-radius: 23px;
  overflow: hidden;
}

.modal-video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-info-body {
  padding: 24px;
}

.video-raga-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 196, 0, 0.12);
  color: var(--color-gold);
  border: 1px solid var(--color-gold-border);
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 12px;
  margin-bottom: 8px;
}

.video-title {
  font-size: 1.8rem;
  margin-bottom: 12px;
  color: var(--color-cream-light);
}

.video-details-desc {
  font-size: 0.95rem;
  color: var(--color-rose-muted);
  margin-bottom: 20px;
}

/* Forms styling */
.form-group {
  margin-bottom: 20px;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}


.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-rose-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-glass-border);
  background: rgba(18, 1, 5, 0.6);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-cream-light);
  outline: none;
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--color-magenta-glow);
  box-shadow: 0 0 10px rgba(233, 30, 99, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

.form-control::placeholder {
  color: var(--color-rose-muted);
  opacity: 0.4;
}

/* File upload zones */
.file-upload-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .file-upload-wrapper {
    grid-template-columns: 1fr 1fr;
  }
}

.file-dropzone {
  border: 2px dashed var(--color-glass-border);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  background: rgba(233, 30, 99, 0.02);
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.file-dropzone:hover {
  background: rgba(255, 196, 0, 0.02);
  border-color: var(--color-gold);
}

.file-dropzone svg {
  width: 32px;
  height: 32px;
  color: var(--color-magenta);
  margin-bottom: 8px;
}

.file-dropzone span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-cream-light);
  opacity: 0.7;
}

.file-dropzone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-preview-indicator {
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #81C784; /* Success light green */
  display: none;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 30px;
}

.btn-primary-action {
  background: linear-gradient(135deg, var(--color-magenta) 0%, var(--color-gold) 100%);
  color: var(--color-bg-dark);
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4), var(--shadow-glow-gold);
}

.btn-secondary-action {
  background: rgba(30, 3, 10, 0.5);
  color: var(--color-cream-light);
  border: 2px solid var(--color-glass-border);
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-secondary-action:hover {
  background: rgba(233, 30, 99, 0.08);
  transform: translateY(-2px);
}

.btn-cancel {
  background: transparent;
  color: var(--color-cream-light);
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  border: 1px solid var(--color-glass-border);
}

.btn-cancel:hover {
  background: rgba(255,255,255,0.03);
}

/* --- Floating Confetti & Animations --- */
@keyframes spin-slow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes audio-wave {
  0% { height: 3px; }
  100% { height: 12px; }
}

@keyframes heart-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* Confetti element */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2000;
  animation: fall linear forwards;
}

@keyframes fall {
  0% {
    transform: translateY(-50px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Empty State */
.empty-gallery {
  text-align: center;
  padding: 60px 40px;
  background: var(--color-glass-bg);
  border: 1px solid var(--color-glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.empty-gallery svg {
  width: 64px;
  height: 64px;
  color: var(--color-magenta);
  opacity: 0.6;
  margin-bottom: 16px;
}

.empty-gallery h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.empty-gallery p {
  color: var(--color-rose-muted);
}

/* Footer Section */
footer {
  background: #0D0105;
  color: var(--color-rose-muted);
  padding: 40px 0;
  border-top: 1px solid var(--color-glass-border);
  margin-top: auto;
}

.footer-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-logo);
  font-size: 1.4rem;
  color: var(--color-gold);
}

.footer-text {
  font-size: 0.85rem;
  opacity: 0.75;
}

.footer-company {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-gold);
}

/* --- Mobile Responsive Media Queries --- */

/* Leaderboard ordering above contestant gallery on mobile */
@media (max-width: 991px) {
  .main-grid {
    display: flex;
    flex-direction: column;
  }
  .sidebar {
    order: -1;
  }
}

@media (max-width: 768px) {
  /* Typography & Layouts */
  h1 {
    font-size: 2.2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  .hero {
    padding: 40px 0 24px 0;
  }
  .hero-desc {
    font-size: 1rem;
    margin-bottom: 24px;
    padding: 0 8px;
  }

  /* Header Controls wrapping */
  .header-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .logo-container {
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }
  .logo-sub {
    margin-top: 0;
  }
  .nav-controls {
    width: 100%;
    justify-content: center;
    gap: 12px;
  }
  .ambiance-control {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 6px 14px;
  }

  /* Hide mandalas on mobile to improve rendering performance */
  .mandala-bg {
    display: none;
  }

  /* Ensure touch-friendly buttons have a minimum of 48px height */
  button,
  .portal-tab-btn,
  .btn-upvote,
  .btn-primary-action {
    min-height: 48px;
  }

  /* Collapse two-column form inputs on mobile */
  .form-row-2col {
    grid-template-columns: 1fr;
  }

  /* Portal tabs fit screen */
  .portal-tab-btn {
    font-size: 0.85rem;
    padding: 10px 18px;
    letter-spacing: 1px;
  }

  /* Filter bar wraps vertically */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px;
  }
  .search-input-wrapper {
    max-width: 100%;
    width: 100%;
  }
  .category-filters {
    width: 100%;
    padding-bottom: 6px;
  }

  /* Portal panels padding */
  .portal-form-panel {
    padding: 24px;
    border-radius: 20px;
  }
  .portal-form-panel h3 {
    font-size: 1.45rem;
  }
  .portal-form-panel p.form-subtitle {
    margin-bottom: 20px;
  }

  /* Modals */
  .modal-container {
    width: 94%;
    border-radius: 20px;
  }
  .video-title {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  /* Smaller mobile sizes */
  h1 {
    font-size: 1.85rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  .container {
    padding: 0 16px;
  }

  /* Hide header volume slider to keep toolbar clean */
  .audio-slider-container {
    display: none;
  }
  .ambiance-control {
    gap: 8px;
  }

  /* Card Layout */
  .card-body {
    padding: 16px;
  }
  .card-name {
    font-size: 1.2rem;
  }
  .card-bio {
    font-size: 0.85rem;
    margin-bottom: 16px;
  }
  .card-footer {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .votes-count {
    font-size: 1.2rem;
  }
  .btn-upvote {
    width: 100%;
    justify-content: center;
    padding: 6px 12px;
    font-size: 0.8rem;
    gap: 6px;
  }

  /* Modal contents */
  .upload-modal-content {
    padding: 20px;
  }
  .video-info-body {
    padding: 16px;
  }
}

