:root {
  --bg: #0b0b12;
  --bg-card: #14141f;
  --bg-elevated: #1c1c2a;
  --border: #2a2a3d;
  --text: #f0f0f5;
  --muted: #9a9ab0;
  --accent: #ff4d6d;
  --accent-soft: rgba(255, 77, 109, 0.15);
  --green: #3dd68c;
  --yellow: #f5c542;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --font: "Inter", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.orb-1 {
  width: 420px;
  height: 420px;
  background: #ff4d6d;
  top: -120px;
  right: -80px;
}
.orb-2 {
  width: 360px;
  height: 360px;
  background: #7b5cff;
  bottom: 10%;
  left: -100px;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(11, 11, 18, 0.75);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.logo .accent {
  color: var(--accent);
}
.nav {
  display: flex;
  gap: 8px;
}
.nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: 0.2s;
}
.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--bg-elevated);
}
.admin-link {
  border: 1px solid var(--border);
}

/* Hero */
.hero {
  padding: 80px 0 48px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.gradient-text {
  background: linear-gradient(135deg, #ff4d6d, #ff8a5c, #7b5cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 28px;
  font-size: 1.05rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: 0.2s;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, #ff4d6d, #ff6b8a);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 77, 109, 0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(255, 77, 109, 0.45);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.btn-block {
  width: 100%;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-danger {
  background: #e74c3c;
  color: #fff;
}
.btn-success {
  background: var(--green);
  color: #0b0b12;
}

/* Sections */
.section {
  padding: 56px 0;
}
.section-alt {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-header {
  margin-bottom: 32px;
  text-align: center;
}
.section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.section-header p {
  color: var(--muted);
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}
.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: 0.2s;
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);
}

/* Shop grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.shop-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: 0.25s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.shop-card:hover {
  border-color: rgba(255, 77, 109, 0.5);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.item-icon {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 8px;
  object-fit: contain;
}
.shop-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
}
.shop-card .desc {
  color: var(--muted);
  font-size: 0.875rem;
  flex: 1;
}
.shop-card .price {
  font-weight: 700;
  color: var(--green);
  font-size: 1.15rem;
}
.shop-card .cat-tag {
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 10px;
  border-radius: 999px;
  width: fit-content;
}

.loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 40px;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.step h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}
.step p {
  color: var(--muted);
  font-size: 0.9rem;
}
.step code {
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* Payment */
.payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.payment-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.payment-card h4 {
  margin-bottom: 6px;
}
.payment-card p {
  color: var(--muted);
  font-size: 0.9rem;
  word-break: break-all;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal[hidden] {
  display: none;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}
.modal-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  padding: 28px;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.modal-item {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}
.item-icon-lg {
  width: 72px;
  height: 72px;
  image-rendering: pixelated;
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 8px;
  object-fit: contain;
}
.price {
  color: var(--green);
  font-weight: 700;
  margin-top: 4px;
}
.muted {
  color: var(--muted);
  font-size: 0.875rem;
}

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}
.input-with-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.player-head {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  image-rendering: pixelated;
  background: var(--bg-elevated);
}
.form-msg {
  margin-top: 12px;
  font-size: 0.9rem;
  text-align: center;
}
.form-msg.ok {
  color: var(--green);
}
.form-msg.err {
  color: #ff6b6b;
}

/* Admin */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 64px);
}
.admin-sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
}
.admin-sidebar a {
  display: block;
  padding: 10px 14px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 10px;
  margin-bottom: 4px;
  font-weight: 500;
}
.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: var(--accent-soft);
  color: var(--text);
}
.admin-content {
  padding: 32px;
}
.admin-content h1 {
  font-size: 1.5rem;
  margin-bottom: 24px;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th,
td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--bg-elevated);
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tr:last-child td {
  border-bottom: none;
}
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-pending {
  background: rgba(245, 197, 66, 0.15);
  color: var(--yellow);
}
.badge-approved {
  background: rgba(61, 214, 140, 0.15);
  color: var(--green);
}
.badge-claimed {
  background: rgba(123, 92, 255, 0.15);
  color: #a78bfa;
}
.badge-rejected {
  background: rgba(231, 76, 60, 0.15);
  color: #ff6b6b;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.actions button {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.admin-form {
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.admin-form .form-group {
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .nav {
    gap: 4px;
  }
  .nav-link {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
}
