/* 3adooli Giveaway Portal — built on the same design tokens as styles.css
   (see :root there for --bg-*, --primary-*, --secondary-*, --accent-*,
   --font-*, --glass-*, --radius-*). This file only adds the page-specific
   layout; it intentionally does NOT redefine its own color/font system
   anymore, so a theme change in styles.css propagates here too. */

body.giveaway-page-body {
  background-color: var(--bg-void);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(124, 59, 255, 0.20), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 15%, rgba(75, 184, 255, 0.14), transparent 60%);
  background-attachment: fixed;
  animation: auroraDrift 34s ease-in-out infinite alternate;
  color: var(--text-primary);
  font-family: var(--font-primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

@keyframes auroraDrift {
  from { background-position: 0% 0%, 0% 0%; }
  to { background-position: 10% 8%, -8% 10%; }
}

/* Main Container */
.gw-main {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem 4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

/* Hero Section — same frosted-glass material as .panel in styles.css
   (grain texture + sheen + translucent base) rather than a flat card. */
.gw-hero-card {
  position: relative;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"),
    var(--glass-sheen),
    rgba(21, 15, 43, 0.78);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  overflow: hidden;
  backdrop-filter: blur(calc(var(--glass-blur) / 2));
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) / 2));
  box-shadow:
    var(--shadow-lg),
    0 2px 6px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.gw-hero-glow {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(83, 252, 24, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.gw-hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.gw-hero-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(83, 252, 24, 0.3);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-color);
}

.status-dot.pulsing {
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(83, 252, 24, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(83, 252, 24, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(83, 252, 24, 0); }
}

.wheel-btn-hero {
  background: rgba(160, 107, 255, 0.15);
  color: var(--primary-light);
  border: 1px solid var(--primary-light);
}

.gw-title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 900;
  margin: 0 0 0.5rem 0;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gw-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin: 0 0 2rem 0;
}

.gw-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.gw-meta-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
}

.gw-meta-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  letter-spacing: 0.5px;
}

.gw-meta-value {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
}

.prize-highlight {
  color: var(--accent-color);
}

.countdown-value {
  color: var(--primary-light);
  font-family: monospace;
}

.gw-action-box {
  display: flex;
  gap: 1rem;
}

/* Cards & Grid Layout */
.gw-card {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"),
    var(--glass-sheen),
    rgba(21, 15, 43, 0.78);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  backdrop-filter: blur(calc(var(--glass-blur) / 2));
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) / 2));
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.gw-card-header {
  margin-bottom: 1.5rem;
}

.gw-card-header h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 0.4rem 0;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gw-card-header p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

/* The prize line and the countdown are both hidden until the API confirms
   the giveaway actually has one — see the `hidden` attributes in
   giveaway.html. [hidden] needs help here because .gw-meta-item sets
   `display`, which outranks the UA stylesheet's `display: none`. */
.gw-meta-item[hidden] {
  display: none !important;
}

/* A giveaway past its deadline: the countdown stops at zero and says so
   rather than rolling into negative numbers or silently freezing. */
.countdown-value.is-ended {
  color: var(--text-muted);
  text-shadow: none;
}

.member-id-badge {
  background: linear-gradient(135deg, rgba(83, 252, 24, 0.2), rgba(83, 252, 24, 0.05));
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  font-family: monospace;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  letter-spacing: 1px;
}

.gw-form-group input,
.gw-input-group input,
.search-box input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.gw-form-group input:focus,
.gw-input-group input:focus,
.search-box input:focus {
  border-color: var(--primary-light);
}

/* Buttons — matches the shape/feel of .btn in styles.css (pill, heading
   font, shimmer sweep on hover) without pulling in its exact hover-glow
   variables, since these buttons carry their own brand colors (Kick
   green, Discord blurple). */
.gw-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.gw-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 52%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-22deg);
  transition: left 0.55s ease;
  pointer-events: none;
}

.gw-btn:hover::before {
  left: 140%;
}

.primary-glow-btn {
  background: var(--accent-color);
  color: #07210a;
  box-shadow: var(--glow-green);
}

.primary-glow-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.xs-btn {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 999px;
}

/* Password Gate */
.password-gate-card {
  border-color: var(--primary-light) !important;
}

.lock-icon {
  font-size: 1.8rem;
}

.gw-input-group {
  display: flex;
  gap: 0.75rem;
  max-width: 500px;
  flex-wrap: wrap;
}

.gw-error-msg {
  color: var(--error-color);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Entrants Table */
.gw-table-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.table-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-box input {
  min-width: 240px;
}

.gw-select {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

.gw-table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 460px;
}

.gw-table-wrapper thead th {
  position: sticky;
  top: 0;
  background: var(--bg-glass-black, #08060f);
  z-index: 1;
}

.gw-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.gw-table th,
.gw-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-color);
}

.gw-table th {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gw-table td {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.gw-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.gw-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Skeleton Loading */
.skeleton-line {
  height: 24px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toast-in {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 600px) {
  .gw-hero-card { padding: 1.6rem; }
  .gw-title { font-size: 1.7rem; }
}

/* --------------------------------------------------------------------
   Account state panel

   Stands in for the removed "Mandatory Account Verifications" card. That
   card was always present and always asked for something; this one only
   appears when there is genuinely something to do, and hides itself once
   the person is logged in and verified. A panel that permanently says
   "you're fine" is just noise on the one page where the giveaway itself
   should be the thing you look at.
   -------------------------------------------------------------------- */
.gw-account-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.gw-account-state[hidden] {
  display: none !important;
}

.gw-account-state-body {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  min-width: 0;
  flex: 1 1 320px;
}

.gw-account-state-icon {
  font-size: 1.6rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.gw-account-state h2 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.gw-account-state p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted, #a1a1aa);
  line-height: 1.55;
}

.gw-account-state-action {
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .gw-account-state-action,
  .gw-account-state-action .gw-btn {
    width: 100%;
  }
}
