/* ===== RESET & BASE ===== */
:root {
  --primary: #a82e2e;      /* Trekell-like deep red */
  --primary-hover: #8f2626;
  --secondary: #2d3748;
  --bg-color: #f7fafc;
  --surface: #ffffff;
  --text-main: #1a202c;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --success: #38a169;
  --error: #e53e3e;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.03);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  color: var(--secondary);
  line-height: 1.2;
}

.hidden { display: none !important; }

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(26,32,44,0.6) 0%, rgba(26,32,44,0.9) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  width: 100%;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.85);
  font-weight: 400;
  margin-bottom: 40px;
}

/* Status Banners */
.status-banner {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  padding: 30px;
  margin-top: 30px;
  color: #fff;
}
.status-banner h2 {
  color: #fff;
  margin-bottom: 10px;
  font-size: 2rem;
}

/* Countdown */
.countdown-container {
  margin-top: 40px;
}
.countdown-label {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 15px;
  font-weight: 600;
}
.countdown {
  display: flex;
  justify-content: center;
  gap: 15px;
}
.countdown-item {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  padding: 15px 20px;
  min-width: 90px;
}
.countdown-item span:first-child {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.cd-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 5px;
}
.countdown-container .ended {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  background: rgba(0,0,0,0.5);
  padding: 10px 30px;
  border-radius: 999px;
  display: inline-block;
}

/* ===== MAIN CONTENT & TABS ===== */
.main-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px 80px;
  flex-grow: 1;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  position: relative;
  z-index: 10;
  margin-top: -65px;
}

.tab {
  background: var(--surface);
  border: none;
  padding: 16px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.tab:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px -5px rgba(168, 46, 46, 0.4);
}

/* ===== FORM STYLES ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 50px;
  max-width: 800px;
  margin: 0 auto;
}

.form-header {
  text-align: center;
  margin-bottom: 40px;
}
.form-header h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.form-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.error-message {
  background: #fed7d7;
  color: #c53030;
  padding: 15px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 30px;
  font-weight: 500;
  text-align: center;
  border: 1px solid #fc8181;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--secondary);
}

.required-asterisk {
  color: var(--primary);
}

input[type="text"],
input[type="email"],
select {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: #fff;
  transition: all 0.2s;
  color: var(--text-main);
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(168, 46, 46, 0.1);
}

/* Native Validation Styles */
form.was-validated input:invalid,
form.was-validated select:invalid {
  border-color: var(--error);
  background-color: #fff5f5;
}

select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  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='%234a5568' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 40px;
}

/* File Drop Area */
.file-drop-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 40px 20px;
  text-align: center;
  background: var(--bg-color);
  position: relative;
  transition: all 0.2s;
  cursor: pointer;
}
.file-drop-area:hover, .file-drop-area.dragover {
  border-color: var(--primary);
  background: #fff5f5;
}
.file-drop-area input[type="file"] {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-icon {
  margin-bottom: 15px;
}
.file-msg {
  font-weight: 500;
  color: var(--secondary);
  margin-bottom: 5px;
}
.file-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Terms Box */
.terms-container {
  margin-bottom: 40px;
}
.terms-scroll-box {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  height: 200px;
  overflow-y: auto;
  padding: 20px;
  background: var(--bg-color);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}
.terms-scroll-box h1, .terms-scroll-box h2, .terms-scroll-box h3 {
  font-family: 'Inter', sans-serif;
  color: var(--secondary);
  margin: 15px 0 10px;
}
.terms-scroll-box h1 { font-size: 1.2rem; }
.terms-scroll-box h2 { font-size: 1.1rem; }
.terms-scroll-box p, .terms-scroll-box ul { margin-bottom: 12px; }
.terms-scroll-box ul { padding-left: 20px; }

.checkbox-group {
  margin-top: 15px;
}
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
}
.checkbox-label.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.checkbox-label.disabled input {
  cursor: not-allowed;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}

.btn-primary {
  width: 100%;
  padding: 18px;
  font-size: 1.1rem;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(168, 46, 46, 0.4);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 46, 46, 0.5);
}
.btn-primary:disabled {
  background: #cbd5e0;
  box-shadow: none;
  cursor: not-allowed;
  color: #a0aec0;
}

.btn-secondary {
  padding: 12px 24px;
  background: var(--secondary);
  color: #fff;
}
.btn-secondary:hover {
  background: #1a202c;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== POST ENTRY / SUCCESS ===== */
.success-header {
  text-align: center;
  margin-bottom: 40px;
}
.success-icon {
  width: 80px;
  height: 80px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto 20px;
  box-shadow: 0 10px 20px rgba(56, 161, 105, 0.3);
}
.success-header h2 { font-size: 2.5rem; margin-bottom: 10px; }
.success-header p { font-size: 1.1rem; color: var(--text-muted); }
.email-confirmation-note {
  font-size: 0.9rem;
  color: var(--secondary);
  background: var(--bg-color);
  padding: 8px 16px;
  border-radius: 999px;
  display: inline-block;
  margin-top: 15px;
  font-weight: 500;
}

.user-submission-preview {
  margin: 30px auto;
  max-width: 400px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--bg-color);
}
.user-submission-preview img {
  width: 100%;
  display: block;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.bonus-section {
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  border: 1px solid #fed7d7;
  border-radius: var(--radius-md);
  padding: 25px;
  text-align: center;
  margin-bottom: 30px;
}
.bonus-section h3 {
  color: var(--primary);
  margin-bottom: 10px;
  font-family: inherit;
  font-size: 1.25rem;
}

.share-section {
  text-align: center;
  padding: 30px;
  background: var(--bg-color);
  border-radius: var(--radius-md);
  margin-bottom: 30px;
}
.share-section h3 {
  font-family: inherit;
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.share-section p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.share-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 20px;
}
.btn-social {
  padding: 12px 20px;
  color: #fff;
  flex: 1;
  max-width: 200px;
}
.btn-fb { background: #1877f2; }
.btn-fb:hover { background: #166fe5; }
.btn-tw { background: #000000; }
.btn-tw:hover { background: #333333; }

.copy-link-group {
  display: flex;
  max-width: 400px;
  margin: 0 auto;
}
.copy-link-group input {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  border-right: none;
  background: #fff;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.copy-link-group button {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  white-space: nowrap;
}

/* ===== GALLERY SECTION ===== */
.gallery-header {
  text-align: center;
  margin-bottom: 40px;
}
.gallery-header h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.gallery-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Gallery Filters */
.gallery-filters {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
  align-items: center;
}
.filter-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.filter-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-muted);
}
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  background: var(--surface);
  padding: 8px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
.filter-btn {
  background: transparent;
  border: none;
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 500;
  color: var(--secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  font-size: 0.95rem;
}
.filter-btn:hover {
  background: var(--bg-color);
}
.filter-btn.active {
  background: var(--secondary);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.gallery-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-img-wrapper {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-color);
}
.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-card:hover .card-img {
  transform: scale(1.05);
}

.card-category-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(26,32,44,0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex-grow: 1;
}

.card-order-number {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: -5px; /* pulls it closer to the uploader name or vote button */
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-vote-small {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 600;
  color: var(--secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-vote-small:hover {
  background: #fff5f5;
  border-color: #feb2b2;
  color: var(--primary);
}
.btn-vote-small:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.voted-indicator {
  width: 100%;
  text-align: center;
  padding: 10px;
  background: #f0fff4;
  color: var(--success);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid #c6f6d5;
}

.card-share-row {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.btn-card-share {
  flex: 1;
  padding: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: var(--bg-color);
  color: var(--text-muted);
  transition: all 0.2s;
}
.btn-card-share:hover {
  background: var(--border-color);
  color: var(--secondary);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.5;
}
.empty-state h3 { font-family: inherit; margin-bottom: 10px; }
.empty-state p { color: var(--text-muted); }

.gallery-footer {
  text-align: center;
  margin-top: 40px;
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 30px;
  background: none; border: none;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 10000;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 50px; height: 50px;
  border-radius: 50%;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10000;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }

.lightbox-content {
  display: flex;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.lightbox-image-container {
  flex: 1;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.lightbox-image-container img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-sidebar {
  width: 350px;
  background: var(--surface);
  padding: 30px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.lightbox-meta {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}
.category-badge {
  display: inline-block;
  background: var(--bg-color);
  color: var(--secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 15px;
}
.lightbox-order-number {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.lightbox-vote-section {
  margin-bottom: 30px;
}
.btn-large {
  padding: 16px;
  font-size: 1.1rem;
}
.vote-count-pill {
  background: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.9rem;
}
.voted-msg {
  text-align: center;
  padding: 16px;
  background: #f0fff4;
  color: var(--success);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1.1rem;
  border: 1px solid #c6f6d5;
}

.lightbox-share p {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 12px;
}
.share-buttons-small {
  display: flex;
  gap: 10px;
}
.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--bg-color);
  color: var(--secondary);
  border-radius: 50%;
}
.btn-icon:hover {
  background: var(--border-color);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 450px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute;
  top: 15px; right: 20px;
  background: none; border: none;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
}
.modal-icon {
  width: 60px; height: 60px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 20px;
}
.modal-content h3 { font-family: inherit; margin-bottom: 10px; }
.modal-content p { color: var(--text-muted); margin-bottom: 25px; }


/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .lightbox-content {
    flex-direction: column;
    max-height: 95vh;
  }
  .lightbox-image-container {
    max-height: 50vh;
  }
  .lightbox-sidebar {
    width: 100%;
    max-height: 45vh;
  }
  .lightbox-nav { top: 25vh; }
}

@media (max-width: 768px) {
  .hero { padding: 60px 15px; min-height: 40vh; }
  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { font-size: 1.1rem; }
  
  .card { padding: 30px 20px; }
  .form-header h2 { font-size: 2rem; }
  
  .gallery-header h2 { font-size: 2rem; }
  
  .tabs { flex-direction: column; gap: 10px; margin-top: -30px; }
  .tab { width: 100%; text-align: center; }
  
  .countdown { flex-wrap: wrap; }
  .countdown-item { min-width: 70px; padding: 10px; }
  .countdown-item span:first-child { font-size: 1.5rem; }
  
  .share-buttons { flex-direction: column; }
  .btn-social { max-width: 100%; }
}

#wbx-powered-by-slot {
  margin-top: 40px;
}
