* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f1f1f1;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #66c247;
  --accent-dark: #4ca535;
  --border: #dcdcdc;
  --shadow: 0 6px 14px rgba(17, 24, 39, 0.08);
  --radius: 8px;
  --header: #2f3440;
  --header-dark: #262a33;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

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

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 16px 0 24px;
}

header {
  background: var(--header);
  border-bottom: 3px solid var(--accent);
  z-index: 20;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--accent);
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.2s;
}

.brand:hover {
  opacity: 0.9;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand small {
  display: block;
  color: #e5e7eb;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  margin-top: 2px;
}

@media (max-width: 480px) {
  .brand-logo {
    width: 40px;
    height: 40px;
  }
  
  .brand {
    font-size: 16px;
    gap: 8px;
  }
  
  .brand small {
    font-size: 10px;
  }
}

.nav {
  display: flex;
  gap: 10px;
  font-size: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--header-dark);
  color: #f9fafb;
  text-align: center;
}

.nav a.active {
  background: var(--accent);
  color: #111827;
  font-weight: 600;
}

.search-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
}

.search-hero__image {
  width: 140px;
  height: auto;
  flex-shrink: 0;
}

.search-hero__content {
  min-width: 240px;
  flex: 1;
}

@media (max-width: 720px) {
  .search-hero {
    flex-wrap: wrap;
  }

  .search-hero__image {
    width: 120px;
    margin: 0 auto;
  }

  .search-hero__content {
    text-align: center;
  }
}

.nav-toggle {
  width: 44px;
  height: 36px;
  border-radius: 8px;
  background: var(--header-dark);
  border: none;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: #f9fafb;
  border-radius: 999px;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 40;
}

.menu-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(320px, 86vw);
  background: #2f3440;
  color: #fff;
  padding: 18px 18px 24px;
  transform: translateX(100%);
  transition: transform 0.2s ease;
  z-index: 50;
  overflow-y: auto;
}

.menu-panel.is-open {
  transform: translateX(0);
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.menu-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.menu-section {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.menu-title {
  font-size: 14px;
  color: #cbd5f5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.menu-panel a {
  color: #fff;
  font-size: 16px;
}

.menu-open {
  overflow: hidden;
}

.category-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.category-nav a {
  color: var(--text);
  font-weight: 600;
}

.category-nav a.active {
  color: var(--accent-dark);
}

.hero {
  padding: 12px 0 8px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.search-bar {
  margin: 12px 0 8px;
  display: flex;
  gap: 0;
}

.search-bar input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 6px 0 0 6px;
  border: 1px solid var(--border);
  font-size: 15px;
}

.search-bar button {
  border-radius: 0 6px 6px 0;
  min-height: 42px;
}

.search-button {
  width: 46px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-button svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.button,
.search-bar button {
  padding: 10px 16px;
  border-radius: 6px;
  border: none;
  background: #2f3440;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  min-height: 42px;
}

.button.secondary {
  background: #fff;
  color: var(--accent-dark);
  border: 1px solid var(--accent-dark);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0;
}

.cards {
  display: grid;
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
  height: 100%;
  overflow: hidden;
}

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

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #f9fafb;
  margin: 0 auto;
}

.app-icon.large {
  width: 86px;
  height: 86px;
}

.card-icon-link {
  display: block;
  transition: transform 0.15s ease;
}

.card-icon-link:hover {
  transform: scale(1.05);
}

.card-title {
  margin: 0;
  font-size: 16px;
  text-align: center;
  line-height: 1.25;
  min-height: 2.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.card-desc {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.35;
  min-height: 3.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e7f6e4;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-size: 12px;
  font-weight: 600;
  align-self: center;
  text-align: center;
}

.card-badge svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.app-verified-badge {
  margin: 0 auto 10px;
}

.card-desc + .card-require {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
}

.card-require {
  font-size: 14px;
  color: var(--accent-dark);
  text-align: center;
  font-weight: 600;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.tag {
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
}

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

.card-actions.install-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: auto;
}

.card-actions.install-actions .card-button {
  margin: 0;
  border-radius: 6px;
  border-top: 1px solid var(--border);
}

.card-button {
  width: 100%;
  justify-content: center;
  display: inline-flex;
  align-items: center;
}

.card-button {
  background: var(--header);
  border-radius: 0 0 var(--radius) var(--radius);
  margin: 8px 0 0;
  padding: 10px 0;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.card-button.install-button {
  background: #fff;
  color: var(--accent-dark);
  border: 1px solid var(--accent-dark);
  border-radius: 6px;
  margin: 0;
  padding: 10px 0;
}

.install-guide {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.install-guide.is-open {
  display: grid;
  gap: 12px;
}

.install-steps {
  display: grid;
  gap: 12px;
}

.install-step {
  display: grid;
  gap: 6px;
}

.install-step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-dark);
}

.install-step-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.install-step img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

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

.filters select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.details-grid {
  display: grid;
  gap: 12px;
}

.details-meta {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.details-meta span {
  color: var(--muted);
}

.screenshots {
  display: grid;
  gap: 8px;
}

.screenshots img {
  border-radius: 12px;
  border: 1px solid var(--border);
}

.screenshots-slider,
.main__gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.screenshots-slider::-webkit-scrollbar {
  height: 6px;
}

.screenshots-slider::-webkit-scrollbar-thumb {
  background: #cbd5f5;
  border-radius: 999px;
}

.screenshots-slider img,
.main__gallery img {
  scroll-snap-align: start;
  width: min(260px, 80%);
  height: auto;
  flex: 0 0 auto;
}

.screenshots-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.screenshots-indicator {
  font-weight: 600;
  color: var(--muted);
}

.screenshots-buttons {
  display: inline-flex;
  gap: 8px;
}

.screenshots-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  min-height: 36px;
}

.download-bar {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 10px 0;
  z-index: 30;
}

.download-bar .container {
  padding: 0;
}

.download-bar .button {
  width: 100%;
}

.spacer-bottom {
  padding-bottom: 80px;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 24px 0 40px;
}

.pagination {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
  margin: 16px 0;
}

.pagination a {
  padding: 6px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-weight: 600;
}

.pagination a.active {
  background: var(--accent);
  color: #111827;
}

.pagination a:hover:not(.active) {
  background: #f3f4f6;
  border-color: var(--accent);
}

.pagination-ellipsis {
  padding: 6px 10px;
  color: var(--muted);
  font-weight: 600;
}

.category-title {
  text-align: center;
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  padding: 16px 0;
  background: var(--header);
  margin: 12px -4vw 12px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.breadcrumbs a {
  color: var(--accent-dark);
  font-weight: 600;
}

.app-hero {
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  display: grid;
  gap: 16px;
}

.app-hero-main {
  display: grid;
  gap: 16px;
}

.app-hero-top {
  display: flex;
  gap: 16px;
  align-items: center;
}

.app-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #166534;
  background: #e7f6e4;
  padding: 4px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.app-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.app-badge {
  background: #fff7ed;
  color: #b45309;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.app-badge.badge-new {
  background: #ecfdf3;
  color: #166534;
  border-color: #bbf7d0;
}

.app-badge.badge-top {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.app-badge.badge-expert {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.app-badge.badge-bonus {
  background: #fdf4ff;
  color: #a21caf;
  border-color: #f5d0fe;
}

.app-recommendations h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

.recommendation-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.recommendation-card img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f3f4f6;
}

.recommendation-title {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}
.app-hero-actions {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.app-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-hero-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.app-header {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.app-header-icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #f3f4f6;
}

.app-header-text {
  flex: 1;
}

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

.app-subtitle {
  margin: 0 0 14px;
  color: var(--muted);
}

.app-download-card {
  background: #f7f7f7;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.app-download-title {
  text-align: center;
  font-weight: 700;
  margin-bottom: 12px;
  color: #374151;
}

.app-download-row {
  display: flex;
  justify-content: center;
}

.app-download {
  width: auto;
  justify-content: center;
  gap: 8px;
  background: #7bbf43;
  border-radius: 6px;
  padding: 12px 18px;
}

.app-install-toggle {
  width: 100%;
  justify-content: center;
  max-width: 480px;
}
.app-download-note {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.app-download-icon {
  font-size: 16px;
}

.app-meta-list {
  margin-top: 14px;
  border-top: 1px solid var(--border);
}

.app-meta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.app-meta-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4b5563;
}

.app-meta-icon {
  width: 18px;
  text-align: center;
}

.app-meta-value {
  font-weight: 600;
  color: #374151;
}

.app-meta-link {
  font-weight: 700;
  color: var(--accent-dark);
}

.app-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.app-section h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comments-stats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.comments-average {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

.comments-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  background: #eef8e9;
  padding: 4px 10px;
  border-radius: 999px;
}

.comments-subtitle {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.comments-list {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.comment-author {
  font-weight: 700;
  font-size: 14px;
}

.comment-date {
  font-size: 12px;
  color: var(--muted);
}

.comment-text {
  margin: 0;
  font-size: 14px;
  color: #374151;
  line-height: 1.4;
}

.comments-empty,
.comment-loading,
.comment-error {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.comment-error {
  color: #b91c1c;
}

.comment-form {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.comment-field {
  display: grid;
  gap: 6px;
}

.comment-field label {
  font-size: 13px;
  color: var(--muted);
}

.comment-label {
  font-size: 13px;
  color: var(--muted);
}

.rating-input {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
}

.rating-input input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rating-input label {
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  transition: color 0.2s ease;
  background: #fff;
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label {
  color: #111827;
  background: #eef8e9;
  border-color: #c7e8ba;
}

.comment-rating {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 6px;
  font-weight: 700;
  color: #374151;
}

.admin-section {
  display: grid;
  gap: 16px;
}

.admin-title {
  margin: 0;
  font-size: 20px;
}

.admin-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-key {
  display: grid;
  gap: 10px;
}

.admin-auth {
  display: grid;
  gap: 10px;
}

.admin-auth input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  font-family: inherit;
}

.admin-key input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  font-family: inherit;
}

.admin-status {
  margin: 0;
  font-size: 13px;
}

.admin-status[data-state="success"] {
  color: #166534;
}

.admin-status[data-state="error"] {
  color: #b91c1c;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px 14px;
  display: grid;
  gap: 10px;
}

.admin-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.admin-card-title {
  font-weight: 700;
  font-size: 15px;
}

.admin-card-meta {
  font-size: 12px;
  color: var(--muted);
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-actions .button {
  min-height: 36px;
}

.admin-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-grid {
  display: grid;
  gap: 12px;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 13px;
}

.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}

.radio-group input {
  accent-color: var(--accent-dark);
}

.admin-grid .full {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.comment-field input,
.comment-field textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}

.comment-field textarea {
  resize: vertical;
  min-height: 110px;
}

.comment-status {
  margin: 0;
  font-size: 13px;
}

.comment-status[data-state="success"] {
  color: #166534;
}

.comment-status[data-state="error"] {
  color: #b91c1c;
}

.comment-form .button.is-sending {
  background: #22c55e;
}

@media (min-width: 768px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero h1 {
    font-size: 26px;
  }

  .download-bar {
    position: static;
    border-top: none;
    background: transparent;
    padding: 0;
  }

  .download-bar .button {
    width: auto;
  }
}

@media (min-width: 1024px) {
  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: center;
  }

  .brand {
    text-align: center;
  }

  .nav {
    justify-content: center;
    gap: 8px;
  }

  .category-nav {
    justify-content: center;
    text-align: center;
  }

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

  .card {
    padding: 12px 12px 14px;
  }

  .card-title {
    font-size: 15px;
  }

  .card-desc {
    min-height: 56px;
  }

  .card-button {
    margin: 8px 0 0;
  }

  .app-header {
    flex-direction: column;
    text-align: center;
  }

  .app-hero-top {
    flex-direction: column;
    text-align: center;
  }

  .app-hero-meta {
    justify-content: center;
  }

  .app-header-icon {
    width: 96px;
    height: 96px;
  }
}

/* Geo-blocked page styles */
.geo-blocked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  min-height: 50vh;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 20px 0;
}

.geo-blocked-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.geo-blocked h1 {
  font-size: 24px;
  margin: 0 0 16px;
  color: var(--text);
}

.geo-blocked p {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 400px;
}

.geo-blocked .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Admin checkbox label */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* ============================================
   ARTICLES STYLES
   ============================================ */

/* Articles List Page */
.articles-hero {
  text-align: center;
  padding: 32px 0 24px;
}

.articles-hero h1 {
  font-size: 28px;
  margin: 0 0 12px;
  color: var(--text);
}

.articles-subtitle {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  padding-bottom: 40px;
}

.article-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.article-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.article-card-image {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #f3f4f6;
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .article-card-image img {
  transform: scale(1.05);
}

.article-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
}

.article-card-content {
  padding: 16px;
}

.article-card-title {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.3;
}

.article-card-title a {
  color: var(--text);
  text-decoration: none;
}

.article-card-title a:hover {
  color: var(--accent);
}

.article-card-desc {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.article-card-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

.article-card-coming {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border: 2px dashed var(--border);
  min-height: 200px;
}

.article-card-coming-content {
  text-align: center;
  color: var(--muted);
}

.article-card-coming-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

/* Article Content Page */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 40px;
  padding-top: 16px;
}

.article-header {
  text-align: center;
  padding: 32px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  background: #fff;
}

.article-badge {
  display: inline-block;
  background: var(--accent);
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.article-header h1 {
  font-size: 32px;
  line-height: 1.25;
  margin: 0 0 16px;
  color: var(--text);
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

/* Article Body */
.article-body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
}

.article-body h2 {
  font-size: 24px;
  margin: 40px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 80px;
}

.article-body section[id] {
  scroll-margin-top: 80px;
}

.article-body h3 {
  font-size: 20px;
  margin: 28px 0 12px;
}

.article-body p {
  margin: 0 0 16px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 20px;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-intro {
  font-size: 18px;
  line-height: 1.6;
  color: #374151;
  background: #f9fafb;
  padding: 20px 24px;
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}

/* Table of Contents */
.article-toc {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}

.article-toc h2 {
  font-size: 16px;
  margin: 0 0 12px;
  padding: 0;
  border: none;
}

.article-toc ul {
  margin: 0;
  padding-left: 20px;
}

.article-toc li {
  margin-bottom: 6px;
}

.article-toc a {
  color: var(--accent);
  text-decoration: none;
}

.article-toc a:hover {
  text-decoration: underline;
}

/* Install Steps in Article */
.install-step-card {
  display: flex;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.install-step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #1a1a1a;
  font-size: 24px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.install-step-content {
  flex: 1;
}

.install-step-content h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.install-step-content p {
  margin: 0 0 16px;
}

.article-image {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}

.article-image-center {
  margin: 0 auto;
}

.article-figure {
  margin: 24px 0;
  text-align: center;
}

.article-figure figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

/* Game card inline for articles */
.game-card-inline {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
}

.game-card-inline .game-card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.game-card-inline .game-card-info p {
  margin: 0;
  font-size: 14px;
}

/* Article table */
.table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.article-table th,
.article-table td {
  padding: 12px 16px;
  text-align: left;
  border: 1px solid var(--border);
}

.article-table th {
  background: #f3f4f6;
  font-weight: 600;
}

.article-table tr:nth-child(even) {
  background: #f9fafb;
}

/* Article Callouts */
.article-callout {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin: 24px 0;
  font-size: 15px;
  line-height: 1.6;
}

.article-callout-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.article-callout-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.article-callout a {
  color: inherit;
  font-weight: 600;
}

/* Article Summary */
.article-summary {
  background: #f9fafb;
  padding: 24px;
  border-radius: var(--radius);
  margin-top: 32px;
}

.article-summary h2 {
  margin: 0 0 16px;
  padding: 0;
  border: none;
  font-size: 22px;
}

/* Article Footer */
.article-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.article-share {
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.share-btn:hover {
  opacity: 0.85;
}

.share-telegram {
  background: #0088cc;
  color: #fff;
}

.share-vk {
  background: #4a76a8;
  color: #fff;
}

.article-nav-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.article-nav-link:hover {
  text-decoration: underline;
}

/* Mobile Styles for Articles */
@media (max-width: 768px) {
  .articles-hero h1 {
    font-size: 24px;
  }

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

  .article-header h1 {
    font-size: 24px;
  }

  .article-body {
    font-size: 16px;
  }

  .article-body h2 {
    font-size: 20px;
  }

  .install-step-card {
    flex-direction: column;
    text-align: center;
  }

  .install-step-number {
    margin: 0 auto;
  }

  .article-image {
    max-width: 100%;
  }

  .article-footer {
    flex-direction: column;
    text-align: center;
  }
}
