/* ============================================================
   GiveawayHub — Main Stylesheet
   Aesthetic: Dark Luxury / Gold Accent
   ============================================================ */

:root {
  --bg:        #0d0d0f;
  --bg2:       #141418;
  --bg3:       #1c1c22;
  --bg4:       #252530;
  --border:    #2a2a38;
  --gold:      #d4a843;
  --gold-lt:   #f0c866;
  --gold-dk:   #9a7520;
  --text:      #e8e8f0;
  --text-muted:#8888aa;
  --text-dim:  #55556a;
  --red:       #e85555;
  --green:     #4ecb71;
  --blue:      #5599ff;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 4px 32px rgba(0,0,0,0.5);
  --shadow-gold: 0 0 32px rgba(212,168,67,0.15);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --transition:   all 0.22s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 40% at 50% -10%, rgba(212,168,67,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 30% at 80% 80%, rgba(85,153,255,0.04) 0%, transparent 50%);
}

a { color: var(--gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-lt); }

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

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

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 24px; border-radius: var(--radius);
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  cursor: pointer; border: none; transition: var(--transition);
  white-space: nowrap; text-decoration: none;
}
.btn--gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dk) 100%);
  color: #0d0d0f;
  box-shadow: 0 2px 16px rgba(212,168,67,0.3);
}
.btn--gold:hover {
  background: linear-gradient(135deg, var(--gold-lt) 0%, var(--gold) 100%);
  box-shadow: 0 4px 24px rgba(212,168,67,0.5);
  color: #0d0d0f; transform: translateY(-1px);
}
.btn--outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
}
.btn--outline:hover { border-color: var(--gold); color: var(--gold); }
.btn--ghost { background: var(--bg3); color: var(--text); }
.btn--ghost:hover { background: var(--bg4); color: var(--text); }
.btn--danger { background: var(--red); color: #fff; }
.btn--sm { padding: 8px 16px; font-size: 13px; }
.btn--lg { padding: 15px 36px; font-size: 16px; }
.btn--full { width: 100%; justify-content: center; }

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%; height: 68px;
  background: rgba(13,13,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.nav__logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 20px; font-weight: 900;
  color: var(--text); letter-spacing: -0.3px;
}
.nav__logo:hover { color: var(--gold-lt); }
.nav__logo-icon { font-size: 22px; }
.nav__links {
  display: flex; align-items: center; gap: 24px; font-size: 14px; font-weight: 500;
}
.nav__links a { color: var(--text-muted); }
.nav__links a:hover { color: var(--text); }
.nav__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dk), var(--gold));
  color: #0d0d0f !important; font-weight: 800; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav__logout { color: var(--text-dim) !important; font-size: 13px; }

/* ── Flash Messages ──────────────────────────────────────── */
.flash {
  padding: 14px 5%; font-size: 14px; font-weight: 500;
  text-align: center; border-bottom: 1px solid transparent;
  animation: slideDown .3s ease;
}
.flash--success { background: rgba(78,203,113,.12); color: var(--green); border-color: rgba(78,203,113,.2); }
.flash--error   { background: rgba(232,85,85,.12);  color: var(--red);   border-color: rgba(232,85,85,.2); }
.flash--info    { background: rgba(85,153,255,.12); color: var(--blue);  border-color: rgba(85,153,255,.2); }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  padding: 80px 5% 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(212,168,67,0.08), transparent 70%);
  pointer-events: none;
}
.hero__tag {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  border: 1px solid rgba(212,168,67,0.3); color: var(--gold);
  font-size: 12px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 20px;
  background: rgba(212,168,67,0.05);
}
.hero h1 {
  font-size: clamp(36px, 6vw, 72px); color: var(--text);
  max-width: 800px; margin: 0 auto 20px;
}
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p {
  color: var(--text-muted); font-size: 18px; max-width: 500px;
  margin: 0 auto 36px;
}
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__stats {
  display: flex; gap: 48px; justify-content: center; margin-top: 60px;
  flex-wrap: wrap;
}
.hero__stat strong {
  display: block; font-family: var(--font-display); font-size: 32px;
  color: var(--gold);
}
.hero__stat span { font-size: 13px; color: var(--text-muted); }

/* ── Search & Filter ─────────────────────────────────────── */
.filters {
  padding: 28px 5%;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.filters__inner {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  max-width: 1200px; margin: 0 auto;
}
.search-bar {
  flex: 1; min-width: 220px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0 16px; height: 44px;
  transition: var(--transition);
}
.search-bar:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,168,67,0.1); }
.search-bar input {
  background: none; border: none; outline: none;
  color: var(--text); font-size: 14px; flex: 1;
}
.search-bar input::placeholder { color: var(--text-dim); }
.search-bar span { color: var(--text-dim); }

.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border); background: var(--bg3);
  color: var(--text-muted); cursor: pointer; transition: var(--transition);
  text-decoration: none;
}
.chip:hover, .chip.active {
  border-color: var(--gold); color: var(--gold);
  background: rgba(212,168,67,0.08);
}

.sort-select {
  height: 44px; padding: 0 14px; border-radius: var(--radius);
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 13px; cursor: pointer;
  outline: none; appearance: none;
}

/* ── Giveaway Grid ───────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }
.section { padding: 48px 0; }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 28px;
}
.section__head h2 { font-size: 26px; color: var(--text); }
.section__head a { font-size: 13px; color: var(--text-muted); }

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

/* Giveaway Card */
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: var(--transition); position: relative;
  display: flex; flex-direction: column;
}
.card:hover {
  border-color: rgba(212,168,67,0.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(212,168,67,0.1);
}
.card--featured {
  border-color: rgba(212,168,67,0.4);
  box-shadow: var(--shadow-gold);
}
.card__badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.badge--featured { background: var(--gold); color: #0d0d0f; }
.badge--ending   { background: var(--red); color: #fff; }
.badge--new      { background: var(--green); color: #0d0d0f; }

.card__img {
  height: 180px; background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; overflow: hidden; position: relative;
}
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__img-placeholder { opacity: 0.6; }

.card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card__cat {
  font-size: 11px; font-weight: 600; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--gold); margin-bottom: 8px;
}
.card__title {
  font-family: var(--font-display); font-size: 18px; color: var(--text);
  line-height: 1.3; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__desc {
  font-size: 13px; color: var(--text-muted); margin-bottom: 14px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__meta {
  display: flex; gap: 16px; font-size: 12px; color: var(--text-dim);
  margin-bottom: 16px; flex-wrap: wrap;
}
.card__meta span { display: flex; align-items: center; gap: 4px; }
.card__footer { display: flex; gap: 10px; align-items: center; }
.card__prize {
  flex: 1; font-family: var(--font-display); font-size: 20px;
  color: var(--gold-lt); font-weight: 700;
}
.card__prize small { font-size: 11px; color: var(--text-muted); display: block; font-family: var(--font-body); font-weight: 400; }

/* ── Auth Forms ──────────────────────────────────────────── */
.auth-wrap {
  min-height: calc(100vh - 68px);
  display: flex; align-items: center; justify-content: center;
  padding: 60px 20px;
}
.auth-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 44px 40px;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow);
}
.auth-box h1 {
  font-size: 28px; margin-bottom: 6px;
}
.auth-box p { color: var(--text-muted); margin-bottom: 32px; font-size: 14px; }
.auth-box .auth-switch {
  text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-muted);
}

/* Form elements */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 8px; letter-spacing: 0.3px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 16px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 14px;
  font-family: var(--font-body); outline: none; transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,168,67,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238888aa' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.form-hint { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Subscribe Page ──────────────────────────────────────── */
.subscribe-wrap {
  min-height: calc(100vh - 68px);
  display: flex; align-items: center; justify-content: center;
  padding: 60px 20px;
}
.subscribe-box {
  background: var(--bg2); border: 1px solid rgba(212,168,67,0.3);
  border-radius: var(--radius-lg); width: 100%; max-width: 960px;
  box-shadow: var(--shadow-gold), var(--shadow);
  overflow: hidden; display: flex;
}
.subscribe-left {
  flex: 1; padding: 56px 44px;
  background: linear-gradient(160deg, rgba(212,168,67,0.08), transparent);
}
.subscribe-left h1 { font-size: 36px; margin-bottom: 8px; }
.subscribe-left h1 em { color: var(--gold); font-style: normal; }
.subscribe-left .sub-price {
  font-size: 48px; font-family: var(--font-display); color: var(--gold-lt);
  font-weight: 900; line-height: 1; margin: 24px 0 8px;
}
.subscribe-left .sub-price small { font-size: 18px; color: var(--text-muted); font-weight: 400; }
.feature-list { list-style: none; margin: 24px 0 36px; display: flex; flex-direction: column; gap: 12px; }
.feature-list li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-muted); }
.feature-list li::before { content: '✓'; color: var(--gold); font-weight: 700; font-size: 16px; flex-shrink: 0; }

.subscribe-right {
  width: 360px; padding: 56px 36px;
  border-left: 1px solid var(--border);
  background: var(--bg);
}
.subscribe-right h2 { font-size: 22px; margin-bottom: 6px; }
.subscribe-right p { color: var(--text-muted); font-size: 13px; margin-bottom: 28px; }

.secure-note {
  display: flex; gap: 8px; align-items: center;
  font-size: 12px; color: var(--text-dim); margin-top: 16px;
}

/* ── Giveaway Detail ─────────────────────────────────────── */
.giveaway-detail { padding: 48px 5%; }
.giveaway-detail__inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 360px; gap: 40px; }
.detail-main {}
.detail-sidebar {}

.detail-img {
  width: 100%; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg2); border: 1px solid var(--border);
  height: 320px; display: flex; align-items: center; justify-content: center; font-size: 96px;
  margin-bottom: 28px;
}
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-meta { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.detail-meta span {
  font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px;
}
.detail-main h1 { font-size: 36px; margin-bottom: 16px; }
.detail-main .body { color: var(--text-muted); line-height: 1.8; font-size: 15px; }

.sidebar-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  margin-bottom: 20px; position: sticky; top: 88px;
}
.sidebar-box h3 { font-size: 20px; margin-bottom: 6px; }
.sidebar-box .prize-val {
  font-family: var(--font-display); font-size: 36px; color: var(--gold);
  font-weight: 900; margin: 12px 0;
}
.sidebar-box .timer {
  background: var(--bg3); border-radius: var(--radius);
  padding: 14px 16px; display: flex; gap: 16px;
  justify-content: center; margin: 16px 0; font-size: 13px; color: var(--text-muted);
}
.timer-unit { text-align: center; }
.timer-unit strong { display: block; font-size: 24px; color: var(--text); font-family: var(--font-display); }
.progress-bar { background: var(--bg3); border-radius: 999px; height: 8px; margin: 12px 0; overflow: hidden; }
.progress-bar__fill { height: 100%; background: linear-gradient(90deg, var(--gold-dk), var(--gold)); border-radius: 999px; transition: width 0.5s ease; }

/* ── Dashboard ───────────────────────────────────────────── */
.dash-wrap { padding: 48px 5%; max-width: 1100px; margin: 0 auto; }
.dash-header { margin-bottom: 36px; }
.dash-header h1 { font-size: 32px; }
.dash-header p { color: var(--text-muted); }
.sub-status {
  display: inline-flex; gap: 8px; align-items: center;
  padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
  margin-top: 12px;
}
.sub-status--active { background: rgba(78,203,113,.12); color: var(--green); border: 1px solid rgba(78,203,113,.2); }
.sub-status--inactive { background: rgba(232,85,85,.1); color: var(--red); border: 1px solid rgba(232,85,85,.2); }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 40px; }
.dash-stat {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; text-align: center;
}
.dash-stat strong { display: block; font-size: 32px; font-family: var(--font-display); color: var(--gold); }
.dash-stat span { font-size: 13px; color: var(--text-muted); }

.table-wrap { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.table-wrap h2 { padding: 20px 24px; border-bottom: 1px solid var(--border); font-size: 18px; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 20px; text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); border-bottom: 1px solid var(--border); }
td { padding: 14px 20px; font-size: 14px; border-bottom: 1px solid rgba(42,42,56,0.5); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.tag--active  { background: rgba(78,203,113,.12); color: var(--green); }
.tag--ended   { background: rgba(136,136,170,.1);  color: var(--text-dim); }
.tag--pending { background: rgba(212,168,67,.12); color: var(--gold); }

/* ── Post Giveaway ───────────────────────────────────────── */
.post-wrap { padding: 48px 5%; max-width: 780px; margin: 0 auto; }
.post-wrap h1 { font-size: 32px; margin-bottom: 6px; }
.post-wrap > p { color: var(--text-muted); margin-bottom: 40px; }

/* ── Empty state ─────────────────────────────────────────── */
.empty { text-align: center; padding: 80px 20px; }
.empty .empty-icon { font-size: 64px; margin-bottom: 20px; }
.empty h2 { font-size: 24px; margin-bottom: 10px; }
.empty p { color: var(--text-muted); margin-bottom: 28px; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; gap: 8px; justify-content: center; padding: 40px 0; }
.pagination a, .pagination span {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); font-size: 14px; font-weight: 500;
  border: 1px solid var(--border); background: var(--bg2); color: var(--text-muted);
  transition: var(--transition);
}
.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .current { background: var(--gold); border-color: var(--gold); color: #0d0d0f; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  margin-top: 80px; border-top: 1px solid var(--border);
  background: var(--bg2); padding: 60px 5% 0;
}
.footer__inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  max-width: 1200px; margin: 0 auto; padding-bottom: 48px;
}
.footer__brand strong { font-size: 18px; font-family: var(--font-display); }
.footer__brand p { color: var(--text-dim); font-size: 13px; margin-top: 8px; }
.footer__links h4 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 16px; letter-spacing: 0.5px; text-transform: uppercase; }
.footer__links a { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }
.footer__links a:hover { color: var(--gold); }
.footer__bottom {
  text-align: center; padding: 20px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-dim); max-width: 1200px; margin: 0 auto;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .subscribe-box { flex-direction: column; }
  .subscribe-right { width: 100%; border-left: none; border-top: 1px solid var(--border); }
  .giveaway-detail__inner { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav__links { gap: 12px; }
  .nav__links a:not(.btn):not(.nav__avatar):not(.nav__logout) { display: none; }
  .hero { padding: 50px 5% 40px; }
  .hero__stats { gap: 24px; }
  .footer__inner { grid-template-columns: 1fr; }
  .auth-box { padding: 32px 24px; }
}
