/* =========================================================
   Categories page
   ========================================================= */

/* ---------- Page title ---------- */

.page-hero {
  text-align: center;
  padding: 60px 5% 30px;
}

.page-title {
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #b8862e, #fff0c4, #d4af37);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #d4af37; /* fallback */
}

.page-subtitle {
  max-width: 560px;
  margin: 14px auto 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ---------- Category groups & buttons ---------- */

.award-groups {
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px 24px 80px;
}

.award-group {
  margin-top: 46px;
}

.award-group:first-child {
  margin-top: 10px;
}

.award-group-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #f1d27a;
}

.award-group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.5), transparent);
}

.award-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.award-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 165px;
  padding: 26px 18px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(20, 20, 24, 0.95), rgba(6, 6, 8, 0.95));
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.award-card:hover,
.award-card:focus-visible {
  transform: translateY(-4px);
  border-color: #f1d27a;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 22px rgba(212, 175, 55, 0.22);
  outline: none;
}

.award-card-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.award-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.award-card.is-voted {
  border-color: rgba(212, 175, 55, 0.8);
}

.award-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #d4af37;
  color: #111827;
  font-size: 0.72rem;
  font-weight: 800;
}

/* ---------- Nominees pop-up ---------- */

body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
}

.modal[hidden] {
  display: none;
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px 32px 32px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 20px;
  background: linear-gradient(160deg, #17171b, #070708);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 50%;
  background: transparent;
  color: #f1d27a;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  background: #d4af37;
  color: #111827;
}

.modal-head {
  text-align: center;
  margin-bottom: 28px;
}

.modal-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.modal-group {
  margin-top: 8px;
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #d4af37;
}

.modal-title {
  margin-top: 6px;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.modal-hint {
  margin-top: 8px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
}

.nominee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.nominee-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.nominee-card {
  position: relative;
  width: 100%;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.nominee-card:hover:not(:disabled) {
  border-color: rgba(212, 175, 55, 0.6);
}

.nominee-card:disabled {
  cursor: default;
}

.nominee-card.is-picked {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.14);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.35);
}

.nominee-card.is-dim {
  opacity: 0.4;
}

.nominee-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: #d4af37;
  color: #111827;
  font-size: 0.9rem;
  font-weight: 800;
}

.nominee-card.is-picked .nominee-check,
.nominee-card.is-voted .nominee-check {
  display: grid;
}

/* ---------- Choice bar + Submit vote ---------- */

.vote-bar {
  position: sticky;
  bottom: -32px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 24px -32px -32px;
  padding: 16px 32px;
  border-top: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 0 0 20px 20px;
  background: #0d0d10;
}

.vote-bar[hidden] {
  display: none;
}

.vote-choice {
  flex: 1 1 200px;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.vote-bar.is-done {
  justify-content: center;
  text-align: center;
}

.vote-bar.is-done .vote-choice {
  color: #f1d27a;
}

.vote-submit {
  flex: 0 0 auto;
  min-width: 200px;
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #f1d27a, #d4af37 55%, #b8962e);
  color: #111827;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.vote-submit:hover:not(:disabled) {
  filter: brightness(1.08);
}

.vote-submit:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.vote-submit[hidden] {
  display: none;
}

.nominee-card.is-voted {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.08);
}

.nominee-avatar {
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid #d4af37;
  border-radius: 50%;
  background: linear-gradient(145deg, #2a2418, #0c0a06);
  color: #f1d27a;
  font-size: 1.6rem;
  font-weight: 800;
}

.nominee-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nominee-name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

/* ---------- Toast message ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  max-width: 90vw;
  padding: 12px 22px;
  border: 1px solid #d4af37;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .page-hero {
    padding: 44px 5% 20px;
  }

  .award-groups {
    padding: 10px 14px 60px;
  }

  .award-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .award-card {
    min-height: 130px;
    padding: 18px 10px;
  }

  .award-card-logo {
    width: 44px;
    height: 44px;
  }

  .award-card-name {
    font-size: 0.88rem;
  }

  .modal {
    padding: 12px;
  }

  .modal-panel {
    padding: 30px 16px 20px;
  }

  .vote-bar {
    bottom: -20px;
    margin: 20px -16px -20px;
    padding: 14px 16px;
  }

  .vote-submit {
    width: 100%;
  }

  .nominee-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}