:root {
  --primary: #a86ce8;
  --primary-hover: #c496ee;
  --secondary: #21ceaa;
  --bg-dark: #1a0f2e;
  --bg-panel: rgba(45, 30, 70, 0.7);
  --text-light: #ffffff;
  --text-muted: #d0c1e3;
  --border-light: rgba(168, 108, 232, 0.4);
  --error: #ff6b6b;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --radius-lg: 16px;
  --radius-md: 12px;
  --transition: all 0.3s ease;
}

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

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

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

/* Hero Section */
.hero {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem 2rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://offertabs.s3.amazonaws.com/offer/ory8u8/site/media/6a3e5c4ab6c1d9.33690742.jpg');
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(26, 15, 46, 0.4) 0%, rgba(26, 15, 46, 0.95) 100%);
  z-index: 2;
}

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

.hero-box {
  background: rgba(35, 20, 60, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(168, 108, 232, 0.3);
  border-radius: 0;
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: rgba(168, 108, 232, 0.2);
  border: 1px solid var(--border-light);
  border-radius: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #e2c2ff;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero h1 span {
  background: linear-gradient(135deg, #e2c2ff, #21ceaa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}

.subtitle {
  font-size: 1.1rem;
  color: #fff;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Countdown */
.countdown-wrapper {
  margin-top: 2rem;
}

.countdown-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.cd-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  min-width: 70px;
  backdrop-filter: blur(8px);
}

.cd-item span {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-heading);
  line-height: 1;
}

.cd-item small {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  text-transform: uppercase;
}

/* Main Container */
.main-container {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  margin-top: -2rem;
}

.tab-btn {
  background: rgba(35, 20, 60, 0.8);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 1rem 2rem;
  border-radius: 99px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(12px);
}

.tab-btn:hover {
  color: var(--text-light);
  background: rgba(168, 108, 232, 0.2);
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(168, 108, 232, 0.4);
}

/* Tab Panes */
.tab-pane {
  animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Glass Panels */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.form-wrapper {
  max-width: 700px;
  margin: 0 auto;
}

.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.form-header h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: flex;
  gap: 1.5rem;
}

.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(168, 108, 232, 0.25);
}

/* Upload Area */
.upload-area {
  position: relative;
  background: rgba(0, 0, 0, 0.2);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  text-align: center;
  transition: var(--transition);
  overflow: hidden;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary);
  background: rgba(168, 108, 232, 0.05);
}

.file-input {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.upload-placeholder {
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  pointer-events: none;
}

.upload-icon {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

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

.image-preview {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #000;
}

.image-preview img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: contain;
}

.remove-btn {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 99px;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 20;
  transition: var(--transition);
}
.remove-btn:hover { background: var(--error); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: inherit;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 15px rgba(168, 108, 232, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(168, 108, 232, 0.5);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: auto;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.btn-outline:hover {
  background: rgba(168, 108, 232, 0.1);
}

/* Errors and Status */
.error-msg {
  background: rgba(255, 107, 107, 0.15);
  color: var(--error);
  border: 1px solid rgba(255, 107, 107, 0.3);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.status-panel {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-panel h2 {
  font-family: var(--font-heading);
  color: #fff;
  margin-bottom: 1rem;
  font-size: 2rem;
}

/* Success Section */
.success-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

.share-panel {
  background: rgba(0, 0, 0, 0.3);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin: 2rem 0;
  border: 1px solid rgba(255,255,255,0.1);
}

.share-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Gallery Section */
.gallery-header {
  text-align: center;
  margin-bottom: 3rem;
}

.gallery-header h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.gallery-card {
  background: rgba(35, 20, 60, 0.5);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  border-color: rgba(168, 108, 232, 0.3);
}

.gallery-img-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #000;
  position: relative;
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-img-wrap img {
  transform: scale(1.05);
}

.gallery-info {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gallery-caption {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #fff;
  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(--text-muted);
  margin-bottom: 1rem;
}

.gallery-meta {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.vote-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-light);
  padding: 0.4rem 0.8rem;
  border-radius: 99px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.vote-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: rgba(168, 108, 232, 0.1);
}

.vote-btn svg {
  width: 16px;
  height: 16px;
}

.vote-btn.voted {
  background: rgba(168, 108, 232, 0.2);
  border-color: var(--primary);
  color: #fff;
  cursor: default;
}

.vote-btn.voted svg {
  fill: var(--primary);
  stroke: var(--primary);
}

/* Gallery Carousel Controls */
.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
}
.gallery-controls .btn {
  width: auto;
  padding: 0.5rem 1rem;
  font-size: 1rem;
}
.mx-3 {
  margin-left: 1rem;
  margin-right: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Loaders */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(168, 108, 232, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

/* Powered By */
#wbx-powered-by-slot {
  margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero { min-height: 40vh; padding-top: 3rem; }
  .hero h1 { font-size: 2.5rem; }
  .hero-box { padding: 1.5rem; }
  .form-row { flex-direction: column; gap: 0; }
  .glass-panel { padding: 2rem 1.5rem; }
  .tabs { flex-direction: column; margin-top: -1rem; margin-bottom: 2rem; }
  .tab-btn { text-align: center; }
  .gallery-controls { flex-direction: column; gap: 1rem; }
}
