:root {
  --bg: #05070a;
  --bg-elevated: #0a0d14;
  --bg-card: #0e131d;
  --bg-card-hover: #141b29;
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(56, 189, 248, 0.4);
  --text: #f1f5f9;
  --text-muted: #7c8ba1;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --success: #10b981;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Animated Dark Background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridDrift 22s linear infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.09), transparent 36%),
    radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.07), transparent 38%);
  animation: ambientFloat 14s ease-in-out infinite alternate;
}

@keyframes gridDrift {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 48px 48px, 48px 48px;
  }
}

@keyframes ambientFloat {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  100% {
    transform: translate3d(2%, 2%, 0) scale(1.06);
  }
}

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

ul {
  list-style: none;
}

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 7, 10, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e2e8f0, var(--accent));
  color: #05070a;
  font-weight: 900;
  font-size: 1.05rem;
}

.brand span em {
  font-style: normal;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a.active {
  border: 1px solid var(--border-accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #05070a;
  font-weight: 700;
}

.btn-primary:hover {
  background: #7dd3fc;
  transform: translateY(-1px);
}

.btn-setup {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #03150e;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.25);
}

.btn-setup:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.setup-spotlight {
  flex: 1;
  min-width: 280px;
  max-width: 420px;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.12), rgba(14, 19, 29, 0.96));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.setup-spotlight-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.btn-setup-giant {
  width: 100%;
  padding: 18px 24px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #03150e;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 14px 34px rgba(16, 185, 129, 0.34);
  transition: var(--transition);
}

.btn-setup-giant:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.48);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 0.84rem;
}

/* Hero */
.hero {
  padding: 44px 0 26px;
}

.hero-box {
  background: rgba(10, 13, 20, 0.85);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 34px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

.hero-content {
  max-width: 600px;
}

.hero h1 {
  font-size: clamp(1.85rem, 3.4vw, 2.55rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-bar {
  display: flex;
  gap: 8px;
  background: #06080d;
  border: 1px solid var(--border);
  padding: 6px;
  border-radius: 10px;
  width: min(440px, 100%);
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  padding: 7px 10px;
  font-size: 0.92rem;
}

.search-bar input::placeholder {
  color: #526075;
}

/* Sections */
.section {
  padding: 28px 0 42px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

/* Filters */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.pill:hover,
.pill.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: var(--accent);
  color: var(--text);
}

.sort-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  outline: none;
}

/* App Grid & Cards */
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.app-card {
  background: rgba(14, 19, 29, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
}

.app-card:hover {
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.app-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #131b2b;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--accent);
}

.app-icon svg,
.detail-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.detail-icon img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.app-title-wrap h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.app-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.badge-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
}

.badge-game {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.badge-cat {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid var(--border);
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #34d399;
}

.status-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.app-desc {
  color: var(--text-muted);
  font-size: 0.86rem;
  flex: 1;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Subpages */
.page-banner {
  padding: 34px 0 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 13, 20, 0.65);
}

.page-banner h1 {
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  margin-bottom: 4px;
}

.page-banner p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.55fr 0.95fr;
  gap: 20px;
  align-items: start;
}

.panel {
  background: rgba(14, 19, 29, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.panel h2,
.panel h3 {
  margin-bottom: 12px;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.detail-icon {
  width: 62px;
  height: 62px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #131b2b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent);
}

.detail-icon svg {
  width: 30px;
  height: 30px;
}

.spec-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.89rem;
}

.spec-row span:first-child {
  color: var(--text-muted);
}

.feature-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.feature-list li {
  padding-left: 20px;
  position: relative;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.feature-list li::before {
  content: "›";
  position: absolute;
  left: 2px;
  color: var(--accent);
  font-weight: 800;
}

/* Forms & FAQ */
.form-grid {
  display: grid;
  gap: 14px;
}

.form-group label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: #06080d;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  background: rgba(14, 19, 29, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-item p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Toast */
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #0e131d;
  border: 1px solid var(--success);
  color: var(--text);
  padding: 13px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 999;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: 0.25s ease;
  max-width: 340px;
  font-size: 0.9rem;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: rgba(5, 7, 10, 0.92);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.86rem;
}

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

.footer-links a:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 960px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #0a0d14;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 4%;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-box {
    padding: 24px;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .search-bar {
    flex-direction: column;
  }
}
