@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap');

/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   BODY / PREMIUM NIGHT SKY
========================= */
html,
body {
  min-height: 100%;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: #fff;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 18%, rgba(56, 76, 130, 0.28) 0%, rgba(17, 28, 58, 0.55) 26%, rgba(5, 10, 22, 0.88) 60%, rgba(2, 5, 12, 0.98) 100%),
    linear-gradient(to bottom, #122041 0%, #0a1530 30%, #050b18 65%, #02050d 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 223, 120, 0.05), transparent 25%),
    radial-gradient(circle at 80% 15%, rgba(146, 196, 255, 0.06), transparent 22%),
    radial-gradient(circle at 50% 55%, rgba(255, 255, 255, 0.025), transparent 30%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(0,0,0,0.04), rgba(0,0,0,0.12));
}

/* =========================
   HEADER
========================= */
header {
  text-align: center;
  padding: 20px 0;
  position: relative;
  z-index: 2;
}

.logo {
  width: 200px;
  max-width: 90%;
}

.company-name {
  font-family: 'Playfair Display', serif;
  font-size: 3.5em;
  text-align: center;
  margin: 40px 0;
  background: linear-gradient(90deg, #fff0a8, #ffd700, #ffcc00, #fff4be);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow:
    0 2px 8px rgba(0,0,0,0.45),
    0 0 22px rgba(255,215,0,0.35),
    0 0 42px rgba(255,215,0,0.12);
}

/* =========================
   TOP BUTTONS
========================= */
.button-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 50px auto 25px auto;
  max-width: 800px;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}

.gold-button {
  flex: 1;
  text-align: center;
  margin: 0;
  padding: 30px 0;
  font-size: 2em;
  font-weight: bold;
  color: #fff8dc;
  text-decoration: none;
  border-radius: 18px;
  background:
    linear-gradient(145deg, #fff2a6 0%, #ffd700 22%, #ffbf00 52%, #f0a500 100%);
  border: 1px solid rgba(255,255,255,0.18);
  text-shadow: 0 2px 4px rgba(0,0,0,0.55);
  box-shadow:
    inset 0 2px 8px rgba(255,255,255,0.65),
    inset 0 -4px 10px rgba(70,40,0,0.45),
    0 10px 20px rgba(0,0,0,0.35),
    0 0 22px rgba(255,215,0,0.18);
  transition: all 0.28s ease;
  cursor: pointer;
}

.gold-button:hover {
  transform: translateY(-2px) scale(1.03);
  background:
    linear-gradient(145deg, #fff5bd 0%, #ffd84d 20%, #ffca1c 50%, #f0ab00 100%);
  box-shadow:
    inset 0 3px 10px rgba(255,255,255,0.75),
    inset 0 -5px 12px rgba(70,40,0,0.5),
    0 14px 28px rgba(0,0,0,0.42),
    0 0 30px rgba(255,215,0,0.25);
}

.gold-button:active {
  transform: scale(0.99);
}

/* =========================
   OPTIONAL VIDEO SUPPORT
========================= */
#bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -10;
  pointer-events: none;
}

/* =========================
   MAIN LAYOUT
========================= */
.container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: transparent;
}

.vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 20px;
}

/* =========================
   CARD
========================= */
.vote-card {
  background: rgba(9, 14, 28, 0.46);
  border: 1.5px solid rgba(255, 215, 0, 0.72);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 12px 28px rgba(0,0,0,0.28),
    0 0 22px rgba(255,215,0,0.08);
}

.vote-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 18px 36px rgba(0,0,0,0.35),
    0 0 30px rgba(255, 215, 0, 0.16);
  border-color: rgba(255, 225, 110, 0.95);
}

.vote-card img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
}

.vote-info {
  padding: 16px 15px 18px;
  text-align: center;
}

.vote-name {
  font-size: 1.3em;
  font-weight: bold;
  color: #6dffd3;
  cursor: pointer;
  user-select: all;
  text-shadow:
    0 0 10px rgba(45, 255, 175, 0.18),
    0 0 24px rgba(45, 255, 175, 0.12);
  word-break: break-word;
}

.vote-count {
  margin-top: 8px;
  font-size: 1.15em;
  color: #ffe07a;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.16);
}

.vote-rank {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 1.75em;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.42);
  padding: 6px 12px;
  border-radius: 12px;
  color: #ffdd66;
  z-index: 2;
  text-shadow: 0 0 12px rgba(255,215,0,0.65);
  border: 1px solid rgba(255,215,0,0.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* =========================
   MODAL
========================= */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}

.modal-content {
  text-align: center;
  background: rgba(9, 14, 24, 0.96);
  padding: 30px;
  border-radius: 18px;
  border: 1.5px solid rgba(255, 215, 0, 0.82);
  max-width: 800px;
  width: 100%;
  box-shadow:
    0 0 18px rgba(255,215,0,0.22),
    0 16px 34px rgba(0,0,0,0.4);
}

.modal-content h2 {
  color: #ffd95f;
  font-size: 1.8em;
  margin-bottom: 15px;
  text-shadow: 0 0 14px rgba(255,215,0,0.25);
}

.modal-content p {
  margin: 15px 0;
  font-size: 1em;
  line-height: 1.6;
}

.modal-content button {
  padding: 12px 26px;
  background: linear-gradient(145deg, #ffe38a, #ffbf00);
  border: none;
  font-weight: bold;
  font-size: 1em;
  color: #111;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.25s ease;
  box-shadow: 0 8px 20px rgba(0,0,0,0.24);
}

.modal-content button:hover {
  transform: translateY(-1px);
  background: linear-gradient(145deg, #ffecad, #ffca28);
}

.modal-scroll {
  max-height: 60vh;
  overflow-y: auto;
  text-align: left;
  padding-right: 10px;
}

.modal-scroll p {
  margin-bottom: 15px;
  line-height: 1.65;
}

/* =========================
   LIGHTBOX / OVERLAY
========================= */
.lightbox {
  display: none;
  position: fixed;
  z-index: 8888;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  justify-content: center;
  align-items: center;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 90px;
  color: gold;
  cursor: pointer;
}

#overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.82);
  justify-content: center;
  align-items: center;
}

#overlay img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 25px rgba(0,0,0,0.55);
  border-radius: 14px;
  cursor: pointer;
}

/* =========================
   FIXED BUTTONS
========================= */
.fixed-app-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: rgba(15, 15, 30, 0.86);
  color: white;
  padding: 18px 30px;
  font-size: 30px;
  border-radius: 100px;
  box-shadow:
    0 10px 20px rgba(0,0,0,0.28),
    0 0 18px rgba(255,255,255,0.05);
  z-index: 9999;
  text-decoration: none;
  transition: background 0.3s, transform 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fixed-app-button:hover {
  background-color: rgba(28, 28, 48, 0.96);
  transform: translateY(-1px);
}

.fixed-app-button-left {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background-color: rgba(15, 15, 30, 0.84);
  color: white;
  padding: 18px 30px;
  font-size: 28px;
  border-radius: 100px;
  box-shadow:
    0 10px 20px rgba(0,0,0,0.28),
    0 0 18px rgba(255,255,255,0.05);
  z-index: 9999;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fixed-app-button-left:hover {
  background-color: rgba(28, 28, 48, 0.96);
  transform: translateY(-1px);
}

.fixed-app-button-center {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(214, 40, 40, 0.92);
  color: white;
  padding: 18px 38px;
  font-size: 30px;
  border-radius: 100px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
  z-index: 9999;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fixed-app-button-center:hover {
  background-color: rgba(169, 31, 31, 0.96);
  transform: translateX(-50%) scale(1.04);
}

/* =========================
   COUNTDOWN
========================= */
#countdown-container {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  background: rgba(8, 12, 22, 0.72);
  padding: 12px 18px;
  border: 1.5px solid rgba(255,215,0,0.85);
  border-radius: 14px;
  z-index: 10000;
  box-shadow:
    0 0 18px rgba(255,215,0,0.18),
    0 10px 24px rgba(0,0,0,0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#countdown-container h2 {
  color: #ffdc69;
  font-size: 1.15em;
  margin-bottom: 5px;
  text-shadow:
    0 0 10px rgba(255,215,0,0.45),
    0 0 20px rgba(255,204,0,0.16);
}

#countdown {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.45rem;
  font-weight: bold;
  color: white;
}

#countdown span {
  color: #ffe07d;
  margin: 0 4px;
}

/* =========================
   SEARCH
========================= */
.search-container {
  text-align: center;
  margin: 25px auto 10px;
  z-index: 2;
  position: relative;
}

#searchBox {
  width: 80%;
  max-width: 420px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 215, 0, 0.82);
  background: rgba(8, 12, 24, 0.45);
  color: #fff;
  font-size: 16px;
  outline: none;
  transition: all 0.28s ease;
  box-shadow:
    0 0 12px rgba(255, 215, 0, 0.16),
    0 10px 20px rgba(0,0,0,0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#searchBox::placeholder {
  color: #d9d9d9;
}

#searchBox:focus {
  background: rgba(12, 18, 32, 0.62);
  box-shadow:
    0 0 18px rgba(255, 215, 0, 0.30),
    0 12px 22px rgba(0,0,0,0.18);
  transform: scale(1.02);
}

/* =========================
   FIREFLIES
========================= */
#fireflies {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.firefly {
  position: absolute;
  border-radius: 50%;
  opacity: 0.95;
  background: radial-gradient(circle, #fffdf0 0%, #ffe9a3 30%, #ffd166 58%, #ffb703 100%);
  box-shadow:
    0 0 10px rgba(255, 230, 130, 1),
    0 0 22px rgba(255, 209, 102, 0.95),
    0 0 40px rgba(255, 209, 102, 0.75),
    0 0 70px rgba(255, 209, 102, 0.45);
  will-change: transform, opacity;
  animation:
    floatUp linear infinite,
    driftSide ease-in-out infinite,
    glowPulse ease-in-out infinite;
}

.firefly.tiny {
  filter: blur(0.2px);
}

.firefly.soft {
  opacity: 0.75;
  box-shadow:
    0 0 8px rgba(255, 230, 130, 0.9),
    0 0 18px rgba(255, 209, 102, 0.8),
    0 0 30px rgba(255, 209, 102, 0.55),
    0 0 55px rgba(255, 209, 102, 0.28);
}

@keyframes floatUp {
  0% {
    transform: translate3d(0, 110vh, 0) scale(0.9);
  }
  100% {
    transform: translate3d(0, -12vh, 0) scale(1.15);
  }
}

@keyframes driftSide {
  0% {
    margin-left: -24px;
  }
  50% {
    margin-left: 24px;
  }
  100% {
    margin-left: -24px;
  }
}

@keyframes glowPulse {
  0% {
    opacity: 0.38;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.38;
  }
}

/* =========================
   EMPTY STATE
========================= */
.empty-message {
  text-align: center;
  padding: 50px 20px;
  color: #ffe7a0;
  font-size: 1.1rem;
  background: rgba(10, 14, 24, 0.35);
  border: 1px solid rgba(255,215,0,0.22);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* =========================
   RESPONSIVE
========================= */
@media screen and (max-width: 768px) {
  .button-container {
    flex-direction: column;
    padding: 0 18px;
    gap: 14px;
    margin-top: 36px;
  }

  .gold-button {
    width: 100%;
    font-size: 1.4em;
    padding: 20px 0;
  }

  .vote-grid {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 16px;
  }

  .container {
    padding: 14px;
  }

  .modal-content {
    width: 100%;
    padding: 22px 18px;
  }

  #countdown-container {
    width: calc(100% - 20px);
    max-width: 500px;
    top: 8px;
    padding: 10px 14px;
  }

  #countdown {
    font-size: 1.1rem;
  }

  .fixed-app-button-left,
  .fixed-app-button,
  .fixed-app-button-center {
    font-size: 18px;
    padding: 14px 20px;
    bottom: 14px;
  }

  .fixed-app-button-left {
    left: 14px;
  }

  .fixed-app-button {
    right: 14px;
  }

  .company-name {
    font-size: 2.2em;
    margin: 24px 0;
  }

  #searchBox {
    width: calc(100% - 30px);
  }
}

.gold-refresh {
  background:
    linear-gradient(145deg, #fff2a6 0%, #ffd700 22%, #ffbf00 52%, #f0a500 100%) !important;
  color: #111 !important;
  font-weight: bold;
  border: none;
  box-shadow:
    inset 0 2px 8px rgba(255,255,255,0.65),
    inset 0 -4px 10px rgba(70,40,0,0.45),
    0 10px 20px rgba(0,0,0,0.35),
    0 0 22px rgba(255,215,0,0.18);
}


.vote-now-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;

  background:
    linear-gradient(145deg, #fff2a6 0%, #ffd700 22%, #ffbf00 52%, #f0a500 100%);

  color: #111;
  padding: 18px 30px;
  font-size: 28px;
  border-radius: 100px;

  box-shadow:
    inset 0 2px 8px rgba(255,255,255,0.65),
    inset 0 -4px 10px rgba(70,40,0,0.45),
    0 10px 20px rgba(0,0,0,0.35),
    0 0 22px rgba(255,215,0,0.18);

  z-index: 9999;
  text-decoration: none;
  font-weight: bold;
  transition: 0.25s ease;
}

.vote-now-btn:hover {
  transform: scale(1.05);
}


/* =========================
   ANIMATED COUNTDOWN
========================= */
#countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 58px;
}

.timer-unit {
  min-width: 68px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 228, 122, 0.16), rgba(255, 191, 0, 0.08));
  border: 1px solid rgba(255, 215, 0, 0.45);
  box-shadow:
    inset 0 1px 6px rgba(255,255,255,0.18),
    0 0 14px rgba(255, 215, 0, 0.10),
    0 8px 18px rgba(0,0,0,0.20);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transform: translateY(0) scale(1);
}

.timer-value {
  display: block;
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 800;
  color: #fff6cf;
  text-shadow:
    0 0 8px rgba(255, 215, 0, 0.28),
    0 0 18px rgba(255, 215, 0, 0.12);
  letter-spacing: 1px;
}

.timer-label {
  display: block;
  margin-top: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #ffd76b;
  opacity: 0.95;
  letter-spacing: 0.6px;
}

#countdown.tick .timer-unit {
  animation: timerPop 0.45s ease;
}

#countdown.tick .timer-value {
  animation: timerNumberFlash 0.45s ease;
}

@keyframes timerPop {
  0% {
    transform: translateY(8px) scale(0.92);
    opacity: 0.72;
  }
  60% {
    transform: translateY(-2px) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes timerNumberFlash {
  0% {
    opacity: 0.5;
    transform: scale(0.92);
  }
  55% {
    opacity: 1;
    transform: scale(1.08);
    text-shadow:
      0 0 12px rgba(255, 230, 140, 0.65),
      0 0 24px rgba(255, 215, 0, 0.28);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.countdown-closed {
  display: flex;
  justify-content: center;
  align-items: center;
}

.closed-text {
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffdf85;
  background: linear-gradient(180deg, rgba(255, 80, 80, 0.14), rgba(255, 0, 0, 0.08));
  border: 1px solid rgba(255, 180, 90, 0.38);
  box-shadow:
    0 0 14px rgba(255, 120, 80, 0.14),
    0 0 28px rgba(255, 170, 50, 0.10);
  animation: closedGlow 1.8s ease-in-out infinite;
}

@keyframes closedGlow {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 14px rgba(255, 120, 80, 0.14),
      0 0 28px rgba(255, 170, 50, 0.10);
  }
  50% {
    transform: scale(1.03);
    box-shadow:
      0 0 18px rgba(255, 160, 90, 0.22),
      0 0 36px rgba(255, 200, 80, 0.16);
  }
}

@media screen and (max-width: 768px) {
  #countdown {
    gap: 8px;
  }

  .timer-unit {
    min-width: 58px;
    padding: 8px 10px;
    border-radius: 12px;
  }

  .timer-value {
    font-size: 1.2rem;
  }

  .timer-label {
    font-size: 0.66rem;
  }

  .closed-text {
    font-size: 0.95rem;
    padding: 10px 16px;
  }
}