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

:root {
  --bg: #0a0b10;
  --bg-muted: #12141c;
  --surface: #1a1d28;
  --border: #2a2f3d;
  --text: #eef0f6;
  --text-muted: #9aa3b5;
  --accent: #6c5ce7;
  --accent-hover: #7d6ff0;
  --radius: 12px;
  --container: 1080px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 11, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

/* Hero */
.hero {
  padding: 6rem 0 5rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(108, 92, 231, 0.25), transparent),
    var(--bg);
}

.hero-inner {
  max-width: 640px;
}

.hero-label {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-primary:disabled,
.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-muted);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-muted {
  background: var(--bg-muted);
}

.section-title {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.about p {
  color: var(--text-muted);
  max-width: 640px;
  font-size: 1.0625rem;
}

/* Game grid */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.game-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.game-card-thumb {
  height: 160px;
  background: #0f1118;
  overflow: hidden;
}

.game-card-thumb:not(:has(img)) {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e2130, #2a2f45);
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  padding: 1rem;
}

.game-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-card-body {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem 1.25rem;
}

.game-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
}

.game-card-body h3 {
  font-size: 1.125rem;
  margin-bottom: 0.125rem;
}

.game-card-body p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.game-card h3 {
  padding: 1rem 1.25rem 0.25rem;
  font-size: 1.125rem;
}

.game-card p {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* APK page */
.page-header h1 {
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.page-desc {
  color: var(--text-muted);
}

.download-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.download-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.download-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex-shrink: 0;
  object-fit: cover;
}

.download-card h2 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.download-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.notice {
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: auto;
}

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

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

@media (max-width: 600px) {
  .hero {
    padding: 4rem 0 3rem;
  }

  .nav {
    gap: 1rem;
  }
}
