/* ==== BASE STYLES & VARIABLES ==== */
:root {
  --color-bg: #1a1025; /* Dark purple */
  --color-bg-alt: #2d1b40; /* Slightly lighter purple */
  --color-surface: #3e2659; /* Lighter surface purple */
  --color-primary: #ff7b00; /* Vibrant orange */
  --color-primary-hover: #e06c00; /* Darker orange */
  --color-text: #fdf8ff; /* Off-white */
  --color-text-muted: #b8a9c9; /* Muted purple-grey */
  --color-error: #ef4444; /* Red 500 */
  --color-success: #10b981; /* Emerald 500 */
  
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
  
  --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.3);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(255, 123, 0, 0.2);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, .subtitle {
  font-family: var(--font-heading);
  line-height: 1.2;
}

.hidden {
  display: none !important;
}

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

.hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url('https://offertabs.s3.amazonaws.com/offer/ouhcu3/site/media/6ad92536af2120.96799136.jpg');
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(26, 16, 37, 0.5) 0%, rgba(26, 16, 37, 1) 100%);
}

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

.hero-flyer {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  margin-bottom: 24px;
  border: 2px solid rgba(255, 123, 0, 0.3);
}

.hero-description {
  font-size: 1.125rem;
  color: var(--color-text);
  max-width: 600px;
  margin: 0 auto;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  font-weight: 600;
}

.prize-highlight {
  display: block;
  margin-top: 10px;
  color: var(--color-primary);
  font-weight: 800;
  font-size: 1.25rem;
}

.timeline-box {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.timeline-item {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 123, 0, 0.3);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(8px);
  min-width: 140px;
}

.timeline-date {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-primary);
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.timeline-text {
  font-size: 0.8rem;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  text-align: center;
}

/* Countdown */
.countdown-container {
  margin-top: 30px;
}
.countdown-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
.countdown {
  display: flex;
  justify-content: center;
  gap: 15px;
}
.cd-box {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  min-width: 70px;
  display: flex;
  flex-direction: column;
}
.cd-box span {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
}
.cd-box small {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

/* ==== MAIN CONTENT ==== */
.main-content {
  flex: 1;
  width: 100%;
  max-width: 1000px;
  margin: -60px auto 40px;
  padding: 0 20px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.app-container {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  margin-bottom: 40px;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 20px;
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}
.tab-btn:hover {
  color: var(--color-text);
  background: rgba(255,255,255,0.02);
}
.tab-btn.active {
  color: var(--color-primary);
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--color-primary);
  box-shadow: 0 -2px 10px rgba(255, 123, 0, 0.5);
}

.tab-content {
  padding: 40px;
}

/* ==== FORMS ==== */
.form-group {
  margin-bottom: 24px;
}
.form-row {
  display: flex;
  gap: 20px;
}
.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 123, 0, 0.2);
}

/* File Upload Area */
.upload-area {
  display: block;
  width: 100%;
  border: 2px dashed rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  background: rgba(255,255,255,0.02);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.upload-area:hover {
  border-color: var(--color-primary);
  background: rgba(255, 123, 0, 0.05);
}
.hidden-file-input {
  position: absolute;
  width: 0; height: 0; opacity: 0;
}
.upload-icon {
  margin-bottom: 16px;
  color: var(--color-text-muted);
}
.upload-placeholder span {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}
.upload-placeholder small {
  color: var(--color-text-muted);
}
.image-preview {
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius-sm);
  margin: 0 auto;
  display: block;
  object-fit: contain;
}
.remove-image-btn {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.remove-image-btn:hover {
  background: var(--color-error);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  width: 100%;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.btn-secondary:hover:not(:disabled) {
  background: rgba(255,255,255,0.2);
}

/* Social share */
.social-share-btns {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.btn-social {
  color: #fff;
}
.btn-social.fb { background: #1877f2; }
.btn-social.tw { background: #000000; border: 1px solid rgba(255,255,255,0.2); }
.btn-social:hover { opacity: 0.9; transform: translateY(-2px); }

/* Loaders */
.loader {
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top: 3px solid #fff;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Alerts & Status */
.error-message {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  padding: 16px;
  border-left: 4px solid var(--color-error);
  border-radius: 4px;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.status-message {
  text-align: center;
  padding: 60px 20px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
}
.status-message h2 { margin-bottom: 10px; color: var(--color-primary); }

/* ==== POST ENTRY ==== */
.post-entry-section {
  text-align: center;
  padding: 20px 0;
}
.success-icon {
  margin-bottom: 20px;
}
.post-entry-section h2 { margin-bottom: 12px; }
.post-entry-section p { color: var(--color-text-muted); margin-bottom: 30px; }

.share-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  padding: 30px;
  margin-bottom: 30px;
}
.share-panel h3 { margin-bottom: 12px; color: var(--color-primary); }
.share-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.share-input-group input {
  flex: 1;
  background: rgba(0,0,0,0.2);
}
.share-input-group button {
  width: auto;
  white-space: nowrap;
}

.mt-4 { margin-top: 24px; }

/* ==== GALLERY ==== */
.gallery-header {
  text-align: center;
  margin-bottom: 30px;
}
.gallery-header h2 { font-size: 2rem; margin-bottom: 8px; }
.gallery-header p { color: var(--color-text-muted); }

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

.gallery-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.1);
}

.gallery-img-wrap {
  width: 100%;
  padding-top: 100%; /* 1:1 aspect ratio */
  position: relative;
  background: #000;
  cursor: pointer;
}
.gallery-img-wrap img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}
.gallery-img-wrap:hover img { opacity: 0.8; }

.gallery-content {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.gallery-caption {
  font-weight: 600;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 1.05rem;
}
.gallery-author {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  flex: 1;
}

.gallery-vote-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 12px;
}
.vote-count {
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.vote-btn {
  background: rgba(255, 123, 0, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(255, 123, 0, 0.2);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.vote-btn:hover:not(:disabled) {
  background: var(--color-primary);
  color: #fff;
}
.vote-btn:disabled {
  background: rgba(255,255,255,0.05);
  color: var(--color-text-muted);
  border-color: transparent;
  cursor: not-allowed;
}

.gallery-empty {
  text-align: center;
  padding: 40px;
  color: var(--color-text-muted);
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-md);
  margin-bottom: 30px;
}
.gallery-footer {
  text-align: center;
}

/* ==== LIGHTBOX ==== */
.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 20px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.7;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-content {
  display: flex;
  flex-direction: column;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.lightbox-img {
  width: 100%;
  height: 60vh;
  object-fit: contain;
  background: #000;
}
.lightbox-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.lightbox-info h3 { margin-bottom: 8px; }
.lightbox-author { color: var(--color-text-muted); margin-bottom: 16px; }

/* Desktop Lightbox */
@media (min-width: 768px) {
  .lightbox-content {
    flex-direction: row;
    height: 80vh;
  }
  .lightbox-img {
    height: auto;
    width: 65%;
    flex: 1;
  }
  .lightbox-info {
    width: 35%;
    border-left: 1px solid rgba(255,255,255,0.1);
  }
}

/* ==== POWERED BY ==== */
#wbx-powered-by-slot {
  margin: 20px auto 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
  .form-row { flex-direction: column; gap: 0; }
  .tab-content { padding: 24px 16px; }
  .hero { padding: 60px 16px 80px; }
  .hero h1 { font-size: 2.2rem; }
}
