/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.hidden { display: none !important; }

:root {
  --primary: #0055BF; /* Lego Blue */
  --primary-light: #337cd1;
  --primary-dark: #003a82;
  --accent: #E3000B; /* Lego Red */
  --accent-light: #ff4d56;
  --accent-yellow: #FFCF00; /* Lego Yellow */
  --bg-dark: #0055BF; 
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --border: rgba(255,255,255,0.2);
  --border-light: rgba(255,255,255,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --transition: all 0.3s ease;
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--primary);
  color: #ffffff;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  border-top: 16px solid var(--accent-yellow);
  border-bottom: 16px solid var(--accent-yellow);
}

.page-wrapper {
  max-width: 100%;
  overflow-x: hidden;
}

/* === LOGOS === */
.logo-top-left {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 5;
}
.logo-top-left img {
  height: 120px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.logo-bottom-centered {
  text-align: center;
  padding-top: 40px;
  margin-bottom: -10px;
}
.logo-bottom-centered img {
  height: 70px;
  width: auto;
  display: inline-block;
}

/* === HERO === */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 80px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 85, 191, 0.6) 0%, rgba(0, 85, 191, 1) 100%);
  z-index: 1;
}

.hero-content {
  position: relative; z-index: 3;
  text-align: center;
  max-width: 750px;
}

.hero-badge {
  display: inline-block;
  padding: 8px 22px;
  border-radius: 999px;
  background: var(--accent-yellow);
  color: #000;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 28px;
  animation: fadeInDown 0.6s ease;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
  color: #ffffff;
  text-transform: uppercase;
  animation: fadeInUp 0.7s ease;
}

.gradient-text {
  color: var(--accent-yellow);
  background: linear-gradient(135deg, var(--accent-yellow) 0%, #ffeb85 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.8s ease;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.9s ease;
}

@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(227, 0, 11, 0.4);
}

.btn-primary:hover {
  background: #c20009;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(227, 0, 11, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--primary-dark);
  border: 2px solid var(--primary-dark);
}

.btn-outline:hover {
  background: rgba(0, 58, 130, 0.05);
  transform: translateY(-2px);
}

.btn-glass {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.3);
}

.btn-glass:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-1px);
}

.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: 12px; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 8px; }
.btn-full { width: 100%; justify-content: center; }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === COUNTDOWN === */
.countdown-bar {
  background: rgba(255,255,255,0.05);
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 16px 24px;
}

.countdown-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.countdown-label {
  font-weight: 800;
  color: var(--accent-yellow);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.countdown-timer {
  display: flex;
  align-items: center;
  gap: 4px;
}

.countdown-unit {
  text-align: center;
  min-width: 50px;
}

.countdown-unit span {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.countdown-unit small {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.countdown-sep {
  font-size: 1.3rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  margin-top: -14px;
}

/* === FINE PRINT === */
.fine-print-section {
  padding: 24px 24px 32px;
  text-align: center;
}

.fine-print-inner {
  max-width: 800px;
  margin: 0 auto;
}

.fine-print-inner p {
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}

.fine-print-inner strong {
  color: var(--accent-yellow);
  font-weight: 800;
}

.fine-print-smaller {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.fine-print-smaller p {
  font-size: 0.75rem;
  margin-bottom: 6px;
  color: inherit;
}

.fine-print-smaller a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
  transition: var(--transition);
}

.fine-print-smaller a:hover {
  color: #ffffff;
}

/* === STATUS BANNERS === */
.status-banner {
  padding: 60px 24px;
  text-align: center;
}

.status-inner {
  max-width: 500px;
  margin: 0 auto;
}

.status-icon { font-size: 3rem; display: block; margin-bottom: 16px; }

.status-banner h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--accent-yellow);
}

.status-banner p {
  color: #ffffff;
  font-size: 1.05rem;
}

/* === CATEGORY FILTER === */
.category-filter {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px 24px;
}

.filter-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-inner label {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  color: #ffffff;
}

.filter-inner select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 8px 36px 8px 14px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: #000000;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231e293b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: 2px solid transparent;
  border-radius: var(--radius-xs);
  min-width: 180px;
}

/* === GALLERY GRID === */
.gallery-wrapper {
  padding-bottom: 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 4px solid #ffffff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: var(--transition);
  animation: fadeInUp 0.4s ease both;
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(0,0,0,0.3);
}

.gallery-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-card-overlay {
  opacity: 1;
}

.gallery-card-caption {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-card-author {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
  font-weight: 600;
}

.gallery-card-heart {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 2px solid transparent;
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  z-index: 2;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.gallery-card-heart svg { transition: var(--transition); stroke: currentColor; }

.gallery-card-heart.voted svg,
.gallery-card:hover .gallery-card-heart svg {
  fill: var(--accent);
  stroke: var(--accent);
}

.gallery-card-heart.voted {
  color: var(--accent);
}

.voted-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}

.empty-icon { margin-bottom: 16px; color: rgba(255,255,255,0.6); }

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #ffffff;
}

.empty-state p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 24px;
}

/* === LOADING === */
.gallery-loading {
  text-align: center;
  padding: 40px 24px;
  color: rgba(255,255,255,0.8);
  font-weight: 600;
}

.spinner {
  width: 36px; height: 36px;
  margin: 0 auto 12px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.load-more-wrap {
  text-align: center;
  padding: 16px 24px 40px;
}

/* === BOTTOM FINE PRINT === */
.bottom-fine-print {
  text-align: center;
  padding: 24px 24px 40px;
  max-width: 800px;
  margin: 0 auto;
  font-size: 0.7rem;
  color: var(--primary-dark);
}

.bottom-fine-print p {
  margin-bottom: 6px;
  color: inherit;
}

.bottom-fine-print strong {
  font-weight: 800;
  color: inherit;
}

.bottom-fine-print a {
  color: var(--primary-dark);
  text-decoration: underline;
  transition: var(--transition);
}

.bottom-fine-print a:hover {
  color: var(--text-muted);
}

.bottom-fine-print-smaller {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 58, 130, 0.2);
  font-size: 0.6rem;
}

/* === LIGHTBOX === */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 58, 130, 0.95);
  backdrop-filter: blur(8px);
}

.lightbox-container {
  position: relative;
  z-index: 1;
  width: 95vw;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--primary-dark);
  border-radius: var(--radius);
  border: 4px solid var(--accent-yellow);
  color: #fff;
  overflow: hidden;
  animation: fadeInUp 0.3s ease;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 10;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-close:hover { background: rgba(255,255,255,0.2); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-nav:hover { background: rgba(0,0,0,0.8); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-content {
  overflow-y: auto;
}

.lightbox-image-wrap {
  width: 100%;
  max-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}

.lightbox-image-wrap img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
}

.lightbox-info {
  padding: 24px;
}

.lightbox-meta { margin-bottom: 20px; }

.lightbox-meta h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: #fff;
}

.lightbox-author {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  font-weight: 600;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.vote-btn-lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
}

.vote-btn-lg:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.02);
}

.vote-btn-lg.voted {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.vote-btn-lg.voted svg { fill: #fff; stroke: #fff; }

.vote-btn-lg:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.vote-count-lg { font-variant-numeric: tabular-nums; }

.lightbox-share-btns {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* === TOAST === */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 14px 28px;
  background: var(--accent-yellow);
  border: 2px solid #e5b800;
  border-radius: 999px;
  color: #000;
  font-size: 0.95rem;
  font-weight: 800;
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

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

/* === POWERED BY === */
#wbx-powered-by-slot {
  padding: 24px;
  text-align: center;
}

/* === VOTER MODAL === */
.voter-modal-container {
  max-width: 400px;
  width: 90vw;
  background: var(--bg-card);
  border: none;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.voter-modal-content {
  padding: 40px 24px 32px;
  text-align: center;
  color: var(--text);
}

.voter-modal-content h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--primary-dark);
}

.voter-modal-content p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 16px;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid #e2e8f0;
  font-size: 1rem;
  font-family: var(--font-body);
  transition: var(--transition);
  outline: none;
  color: var(--text);
}

.form-group input::placeholder {
  color: #94a3b8;
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 85, 191, 0.1);
}

.form-error {
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 12px;
  font-weight: 600;
}

.santoki-promo {
  margin-top: 20px;
  padding: 16px;
  background: rgba(0, 85, 191, 0.05);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 85, 191, 0.1);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: left;
}

.santoki-promo p {
  margin-bottom: 0 !important;
  font-size: 0.9rem;
}

.santoki-promo a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
}

.santoki-promo a:hover {
  color: var(--primary-dark);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero { min-height: 70vh; padding: 80px 20px 60px; }
  .logo-top-left { top: 16px; left: 16px; }
  .logo-top-left img { height: 80px; }
  .logo-bottom-centered img { height: 60px; }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding: 16px;
  }
  .lightbox-container { width: 98vw; max-height: 95vh; }
  .lightbox-nav { width: 36px; height: 36px; }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .lightbox-info { padding: 20px; }
  .lightbox-actions { flex-direction: column; align-items: flex-start; gap: 20px; }
}

@media (max-width: 400px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 12px; }
}