:root {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #1c1c1c;
  --muted: #5c6670;
  --green: #198754;
  --green-dark: #146c43;
  --line: rgba(0, 0, 0, 0.08);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  --radius: 18px;
  --header: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  font-family: Outfit, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); }
button, input, select, textarea { font: inherit; }
.screen-reader-text,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  background: #fff;
  color: #000;
  padding: 8px 12px;
  width: auto;
  height: auto;
  clip: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.nav-container, .site-shell { width: min(1120px, calc(100% - 28px)); margin: 0 auto; }
.nav-container { display: flex; align-items: center; justify-content: space-between; min-height: var(--header); gap: 16px; }
.logo-container { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-icon { width: 40px; height: 40px; display: flex; }
.logo-icon img, .custom-logo { width: 40px; height: 40px; object-fit: contain; }
.brand-name { font-weight: 800; font-size: 1.45rem; letter-spacing: -0.03em; color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-links, .footer-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 600; }
.nav-links a:hover, .nav-links .current-menu-item a { color: var(--green); }
.hamburger { display: none; width: 42px; height: 42px; border: 0; background: transparent; padding: 8px; }
.hamburger .bar { display: block; height: 2px; margin: 5px 0; background: var(--ink); }

.site-shell { padding-bottom: 40px; }
.horizontal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  margin: 18px 0;
}
.horizontal-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
}
.horizontal-nav a svg { width: 16px; height: 16px; color: var(--green); }
.horizontal-nav a.active, .horizontal-nav a:hover { background: #eaf8f1; color: var(--green); }

.panel, .app-card, .info-card {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { padding: 22px; margin-bottom: 18px; }
.panel h1, .panel h2, .app-name { margin: 0 0 10px; line-height: 1.2; }
.panel p { margin: 0 0 12px; }
.clamp { max-height: 7.6em; overflow: hidden; }
.clamp.expanded { max-height: none; }
.app-description h1 { font-size: 1.7rem; }
.see-more { background: none; border: 0; color: var(--green); font-weight: 800; padding: 0; cursor: pointer; text-decoration: underline; }
.app-read h2 { font-size: 1.35rem; }
.app-read h2 a { color: var(--green); text-decoration: underline; }
.app-read-body { line-height: 1.6; max-height: 3.2em; overflow: hidden; }
.app-read-body.is-open { max-height: none; }
.app-read-body p { margin: 0; line-height: 1.6; color: #3d4a54; }
.app-read-body.is-open p + p { margin-top: 12px; }
.app-read-body a { color: var(--green); font-weight: 700; text-decoration: underline; }
.app-read-toggle { display: inline-flex; align-items: center; gap: 2px; margin-top: 8px; background: none; border: 0; padding: 0; color: var(--green); font-weight: 700; cursor: pointer; }
.app-read-toggle svg { width: 18px; height: 18px; }
.app-read-toggle.is-open svg { transform: rotate(180deg); }
.category-pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 12px 0 0; margin: 0; }
.category-pills a, .btn, .download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 800;
}
.category-pills a { background: #eaf8f1; color: var(--green); padding: 6px 10px; }

.apps-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.app-card { padding: 22px 16px; text-align: center; }
.app-icon { width: 104px; height: 104px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; }
.app-icon img, .game-card-thumbnail img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.logo-fallback {
  width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center;
  background: #eaf8f1; color: var(--green); font-weight: 800; font-size: 1.4rem;
}
.download-btn, .btn-primary { background: var(--green); color: #fff; }
.download-btn { width: 100%; min-height: 46px; margin-top: 12px; }
.download-btn:hover, .btn-primary:hover { background: var(--green-dark); }
.card-meta, .game-meta { color: var(--muted); font-size: 0.92rem; }
.star-row, .card-note, .game-cat, .bonus-line { display: none; }
.popular-apps .star-row { display: block; margin: 0 0 6px; color: #e5e7eb; letter-spacing: 1px; font-size: 0.95rem; line-height: 1; }
.popular-apps .star-row .is-on { color: #f5b400; }
.game-card-action .btn { gap: 4px; }
.game-card-action svg { width: 14px; height: 14px; }

.explorer-header, .toolbar, .search-container { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.tab-switch { display: flex; gap: 8px; }
.tab-btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); background: #f4f6f5; border-radius: 999px; padding: 8px 14px; font-weight: 700; }
.tab-btn svg { width: 16px; height: 16px; }
.tab-btn.active { background: #eaf8f1; color: var(--green); }
.search-container input, .toolbar input, .contact-form input, .contact-form textarea, .toolbar select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 0;
  background: #f8fafc;
  color: var(--ink);
}
.search-container { flex: 1; }
.search-container input { flex: 1; }
.search-container svg { width: 18px; height: 18px; color: var(--muted); }
.btn { border: 0; cursor: pointer; padding: 10px 14px; }
.btn-sm { min-height: 38px; }

.games-grid { display: flex; flex-direction: column; }
.game-card { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.game-card:last-child { border-bottom: 0; }
.game-card-thumbnail { width: 64px; height: 64px; flex: 0 0 64px; }
.game-card-info { flex: 1; min-width: 0; }
.game-title { margin: 0 0 4px; font-size: 1.05rem; }
.game-title a { color: var(--green); }
.game-card-action { flex: 0 0 auto; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.info-card { padding: 16px; }
.card-label { font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.card-value { font-weight: 800; font-size: 1.05rem; }
.app-header { display: flex; gap: 18px; align-items: center; }
.app-icon-wrapper { width: 112px; flex: 0 0 112px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.gallery-grid img { border-radius: 12px; width: 100%; height: auto; }
.category-image { width: 120px; border-radius: 12px; margin-bottom: 12px; }

.faq-question { width: 100%; text-align: left; background: #f8fafc; border: 0; border-radius: 10px; padding: 12px; font-weight: 700; display: flex; justify-content: space-between; cursor: pointer; }
.faq-answer { display: none; padding: 8px 4px 14px; }
.faq-item.is-open .faq-answer { display: block; }
.app-faq { margin: 22px 0 8px; }
.app-faq-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.45rem; font-weight: 800; }
.app-faq-title::before { content: ""; width: 6px; height: 1.15em; border-radius: 4px; background: var(--green); }
.app-faq-item { background: #fff; border: 1px solid #e6e8ee; border-radius: 14px; margin: 0 0 12px; }
.app-faq-q { align-items: center; gap: 16px; background: transparent; border-radius: 14px; padding: 16px 18px; font-weight: 600; color: var(--ink); }
.app-faq-text { flex: 1; line-height: 1.45; }
.app-faq-text a, .app-faq .faq-answer a { color: var(--green); text-decoration: underline; }
.app-faq-toggle { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: #7c3aed; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; font-weight: 500; line-height: 1; }
.app-faq .faq-answer { padding: 0 68px 16px 18px; }
.app-faq .faq-answer p { margin: 0; color: #4b5563; }
.important-notice { background: #fff8ee; color: #7c4a03; }
.important-notice a { color: #9a3412; }
.app-notice { background: #fff8ee; color: #9a5b12; border: 1px dashed #e8a04a; border-radius: 16px; padding: 18px 20px 8px; margin: 18px 0 8px; }
.app-notice h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1.15rem; color: #c2410c; }
.app-notice p { margin: 0 0 12px; }
.app-notice a { color: var(--green); font-weight: 800; text-decoration: none; }
.app-notice strong { color: #9a3412; }
.pagination { margin: 8px 0 20px; }
.pagination ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.pagination a, .pagination span { display: inline-block; background: #fff; color: var(--ink); text-decoration: none; border-radius: 10px; padding: 8px 12px; font-weight: 700; }
.pagination .current { background: var(--green); color: #fff; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 8px 0 14px; color: var(--muted); }
.breadcrumbs a { color: var(--ink); }
.site-footer { color: var(--muted); padding: 10px 0 30px; }
.footer-links { flex-wrap: wrap; gap: 12px 18px; margin-bottom: 10px; }
.footer-links a { color: var(--ink); text-decoration: none; }
.empty-copy, .empty-state p { color: var(--muted); }
.jr-hp { position: absolute; left: -9999px; }
.contact-form input, .contact-form textarea { width: min(100%, 520px); display: block; }
.sort-note { color: var(--muted); }
.to-top {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 40;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 18px rgba(25, 135, 84, 0.3);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.to-top.is-visible { display: flex; }
.to-top svg { width: 22px; height: 22px; }

@media (max-width: 800px) {
  body.home { background: #f3f6f8; }
  .app-description h1 { font-size: 1.35rem; }
  .app-description .clamp { line-height: 1.6; max-height: 6.4em; }
  .app-description .clamp.expanded { max-height: none; }
  .app-description .clamp p { margin: 0; }
  .app-description .clamp.expanded p + p { margin-top: 12px; }
  .app-description .see-more { display: block; margin-top: 8px; }
  .home .site-main { display: flex; flex-direction: column; }
  .home .games-explorer { order: 2; }
  .home .catalog-list { order: 3; }
  .home .latest-apps { order: 4; }
  .home .seo-article { order: 5; }
  .home .important-notice { order: 6; }
  .apps-container { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .popular-apps { background: transparent; border: 0; box-shadow: none; padding: 4px 0 8px; }
  .popular-apps h2 { display: none; }
  .popular-apps .app-card { background: transparent; border: 0; box-shadow: none; padding: 4px 2px 8px; }
  .popular-apps .app-icon { width: 72px; height: 72px; margin-bottom: 8px; }
  .popular-apps .app-name { font-size: 0.92rem; margin: 0 0 2px; }
  .popular-apps .app-name a { color: var(--ink); text-decoration: none; }
  .popular-apps .star-row, .popular-apps .card-note { display: block; margin: 0; font-size: 0.75rem; line-height: 1.2; }
  .popular-apps .star-row { color: #e5e7eb; letter-spacing: 1px; }
  .popular-apps .star-row .is-on { color: #f5b400; }
  .popular-apps .card-note { color: #9aa3ad; margin-bottom: 6px; }
  .popular-apps .card-meta { display: none; }
  .popular-apps .download-btn { min-height: 34px; margin-top: 6px; border-radius: 999px; font-size: 0.86rem; padding: 0 8px; }
  .games-explorer { background: transparent; border: 0; box-shadow: none; padding: 4px 0; }
  .explorer-header { flex-direction: column; align-items: stretch; gap: 12px; }
  .tab-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: #fff; border-radius: 999px; padding: 4px; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06); }
  .tab-btn { justify-content: center; background: transparent; border-radius: 999px; color: #8b95a1; }
  .tab-btn.active { background: #fff; color: var(--green); box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08); }
  .search-container { width: 100%; background: #fff; border: 1px solid #e6ebf0; border-radius: 999px; padding: 4px 14px; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04); }
  .search-container input { border: 0; background: transparent; padding: 10px 4px; }
  .search-container .btn { display: none; }
  .catalog-list, .latest-apps { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05); }
  .game-card { flex-wrap: nowrap; align-items: center; gap: 10px; }
  .game-card-thumbnail { width: 58px; height: 58px; flex-basis: 58px; }
  .game-card-action { width: auto; }
  .game-date { display: none; }
  .game-cat, .bonus-line { display: block; margin: 0; font-size: 0.78rem; line-height: 1.3; }
  .game-title { font-size: 0.98rem; }
  .game-title a { color: var(--ink); text-decoration: none; }
  .bonus-line { color: var(--green); font-weight: 700; }
  .game-card-action .btn { background: #fff; color: var(--green); border: 1.5px solid #8fd4b0; border-radius: 999px; padding: 6px 10px; font-size: 0.82rem; }
  .hamburger { display: block; }
  .primary-nav { display: none; position: absolute; top: var(--header); left: 0; right: 0; background: #fff; padding: 8px 16px 16px; border-bottom: 1px solid var(--line); }
  .primary-nav.is-open, .nav-links.is-open { display: block; }
  .nav-links { display: none; flex-direction: column; gap: 0; }
  .nav-links.is-open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .app-header { flex-direction: column; align-items: center; text-align: center; }
  .app-icon-wrapper { width: 96px; flex-basis: auto; }
  .app-icon-wrapper img, .app-icon-wrapper .logo-fallback { width: 96px; height: 96px; }
  .horizontal-nav { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .horizontal-nav a { flex: 0 0 auto; }
}
@media (min-width: 801px) and (max-width: 1024px) {
  .apps-container { grid-template-columns: repeat(2, 1fr); }
}
