:root {
  --bg: #090909;
  --bg-soft: #101010;
  --panel: #151515;
  --panel-2: #1d1d1d;
  --line: rgba(214, 175, 67, 0.18);
  --gold: #d6af43;
  --gold-soft: #f4dfa1;
  --text: #f8f4e8;
  --muted: #c0b797;
  --danger: #b55252;
  --success: #3ca76b;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(214, 175, 67, 0.18), transparent 30%),
    linear-gradient(180deg, #090909 0%, #0d0d0d 45%, #090909 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.site-header,
.section-heading,
.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header {
  margin-bottom: 26px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(21, 21, 21, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold-soft);
}

.brand-subtitle,
.muted,
.table-subtext,
.task-meta {
  color: var(--muted);
}

.nav-actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--muted);
  font-weight: 600;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.user-chip img {
  width: 28px;
  height: 28px;
  border-radius: 999px;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.card,
.card-panel,
.collection-row,
.task-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(25, 25, 25, 0.98), rgba(16, 16, 16, 0.98));
  box-shadow: var(--shadow);
}

.card {
  padding: 24px;
}

.card-panel,
.collection-row,
.task-row {
  padding: 18px;
}

.hero {
  display: grid;
  grid-template-columns: 1.45fr 0.9fr;
  gap: 24px;
  align-items: center;
}

.hero h1,
.giveaway-detail-card h1,
.admin-heading h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.04;
}

.hero-copy,
.preserve-lines {
  white-space: pre-wrap;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  font-weight: 700;
}

.hero-stats-grid,
.card-grid,
.form-grid,
.two-column-grid,
.giveaway-detail-grid {
  display: grid;
  gap: 18px;
}

.hero-stats-grid,
.admin-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.two-column-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.form-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.giveaway-detail-grid {
  grid-template-columns: 1.4fr 0.8fr;
}

.mini-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  align-items: flex-start;
}

.mini-stat strong {
  font-size: 1.55rem;
  color: var(--gold-soft);
}

.cover-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.cover-image.large {
  margin-bottom: 0;
}

.button,
.button-secondary,
.button-danger,
.pill,
.required-pill,
.card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-weight: 700;
}

.button,
.button-secondary,
.button-danger {
  border: 1px solid transparent;
  padding: 12px 16px;
  cursor: pointer;
  transition: 0.2s ease;
}

.button {
  background: linear-gradient(180deg, #e1bc57, #b58a26);
  color: #111;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(214, 175, 67, 0.28);
}

.button-secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--gold-soft);
}

.button-danger {
  background: rgba(181, 82, 82, 0.14);
  border-color: rgba(181, 82, 82, 0.35);
  color: #ffc8c8;
}

.button.small {
  padding: 8px 12px;
  border-radius: 10px;
}

.input,
.textarea,
select.input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 9, 9, 0.85);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

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

.input:focus,
.textarea:focus,
select.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(214, 175, 67, 0.12);
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.94rem;
  color: var(--gold-soft);
  font-weight: 700;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.detail-list.compact-gap {
  gap: 10px;
}

.detail-list > div {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.detail-list span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 6px;
}

.detail-list strong {
  color: var(--gold-soft);
}

.giveaway-card h3,
.task-row h3,
.card-panel h3 {
  margin-top: 0;
}

.stack,
.stack-lg,
.stack-xl,
.sidebar-stack {
  display: flex;
  flex-direction: column;
}

.stack {
  gap: 14px;
}

.stack-lg,
.sidebar-stack {
  gap: 18px;
}

.stack-xl {
  gap: 28px;
}

.task-row,
.collection-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.pill,
.required-pill,
.card-badge {
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(214, 175, 67, 0.08);
  color: var(--gold-soft);
  font-size: 0.82rem;
}

.pill.success,
.required-pill {
  background: rgba(60, 167, 107, 0.12);
  border-color: rgba(60, 167, 107, 0.26);
  color: #a6efc4;
}

.card-badge.badge-ended {
  background: rgba(60, 167, 107, 0.12);
  border-color: rgba(60, 167, 107, 0.26);
  color: #a6efc4;
}

.card-badge.badge-upcoming {
  background: rgba(118, 119, 214, 0.12);
  border-color: rgba(118, 119, 214, 0.26);
  color: #d3d7ff;
}

.card-badge.badge-ready_to_end,
.card-badge.badge-live {
  color: var(--gold-soft);
}

.flash {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.flash-success {
  background: rgba(60, 167, 107, 0.14);
  border-color: rgba(60, 167, 107, 0.28);
}

.flash-error {
  background: rgba(181, 82, 82, 0.14);
  border-color: rgba(181, 82, 82, 0.28);
}

.empty-state {
  text-align: center;
  padding: 36px 22px;
}

.simple-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.text-link {
  color: var(--gold-soft);
  text-decoration: underline;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.admin-table th {
  color: var(--gold-soft);
}

.winner-inline-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.winner-inline-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.radio-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.radio-card input {
  accent-color: var(--gold);
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
}

.align-right {
  display: flex;
  justify-content: flex-end;
}

.align-end {
  align-items: end;
}

.collection {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.compact {
  gap: 8px;
}

.compact-top {
  margin-top: 12px;
}

.site-footer {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero,
  .two-column-grid,
  .giveaway-detail-grid,
  .form-grid.two-up,
  .form-grid.three-up,
  .site-header,
  .section-heading,
  .admin-heading {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .task-row,
  .collection-row {
    flex-direction: column;
  }
}
