/* ============================================================
   IndieSpot - Design System v2
   Dark gaming aesthetic with glassmorphism, gradients, animations
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Core colors */
  --bg-deep: #07070f;
  --bg-primary: #0c0c1a;
  --bg-elevated: #12122a;
  --bg-card: #181830;
  --bg-glass: rgba(18, 18, 42, 0.75);
  --bg-hover: #222250;
  
  /* Accent gradients */
  --accent-purple: #8b5cf6;
  --accent-violet: #a78bfa;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-gold: #f59e0b;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #06b6d4 100%);
  --gradient-hero: linear-gradient(135deg, #1e1b4b 0%, #312e81 30%, #4c1d95 60%, #701a75 100%);
  --gradient-card: linear-gradient(145deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.05) 100%);
  --gradient-glow: radial-gradient(ellipse at top, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
  
  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;
  
  /* Borders & effects */
  --border-subtle: rgba(139, 92, 246, 0.15);
  --border-glow: rgba(139, 92, 246, 0.3);
  --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.15);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-subtle);
  --shadow-card-hover: 0 8px 40px rgba(139, 92, 246, 0.2), 0 0 0 1px var(--border-glow);
  
  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Animated background particles */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(236, 72, 153, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.hidden { display: none !important; }

/* ============================================================
   HEADER
   ============================================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 7, 15, 0.8);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  transition: var(--transition-base);
}

.logo-img:hover {
  transform: scale(1.1);
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.3); }
  50% { box-shadow: 0 0 30px rgba(236, 72, 153, 0.4); }
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition-base);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.1);
}

.nav-link.active {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.15);
  box-shadow: 0 0 0 1px var(--border-subtle);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.points-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.points-icon {
  font-size: 1.1rem;
  animation: starFloat 2s ease-in-out infinite;
}

@keyframes starFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.user-menu {
  position: relative;
  cursor: pointer;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-subtle);
  transition: var(--transition-base);
}

.user-avatar:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.dropdown {
  position: absolute;
  top: 56px;
  right: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 8px 0;
  min-width: 200px;
  box-shadow: var(--shadow-glow);
  animation: dropdownIn 0.2s ease;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.dropdown a:hover {
  background: rgba(139, 92, 246, 0.1);
  color: var(--text-primary);
}

.dropdown hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 8px 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.btn:hover::before {
  transform: translateX(100%);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-glow);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.btn-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-glass:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--border-glow);
}

.btn-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* Social login buttons */
.btn-google {
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
}
.btn-google:hover { background: #f8f9fa; }

.btn-discord {
  background: #5865f2;
  color: white;
}
.btn-discord:hover { background: #4752c4; }

.btn-steam {
  background: #1b2838;
  color: #c7d5e0;
  border: 1px solid #2a475e;
}
.btn-steam:hover { background: #2a475e; }

.btn-apple {
  background: #000;
  color: white;
}

.btn-github {
  background: #24292e;
  color: white;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  padding: 100px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
  animation: heroGlow 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroGlow {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.5; }
  50% { transform: translateX(-50%) scale(1.1); opacity: 0.8; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease;
}

.hero-badge span {
  color: var(--accent-gold);
  font-weight: 600;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-title-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 60px;
  animation: fadeInUp 0.6s ease 0.4s both;
}

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

.hero-stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

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

/* ============================================================
   SECTIONS
   ============================================================ */

.section-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 32px;
}

/* ============================================================
   FILTERS
   ============================================================ */

.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  align-items: center;
  padding: 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
}

.filter-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* ============================================================
   AD CARDS
   ============================================================ */

.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.ad-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: var(--transition-slow);
  cursor: pointer;
  position: relative;
}

.ad-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.ad-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-glow);
}

.ad-card:hover::before {
  opacity: 1;
}

.ad-card-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.ad-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.ad-card:hover .ad-card-image {
  transform: scale(1.05);
}

.ad-card-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 16px 16px;
  background: linear-gradient(transparent, rgba(12, 12, 26, 0.9));
}

.ad-card-price-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.ad-card-body {
  padding: 20px;
  position: relative;
  z-index: 1;
}

.ad-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ad-card-dev {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ad-card-dev img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.ad-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tag {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
}

.tag-accent {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-violet);
  border-color: rgba(139, 92, 246, 0.3);
}

.tag-gold {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border-color: rgba(245, 158, 11, 0.3);
}

.ad-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.ad-card-stats {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ad-card-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ad-card-giveaway {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(236, 72, 153, 0.15);
  color: var(--accent-pink);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  animation: giveawayPulse 2s ease-in-out infinite;
}

@keyframes giveawayPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(236, 72, 153, 0); }
}

/* ============================================================
   AD DETAIL
   ============================================================ */

.ad-detail {
  max-width: 1000px;
  margin: 0 auto;
}

.ad-detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  margin-bottom: 40px;
  align-items: start;
}

.ad-detail-cover {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.ad-detail-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ad-detail-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.ad-detail-dev {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
}

.ad-detail-dev img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-subtle);
}

.ad-detail-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ad-detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Progress Section */
.progress-section {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.progress-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
}

.progress-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: var(--bg-elevated);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 24px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 5px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2));
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-40px); }
  100% { transform: translateX(40px); }
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  text-align: center;
}

.progress-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-base);
}

.progress-step.completed .progress-step-icon {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.progress-step.active .progress-step-icon {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent-purple);
  color: var(--accent-violet);
  animation: stepPulse 2s ease-in-out infinite;
}

@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.3); }
  50% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
}

.progress-step-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.progress-step.completed .progress-step-label {
  color: var(--accent-violet);
}

.progress-step.active .progress-step-label {
  color: var(--text-primary);
}

/* Video */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 32px;
  border: 1px solid var(--border-subtle);
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Steam Widget */
.steam-widget-container {
  margin: 24px 0;
  display: flex;
  justify-content: center;
}

.steam-widget {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

/* Gallery */
.gallery {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 32px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.gallery::-webkit-scrollbar {
  height: 6px;
}

.gallery::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

.gallery img {
  width: 240px;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  flex-shrink: 0;
  cursor: pointer;
  transition: var(--transition-base);
  border: 1px solid var(--border-subtle);
}

.gallery img:hover {
  transform: scale(1.05);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

/* Description */
.description-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 32px;
}

.description-box h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.description-box p {
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-wrap;
  font-size: 1rem;
}

/* ============================================================
   GIVEAWAY CARDS
   ============================================================ */

.giveaway-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.giveaway-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.giveaway-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 16px;
}

.giveaway-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.giveaway-card-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.giveaway-card-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.giveaway-card-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 4px;
  overflow: hidden;
}

.giveaway-card-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ============================================================
   KEYS INVENTORY
   ============================================================ */

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

.key-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-base);
}

.key-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card-hover);
}

.key-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-primary);
}

.key-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.key-card-header img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

.key-card-title {
  font-weight: 600;
  font-size: 1rem;
}

.key-card-type {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.key-code {
  background: var(--bg-elevated);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
  user-select: all;
  margin-bottom: 16px;
  transition: var(--transition-fast);
  letter-spacing: 1px;
}

.key-code:hover {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.05);
}

/* ============================================================
   FORMS
   ============================================================ */

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

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

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Social login grid */
.social-login-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.social-login-grid .btn {
  padding: 12px;
  font-size: 0.9rem;
}

.or-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 7, 15, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 40px;
  box-shadow: var(--shadow-glow);
  animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 24px;
}

/* ============================================================
   TOAST
   ============================================================ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-glow);
  animation: toastSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 400px;
  font-size: 0.95rem;
}

.toast.success { 
  border-left: 3px solid var(--success); 
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.1), var(--bg-elevated));
}
.toast.error { 
  border-left: 3px solid var(--danger); 
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), var(--bg-elevated));
}
.toast.info { 
  border-left: 3px solid var(--accent-purple); 
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), var(--bg-elevated));
}

@keyframes toastSlide {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   DEV PANEL
   ============================================================ */

.dev-panel {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
}

.dev-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 96px;
}

.dev-sidebar-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.dev-sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dev-sidebar-menu a {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dev-sidebar-menu a:hover {
  background: rgba(139, 92, 246, 0.1);
  color: var(--text-primary);
}

.dev-sidebar-menu a.active {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-violet);
  box-shadow: 0 0 0 1px var(--border-subtle);
}

.dev-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-base);
}

.stat-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0.5;
}

.stat-card-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.stat-card-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Keys upload */
.keys-upload {
  background: var(--bg-elevated);
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  transition: var(--transition-base);
}

.keys-upload:hover {
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.05);
}

.keys-upload textarea {
  width: 100%;
  min-height: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 16px;
  border-radius: var(--radius-lg);
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  resize: vertical;
  margin-top: 16px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  font-family: var(--font-display);
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 1.4rem;
}

.empty-state p {
  max-width: 400px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/* ============================================================
   LOADING
   ============================================================ */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 60px;
}

/* ============================================================
   TICKER / MARQUEE (Lanzamientos de hoy)
   ============================================================ */

.ticker-section {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 12px 20px;
  margin-bottom: 32px;
  overflow: hidden;
}

.ticker-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent-violet);
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-wrap {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
}

.ticker-track {
  display: flex;
  gap: 24px;
  animation: tickerScroll 30s linear infinite;
  width: max-content;
}

.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  cursor: pointer;
  transition: var(--transition-base);
  flex-shrink: 0;
}

.ticker-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-glow);
  transform: scale(1.05);
}

.ticker-item img {
  width: 40px;
  height: 24px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.ticker-item span {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.ticker-tag {
  font-size: 0.9rem;
}

.ticker-placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================================
   FEATURED SECTIONS (Steam-style)
   ============================================================ */

.featured-sections {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 40px;
}

.featured-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.featured-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0.6;
}

.featured-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.featured-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.featured-link {
  color: var(--accent-violet);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.featured-link:hover {
  color: var(--text-primary);
}

.featured-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.featured-scroll::-webkit-scrollbar {
  height: 6px;
}

.featured-scroll::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

.featured-card {
  flex-shrink: 0;
  width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-base);
}

.featured-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card-hover);
}

.featured-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.featured-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 12px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-card-meta {
  display: flex;
  gap: 12px;
  padding: 0 12px 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 0;
    gap: 12px;
  }
  
  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  
  .hero {
    padding: 60px 0 40px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-stats {
    gap: 24px;
  }
  
  .ads-grid {
    grid-template-columns: 1fr;
  }
  
  .ad-detail-hero {
    grid-template-columns: 1fr;
  }
  
  .ad-detail-cover {
    max-width: 280px;
    margin: 0 auto;
  }
  
  .dev-panel {
    grid-template-columns: 1fr;
  }
  
  .dev-sidebar {
    position: static;
  }
  
  .gallery img {
    width: 180px;
    height: 100px;
  }
  
  .progress-steps {
    gap: 8px;
  }
  
  .progress-step-icon {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  
  .social-login-grid {
    grid-template-columns: 1fr;
  }
  
  .modal {
    padding: 24px;
  }
}

/* ============================================================
   ANIMATIONS & UTILITIES
   ============================================================ */

.animate-fade-in {
  animation: fadeInUp 0.6s ease both;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-glow);
}

/* Selection */
::selection {
  background: rgba(139, 92, 246, 0.3);
  color: var(--text-primary);
}
