/**
 * ============================================================================
 * RUMMY GAMES - MAIN STYLESHEET (style.css)
 * ============================================================================
 * Clean, lightweight, responsive CSS with mobile-first architecture.
 * ============================================================================
 */

:root {
  --primary-color: #0b4594;
  --primary-hover: #083470;
  --accent-red: #d9222a;
  --accent-red-hover: #b8171f;
  --accent-gold: #f5a623;
  --accent-green: #1ba345;
  --accent-green-hover: #148035;
  --bg-page: #f2f4f8;
  --bg-card: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container-max: 980px;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 12px;
}

/* Top Announcement Bar */
.top-announcement-bar {
  background: linear-gradient(90deg, #072a6b, #0e56ba);
  color: #ffffff;
  padding: 7px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.top-announcement-bar .badge-icon {
  background: var(--accent-gold);
  color: #111;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 800;
  margin-right: 6px;
  display: inline-block;
  vertical-align: middle;
}

/* Main Site Header */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  height: 52px;
  width: auto;
  max-width: 90px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
  transition: transform 0.2s ease;
}

.brand-logo:hover {
  transform: scale(1.04);
}

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

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: #4b5563;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-red);
  background-color: #fef2f2;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 6px;
  font-size: 1.4rem;
  color: var(--text-main);
}

/* Hero Section */
.hero-section {
  margin: 12px 0 16px 0;
}

.hero-banner-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #3a0812;
}

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

.hero-banner-overlay {
  display: none; /* Fallback if banner image is not used */
}

/* Search Bar Section */
.search-filter-section {
  margin-bottom: 14px;
}

.search-box-wrapper {
  position: relative;
  margin-bottom: 10px;
}

.search-input {
  width: 100%;
  padding: 12px 42px 12px 42px;
  border: 2px solid #d1d5db;
  border-radius: var(--radius-pill);
  font-size: 0.98rem;
  background-color: #ffffff;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(11, 69, 148, 0.15);
  outline: none;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 1.1rem;
  pointer-events: none;
}

.clear-search-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: #e5e7eb;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #4b5563;
  cursor: pointer;
}

.clear-search-btn:hover {
  background: #d1d5db;
}

/* Category Filter Bar */
.category-filter-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px 2px;
  scrollbar-width: thin;
}

.category-filter-wrapper::-webkit-scrollbar {
  height: 4px;
}

.category-filter-wrapper::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.filter-btn {
  white-space: nowrap;
  padding: 6px 14px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b5563;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.filter-btn.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(11, 69, 148, 0.25);
}

/* Promotional Banner Cards (Dual Cards) */
.promo-banner-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.promo-card {
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.promo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.promo-badge-text {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.promo-card-content h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.promo-card-content p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.promo-card-btn {
  background: var(--accent-green);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.2s;
}

.promo-card-btn:hover {
  background: var(--accent-green-hover);
}

/* Directory Section Header (Red Bar) */
.directory-section-header {
  background: linear-gradient(90deg, #c51820, #e0262e);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.directory-section-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.directory-section-header p {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-top: 2px;
}

/* Main App List Directory */
.app-directory-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  overflow: hidden;
}

.app-list-wrapper {
  display: flex;
  flex-direction: column;
}

/* Individual App Card Row */
.app-row-card {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
  transition: background-color 0.15s ease;
  position: relative;
}

.app-row-card:last-child {
  border-bottom: none;
}

.app-row-card:hover {
  background-color: #fafbfc;
}

/* App Rank Number */
.app-rank {
  font-size: 1.1rem;
  font-weight: 700;
  color: #6b7280;
  width: 30px;
  min-width: 30px;
  text-align: center;
  flex-shrink: 0;
  margin-right: 10px;
}

.app-rank.rank-top-1 {
  color: #b91c1c;
}
.app-rank.rank-top-2 {
  color: #b45309;
}
.app-rank.rank-top-3 {
  color: #1e40af;
}

/* App Icon */
.app-icon-wrapper {
  position: relative;
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  margin-right: 14px;
}

.app-icon-img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background-color: #f3f4f6;
  display: block;
}

.featured-tag {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-gold);
  color: #111;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

/* App Info Column */
.app-info {
  flex: 1;
  min-width: 0; /* Prevents text overflow */
  padding-right: 12px;
}

.app-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.app-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
}

.app-category-badge {
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}

.app-stats-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.8rem;
  color: #4b5563;
  margin-top: 3px;
}

.stat-downloads {
  font-weight: 600;
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.stat-bonus {
  color: #dc2626;
  font-weight: 700;
}

.app-meta-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 2px;
}

.min-withdrawal {
  color: #047857;
  font-weight: 600;
}

.review-link {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.75rem;
  text-decoration: underline;
}

.review-link:hover {
  color: var(--accent-red);
}

.app-description-text {
  font-size: 0.78rem;
  color: #4b5563;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Action Button Column (Right) */
.app-action {
  flex-shrink: 0;
  text-align: right;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #e6232b, #c41820);
  color: #ffffff !important;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 6px rgba(217, 34, 42, 0.3);
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
  min-width: 110px;
  text-align: center;
}

.btn-download:hover {
  background: linear-gradient(135deg, #c41820, #9f0e15);
  box-shadow: 0 4px 8px rgba(217, 34, 42, 0.45);
  transform: translateY(-1px);
}

.btn-visit {
  background: linear-gradient(135deg, #0e56ba, #083470);
  box-shadow: 0 3px 6px rgba(14, 86, 186, 0.3);
}

.btn-visit:hover {
  background: linear-gradient(135deg, #083470, #06234e);
}

.btn-download.btn-disabled {
  background: #9ca3af;
  color: #f3f4f6 !important;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.65;
}

.download-arrow-icon {
  font-size: 0.95rem;
  font-weight: 900;
}

/* Empty State / No Results */
.no-results-box {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

.no-results-box h3 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

/* Floating Channels / Community Widget */
.floating-community-bar {
  position: fixed;
  right: 14px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99;
}

.floating-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0088cc;
  color: #ffffff !important;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s, background-color 0.2s;
}

.floating-pill:hover {
  transform: translateY(-2px);
  background-color: #0077b5;
}

.floating-pill.support-pill {
  background: #25d366;
}

.floating-pill.support-pill:hover {
  background: #20ba5a;
}

/* Informational / SEO Content Section */
.seo-content-section {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.seo-content-section h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
  border-left: 4px solid var(--accent-red);
  padding-left: 10px;
}

.seo-content-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 18px 0 8px 0;
}

.seo-content-section p {
  color: #4b5563;
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 12px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.feature-card {
  background: #f9fafb;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.feature-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.feature-card p {
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 0;
}

/* Compliance Warning Box */
.warning-box {
  background: #fffbeb;
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 0.85rem;
  color: #92400e;
  line-height: 1.5;
}

.warning-box strong {
  color: #78350f;
}

/* Editorial & Advertiser Disclosure Bottom Box */
.disclosure-bottom-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 24px 0 20px 0;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.6;
}

.disclosure-bottom-box .disclosure-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.disclosure-bottom-box h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.badge-18 {
  background: #dc2626;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
}

/* Footer */
.site-footer {
  background: #111827;
  color: #9ca3af;
  margin-top: auto;
  padding: 36px 0 24px 0;
  border-top: 1px solid #1f2937;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-col p {
  font-size: 0.82rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #9ca3af;
  font-size: 0.82rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding-top: 16px;
  text-align: center;
  font-size: 0.78rem;
  color: #6b7280;
}

.footer-disclaimer-notice {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* ============================================================================
 * MOBILE SHOWCASE HIGHLIGHT BOX
 * ============================================================================ */
.mobile-showcase-box {
  background: linear-gradient(135deg, #440914, #1a0207);
  border: 1px solid #751428;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  color: #ffffff;
  margin: 18px 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.mobile-showcase-text {
  width: 100%;
}

.badge-gold {
  display: inline-block;
  background: #f5a623;
  color: #111111;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.mobile-showcase-text h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.3;
}

.mobile-showcase-text p {
  font-size: 0.86rem;
  color: #f3e8ee;
  line-height: 1.55;
  margin-bottom: 12px;
}

.mobile-features-list {
  list-style: none;
  font-size: 0.82rem;
  color: #f5f5f5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-features-list strong {
  color: #ffd875;
}

/* ============================================================================
 * RESPONSIVE BREAKPOINTS (Mobile & Tablet Optimization)
 * ============================================================================ */

@media (max-width: 768px) {
  .header-inner {
    padding: 8px 0;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 12px 16px;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--border-color);
    gap: 8px;
  }

  .nav-menu.open {
    display: flex;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .promo-banner-strip {
    grid-template-columns: 1fr;
  }

  .app-row-card {
    padding: 11px 12px;
  }

  .app-rank {
    font-size: 0.95rem;
    font-weight: 800;
    width: 26px;
    min-width: 26px;
    margin-right: 6px;
    text-align: center;
  }

  .app-icon-wrapper {
    width: 54px;
    height: 54px;
    margin-right: 10px;
  }

  .app-icon-img {
    border-radius: 13px;
  }

  .app-name {
    font-size: 0.98rem;
    font-weight: 800;
  }

  .app-stats-row {
    font-size: 0.76rem;
    gap: 4px 8px;
  }

  .app-meta-secondary {
    font-size: 0.72rem;
  }

  .app-description-text {
    display: none; /* Keep mobile cards neat and compact */
  }

  .btn-download {
    padding: 8px 13px;
    font-size: 0.8rem;
    min-width: 86px;
    border-radius: 9999px;
  }

  .mobile-showcase-box {
    padding: 14px 16px;
    margin: 14px 0;
  }

  .mobile-showcase-text h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
  }

  .mobile-showcase-text p {
    font-size: 0.82rem;
    margin-bottom: 8px;
    line-height: 1.45;
  }

  .mobile-features-list {
    font-size: 0.78rem;
    gap: 4px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .floating-community-bar {
    right: 10px;
    bottom: 16px;
  }
}

@media (max-width: 420px) {
  .app-info {
    padding-right: 6px;
  }
  
  .btn-download {
    padding: 7px 11px;
    font-size: 0.76rem;
    min-width: 80px;
  }
}
