/* Reset & Base Variables */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --accent: #f59e0b;
  --danger: #ef4444;
  --success: #10b981;
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Playfair Display', serif;
}

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

.hidden { display: none !important; }

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

a {
  color: var(--primary);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Typography Helpers */
.mt-4 { margin-top: 1rem; }

/* Hero Section */
.hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem 6rem;
  background: url('https://offertabs.s3.amazonaws.com/offer/py54j9/site/media/6ac5733ff2bed5.52451341.jpg') center/cover no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3) 0%, rgba(15, 23, 42, 1) 100%);
  z-index: 1;
}

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

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 1.5rem;
  color: #fff;
}

.hero p {
  font-size: 1.25rem;
  color: #e2e8f0;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.countdown-item {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
  min-width: 90px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.countdown-item span:first-child {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-heading);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.cd-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Tabs */
.nav-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: -2.5rem auto 3rem;
  position: relative;
  z-index: 10;
  max-width: 600px;
  padding: 0 1rem;
  width: 100%;
}

.tab-btn {
  flex: 1;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.5);
}

/* Main Content Area */
.main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  width: 100%;
}

.card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 3rem 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  max-width: 600px;
  margin: 0 auto;
}

.card h2 {
  margin-bottom: 2rem;
  font-size: 2.25rem;
  text-align: center;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #e2e8f0;
  font-size: 0.95rem;
}

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

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  background: rgba(0, 0, 0, 0.4);
}

/* Custom Select */
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='%2394a3b8' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  padding-right: 3rem;
  cursor: pointer;
}

/* File Input & Preview */
input[type="file"] {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
}

input[type="file"]:hover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

.photo-preview {
  position: relative;
  margin-top: 1rem;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4/3;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-clear {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}

.btn-clear:hover {
  background: rgba(239, 68, 68, 0.8);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #fff;
  box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(59, 130, 246, 0.5);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  background: var(--text-muted);
  box-shadow: none;
}

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

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

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-block {
  width: 100%;
  display: block;
}

/* Post-Entry & Share Panel */
.success-icon {
  width: 64px;
  height: 64px;
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  border: 2px solid rgba(16, 185, 129, 0.4);
}

#thank-you-container p {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.share-panel {
  margin-top: 2.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(79, 70, 229, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  text-align: center;
}

.share-panel h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.share-controls {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.social-share {
  display: flex;
  gap: 1rem;
}

.btn-social {
  flex: 1;
  text-align: center;
  padding: 0.875rem;
  border-radius: 12px;
  font-weight: 600;
  transition: transform 0.2s;
}

.btn-social:hover {
  transform: translateY(-2px);
}

.btn-social.fb { background: #1877f2; color: #fff; }
.btn-social.tw { background: #0f1419; color: #fff; border: 1px solid rgba(255,255,255,0.2); }

/* Gallery */
.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.gallery-header h2 {
  font-size: 2.5rem;
  margin: 0;
}

.gallery-filters select {
  min-width: 200px;
}

.gallery-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(255,255,255,0.02);
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,0.1);
  color: var(--text-muted);
  font-size: 1.125rem;
}

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

.gallery-card {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.3);
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 40px -15px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.15);
}

.card-img-wrapper {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #000;
  position: relative;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-card:hover .card-img-wrapper img {
  transform: scale(1.08);
}

.card-body {
  padding: 1.5rem;
}

.card-caption {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.load-more-container {
  text-align: center;
  margin-top: 3rem;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  z-index: 1001;
  background: var(--bg-card);
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  border-radius: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 900px) {
  .modal-content {
    flex-direction: row;
    overflow: hidden;
  }
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 10;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.9);
}

.modal-body {
  display: flex;
  flex-direction: column;
  width: 100%;
}

@media (min-width: 900px) {
  .modal-body { flex-direction: row; }
}

.modal-img-container {
  flex: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.modal-img-container img {
  max-height: 60vh;
  width: auto;
  object-fit: contain;
}

@media (min-width: 900px) {
  .modal-img-container img { max-height: 90vh; }
}

.modal-details {
  width: 100%;
  padding: 2.5rem 2rem;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
}

@media (min-width: 900px) {
  .modal-details {
    width: 380px;
    min-width: 380px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    overflow-y: auto;
  }
}

.modal-details h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--text);
}

.modal-details p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Item Share */
.share-item-panel {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.share-item-panel p {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.25rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

#item-share-url {
  font-size: 0.85rem;
  padding: 0.75rem;
  text-align: center;
  background: rgba(0,0,0,0.3);
}

/* Alerts */
.alert {
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  font-weight: 600;
  text-align: center;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Powered By */
#wbx-powered-by-slot {
  margin: 3rem auto 0;
  width: 100%;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero { padding: 4rem 1.5rem; }
  .card { padding: 2rem 1.5rem; }
  .nav-tabs { flex-direction: column; }
  .gallery-header { flex-direction: column; align-items: flex-start; }
  .gallery-filters, .gallery-filters select { width: 100%; }
}