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

:root {
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --primary-dark: #5b21b6;
  --accent: #f43f5e;
  --accent-light: #fb7185;
  --bg-dark: #0f0a1e;
  --bg-card: rgba(255,255,255,0.06);
  --bg-card-hover: rgba(255,255,255,0.1);
  --text: #f1f0f5;
  --text-muted: rgba(241,240,245,0.6);
  --border: rgba(255,255,255,0.1);
  --border-light: rgba(255,255,255,0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: all 0.3s ease;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* === 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(15,10,30,0.7) 0%, rgba(15,10,30,0.9) 100%);
  z-index: 1;
}

.hero-blur-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 2;
  opacity: 0.5;
}

.blob-1 {
  width: 400px; height: 400px;
  top: -80px; right: -60px;
  background: radial-gradient(circle, rgba(124,58,237,0.5), transparent 70%);
  animation: float 8s ease-in-out infinite;
}

.blob-2 {
  width: 350px; height: 350px;
  bottom: -60px; left: -80px;
  background: radial-gradient(circle, rgba(244,63,94,0.4), transparent 70%);
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

.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: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--primary-light);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  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: #fff;
  animation: fadeInUp 0.7s ease;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 50%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  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: 600;
  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;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124,58,237,0.5);
}

.btn-glass {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid var(--border-light);
  backdrop-filter: blur(8px);
}

.btn-glass:hover {
  background: rgba(255,255,255,0.15);
  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(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* === COUNTDOWN === */
.countdown-bar {
  background: rgba(124,58,237,0.15);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  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: 600;
  color: var(--primary-light);
  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: 700;
  font-variant-numeric: tabular-nums;
}

.countdown-unit small {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.countdown-sep {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: -14px;
}

/* === 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;
  margin-bottom: 12px;
}

.status-banner p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* === TABS === */
.tabs-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15,10,30,0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.tabs-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  padding: 0 16px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary);
}

/* === 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: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.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);
  color: var(--text);
  background-color: rgba(255,255,255,0.08);
  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='%23a78bfa' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  min-width: 180px;
}

/* === GALLERY GRID === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  animation: fadeInUp 0.4s ease both;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  border-color: var(--border-light);
}

.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 50%, rgba(0,0,0,0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

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

.gallery-card-author {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.gallery-card-heart {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  z-index: 2;
  transition: var(--transition);
}

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

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

.gallery-card-heart.voted {
  background: rgba(244,63,94,0.2);
  border-color: rgba(244,63,94,0.3);
}

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

.empty-icon { margin-bottom: 16px; color: var(--text-muted); }

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* === LOADING === */
.gallery-loading {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
}

.spinner {
  width: 36px; height: 36px;
  margin: 0 auto 12px;
  border: 3px solid var(--border);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* === FORM === */
.form-card {
  max-width: 600px;
  margin: 24px auto;
  padding: 40px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}

.form-header {
  text-align: center;
  margin-bottom: 32px;
}

.form-header h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.form-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.8);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.2);
  background: rgba(255,255,255,0.08);
}

.form-group textarea { resize: vertical; }

.form-group select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 40px;
  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='%23a78bfa' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.char-count {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 500px) {
  .form-row { grid-template-columns: 1fr; }
}

/* Upload Zone */
.upload-zone {
  position: relative;
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 24px;
  transition: var(--transition);
  overflow: hidden;
}

.upload-zone.dragover {
  border-color: var(--primary-light);
  background: rgba(124,58,237,0.1);
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--text-muted);
  gap: 12px;
}

.upload-placeholder span { font-weight: 500; }
.upload-placeholder small { font-size: 0.8rem; }

.upload-preview {
  position: relative;
  width: 100%;
}

.upload-preview img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  display: block;
  background: rgba(0,0,0,0.3);
}

.remove-photo-btn {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: var(--transition);
}

.remove-photo-btn:hover { background: var(--accent); }

/* Form Error */
.form-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(244,63,94,0.12);
  border: 1px solid rgba(244,63,94,0.3);
  border-radius: var(--radius-xs);
  color: var(--accent-light);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* === SUCCESS === */
.success-content {
  text-align: center;
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.success-content h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.success-content > p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.success-photo-wrap {
  max-width: 300px;
  margin: 0 auto 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.success-photo-wrap img {
  width: 100%;
  display: block;
}

.share-section { margin-top: 24px; }

.share-section h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.share-url-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.share-url-row input {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-family: var(--font-body);
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  outline: none;
}

.share-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.share-fb { background: #1877f2; color: #fff; }
.share-fb:hover { background: #0d65d9; }
.share-tw { background: #1d1d1d; color: #fff; }
.share-tw:hover { background: #333; }

/* Bonus Panel */
.bonus-panel {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.bonus-panel h3 { margin-bottom: 8px; }
.bonus-panel p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }

/* === 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,0,0,0.92);
  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: #1a1128;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: fadeInUp 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 10;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  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: var(--accent); }

.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(124,58,237,0.6); }
.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: 20px 24px;
}

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

.lightbox-meta h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.lightbox-author {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.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: 10px 24px;
  border-radius: 999px;
  background: rgba(244,63,94,0.12);
  border: 1px solid rgba(244,63,94,0.3);
  color: var(--accent-light);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.vote-btn-lg:hover {
  background: rgba(244,63,94,0.25);
  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: 8px;
  align-items: center;
}

/* === TOAST === */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  background: rgba(15,10,30,0.95);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 2000;
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

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

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

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero { min-height: 70vh; padding: 80px 20px 60px; }
  .form-card { margin: 16px; padding: 28px 20px; }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    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: 16px; }
  .lightbox-actions { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px; }
  .tabs-inner { padding: 0 8px; }
  .tab-btn { font-size: 0.8rem; padding: 12px 8px; gap: 4px; }
  .tab-btn svg { width: 14px; height: 14px; }
}
