:root {
  --bg: #07080d;
  --bg-elevated: #11131c;
  --bg-card: #151823;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f3f4f8;
  --muted: #8b93a7;
  --accent: #7c5cff;
  --accent-2: #3b82f6;
  --success: #22c55e;
  --warning: #f59e0b;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background:
    radial-gradient(circle at top, rgba(124, 92, 255, 0.12), transparent 35%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.08), transparent 25%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(7, 8, 13, 0.75);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
}

.nav a.active,
.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.hero {
  padding: 48px 0 24px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.6;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 28px 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.stat-card .label {
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-card .value {
  margin-top: 8px;
  font-size: 1.6rem;
  font-weight: 700;
}

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 20px;
  box-shadow: var(--shadow);
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.filters label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.filters input,
.filters select {
  width: 100%;
  background: #0d1018;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.filters-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 32px 0 16px;
}

.section-title h2 {
  margin: 0;
  font-size: 1.25rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.gift-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.gift-card:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.35);
}

.gift-thumb {
  aspect-ratio: 1.2;
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.15), rgba(7, 8, 13, 0.2));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.gift-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-body {
  padding: 14px;
}

.gift-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.gift-meta {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chip {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.collection-list {
  display: grid;
  gap: 12px;
}

.collection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.collection-item:hover {
  border-color: rgba(124, 92, 255, 0.35);
}

.progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.status {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.status.done { color: var(--success); }
.status.in_progress { color: var(--warning); }

.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.detail-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
}

.detail-preview img {
  width: 100%;
  display: block;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-table th,
.detail-table td {
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.detail-table th {
  color: var(--muted);
  width: 140px;
  font-weight: 500;
}

.footer {
  padding: 40px 0;
  color: var(--muted);
  text-align: center;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 40px;
}

.pagination a,
.pagination span {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.pagination a:hover,
.pagination span.active {
  color: var(--text);
  border-color: rgba(124, 92, 255, 0.35);
}

@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; }
}
