/* ========== VARIABLES ========== */
:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a24;
  --card: #16161f;
  --card-hover: #1e1e2a;
  --border: #2a2a3a;
  --accent: #ff3c5f;
  --accent2: #ff7a3c;
  --accent3: #3caaff;
  --gold: #ffd93d;
  --green: #2ecc71;
  --text: #f0f0f8;
  --text2: #9090aa;
  --text3: #5a5a70;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 40px rgba(0,0,0,0.4);
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'Space Mono', 'Noto Sans', 'Segoe UI Symbol', 'Noto Sans Symbols', monospace;
}

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body), 'Noto Sans', 'Segoe UI Symbol', 'Noto Sans Symbols', 'Apple Symbols', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ========== BUTTONS ========== */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}
.btn-primary:hover { background: #ff5573; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,60,95,0.4); }
.btn-primary.big { padding: 15px 36px; font-size: 16px; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--text2); background: var(--bg3); }
.btn-ghost.big { padding: 15px 36px; font-size: 16px; }

.btn-full { width: 100%; text-align: center; }

/* ========== NAVBAR ========== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 24px;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 32px;
  height: 64px;
}
.logo {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 2px;
  color: var(--text);
  flex-shrink: 0;
}
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 8px; flex: 1; }
.nav-link {
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text2);
  transition: all 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--bg3); }
.nav-auth { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; }

/* User menu */
.user-menu { position: relative; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; cursor: pointer;
  border: 2px solid transparent; transition: border-color 0.2s;
}
.user-avatar:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,60,95,0.4); }
.user-avatar { transition: all 0.2s; }
.dropdown {
  position: absolute; top: 48px; right: 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); min-width: 180px;
  box-shadow: var(--shadow); overflow: hidden;
  display: none;
  z-index: 999;
}
.dropdown.open { display: block; }
.dropdown a {
  display: block; padding: 12px 18px;
  font-size: 14px; color: var(--text2);
  transition: all 0.15s;
}
.dropdown a:hover { background: var(--bg3); color: var(--text); }
.dropdown-divider { height: 1px; background: var(--border); }

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 100px 24px 60px;
  position: relative; overflow: hidden;
  gap: 40px;
  max-width: 1300px; margin: 0 auto;
}
.hero-bg { position: fixed; inset: 0; z-index: -1; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.15;
}
.blob1 { width: 500px; height: 500px; background: var(--accent); top: -100px; left: -100px; animation: blob-move 8s ease-in-out infinite; }
.blob2 { width: 400px; height: 400px; background: var(--accent3); bottom: 0; right: 10%; animation: blob-move 10s ease-in-out infinite reverse; }
.blob3 { width: 300px; height: 300px; background: var(--accent2); top: 40%; left: 40%; animation: blob-move 12s ease-in-out infinite; }
@keyframes blob-move {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-30px) scale(1.05); }
  66% { transform: translate(-20px,20px) scale(0.95); }
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px; opacity: 0.3;
}
.hero-content { flex: 1; max-width: 580px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  padding: 8px 16px; border-radius: 100px;
  font-size: 13px; font-weight: 500; color: var(--text2);
  margin-bottom: 24px;
  animation: fade-up 0.6s ease both;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 8vw, 96px);
  line-height: 0.95;
  letter-spacing: 2px;
  margin-bottom: 24px;
  animation: fade-up 0.6s 0.1s ease both;
}
.hero-title .accent { color: var(--accent); }
.hero-sub {
  font-size: 17px; line-height: 1.6; color: var(--text2);
  margin-bottom: 36px; max-width: 480px;
  animation: fade-up 0.6s 0.2s ease both;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; animation: fade-up 0.6s 0.3s ease both; }
.hero-stats { display: flex; align-items: center; gap: 24px; animation: fade-up 0.6s 0.4s ease both; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-family: var(--font-display); font-size: 28px; color: var(--text); letter-spacing: 1px; }
.stat-label { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* Floating cards */
.hero-visual { flex: 1; display: flex; flex-direction: column; gap: 16px; align-items: flex-end; animation: fade-up 0.8s 0.2s ease both; }
.floating-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
  width: 260px;
  box-shadow: var(--shadow);
  animation: float 4s ease-in-out infinite;
}
.card-a { animation-delay: 0s; }
.card-b { animation-delay: -1.5s; }
.card-c { animation-delay: -3s; }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.fc-tag {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--accent); margin-bottom: 10px;
}
.winner-tag { color: var(--gold); }
.upcoming-tag { color: var(--accent3); }
.fc-name { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.fc-price { font-size: 13px; color: var(--text2); margin-bottom: 12px; }
.fc-bar { height: 6px; background: var(--bg3); border-radius: 10px; overflow: hidden; margin-bottom: 6px; }
.fc-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 10px; transition: width 1s ease; }
.fc-info { font-size: 12px; color: var(--text3); font-family: var(--font-mono); }
.fc-winner { font-size: 14px; color: var(--gold); font-weight: 600; margin-top: 4px; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== SECTIONS ========== */
.section { padding: 80px 24px; }
.container { max-width: 1200px; margin: 0 auto; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.section-title { font-family: var(--font-display); font-size: 36px; letter-spacing: 1px; }
.section-title.centered { text-align: center; }
.see-all { font-size: 14px; color: var(--accent); font-weight: 500; transition: opacity 0.2s; }
.see-all:hover { opacity: 0.7; }

/* ========== RAFFLE CARD ========== */
.raffle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.raffle-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  cursor: pointer; transition: all 0.25s;
  display: flex; flex-direction: column;
}
.raffle-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(255,60,95,0.15); }

.card-image {
  width: 100%; aspect-ratio: 4/3;
  background: var(--bg3); display: flex; align-items: center; justify-content: center;
  font-size: 48px; position: relative; overflow: hidden;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-status {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase;
}
.status-live { background: rgba(255,60,95,0.2); color: var(--accent); border: 1px solid var(--accent); }
.status-upcoming { background: rgba(60,170,255,0.2); color: var(--accent3); border: 1px solid var(--accent3); }
.status-ended { background: rgba(90,90,112,0.3); color: var(--text3); border: 1px solid var(--text3); }
.status-winner { background: rgba(255,217,61,0.2); color: var(--gold); border: 1px solid var(--gold); }

.card-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.card-title { font-size: 17px; font-weight: 600; line-height: 1.3; }
.card-desc { font-size: 13px; color: var(--text2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.card-meta { display: flex; gap: 16px; margin-top: 4px; }
.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.8px; }
.meta-value { font-size: 15px; font-weight: 600; font-family: var(--font-mono); color: var(--accent); }

.card-progress { margin-top: 4px; }
.progress-bar { height: 5px; background: var(--bg3); border-radius: 10px; overflow: hidden; margin-bottom: 5px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 10px; transition: width 0.8s ease; }
.progress-label { font-size: 12px; color: var(--text3); font-family: var(--font-mono); }

.card-timer { font-family: var(--font-mono); font-size: 13px; color: var(--text2); display: flex; align-items: center; gap: 6px; }
.timer-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.card-host { font-size: 12px; color: var(--text3); }
.card-host strong { color: var(--text2); }

/* ========== HOW IT WORKS ========== */
.how { background: var(--bg2); }
.steps { display: flex; align-items: flex-start; gap: 20px; margin-top: 48px; flex-wrap: wrap; justify-content: center; }
.step { flex: 1; min-width: 220px; max-width: 300px; text-align: center; padding: 30px 24px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.step-num { font-family: var(--font-display); font-size: 48px; color: var(--accent); opacity: 0.3; margin-bottom: 14px; }
.step h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.step p { font-size: 14px; color: var(--text2); line-height: 1.6; }
.step-arrow { font-size: 24px; color: var(--text3); margin-top: 60px; }

/* ========== FOOTER ========== */
.footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 48px 24px 24px; }
.footer-top { display: flex; gap: 40px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 32px; }
.footer-brand p { color: var(--text3); font-size: 14px; margin-top: 8px; max-width: 280px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; padding-top: 6px; }
.footer-links a { font-size: 14px; color: var(--text3); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text3); text-align: center; }

/* ========== AUTH PAGES ========== */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 100px 24px 60px; position: relative;
}
.auth-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 48px 40px;
  width: 100%; max-width: 440px;
  position: relative; z-index: 1;
  box-shadow: var(--shadow);
}
.auth-title { font-family: var(--font-display); font-size: 36px; letter-spacing: 1px; margin-bottom: 8px; }
.auth-sub { color: var(--text2); font-size: 15px; margin-bottom: 36px; }
.auth-link { color: var(--accent); font-weight: 500; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 13px 16px;
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font-body); font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,60,95,0.12);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-select { appearance: none; cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 12px; color: var(--text3); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--accent); margin-top: 5px; display: none; }
.form-group.has-error .form-input { border-color: var(--accent); }
.form-group.has-error .form-error { display: block; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; }
.auth-divider::before, .auth-divider::after { content:''; flex:1; height:1px; background: var(--border); }
.auth-divider span { font-size: 12px; color: var(--text3); }

/* ========== CREATE RAFFLE PAGE ========== */
.page-wrap { padding: 100px 24px 60px; max-width: 800px; margin: 0 auto; }
.page-title { font-family: var(--font-display); font-size: 48px; letter-spacing: 1px; margin-bottom: 8px; }
.page-sub { color: var(--text2); font-size: 16px; margin-bottom: 40px; }

.create-card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 40px; }
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px; display: flex; align-items: center; gap: 8px;
}
.section-label::after { content:''; flex:1; height:1px; background: var(--border); }
.form-section { margin-bottom: 36px; }

/* Image Upload */
.image-upload {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 48px 24px; text-align: center; cursor: pointer;
  transition: all 0.2s; background: var(--bg3);
}
.image-upload:hover { border-color: var(--accent); background: rgba(255,60,95,0.05); }
.image-upload-icon { font-size: 36px; margin-bottom: 12px; }
.image-upload-text { font-size: 15px; color: var(--text2); }
.image-upload-sub { font-size: 13px; color: var(--text3); margin-top: 4px; }

/* Toggle */
.toggle-group { display: flex; gap: 0; background: var(--bg3); border-radius: var(--radius-sm); border: 1.5px solid var(--border); overflow: hidden; }
.toggle-btn { flex: 1; padding: 11px; text-align: center; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; color: var(--text2); border: none; background: transparent; }
.toggle-btn.active { background: var(--accent); color: #fff; }

/* ========== BROWSE PAGE ========== */
.browse-wrap { padding: 100px 24px 60px; max-width: 1200px; margin: 0 auto; }
.browse-header { margin-bottom: 32px; }
.browse-filters {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  margin-bottom: 28px;
}
.filter-btn {
  padding: 8px 18px; border-radius: 100px; font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--border); background: transparent; color: var(--text2);
  cursor: pointer; transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(255,60,95,0.08); }
.search-bar {
  display: flex; gap: 10px; margin-bottom: 24px;
}
.search-input {
  flex: 1; padding: 12px 18px;
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font-body); font-size: 15px; outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--accent); }

/* ========== RAFFLE DETAIL ========== */
.detail-wrap { padding: 100px 24px 60px; max-width: 1100px; margin: 0 auto; }
.detail-grid { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.detail-image {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center;
  font-size: 80px; overflow: hidden;
}
.detail-image img { width: 100%; height: 100%; object-fit: cover; }
.detail-left { display: flex; flex-direction: column; gap: 24px; }
.detail-right { position: sticky; top: 84px; }

.detail-title { font-family: var(--font-display); font-size: 40px; letter-spacing: 1px; line-height: 1.1; }
.detail-host { font-size: 14px; color: var(--text3); margin-top: 6px; }
.detail-host strong { color: var(--accent); }
.detail-desc { font-size: 15px; color: var(--text2); line-height: 1.7; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }

.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.d-stat { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; }
.d-stat-val { font-family: var(--font-display); font-size: 30px; color: var(--accent); }
.d-stat-key { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.8px; margin-top: 4px; }

.buy-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.buy-price { font-family: var(--font-display); font-size: 48px; color: var(--accent); }
.buy-label { font-size: 13px; color: var(--text3); margin-bottom: 20px; }
.buy-slots { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 20px; }
.slots-title { font-size: 13px; color: var(--text2); margin-bottom: 10px; font-weight: 600; }
.slots-bar { height: 8px; background: var(--bg); border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.slots-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 10px; }
.slots-text { font-size: 13px; color: var(--text3); font-family: var(--font-mono); }
.buy-timer { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 15px; color: var(--text2); margin-bottom: 20px; }
.winner-banner { background: rgba(255,217,61,0.1); border: 1px solid var(--gold); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; text-align: center; }
.winner-banner .wl { font-size: 13px; color: var(--text3); margin-bottom: 4px; }
.winner-banner .wn { font-size: 22px; font-weight: 700; color: var(--gold); }


/* ========== CURRENCY BADGE (nav) ========== */
.currency-nav-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--radius-sm);
  background: var(--bg3); border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600; font-family: var(--font-mono);
  cursor: pointer; color: var(--text2);
  transition: all 0.2s; user-select: none;
}
.currency-nav-badge:hover { border-color: var(--accent); color: var(--accent); }

/* ========== CURRENCY OPTION ========== */
.currency-option {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--bg3); border: 1.5px solid var(--border);
  cursor: pointer; transition: all 0.2s; width: 100%;
  color: var(--text);
}
.currency-option:hover { border-color: var(--accent); background: rgba(255,60,95,0.06); }
.currency-option.selected { border-color: var(--green); background: rgba(46,204,113,0.08); }
/* ========== TOAST ========== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 20px;
  box-shadow: var(--shadow); font-size: 14px;
  display: flex; align-items: center; gap: 10px;
  animation: toast-in 0.3s ease;
  max-width: 320px;
}
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--accent); }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ========== MY PROFILE ========== */
.profile-wrap { padding: 100px 24px 60px; max-width: 900px; margin: 0 auto; }
.profile-header { display: flex; align-items: center; gap: 24px; margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; flex-shrink: 0;
}
.profile-name { font-family: var(--font-display); font-size: 32px; }
.profile-email { font-size: 14px; color: var(--text3); margin-top: 4px; }
.profile-balance { margin-left: auto; text-align: right; }
.balance-label { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; }
.balance-val { font-family: var(--font-display); font-size: 36px; color: var(--green); }

.tab-nav { display: flex; gap: 4px; background: var(--bg2); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 28px; }
.tab-btn { flex: 1; padding: 10px; text-align: center; font-size: 14px; font-weight: 500; cursor: pointer; border-radius: 6px; transition: all 0.2s; color: var(--text2); border: none; background: transparent; }
.tab-btn.active { background: var(--card); color: var(--text); }

/* ========== EMPTY STATE ========== */
.empty-state { text-align: center; padding: 64px 24px; color: var(--text3); }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-text { font-size: 16px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .hero { flex-direction: column; }
  .hero-visual { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-right { position: static; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .nav-auth { display: none; }
  .nav-auth.open { display: flex; position: absolute; top: 64px; right: 0; left: 0; padding: 12px 24px; background: var(--bg); border-bottom: 1px solid var(--border); flex-direction: column; }
  .auth-card { padding: 32px 24px; }
  .create-card { padding: 24px 20px; }
  .detail-stats { grid-template-columns: 1fr 1fr; }
  .steps { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); margin-top: 0; }
}

/* ========== MODAL ========== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 40px; max-width: 440px; width: 100%; box-shadow: var(--shadow); }
.modal-title { font-family: var(--font-display); font-size: 28px; margin-bottom: 16px; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--text2); font-size: 20px; cursor: pointer; }

/* Loader */
.loader { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== LIGHT MODE ========== */
[data-theme="light"] {
  --bg: #f4f4f8;
  --bg2: #eaeaf0;
  --bg3: #e0e0ea;
  --card: #ffffff;
  --card-hover: #f8f8fc;
  --border: #d0d0e0;
  --text: #0a0a15;
  --text2: #44445a;
  --text3: #8080a0;
}
[data-theme="light"] .blob { opacity: 0.08; }
[data-theme="light"] .grid-overlay { opacity: 0.15; }
[data-theme="light"] .navbar { background: rgba(244,244,248,0.9); }

/* ========== MOBILE NAV ========== */
@media (max-width: 640px) {
  .nav-links.mobile-open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    gap: 4px;
    z-index: 99;
  }
  .nav-auth.mobile-open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    z-index: 99;
  }
}

/* ========== QUICK PREVIEW POPUP ========== */
.quick-preview {
  position: absolute;
  width: 280px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  z-index: 300;
  animation: fade-up 0.15s ease;
}
.qp-header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.qp-stats { display: flex; gap: 8px; margin-bottom: 10px; }
.qp-stat { flex: 1; background: var(--bg3); border-radius: 8px; padding: 8px; text-align: center; }
.qp-val { display: block; font-family: var(--font-mono); font-size: 14px; color: var(--accent); font-weight: 700; }
.qp-key { display: block; font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.8px; margin-top: 2px; }

/* ========== URGENT RAFFLE ========== */
.raffle-card.urgent {
  border-color: var(--accent) !important;
  animation: urgent-pulse 1.5s ease-in-out infinite;
}
@keyframes urgent-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,60,95,0); }
  50% { box-shadow: 0 0 0 6px rgba(255,60,95,0.15); }
}

/* ========== STATS PAGE ========== */
.stats-wrap { padding: 100px 24px 60px; max-width: 1200px; margin: 0 auto; }
.stats-grid-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.stat-big-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 20px; text-align: center;
  transition: all 0.2s;
}
.stat-big-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.stat-big-icon { font-size: 28px; margin-bottom: 10px; }
.stat-big-val { font-family: var(--font-display); font-size: 36px; color: var(--accent); letter-spacing: 1px; }
.stat-big-key { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

.stats-grid-bottom {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}
.stat-panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.stat-panel-title { font-size: 16px; font-weight: 700; margin-bottom: 18px; }

.cat-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cat-label { font-size: 13px; color: var(--text2); width: 100px; flex-shrink: 0; }
.cat-bar-wrap { flex: 1; height: 8px; background: var(--bg3); border-radius: 10px; overflow: hidden; }
.cat-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 10px; transition: width 1s ease; }
.cat-count { font-size: 12px; color: var(--text3); font-family: var(--font-mono); width: 55px; text-align: right; flex-shrink: 0; }

.winner-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.winner-row:last-child { border-bottom: none; }
.winner-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}

/* ========== NOTIFICATION BADGE ========== */
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--accent); color: #fff;
  border-radius: 50%; width: 16px; height: 16px;
  font-size: 10px; display: none;
  align-items: center; justify-content: center;
  font-family: var(--font-mono);
}

/* ========== FAV BUTTON ========== */
.fav-btn { transition: transform 0.2s; }
.fav-btn:hover { transform: scale(1.2); }
.fav-btn.active { }

/* ========== ADVANCED FILTER ========== */
#advFilterPanel { animation: fade-up 0.2s ease; }

/* ========== FREE RAFFLE BADGE ========== */
.free-badge {
  background: rgba(46,204,113,0.15);
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 100px;
  display: inline-block;
}

/* ========== CSS TRANSITIONS for dark/light ========== */
body, .navbar, .card, .raffle-card, .auth-card, .create-card,
.buy-card, .stat-panel, .floating-card {
  transition: background 0.3s ease, border-color 0.3s ease, color 0.2s ease;
}

/* ========== QUICK PREVIEW - close on popup leave ========== */
.quick-preview:hover { display: block; }

/* ========== VERIFIED BADGE ========== */
.verified-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--accent3); font-weight: 600;
  background: rgba(60,170,255,0.1);
  border: 1px solid rgba(60,170,255,0.3);
  border-radius: 100px; padding: 2px 8px;
}

/* ========== PUBLIC PROFILE ========== */
.public-profile-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(60,170,255,0.1); border: 1px solid var(--accent3);
  color: var(--accent3); border-radius: 100px;
  padding: 4px 12px; font-size: 13px; font-weight: 600;
}

/* ========== CREATE - Free entry hint ========== */
.free-hint {
  background: rgba(46,204,113,0.1);
  border: 1px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px; color: var(--green);
  margin-top: 8px; display: none;
}

/* ========== NAV ICON BUTTONS ========== */
.theme-toggle, .icon-btn {
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text);
  transition: all 0.2s;
  position: relative;
  line-height: 1;
}
.theme-toggle:hover, .icon-btn:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ========== NOTIFICATION PANEL ========== */
#notifPanel {
  position: fixed;
  top: 68px; right: 16px;
  width: 320px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 500;
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;
}
.notif-item {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.notif-item:hover { background: var(--bg3); }

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 600;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* ========== NAV AUTH LAYOUT ========== */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}


/* ========== ADMIN PANEL ========== */
.admin-raffle-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  display: flex;
  gap: 18px;
  align-items: center;
}
.admin-raffle-row:hover { border-color: var(--accent); }

@media (max-width: 640px) {
  .admin-raffle-row { flex-direction: column; align-items: stretch; }
}

/* Verification code input polish */
input[inputmode="numeric"] {
  font-variant-numeric: tabular-nums;
}


/* ========== CURRENCY SYMBOLS FONT FIX ========== */
/* Forces proper rendering of currency symbols like ₹, ₺, ¥ on all systems */
.meta-value, .buy-price, .d-stat-val, .stat-big-val, .balance-val,
.fc-price, .hero-price, .qp-val, .stat-num, .currency-nav-badge {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* Ensure Rupee symbol renders correctly by loading a Google Font that supports it well */

/* ========== LOGO ========== */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 2px;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s;
}
.logo:hover { transform: scale(1.03); }
.logo-img {
  width: 40px;
  height: 40px;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(255,60,95,0.4));
}
.logo-text {
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.logo-accent {
  color: var(--accent);
}

/* Footer logo smaller */
.footer-brand .logo { font-size: 24px; gap: 10px; }
.footer-brand .logo-img { width: 28px; height: 28px; }

/* Auth page big logo */
.auth-card .logo { font-size: 34px; gap: 14px; }
.auth-card .logo-img { width: 44px; height: 44px; }

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.legal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 40px;
  line-height: 1.8;
  color: var(--text2);
  font-size: 15px;
}
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 1px;
  color: var(--text);
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content p { margin-bottom: 14px; }
.legal-content a { color: var(--accent); text-decoration: none; }
.legal-content a:hover { text-decoration: underline; }
.legal-content code {
  background: var(--bg2);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent3);
}
@media (max-width: 600px) {
  .legal-content { padding: 28px 20px; }
  .legal-content h2 { font-size: 20px; }
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  padding: 32px 24px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text3);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  color: var(--text3);
  font-size: 13px;
}
@media (max-width: 600px) {
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 540px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  z-index: 9999;
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner-text {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 12px;
}
.cookie-banner-text a { color: var(--accent); text-decoration: none; }
.cookie-banner-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.cookie-banner-actions button {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: transparent;
  color: var(--text);
}
.cookie-banner-actions .accept {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  font-weight: 600;
}


/* Prevent auth flash-of-unstyled-content (FOUC)
   nav-auth is invisible until JS populates it from Supabase session */
.nav-auth { visibility: hidden; }
.nav-auth.ready { visibility: visible; }
