@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;900&family=Montserrat:wght@400;500;600;700;800;900&family=Orbitron:wght@600;800;900&display=swap');

:root {
  --gold: #f59e0b;
  --gold-light: #fde68a;
  --gold-dark: #b45309;
  --gold-gradient: linear-gradient(135deg, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%);
  --red: #ef4444;
  --safe: #10b981;
  --dark-bg: #06080d;
  --card-bg: rgba(14, 18, 28, 0.92);
  --border-gold: rgba(245, 158, 11, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--dark-bg);
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: 80px; /* space for mobile floating bottom bar */
}

/* Background Atmosphere */
.bg-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
  opacity: 0.16;
  z-index: 0;
}
.bg-gold { top: -150px; left: 50%; transform: translateX(-50%); background: #f59e0b; }
.bg-red { bottom: 0; right: -100px; background: #dc2626; }
.bg-blue { bottom: 20%; left: -100px; background: #2563eb; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 5;
}

/* Top Navbar */
.site-header {
  background: rgba(10, 13, 22, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1.5px solid rgba(245, 158, 11, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 0;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-eye {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 0 8px #f59e0b);
}

.brand-text h1 {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 900;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  letter-spacing: 1px;
}

.brand-text span {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #cbd5e1;
  text-transform: uppercase;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-obs-link {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--gold);
  color: #fde68a;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-obs-link:hover {
  background: var(--gold);
  color: #000;
}

/* Closed Lines Mega Alert Banner */
.alert-closed-banner {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.25) 0%, rgba(153, 27, 27, 0.4) 50%, rgba(13, 16, 26, 0.95) 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.7);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.25);
  text-align: center;
}

.alert-top-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.badge-closed {
  background: #dc2626;
  color: #ffffff;
  font-weight: 900;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.8);
}

.timer-closed {
  font-family: 'Orbitron', monospace;
  font-size: 0.88rem;
  font-weight: 800;
  color: #fca5a5;
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.alert-closed-banner h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
}

.alert-closed-banner p {
  font-size: 0.78rem;
  color: #cbd5e1;
}

/* Contestant Grid - 3 columns on desktop, stacked on mobile */
.contestants-section {
  margin: 20px 0;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  padding-bottom: 6px;
}

.section-title h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.section-title span {
  font-family: 'Orbitron', monospace;
  font-size: 0.72rem;
  color: #94a3b8;
}

.contestant-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 860px) {
  .contestant-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Contestant Card */
.pub-card {
  position: relative;
  background: var(--card-bg);
  border-radius: 16px;
  border: 2px solid var(--border-gold);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(245, 158, 11, 0.2);
}

.pub-card.card-rank-1 {
  border-color: rgba(234, 179, 8, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(234, 179, 8, 0.25);
}

.pub-card.card-rank-2 {
  border-color: rgba(59, 130, 246, 0.8);
}

.pub-card.card-rank-3 {
  border-color: rgba(239, 68, 68, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(239, 68, 68, 0.3);
}

/* Card Header Badges */
.pub-card-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.badge-rank-tag {
  font-family: 'Orbitron', monospace;
  font-size: 0.72rem;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.85);
  color: #fde68a;
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-status-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 10px;
}

.status-safe { background: #059669; color: #fff; box-shadow: 0 0 10px rgba(16, 185, 129, 0.6); }
.status-borderline { background: #d97706; color: #fff; box-shadow: 0 0 10px rgba(245, 158, 11, 0.6); }
.status-danger { background: #dc2626; color: #fff; box-shadow: 0 0 12px rgba(239, 68, 68, 0.7); animation: pulseDanger 1.8s infinite; }

@keyframes pulseDanger {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* Card Image Area */
.pub-img-wrap {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: #000;
}

@media (max-width: 860px) {
  .pub-img-wrap {
    height: 280px;
  }
}

.pub-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 8%;
  transition: transform 0.5s ease;
}

.pub-card:hover .pub-img {
  transform: scale(1.04);
}

.pub-scrim {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(180deg, transparent 0%, rgba(9, 12, 20, 0.5) 30%, rgba(7, 9, 14, 0.95) 75%, #07090e 100%);
  pointer-events: none;
}

/* Card Content / Stats */
.pub-card-content {
  position: relative;
  z-index: 10;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(10, 13, 22, 0.95);
  margin-top: -30px;
  border-radius: 16px 16px 0 0;
  border-top: 1px solid rgba(245, 158, 11, 0.2);
}

.pub-name-box h4 {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 900;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.pub-name-box span {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.pub-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.pub-percent {
  font-family: 'Orbitron', monospace;
  font-size: 1.6rem;
  font-weight: 900;
  color: #fde68a;
}

.pub-votes-count {
  font-family: 'Orbitron', monospace;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.pub-progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.pub-progress-bar {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, #d97706, #f59e0b, #fef08a);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-rank-1 .pub-progress-bar {
  background: linear-gradient(90deg, #059669, #10b981, #6ee7b7);
}

.card-rank-3 .pub-progress-bar {
  background: linear-gradient(90deg, #991b1b, #ef4444, #fca5a5);
}

.btn-pub-vote {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
}

.btn-pub-vote:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

.btn-pub-vote:active {
  transform: scale(0.97);
}

/* ========================================================
   LIVE FAN CHAT & COMMENTS SECTION
   ======================================================== */
.chat-section {
  margin: 28px 0 20px;
  background: rgba(14, 18, 28, 0.9);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.chat-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-badge-chat {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 1px;
}

/* Chat Input Form */
.chat-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 18px;
}

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

@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
  }
}

.chat-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-family: 'Montserrat', sans-serif;
  flex: 1;
}

.chat-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.select-contestant {
  background: #111624;
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-send-chat {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.btn-send-chat:hover {
  background: #10b981;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}

/* Chat Messages Feed */
.chat-feed-box {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 6px;
}

.chat-feed-box::-webkit-scrollbar {
  width: 5px;
}

.chat-feed-box::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.4);
  border-radius: 4px;
}

/* Live Activity Bar */
.chat-live-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 0.76rem;
}

@media (max-width: 600px) {
  .chat-live-stats-bar {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }
}

.stats-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f1f5f9;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseLiveDot 1.5s infinite;
}

@keyframes pulseLiveDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.live-pill-count {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #6ee7b7;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
}

.real-audience-pill {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.form-sub-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: -4px;
}

.chat-msg-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fadeIn 0.3s ease-out;
  transition: all 0.3s ease;
}

/* REAL AUDIENCE VOTE CARD HIGHLIGHT */
.chat-msg-item.real-audience-vote {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(245, 158, 11, 0.08));
  border: 1.5px solid #10b981;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3), inset 0 0 12px rgba(16, 185, 129, 0.1);
  position: relative;
  overflow: hidden;
}

.chat-msg-item.real-audience-vote::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.badge-real-audience {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff !important;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-spotted-vote {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.6);
  color: #fde68a;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}

.fan-place-tag {
  color: #f59e0b;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.msg-author {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.msg-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}

.badge-for-scout { background: rgba(234, 179, 8, 0.2); border: 1px solid #eab308; color: #fde68a; }
.badge-for-aasif { background: rgba(59, 130, 246, 0.2); border: 1px solid #3b82f6; color: #93c5fd; }
.badge-for-rohed { background: rgba(239, 68, 68, 0.2); border: 1px solid #ef4444; color: #fca5a5; }

.msg-time {
  font-size: 0.65rem;
  color: #64748b;
  white-space: nowrap;
}

.msg-body {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.4;
}

/* Mobile Quick-Vote Floating Bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 13, 22, 0.98);
  backdrop-filter: blur(16px);
  border-top: 1.5px solid rgba(245, 158, 11, 0.4);
  padding: 8px 12px;
  z-index: 999;
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.8);
}

@media (max-width: 860px) {
  .mobile-bottom-bar {
    display: flex;
    justify-content: space-around;
    gap: 8px;
  }
}

.quick-vote-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
}

.quick-vote-btn:active {
  transform: scale(0.95);
}

.quick-vote-scout { border-color: #eab308; color: #fde68a; background: rgba(234, 179, 8, 0.15); }
.quick-vote-aasif { border-color: #3b82f6; color: #93c5fd; background: rgba(59, 130, 246, 0.15); }
.quick-vote-rohed { border-color: #ef4444; color: #fca5a5; background: rgba(239, 68, 68, 0.15); }

/* Footer */
.site-footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 0.72rem;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 30px;
}
