:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a28;
  --border: #1e1e30;
  --border-hover: #00e5a0;
  --text: #e0e0e0;
  --text-muted: #888;
  --accent: #00e5a0;
  --accent2: #0088ff;
  --glow: rgba(0, 229, 160, 0.15);
  --radius: 12px;
  --max: 1280px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

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

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

header {
  background: linear-gradient(180deg, #0d0d18 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
}

.logo-icon { font-size: 1.6rem; }

.logo-accent {
  color: var(--accent);
  text-shadow: 0 0 20px var(--glow);
}

.last-updated {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

main { max-width: var(--max); margin: 0 auto; padding: 24px; }

.section {
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

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

.badge {
  font-size: 0.7rem;
  background: var(--accent);
  color: #000;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
  vertical-align: middle;
}

.badge-fire { background: #ff6b35; color: #fff; }
.badge-free { background: #00c853; color: #fff; }
.badge-coming { background: var(--accent2); color: #fff; }
.badge-top { background: #ffd700; color: #000; }

.hero {
  margin-bottom: 48px;
}

.hero-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.3s;
  position: relative;
}

.hero-content:hover { border-color: var(--border-hover); }

.hero-slide {
  display: none;
  min-height: 300px;
}

.hero-slide.active {
  display: flex;
}

.hero-slide.fade-in {
  animation: heroFade 0.5s ease forwards;
}

@keyframes heroFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-image {
  flex: 0 0 40%;
  min-height: 280px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 50%, var(--bg-card) 100%);
}

.hero-info {
  flex: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-info h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  background: var(--accent2);
  color: #fff;
  padding: 3px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  width: fit-content;
}

.hero-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.hero-price .original {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 8px;
}

.hero-discount {
  display: inline-block;
  background: #ff6b35;
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-left: 8px;
}

.hero-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  padding: 0;
}

.hero-dot:hover {
  background: var(--accent2);
  transform: scale(1.2);
}

.hero-dot.active {
  background: var(--accent);
  transform: scale(1.3);
  box-shadow: 0 0 10px var(--glow);
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 32px var(--glow);
}

.card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  background: #1a1a28;
}

.card-image-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #1a1a28 0%, #252540 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.card-body {
  padding: 16px;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  margin-bottom: 8px;
  align-items: center;
}

.card-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #ffd700;
}

.card-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.card-price .original {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 6px;
}

.card-discount {
  display: inline-block;
  background: #ff6b35;
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 6px;
}

.card-free {
  display: inline-block;
  background: #00c853;
  color: #fff;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-tag {
  font-size: 0.7rem;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 8px;
}

.loader, .hero-loader, .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.empty-state {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

footer {
  background: #0d0d18;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.footer-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.attrib-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.attrib-links {
  display: flex;
  gap: 16px;
}

.attrib-links a {
  font-size: 0.8rem;
  color: var(--accent2);
  text-decoration: none;
  transition: color 0.2s;
}

.attrib-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.admin-email {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.admin-email:hover {
  color: var(--accent);
}

.footer-counter {
  text-align: right;
}

.visit-counter {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.visit-label {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer-counter {
    text-align: left;
  }
}

.modal-overlay {
  display: none !important;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.modal-overlay.open {
  display: flex !important;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 520px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.modal-welcome {
  text-align: center;
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.modal-welcome h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.modal-welcome p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.6;
}

.modal-confirm {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 32px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.modal-confirm:hover {
  box-shadow: 0 0 20px var(--glow);
}

.modal-card-img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
  background: #1a1a28;
}

.modal-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  margin-bottom: 12px;
  align-items: center;
}

.modal-card-rating {
  color: #ffd700;
}

.modal-card-price {
  color: var(--accent);
  font-weight: 600;
}

.modal-card-price .original {
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 6px;
  font-size: 0.85rem;
}

.modal-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.modal-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.modal-card-tag {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: 8px;
}

.modal-card-link {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent2);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: box-shadow 0.2s;
}

.modal-card-link:hover {
  box-shadow: 0 0 16px rgba(0,136,255,0.3);
}

@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: 8px; text-align: center; }
  .hero-slide.active { flex-direction: column; }
  .hero-image { flex: 0 0 200px; }
  .hero-image::after { background: linear-gradient(0deg, var(--bg-card) 0%, transparent 50%); }
  .hero-info { padding: 20px; }
  .hero-info h3 { font-size: 1.3rem; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .footer-inner { flex-direction: column; text-align: center; }
  .attrib-links { justify-content: center; }
  .modal-box { padding: 24px; }
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  main { padding: 16px; }
}