/* ========================= */
/* POLLS PAGE */
/* ========================= */

.polls-page {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  gap: 24px;
}

.polls-hero {
  text-align: center;
  padding: 24px 0;
}

.polls-hero__title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.polls-hero__desc {
  color: var(--text-muted);
  font-size: 1rem;
}

.polls-section__title {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.polls-section__title i {
  color: var(--accent);
  font-size: 0.85rem;
}

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

/* Poll Card */
.poll-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg2);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.15s;
}

.poll-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.poll-card--closed {
  opacity: 0.7;
}

.poll-card--closed:hover {
  opacity: 1;
}

.poll-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.poll-card__badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
}

.poll-card__badge--open {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.poll-card__badge--closed {
  background: rgba(113, 113, 122, 0.15);
  color: #71717a;
}

.poll-card__type {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.poll-card__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.poll-card__meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.poll-card__meta i {
  margin-right: 4px;
}

.poll-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

.poll-card__countdown {
  color: var(--accent);
  font-weight: 600;
}

.polls-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.polls-empty i {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

/* ========================= */
/* POLL VOTE PAGE */
/* ========================= */

.poll-vote-page {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  gap: 20px;
}

.poll-vote-hero__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.poll-vote-hero__back {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.poll-vote-hero__back:hover {
  color: var(--accent);
}

.poll-vote-hero__badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
}

.poll-vote-hero__badge--open {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.poll-vote-hero__badge--closed {
  background: rgba(113, 113, 122, 0.15);
  color: #71717a;
}

.poll-vote-hero__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.poll-vote-hero__desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.poll-vote-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.poll-vote-hero__meta i {
  margin-right: 4px;
}

/* CTA Login */
.poll-vote-cta {
  text-align: center;
  padding: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.poll-vote-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}

.poll-vote-cta__btn:hover {
  opacity: 0.85;
}

/* Vote Grid */
.poll-vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

/* Vote Card */
.poll-vote-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg2);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  width: 100%;
}

.poll-vote-card:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.poll-vote-card:disabled {
  cursor: default;
  opacity: 0.7;
}

.poll-vote-card.is-voted {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.06);
}

/* Icon */
.poll-vote-card__icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  z-index: 2;
  transition: background 0.2s, border-color 0.2s;
}

.poll-vote-card__icon .fa-check {
  display: none;
}

.poll-vote-card.is-voted .poll-vote-card__icon {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.poll-vote-card.is-voted .poll-vote-card__icon .fa-plus {
  display: none;
}

.poll-vote-card.is-voted .poll-vote-card__icon .fa-check {
  display: block;
}

/* Cover */
.poll-vote-card__cover {
  width: 55px;
  height: 78px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg3);
}

/* Body */
.poll-vote-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.poll-vote-card__title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.poll-vote-card__episode {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 500;
}

/* Progress Bar */
.poll-vote-card__bar-wrapper {
  width: 100%;
  height: 6px;
  background: var(--bg3);
  border-radius: 999px;
  overflow: hidden;
}

.poll-vote-card__bar {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.4s ease;
  min-width: 2px;
}

.poll-vote-card.is-voted .poll-vote-card__bar {
  background: #22c55e;
}

/* Stats */
.poll-vote-card__stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */

@media (max-width: 780px) {
  .polls-page {
    padding: 14px 10px;
  }

  .poll-vote-page {
    padding: 14px 10px;
  }

  .polls-grid {
    grid-template-columns: 1fr;
  }

  .poll-vote-grid {
    grid-template-columns: 1fr;
  }

  .poll-vote-hero__title {
    font-size: 1.2rem;
  }
}

@media (max-width: 420px) {
  .polls-page {
    padding: 10px 8px;
  }

  .poll-vote-page {
    padding: 10px 8px;
  }

  .poll-card {
    padding: 12px;
  }

  .poll-vote-card {
    padding: 8px;
  }

  .poll-vote-card__cover {
    width: 48px;
    height: 68px;
  }
}

/* ========================= */
/* ADMIN - WEEK INFO */
/* ========================= */

.admin-week-info {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.admin-week-info__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ========================= */
/* ADMIN - ANIME SELECTION GRID */
/* ========================= */

.admin-anime-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.admin-anime-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: #0f141b;
  cursor: pointer;
  transition: border-color 0.2s;
  overflow: hidden;
}

.admin-anime-card:hover {
  border-color: var(--admin-accent);
}

.admin-anime-card.is-selected {
  border-color: #3fb950;
  background: rgba(63, 185, 80, 0.06);
}

.admin-anime-card__check {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 3;
  width: 14px;
  height: 14px;
  accent-color: #3fb950;
  cursor: pointer;
  margin: 0;
}

.admin-anime-card__cover {
  position: relative;
  width: 40px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #161b22;
}

.admin-anime-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-anime-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--admin-muted);
  font-size: 0.8rem;
}

.admin-anime-card__check-icon {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3fb950;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.45rem;
  z-index: 2;
}

.admin-anime-card.is-selected .admin-anime-card__check-icon {
  display: flex;
}

.admin-anime-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.admin-anime-card__title {
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--admin-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.admin-anime-card__format {
  font-size: 0.55rem;
  color: var(--admin-muted);
  display: inline-block;
}

@media (max-width: 1100px) {
  .admin-anime-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 800px) {
  .admin-anime-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 500px) {
  .admin-anime-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================= */
/* POLL PODIUM */
/* ========================= */

.poll-podium {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
}

.poll-podium__sides {
  display: flex;
  gap: 16px;
  justify-content: center;
  width: 100%;
}

.poll-podium__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg2);
  border: 2px solid var(--border);
  max-width: 320px;
  width: 100%;
}

.poll-podium__item--first {
  border-color: #f59e0b;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.15);
  max-width: 360px;
}

.poll-podium__item--second {
  border-color: #94a3b8;
}

.poll-podium__item--third {
  border-color: #b45309;
}

.poll-podium__medal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

.poll-podium__medal--silver {
  background: linear-gradient(135deg, #94a3b8, #64748b);
}

.poll-podium__medal--bronze {
  background: linear-gradient(135deg, #b45309, #78350f);
}

.poll-podium__cover-wrap {
  flex-shrink: 0;
}

.poll-podium__cover {
  width: 80px;
  height: 112px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg3);
}

.poll-podium__cover--lg {
  width: 110px;
  height: 154px;
}

.poll-podium__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.poll-podium__place {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #f59e0b;
}

.poll-podium__item--second .poll-podium__place {
  color: #94a3b8;
}

.poll-podium__item--third .poll-podium__place {
  color: #b45309;
}

.poll-podium__title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.poll-podium__ep {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 500;
}

.poll-podium__bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--bg3);
  border-radius: 999px;
  overflow: hidden;
}

.poll-podium__bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
  min-width: 2px;
}

.poll-podium__bar--gold {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.poll-podium__bar--silver {
  background: linear-gradient(90deg, #94a3b8, #64748b);
}

.poll-podium__bar--bronze {
  background: linear-gradient(90deg, #b45309, #78350f);
}

.poll-podium__votes {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Rest of placements */
.poll-rest {
  width: 100%;
  padding-top: 8px;
}

.poll-rest__title {
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.poll-rest__title i {
  color: var(--accent);
  font-size: 0.75rem;
}

.poll-rest__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.poll-rest__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg2);
}

.poll-rest__cover {
  width: 48px;
  height: 67px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--bg3);
}

.poll-rest__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.poll-rest__title-text {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.poll-rest__ep {
  font-size: 0.65rem;
  color: var(--accent);
  font-weight: 500;
}

.poll-rest__bar-wrap {
  width: 100%;
  height: 4px;
  background: var(--bg3);
  border-radius: 999px;
  overflow: hidden;
}

.poll-rest__bar {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  min-width: 2px;
}

.poll-rest__votes {
  font-size: 0.65rem;
  color: var(--text-muted);
}

@media (max-width: 700px) {
  .poll-podium__sides {
    flex-direction: column;
    align-items: center;
  }

  .poll-podium__item--first {
    max-width: 100%;
  }

  .poll-rest__grid {
    grid-template-columns: 1fr;
  }
}
