body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  font-family: 'Inter', sans-serif;
  color: #374151;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3 {
  font-family: 'Playfair Display', serif;
}

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

/* Hero Section */
.hero {
  position: relative;
  padding: 80px 20px 100px;
  text-align: center;
  color: white;
  background: url('https://offertabs.s3.amazonaws.com/offer/cte7kh/site/media/69fba1dfe6b036.29091643.jpg') center/cover;
  overflow: hidden;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0.9) 100%);
  z-index: 1;
}
.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 3rem;
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 800;
  line-height: 1.2;
}
.hero .subtitle {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  margin: 0;
}

/* Coming Soon Fullscreen State */
body.is-coming-soon .hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 80px; /* Space for powered-by */
}
body.is-coming-soon .hero > div:first-child {
  position: relative;
  z-index: 2;
  width: 100%;
}
body.is-coming-soon .ranking-container {
  margin: 0 auto;
  padding: 0;
  min-height: 0;
  box-shadow: none;
  background: transparent;
  transform: translateY(-60px); /* Pull powered-by into view over the hero */
}
body.is-coming-soon .phase-section {
  display: none !important;
}

/* Countdown */
.countdown-container {
  margin-top: 30px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 20px 30px;
  display: inline-block;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.countdown-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}
.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
}
.countdown-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 55px;
}
.countdown-block span:first-child {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: 'Inter', sans-serif;
  line-height: 1;
  color: white;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.cd-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-top: 6px;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.cd-colon {
  font-size: 2.2rem !important;
  font-weight: 400 !important;
  color: rgba(255,255,255,0.5) !important;
  line-height: 1 !important;
  margin: 0 -5px;
}

/* Main Container */
.ranking-container {
  max-width: 1000px;
  margin: -40px auto 40px;
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  position: relative;
  z-index: 10;
  min-height: 400px;
  box-sizing: border-box;
}

/* Transitions */
.phase-section {
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Phase 1 Instructions */
.instructions {
  text-align: center;
  margin-bottom: 30px;
}
.instructions h2 {
  font-size: 2rem;
  color: #111827;
  margin-top: 0;
  margin-bottom: 10px;
}
.instructions p {
  color: #6b7280;
  font-size: 1.1rem;
  margin: 0;
}

/* Selection UI */
.selection-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 20px;
}
@media (min-width: 800px) {
  .selection-container {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.ranked-section, .available-section {
  background: #f8fafc;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.ranked-section h3, .available-section h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.4rem;
  color: #1e293b;
  border-bottom: 2px solid #cbd5e1;
  padding-bottom: 10px;
}
.available-count-label {
  font-size: 1rem;
  color: #64748b;
  font-weight: 500;
  margin-left: 8px;
  font-family: 'Inter', sans-serif;
}
.available-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
}
.available-item {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.available-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.available-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: pointer;
}
.available-info {
  padding: 10px;
  flex-grow: 1;
}
.available-info h4 {
  margin: 0;
  font-size: 0.9rem;
  color: #334155;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.action-buttons {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.btn-add {
  background: #10b981;
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: all 0.2s;
}
.btn-add:hover:not(:disabled) {
  background: #059669;
  transform: scale(1.1);
}
.btn-add:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  opacity: 0.5;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-style: italic;
  background: white;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
}

/* Ranking List UI */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ranking-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.ranking-item:hover {
  box-shadow: 0 8px 15px rgba(0,0,0,0.05);
  border-color: #d1d5db;
}
.rank-number {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: #4b5563;
  font-weight: 700;
  border-radius: 50%;
  font-size: 1rem;
  margin-right: 15px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}
/* Gold, Silver, Bronze for top 3 */
.ranking-item:nth-child(1) .rank-number { background: #fbbf24; color: white; box-shadow: 0 4px 10px rgba(251, 191, 36, 0.4); }
.ranking-item:nth-child(2) .rank-number { background: #9ca3af; color: white; box-shadow: 0 4px 10px rgba(156, 163, 175, 0.4); }
.ranking-item:nth-child(3) .rank-number { background: #b45309; color: white; box-shadow: 0 4px 10px rgba(180, 83, 9, 0.4); }

.ranking-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 15px;
  cursor: pointer;
  border: 1px solid #f3f4f6;
}
.ranking-info {
  flex-grow: 1;
}
.ranking-info h3 {
  margin: 0;
  font-size: 1rem;
  color: #1f2937;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}
.ranking-controls {
  display: flex;
  flex-direction: row;
  gap: 6px;
}
.ranking-controls button {
  background: #f3f4f6;
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4b5563;
  transition: all 0.2s;
}
.ranking-controls button:hover:not(:disabled) {
  background: #e5e7eb;
  color: #1f2937;
}
.ranking-controls button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.ranking-controls .btn-remove {
  background: #fee2e2 !important;
  color: #ef4444 !important;
}
.ranking-controls .btn-remove:hover {
  background: #fecaca !important;
  color: #dc2626 !important;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}
.btn-primary:disabled {
  background: #9ca3af;
  box-shadow: none;
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
.btn-block {
  width: 100%;
}
.btn-text {
  background: none;
  border: none;
  color: #6b7280;
  padding: 10px;
  margin-top: 15px;
  cursor: pointer;
  font-size: 1rem;
  width: 100%;
  font-family: 'Inter', sans-serif;
}
.btn-text:hover {
  color: #111827;
  text-decoration: underline;
}

/* Forms */
.form-container {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}
.form-container h2 {
  font-size: 2rem;
  margin-top: 0;
  margin-bottom: 10px;
  color: #111827;
}
.form-container p {
  color: #6b7280;
  margin-bottom: 30px;
  font-size: 1.1rem;
}
.form-group {
  margin-bottom: 20px;
  text-align: left;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
}
.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}
.form-group input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.alert-error {
  background: #fee2e2;
  color: #b91c1c;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #fecaca;
  text-align: left;
}

/* Success State */
.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}
#success-state h2 {
  font-size: 2rem;
  margin-top: 0;
  margin-bottom: 10px;
  color: #111827;
}
#success-state p {
  color: #6b7280;
  font-size: 1.1rem;
}

/* Share Panel */
.share-panel {
  margin-top: 40px;
  padding: 30px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.share-panel h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.4rem;
  font-family: 'Inter', sans-serif;
}
.share-input-group {
  display: flex;
  margin: 20px 0;
}
.share-input-group input {
  flex-grow: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px 0 0 8px;
  background: white;
  font-size: 1rem;
  color: #4b5563;
}
.share-input-group button {
  background: #4b5563;
  color: white;
  border: none;
  padding: 0 20px;
  border-radius: 0 8px 8px 0;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.share-input-group button:hover {
  background: #374151;
}
.social-shares {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-social {
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  color: white;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s, transform 0.2s;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
}
.btn-social:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.btn-social.fb { background: #1877f2; }
.btn-social.tw { background: #000000; }

.hidden { display: none !important; }

/* Responsive adjustments */
@media (max-width: 640px) {
  .hero { padding: 60px 15px 80px; }
  .hero h1 { font-size: 2.2rem; }
  
  .countdown { gap: 8px; }
  .countdown-block { min-width: 45px; }
  .countdown-block span:first-child { font-size: 1.8rem; }
  .cd-colon { font-size: 1.6rem !important; margin: 0 -4px; }
  
  .ranking-container { margin: -30px 15px 30px; padding: 20px; }
  .ranking-image { width: 40px; height: 40px; margin-right: 12px; }
  .rank-number { width: 30px; height: 30px; font-size: 0.9rem; margin-right: 12px; }
  .ranking-info h3 { font-size: 0.9rem; }
  .ranking-item { padding: 8px; }
  .ranking-controls { gap: 4px; }
  .ranking-controls button { width: 28px; height: 28px; }
  .available-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .ranked-section, .available-section { padding: 15px; }
}
