/* ══════════════════════════════════════════════════════════
   OtakuPlay Vote Gallery — Styles (synced with op.css)
   Brand: #141414 bg · #F34542 red · #F16122 orange · #f1f1f1 white
   ══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:ital,wght@0,400;0,600;0,700;1,400&family=Oswald:wght@400;500;600;700&family=Montserrat:wght@400;500;600;700&display=swap');

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #141414;
  --card:      #1e1e1e;
  --card-alt:  #252525;
  --red:       #F34542;
  --orange:    #F16122;
  --white:     #f1f1f1;
  --grey:      #999999;
  --purple:    #A41EEA;
  --cyan:      #47FBF2;
  --font-head: 'Oswald', 'Arial', sans-serif;
  --font-body: 'Libre Franklin', 'Calibri', sans-serif;
  --font-display: 'Montserrat', 'Arial', sans-serif;
  --font-mono: 'Consolas', 'JetBrains Mono', monospace;
  --radius:    8px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Top Bar ─────────────────────────────────────────────── */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
}

.top-bar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar__accent {
  height: 3px;
  background: var(--red);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo__icon {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: url('./images/op-logo.webp') center / contain no-repeat;
  border-radius: 6px;
}

.logo__text {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
}

.top-nav {
  display: flex;
  gap: 32px;
}

.top-nav__link {
  color: var(--grey);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}

.top-nav__link:hover,
.top-nav__link.active {
  color: var(--white);
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px 48px;
  text-align: center;
}

.hero__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--red);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero__title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero__subtitle {
  font-size: 18px;
  color: var(--grey);
  max-width: 600px;
  margin: 0 auto 20px;
}

.hero__cta {
  display: inline-block;
  margin-bottom: 18px;
  padding: 12px 36px 12px 36px;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.hero__cta:hover {
  background: var(--red);
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-pill {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 28px;
  text-align: center;
  min-width: 120px;
}

.stat-pill__number {
  display: block;
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
}

.stat-pill__label {
  display: block;
  font-size: 12px;
  color: var(--grey);
  margin-top: 4px;
}

/* ── Section Title ───────────────────────────────────────── */
.section-title {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 32px;
}

/* ── Gallery ─────────────────────────────────────────────── */
.gallery {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

.gallery__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.gallery__sort {
  display: flex;
  gap: 8px;
}

.sort-btn {
  background: var(--card);
  border: 1px solid transparent;
  color: var(--grey);
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.sort-btn:hover {
  color: var(--white);
  border-color: #333;
}

.sort-btn.active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

/* ── Gallery Grid ────────────────────────────────────────── */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

/* ── Art Card ────────────────────────────────────────────── */
.art-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.art-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.art-card__image {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.art-card__placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.placeholder-art {
  width: 100%;
  height: 100%;
  position: relative;
}

.p-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
}

.placeholder-silhouette {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: auto;
}

.art-card__rank {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
}

.art-card__info {
  padding: 20px;
}

.art-card__title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.art-card__artist {
  font-size: 13px;
  color: var(--grey);
  margin-bottom: 10px;
}

.artist-name {
  color: var(--orange);
  font-weight: 600;
}

.art-card__desc {
  font-size: 14px;
  color: var(--grey);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.art-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vote-count {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vote-count__icon {
  color: var(--red);
  font-size: 14px;
}

.vote-count__number {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
}

.vote-count__label {
  font-size: 13px;
  color: var(--grey);
}

.vote-btn {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.vote-btn:hover {
  background: #d93d3a;
  transform: scale(1.04);
}

.vote-btn--voted {
  background: #2a2a2a;
  color: #888;
  cursor: default;
  pointer-events: none;
}

/* ── Leaderboard ─────────────────────────────────────────── */
.leaderboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

.leaderboard__table {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
}

.lb-row {
  display: grid;
  grid-template-columns: 70px 1fr 160px 80px 1fr;
  align-items: center;
  padding: 14px 20px;
  gap: 12px;
  border-bottom: 1px solid #2a2a2a;
}

.lb-row:last-child { border-bottom: none; }

.lb-row--header {
  background: #1a1a1a;
  font-size: 12px;
  font-weight: 600;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 20px;
}

.rank-badge {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--grey);
}

.rank-badge--1 { color: var(--red); }
.rank-badge--2 { color: var(--orange); }
.rank-badge--3 { color: var(--orange); }

.lb-art {
  font-weight: 600;
  font-size: 14px;
}

.lb-artist {
  font-size: 13px;
  color: var(--orange);
}

.lb-votes {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  text-align: right;
}

.lb-bar {
  height: 8px;
  background: #2a2a2a;
  border-radius: 4px;
  overflow: hidden;
}

.lb-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--orange));
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* ── How It Works ────────────────────────────────────────── */
.how-it-works {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.step {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px 28px;
  flex: 1;
  min-width: 240px;
  max-width: 320px;
}

.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.step__number--red { background: var(--red); }
.step__number--orange { background: var(--orange); }

.step__title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step__desc {
  font-size: 14px;
  color: var(--grey);
  line-height: 1.6;
}

.step__arrow {
  display: flex;
  align-items: center;
  font-size: 24px;
  color: var(--red);
  font-weight: 700;
  padding-top: 48px;
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  border-top: 3px solid var(--red);
  padding: 24px 0;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-footer__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-footer__tagline {
  color: var(--grey);
  font-size: 13px;
  margin-left: 8px;
}

.site-footer__copy {
  font-size: 12px;
  color: var(--grey);
}

/* ══════════════════════════════════════════════════════════
   VOTE MODAL
   ══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg);
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  width: 90%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--card);
  border: none;
  color: var(--grey);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, color 0.2s;
}

.modal__close:hover {
  background: #333;
  color: var(--white);
}

/* ── Modal Step 1: Vote Form ─────────────────────────────── */
.modal__step { animation: fadeIn 0.3s ease; }
.modal__step--hidden { display: none !important; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

#modalStep1 {
  display: flex;
  flex-direction: row;
}

.modal__art {
  flex: 0 0 40%;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  overflow: hidden;
}

.modal__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal__content {
  flex: 1;
  padding: 28px 32px 32px;
  overflow-y: auto;
}

.modal__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--red);
  margin-bottom: 8px;
}

.modal__title {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.modal__artist {
  font-size: 14px;
  color: var(--grey);
  margin-bottom: 28px;
}

/* ── Vote Form ───────────────────────────────────────────── */
.vote-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
}

.required { color: var(--red); }

.form-input {
  background: var(--card);
  border: 1px solid #333;
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.form-input::placeholder {
  color: #555;
}

.form-input:focus {
  border-color: var(--red);
}

.form-hint {
  font-size: 12px;
  color: var(--grey);
}

/* ── Form Divider ────────────────────────────────────────── */
.form-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 0;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #2a2a2a;
}

.form-divider__text {
  font-size: 12px;
  color: var(--grey);
  white-space: nowrap;
}

/* ── Connect Buttons ─────────────────────────────────────── */
.connect-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid #333;
  border-radius: 6px;
  padding: 12px 16px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.connect-btn:hover {
  border-color: #555;
  background: var(--card-alt);
}

.connect-btn--google:hover,
.connect-btn--google.connect-btn--connected {
  border-color: #4285F4;
}

.connect-btn--discord:hover,
.connect-btn--discord.connect-btn--connected {
  border-color: #5865F2;
}

.connect-btn--telegram:hover,
.connect-btn--telegram.connect-btn--connected {
  border-color: #229ED9;
}

.connect-btn--connected {
  background: #1a2e1a;
  border-color: #22c55e;
}

.connect-btn__icon {
  display: flex;
  align-items: center;
  color: var(--grey);
}

.connect-btn--google .connect-btn__icon { color: #4285F4; }
.connect-btn--discord .connect-btn__icon { color: #5865F2; }
.connect-btn--telegram .connect-btn__icon { color: #229ED9; }

.connect-btn__status {
  margin-left: auto;
  font-size: 12px;
  color: #22c55e;
}

/* ── Info Box ────────────────────────────────────────────── */
.info-box {
  display: flex;
  gap: 10px;
  background: var(--card);
  border-left: 3px solid var(--orange);
  border-radius: 0 6px 6px 0;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--grey);
  line-height: 1.5;
}

.info-box__icon {
  color: var(--orange);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Submit Button ───────────────────────────────────────── */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 4px;
}

.submit-btn:hover {
  background: #d93d3a;
  transform: scale(1.02);
}

.submit-btn__icon {
  font-size: 12px;
}

.submit-btn--secondary {
  background: var(--card);
  border: 1px solid #333;
}

.submit-btn--secondary:hover {
  background: #333;
}

/* ── Modal Step 2: Confirmation ──────────────────────────── */
.modal__confirmation {
  padding: 48px 32px 36px;
  text-align: center;
}

.confirmation__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: #1a2e1a;
  border: 2px solid #22c55e;
  color: #22c55e;
  font-size: 28px;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 20px;
}

.confirmation__title {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.confirmation__subtitle {
  font-size: 16px;
  color: var(--grey);
  margin-bottom: 28px;
}

.confirmation__card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: left;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.confirmation__card-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--orange);
}

.confirmation__message {
  font-size: 14px;
  line-height: 1.7;
  padding-left: 12px;
}

/* ── Vote Weight Indicator ───────────────────────────────── */
.vote-weight {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}

.vote-weight__current {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 700;
  color: var(--grey);
}

.vote-weight__arrow {
  font-size: 24px;
  color: var(--red);
}

.vote-weight__boosted {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 700;
  color: var(--red);
}

.vote-weight__label {
  font-size: 13px;
  color: var(--grey);
  background: var(--card);
  padding: 4px 12px;
  border-radius: 4px;
}

/* ── DM Preview ──────────────────────────────────────────── */
.confirmation__dm-preview {
  text-align: left;
  margin-bottom: 24px;
}

.dm-preview__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.dm-preview__card {
  background: var(--card);
  border-left: 3px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
}

.dm-preview__link {
  color: var(--orange);
  font-weight: 600;
}

.dm-preview__note {
  color: var(--grey);
  font-style: italic;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .gallery__grid {
    grid-template-columns: 1fr;
  }

  .gallery__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .lb-row {
    grid-template-columns: 50px 1fr 80px;
  }

  .lb-artist, .lb-bar { display: none; }

  .steps {
    flex-direction: column;
    align-items: center;
  }

  .step__arrow {
    transform: rotate(90deg);
    padding-top: 0;
  }

  .step { max-width: 100%; }

  .modal { width: 95%; }

  #modalStep1 { flex-direction: column; }

  .modal__art {
    flex: none;
    height: 200px;
  }

  .modal__content { padding: 20px; }

  .top-nav { gap: 16px; }

  .top-nav__link { font-size: 12px; }
}

@media (max-width: 480px) {
  .hero__title { font-size: 24px; }

  .hero__stats { flex-direction: column; align-items: center; }

  .stat-pill { width: 100%; max-width: 200px; }
}
