:root {
  /* Typography scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.6rem;

  /* Spacing */
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Dark theme colors */
  --bg: #05070c;
  --surface: #0c0f17;
  --surface-2: #121622;
  --border: #272c3c;
  --border-soft: rgba(255, 255, 255, 0.04);

  --text: #e4e7f1;
  --muted: #9298b0;

  --primary: #4f9cff;
  --primary-hover: #327ee0;

  --error: #ff4b8b;
  --danger: #ff4b6a;
  --success: #4fd18b;

  --radius: 16px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.85);

  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  background:
    radial-gradient(circle at top, #151a33 0, #05070c 48%),
    #05070c;
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.shell {
  max-width: 860px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-4);
}

.card,
.hero-card {
  background: radial-gradient(circle at top left, #171c30, #0b0f18 60%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.card::before,
.hero-card::before {
  content: "";
  position: absolute;
  inset: -120px;
  background:
    radial-gradient(circle at top left, rgba(79, 156, 255, 0.09), transparent 60%),
    radial-gradient(circle at bottom right, rgba(79, 209, 139, 0.06), transparent 55%);
  opacity: 0.85;
  pointer-events: none;
}

.card > *,
.hero-card > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 0 0 var(--space-3);
}

h1 {
  margin: 8px 0 16px;
  font-size: var(--text-xl);
  letter-spacing: 0.02em;
}

.lede {
  color: var(--muted);
  max-width: 60ch;
  margin: 0;
}

/* Form */

.upload-form {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

label span {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--muted);
}

input[type="file"],
input[type="number"],
input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, #0e1220, #070a12);
  color: var(--text);
  font: inherit;
}

input::file-selector-button {
  margin-right: 10px;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(79, 156, 255, 0.12);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
input::file-selector-button:hover {
  background: rgba(79, 156, 255, 0.2);
}

button,
a[href="/"] {
  display: inline-block;
  margin-top: 12px;
  background: var(--primary);
  color: #05070c;
  border: 0;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(79, 156, 255, 0.4);
  transition:
    background 0.15s ease-out,
    transform 0.1s ease-out,
    box-shadow 0.15s ease-out;
}

button:hover,
a[href="/"]:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(79, 156, 255, 0.55);
}

button:active,
a[href="/"]:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(79, 156, 255, 0.35);
}

.danger,
.danger-btn {
  background: var(--danger);
  box-shadow: 0 12px 28px rgba(255, 75, 106, 0.4);
}
.danger:hover,
.danger-btn:hover {
  background: #ff3659;
  box-shadow: 0 16px 40px rgba(255, 75, 106, 0.55);
}

/* Alerts */

.alert {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: radial-gradient(circle at top left, #202538, #11131f);
  font-size: var(--text-sm);
}

.alert p {
  margin: 4px 0;
}

.success {
  border-color: rgba(79, 209, 139, 0.35);
}
.error {
  border-color: rgba(255, 75, 139, 0.5);
}

/* Admin table */

.table-wrapper {
  margin-top: 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #070a11;
  overflow: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.admin-table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  background: linear-gradient(to bottom, #111628, #0b0f1a);
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-table tr:nth-child(every-odd) {
  background: #070a11;
}

.admin-table tr:hover td {
  background: rgba(79, 156, 255, 0.08);
}

.admin-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: var(--text-xs);
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

/* Layout variants */

.single-card {
  max-width: 760px;
}

/* Responsive tweaks */

@media (max-width: 640px) {
  .shell {
    padding: var(--space-8) var(--space-4);
  }
  .card,
  .hero-card {
    padding: 22px;
  }
  h1 {
    font-size: 1.4rem;
  }
}
