/* ==========================================================================
   Yono App Store - Mobile-First Red / White / Black UI Stylesheet
   ========================================================================== */

:root {
  --primary-color: #fb3737;
  --secondary-color: #ff0000;
  --accent-color: #000000;
  --success-color: #00ffff;
  --warning-color: #0000ff;
  --danger-color: #ff00ff;
  --bg-page: #f8fafc;
  --border-light: #e2e8f0;
  --text-dark: #1a202c;
  --text-muted: #64748b;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-page);
  color: var(--text-dark);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

.container {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
  background: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #ffffff;
  position: relative;
  z-index: 50;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #ffffff;
  min-width: 0;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  min-height: 45px;
  flex-shrink: 0;
}

.logo img {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  object-fit: cover;
}

.site-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}

.menu-toggle {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
}

.menu-toggle i {
  font-size: 16px;
}

/* Collapsible Mobile / Hamburger Drawer */
.mobile-dropdown {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.mobile-dropdown[hidden] {
  display: none;
}

.mobile-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
}

.mobile-dropdown a:hover,
.mobile-dropdown a.active {
  background: #fef2f2;
  color: var(--primary-color);
  font-weight: 600;
}

.mobile-dropdown a i {
  width: 16px;
  text-align: center;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.nav-menu {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-item i {
  font-size: 16px;
}

.nav-item:hover {
  color: var(--primary-color);
  background: #f1f5f9;
}

.nav-item.active {
  color: var(--primary-color);
  font-weight: 600;
  background: #fef2f2;
}

/* ==========================================================================
   Main Content & Hero
   ========================================================================== */
.main-content {
  flex: 1;
  padding: 20px;
  background: var(--bg-page);
}

.main-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
  text-align: center;
}

/* Promo Section */
.promo-section {
  background: linear-gradient(135deg, var(--accent-color), var(--success-color));
  padding: 11px 12px;
  border-radius: 10px;
  margin-bottom: 16px;
  color: #ffffff;
}

.promo-text {
  font-size: 11px;
  line-height: 1.45;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* Download Section & Tabs */
.download-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
  text-align: center;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  background: #ffffff;
  padding: 4px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab {
  flex: 1;
  padding: 10px 16px;
  text-align: center;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}

.tab i {
  font-size: 14px;
}

.tab.active {
  background: var(--secondary-color);
  color: #ffffff;
}

.tab:not(.active) {
  background: transparent;
  color: var(--text-muted);
}

.tab:not(.active):hover {
  background: #f1f5f9;
  color: #374151;
}

/* ==========================================================================
   Game Cards
   ========================================================================== */
.games-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid var(--border-light);
}

.game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: #cbd5e1;
}

.game-number {
  position: absolute;
  left: -6px;
  top: -6px;
  background: var(--primary-color);
  color: #ffffff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.game-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  flex-shrink: 0;
  overflow: hidden;
  display: block;
}

.game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-icon-fallback {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 10px;
  text-align: center;
  line-height: 1;
  flex-shrink: 0;
}

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

.game-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-name a {
  text-decoration: none;
  color: inherit;
}

.game-name a:hover {
  color: var(--primary-color);
}

.game-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bonus-info,
.withdraw-info {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.bonus-info {
  color: var(--secondary-color);
}

.bonus-info i {
  color: var(--secondary-color);
  font-size: 12px;
}

.withdraw-info {
  color: var(--accent-color);
}

.withdraw-info i {
  color: var(--accent-color);
  font-size: 12px;
}

.download-btn {
  background: var(--accent-color);
  color: #ffffff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  text-decoration: none;
}

.download-btn:hover {
  background: var(--primary-color);
  transform: translateY(-1px);
  color: #ffffff;
}

.download-btn:active {
  transform: translateY(0);
}

.download-btn i {
  font-size: 12px;
}

.download-btn--lg {
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  border-radius: 10px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 36px 20px;
  color: #6b7280;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.empty-state i {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
  display: block;
}

/* ==========================================================================
   Filter & Search Toolbar (All Games Page)
   ========================================================================== */
.filter-toolbar {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: 13px;
}

.search-box input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  outline: none;
  color: var(--text-dark);
}

.search-box input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(251, 55, 55, 0.12);
}

.category-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  background: #f1f5f9;
  border: none;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

.pill-btn:hover {
  background: #e2e8f0;
  color: var(--text-dark);
}

.pill-btn.active {
  background: var(--secondary-color);
  color: #ffffff;
}

/* ==========================================================================
   SEO / Featured Apps & Queries Section
   ========================================================================== */
.seo-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.seo-card h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.seo-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 16px 0 6px;
}

.seo-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 18px 0 8px;
}

.seo-card p {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 10px;
  color: #475569;
}

.seo-card a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.seo-card a:hover {
  text-decoration: underline;
}

.seo-guides-list {
  padding-left: 18px;
  margin: 8px 0 12px;
  font-size: 13px;
}

.seo-guides-list li {
  margin-bottom: 6px;
}

.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.query-badge {
  display: inline-block;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 500;
}

/* ==========================================================================
   App Detail View
   ========================================================================== */
.detail-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.detail-logo {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.detail-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-logo-fallback {
  width: 84px;
  height: 84px;
  font-size: 18px;
}

.detail-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.detail-desc {
  color: #475569;
  font-size: 13px;
  margin-bottom: 18px;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.detail-stat {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 10px 8px;
}

.detail-stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.detail-stat--bonus strong {
  color: var(--secondary-color);
  font-size: 15px;
}

.detail-stat--withdraw strong {
  color: var(--accent-color);
  font-size: 15px;
}

.detail-stat--rating strong {
  color: #d97706;
  font-size: 15px;
}

.detail-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
}

.related-section {
  margin-top: 22px;
}

/* ==========================================================================
   Blog / Guides & Legal Cards
   ========================================================================== */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.blog-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.blog-card__media img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.blog-card__body {
  padding: 16px;
}

.blog-card__date {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.blog-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.35;
}

.blog-card__title a {
  text-decoration: none;
}

.blog-card__title a:hover {
  color: var(--primary-color);
}

.blog-card__excerpt {
  font-size: 13px;
  color: #475569;
  margin-bottom: 10px;
}

.blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.article-card,
.legal-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 22px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.article-meta {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.article-title,
.legal-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 16px;
  line-height: 1.3;
}

.article-cover {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
}

.article-body,
.legal-body {
  font-size: 14px;
  line-height: 1.7;
  color: #334155;
}

.article-body p,
.legal-body p {
  margin-bottom: 12px;
}

.article-body a,
.legal-body a {
  color: var(--primary-color);
  font-weight: 600;
}

.article-actions {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.article-back {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   Footer & Floating Controls
   ========================================================================== */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 20px 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin-bottom: 12px;
}

.footer-nav a {
  text-decoration: none;
  font-weight: 500;
  color: #475569;
}

.footer-nav a:hover {
  color: var(--primary-color);
}

.footer-disclaimer {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.footer-bottom {
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  font-size: 11px;
}

.admin-link {
  position: fixed;
  bottom: 72px;
  right: 20px;
  background: var(--primary-color);
  color: #ffffff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 999;
}

.admin-link:hover {
  background: var(--secondary-color);
}

#ast-scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-color);
  color: #ffffff;
  border: none;
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease;
}

#ast-scroll-top.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#ast-scroll-top:hover {
  background: var(--primary-color);
}

/* ==========================================================================
   Focus & Accessibility
   ========================================================================== */
.nav-item:focus-visible,
.download-btn:focus-visible,
.tab:focus-visible,
.menu-toggle:focus-visible,
.pill-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 620px) {
  .container {
    max-width: 100%;
    box-shadow: none;
  }
  .header {
    padding: 14px 16px;
  }
  .logo {
    min-width: 36px;
    min-height: 36px;
  }
  .logo img {
    width: 36px;
    height: 36px;
  }
  .site-title {
    font-size: 16px;
  }
  .nav-menu {
    padding: 10px 12px;
    font-size: 11px;
  }
  .nav-item {
    padding: 4px 6px;
  }
  .nav-item i {
    font-size: 14px;
  }
  .main-content {
    padding: 16px;
  }
  .main-title {
    font-size: 22px;
  }
  .game-card {
    padding: 14px;
    gap: 12px;
  }
  .game-icon,
  .game-icon-fallback {
    width: 45px;
    height: 45px;
  }
  .game-name {
    font-size: 15px;
  }
  .bonus-info,
  .withdraw-info {
    font-size: 10px;
    gap: 4px;
  }
  .bonus-info i,
  .withdraw-info i {
    font-size: 10px;
  }
  .download-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
  .detail-stats {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
