:root {
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --bg-dark: #0a0a0c;
  --bg-panel: rgba(25, 25, 30, 0.6);
  --bg-panel-solid: #19191e;
  
  --accent-primary: #ff4500;
  --accent-hover: #ff6a00;
  --accent-gradient: linear-gradient(135deg, #ff4500 0%, #ff8c00 100%);
  
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --border-color: rgba(255, 255, 255, 0.1);
  
  --radius-lg: 16px;
  --radius-md: 8px;
  --radius-sm: 4px;
  
  --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-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  border-bottom: 1px solid var(--border-color);
}

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

.hero .badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 99px;
  background: rgba(255, 69, 0, 0.15);
  border: 1px solid rgba(255, 69, 0, 0.3);
  color: var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin: 0 auto;
}

/* Prizes Section */
.prizes-section {
  max-width: 1000px;
  margin: 60px auto 0;
  padding: 0 20px;
  text-align: center;
}

.prizes-section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.prizes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.prize-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: var(--transition);
}

.prize-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 25px rgba(255, 69, 0, 0.15);
}

.prize-icon {
  width: 72px;
  height: 72px;
  background: rgba(255, 69, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  margin-bottom: 20px;
}

.prize-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: #fff;
}

.prize-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* How to Enter Section */
.how-to-enter-section {
  max-width: 1000px;
  margin: 60px auto 0;
  padding: 0 20px;
  text-align: center;
}

.how-to-enter-section h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.step-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 25px rgba(255, 69, 0, 0.15);
}

.step-label {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(255, 69, 0, 0.15);
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: #fff;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}


/* Main Container */
.app-container {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
}

/* Tabs */
.tabs-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}

.tab-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-heading);
  border-radius: 99px;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-main);
  border-color: rgba(255,255,255,0.3);
}

.tab-btn.active {
  background: var(--bg-panel-solid);
  color: var(--text-main);
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(255, 69, 0, 0.2);
}

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

.tab-pane.active {
  display: block;
}

@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(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

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

.panel-header h2 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.panel-header p {
  color: var(--text-muted);
}

/* Forms */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

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

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-main);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: var(--transition);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(0,0,0,0.5);
  box-shadow: 0 0 0 2px rgba(255, 69, 0, 0.2);
}

/* Checkboxes */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.checkbox-group input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.3);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}
.checkbox-group input[type="checkbox"]:checked {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}
.checkbox-group input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox-group label {
  margin-bottom: 0;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.5;
}
.checkbox-group input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 69, 0, 0.2);
}

/* File Upload Area */
.file-upload-zone {
  position: relative;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.2);
  padding: 40px 20px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  overflow: hidden;
}

.file-upload-zone:hover, .file-upload-zone.dragover {
  border-color: var(--accent-primary);
  background: rgba(255, 69, 0, 0.05);
}

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

.upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.upload-prompt svg {
  color: var(--accent-primary);
}

.upload-prompt small {
  font-size: 0.8rem;
  opacity: 0.7;
}

#file-preview {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  object-fit: contain;
}

.remove-btn {
  position: relative;
  z-index: 20;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 8px 16px;
  border-radius: 99px;
  cursor: pointer;
  font-size: 0.85rem;
}

.remove-btn:hover {
  background: rgba(255,255,255,0.1);
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 24px;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-heading);
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: var(--transition);
  position: relative;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 69, 0, 0.5);
}

.btn-primary.outline {
  background: transparent;
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: none;
}

.btn-primary.outline:hover {
  background: rgba(255, 69, 0, 0.1);
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
  width: auto;
  padding: 12px 24px;
}

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

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* 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;
  margin-left: 10px;
}

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

/* Success & Share Screen */
.success-header {
  text-align: center;
  margin-bottom: 30px;
}

.success-icon {
  margin-bottom: 16px;
}

.success-preview {
  margin-bottom: 30px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.success-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.share-panel {
  background: rgba(0,0,0,0.3);
  padding: 24px;
  border-radius: var(--radius-md);
  text-align: center;
  margin-bottom: 30px;
  border: 1px dashed var(--border-color);
}

.share-panel h3 {
  color: var(--accent-primary);
  margin-bottom: 8px;
}

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

.share-input-group {
  display: flex;
  margin-bottom: 16px;
}

.share-input-group input {
  flex: 1;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  border-right: none;
}

.share-input-group button {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0 20px;
}

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

.btn-social {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-social.fb { background: #1877F2; }
.btn-social.tw { background: #000000; border: 1px solid rgba(255,255,255,0.2); }
.btn-social:hover { filter: brightness(1.1); transform: translateY(-2px); }

/* Gallery */
.gallery-header {
  text-align: center;
  margin-bottom: 40px;
}

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

.gallery-card {
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.3);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.card-img-wrap {
  position: relative;
  padding-top: 100%; /* 1:1 Aspect ratio */
  cursor: pointer;
  overflow: hidden;
  background: #000;
}

.card-img-wrap img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-content {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-author {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.card-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 12px;
}

.btn-vote {
  background: transparent;
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

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

.btn-vote:hover:not(:disabled) {
  background: rgba(255, 69, 0, 0.1);
}

.btn-vote.voted {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  cursor: default;
}

.btn-vote.voted svg {
  fill: currentColor;
}

.card-votes {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.gallery-footer {
  text-align: center;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 20px;
  background: transparent; border: none;
  color: #fff; font-size: 2.5rem;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
}

.lightbox-content {
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

.lightbox-image-container {
  flex: 2;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.lightbox-image-container img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-info {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
  min-width: 300px;
}

.lightbox-author {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.lightbox-caption {
  color: var(--text-muted);
  margin-bottom: 30px;
  flex: 1;
  overflow-y: auto;
}

.lightbox-actions {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-vote.large {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 1.1rem;
}

.vote-count-display {
  text-align: center;
}

.count-number {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--accent-primary);
  display: block;
  line-height: 1;
}

.count-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: #fff;
  color: #000;
  padding: 12px 24px;
  border-radius: 99px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-container.hidden {
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
}

.toast-container.error { background: #ef4444; color: #fff; }
.toast-container.success { background: #10b981; color: #fff; }

/* Contest Rules */
.rules-section {
  margin-top: auto;
  padding-top: 60px;
  text-align: center;
  max-width: 800px;
  width: 100%;
  align-self: center;
}

.rules-content {
  border-top: 1px solid var(--border-color);
  padding-top: 40px;
}

.rules-section h2 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rules-section p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.6;
}

/* Powered By */
#wbx-powered-by-slot {
  margin-top: 0;
  padding: 20px 0 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .prizes-grid { grid-template-columns: 1fr; gap: 16px; }
  .steps-grid { grid-template-columns: 1fr; gap: 16px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .lightbox-content { flex-direction: column; overflow-y: auto; }
  .lightbox-image-container { flex: none; height: 50vh; }
  .lightbox-info { padding: 20px; }
  .hero { padding: 60px 15px; }
  .glass-panel { padding: 24px 15px; }
}