/* All Top Rummy App — light theme, green CTAs, wider content column */
:root {
  --content-max: 880px;
  --bg-page: #ffffff;
  --bg-card: #ffffff;
  --bg-muted: #f0f4f1;
  --accent: #16a34a;
  --accent-hover: #15803d;
  --accent-soft: #22c55e;
  --accent-pill-bg: rgba(22, 163, 74, 0.1);
  --accent-pill-border: rgba(22, 163, 74, 0.28);
  --text: #1a1f1c;
  --text-muted: #5b6560;
  --border: #dfe6e1;
  --shadow: 0 2px 12px rgba(15, 40, 25, 0.08);
  --shadow-lg: 0 8px 28px rgba(15, 40, 25, 0.1);
  --radius: 12px;
  --header-h: 56px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-page);
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.main-shell {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: calc(var(--header-h) + 16px) 16px 36px;
}

.main-shell--home {
  padding-top: calc(var(--header-h) + 10px);
}

.home-hero {
  margin-bottom: 12px;
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 38%);
  border-color: rgba(22, 163, 74, 0.18);
}

.home-notice {
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
}

.home-notice-heading {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 800;
  color: #b45309;
}

.home-notice p {
  margin: 0;
  font-size: 13px;
  color: #78350f;
  line-height: 1.5;
}

.section-head {
  margin-bottom: 10px;
}

.section-head .section-title {
  margin: 0;
}

.section-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.home-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.home-filter-tab {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
}

.home-filter-tab:hover,
.home-filter-tab:focus-visible {
  border-color: var(--accent);
  color: var(--accent-hover);
  outline: none;
}

.home-filter-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.app-list-section--framed {
  padding-top: 16px;
  padding-bottom: 16px;
}

.app-list--grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 640px) {
  .app-list--grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.app-list--grid .app-card {
  margin-bottom: 0;
}

.home-list-empty {
  margin: 12px 0 0;
  padding: 12px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  background: var(--bg-muted);
  border-radius: 10px;
}

/* ——— Header ——— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.header-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
}

.brand-text {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  top: 100%;
  padding: 8px 16px 14px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

body.nav-open .site-nav {
  display: block;
}

.nav-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 0 10px;
}

.nav-drawer-links a {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.nav-drawer-links a:last-child {
  border-bottom: none;
}

.nav-drawer-links a:hover,
.nav-drawer-links a:focus-visible {
  background: var(--bg-muted);
  color: var(--accent);
}

.nav-drawer-links a.active {
  color: var(--accent);
  font-weight: 700;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  overflow: hidden;
  padding: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-overlay {
  padding: 14px 16px 16px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.96));
}

.hero-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
}

.hero-tagline {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* ——— App detail SEO lead ——— */
.app-seo-lead {
  margin-bottom: 14px;
  padding: 12px 14px;
  background: var(--bg-muted);
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.app-seo-lead p {
  margin: 0;
}

.section-title {
  margin: 22px 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

/* ——— App list ——— */
.app-list {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

.app-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: 10px;
  margin-bottom: 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  flex-wrap: nowrap;
}

.app-card .app-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  flex-shrink: 0;
  object-fit: cover;
}

.app-card .app-info {
  flex: 1;
  min-width: 0;
}

.app-card .app-name {
  font-weight: bold;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 2px;
}

.app-card .app-bonus {
  font-size: 13px;
  color: var(--accent-hover);
}

.app-card .app-min {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.app-card .download-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  align-self: center;
}

.app-card .download-btn:hover,
.app-card .download-btn:focus-visible {
  background: var(--accent-hover);
}

.app-list:not(.app-list--grid) .app-card {
  margin-bottom: 10px;
}

/* ——— Cards / prose ——— */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 18px 16px;
}

.page-prose h1 {
  margin-top: 0;
  font-size: 22px;
}

.page-prose h2 {
  margin-top: 1.4em;
  font-size: 17px;
}

.contact-block .label {
  font-weight: 600;
  color: var(--text-muted);
}

/* ——— App detail ——— */
.app-detail .app-hero-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.app-hero-icon {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  flex-shrink: 0;
  object-fit: cover;
}

.app-title {
  margin: 0;
  font-size: 22px;
}

.app-sub {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.stat {
  flex: 1 1 calc(50% - 8px);
  min-width: 120px;
  background: var(--bg-muted);
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
}

.stat-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.stat-value {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.price-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}

.price-tag {
  background: var(--accent-pill-bg);
  color: var(--accent-hover);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--accent-pill-border);
}

.trusted-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.trusted-badge img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.bonus-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  margin-bottom: 16px;
}

.bonus-lines .bonus {
  color: var(--accent-hover);
  font-weight: 600;
}

.bonus-lines .withdraw {
  color: var(--text-muted);
}

.btn-download-lg {
  display: block;
  text-align: center;
  padding: 14px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  border-radius: 12px;
  text-decoration: none;
  margin-bottom: 22px;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.35);
}

.btn-download-lg:hover,
.btn-download-lg:focus-visible {
  background: var(--accent-hover);
}

/* ——— FAQ ——— */
.faq-section h2 {
  margin-top: 0;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--bg-muted);
}

.faq-q {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.faq-q::after {
  content: "+";
  font-size: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.faq-q[aria-expanded="true"]::after {
  content: "−";
}

.faq-a {
  padding: 0 14px 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.faq-a[hidden] {
  display: none !important;
}

/* ——— More apps (allyonostore-style row) ——— */
.more-apps-section {
  margin-top: 18px;
}

.more-apps-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.more-apps-sub {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.more-apps-rail {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.more-app-item {
  flex: 0 0 calc((100% - 5 * 10px) / 6);
  min-width: 72px;
  max-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  scroll-snap-align: start;
  padding: 6px 4px;
  border-radius: 10px;
}

.more-app-item:hover,
.more-app-item:focus-visible {
  background: var(--bg-muted);
  color: var(--accent);
}

.more-app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border);
  margin-bottom: 6px;
}

.more-app-name {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* ——— Footer ——— */
.site-footer {
  margin-top: 24px;
  padding: 24px 16px 40px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.important-notice {
  background: var(--accent-pill-bg);
  border: 1px solid var(--accent-pill-border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
}

.important-notice h2 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--accent-hover);
}

.important-notice p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
}

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

.footer-telegram {
  margin: 0 0 8px;
  font-size: 14px;
}

.copyright {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

body.nav-open {
  overflow: hidden;
}

@media (min-width: 520px) {
  .stat {
    flex: 1 1 calc(25% - 8px);
  }
}
