/* ===================================================================
   VAN88 CLUB - MOBILE FIRST & MULTI-DEVICE RESPONSIVE OPTIMIZATION
   Tối ưu hóa toàn diện giao diện Mobile (iOS Safari & Android Chrome)
   Trải nghiệm siêu mượt chuẩn Native App, tốc độ tải cao, tỷ lệ chuyển đổi CRO tối đa
   =================================================================== */

/* Tối ưu hiệu năng cảm ứng chung */
* {
  -webkit-tap-highlight-color: transparent;
}

button, .btn, a, .odds-btn, .game-tab-btn, .theme-btn-chip {
  touch-action: manipulation;
}

button:active, .btn:active, .odds-btn:active {
  transform: scale(0.97);
}

/* ===================================================================
   TABLET & SMALL LAPTOP (<= 1080px)
   =================================================================== */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .bento-card.col-span-2 {
    grid-column: span 1;
  }
  
  .game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .payout-stream-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .seo-layout {
    grid-template-columns: 1fr;
  }
  
  .toc-sidebar {
    position: static;
    margin-bottom: 25px;
  }
  
  .footer-top-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

/* ===================================================================
   MOBILE PHONES & TABLETS (<= 768px)
   =================================================================== */
@media (max-width: 768px) {
  /* Body spacing for sticky bottom bar & notch */
  body {
    padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px));
  }

  .container {
    padding: 0 14px;
  }

  /* 1. TOP MARQUEE & THEME SWITCHER */
  .cyber-top-bar {
    padding: 5px 0;
  }

  .top-bar-inner {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .ticker-wrap {
    width: 100%;
    order: 2;
  }

  .theme-switcher-box {
    order: 1;
    width: 100%;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 3px 8px;
  }

  .theme-btn-chip {
    font-size: 0.7rem;
    padding: 2px 7px;
  }

  .top-quick-nav {
    display: none;
  }

  /* 2. SITE HEADER */
  .site-header {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.7);
  }

  .header-main-row {
    padding: 8px 0;
  }

  .brand-logo-img {
    height: 36px;
  }

  .mobile-toggle-btn {
    display: inline-flex;
    width: 38px;
    height: 38px;
    font-size: 1.25rem;
  }

  .header-trust-pills {
    display: none;
  }

  .header-auth-group {
    gap: 6px;
  }

  .header-auth-group .btn {
    padding: 7px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-xs);
  }

  /* 3. HORIZONTAL SWIPE CATEGORY NAV */
  .header-nav-matrix {
    padding: 0;
    border-bottom: 1px solid var(--border-theme);
  }

  .matrix-nav-list {
    padding: 5px 10px;
    gap: 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .matrix-nav-item {
    scroll-snap-align: start;
  }

  .matrix-nav-link {
    padding: 8px 12px;
    font-size: 0.8rem;
    gap: 6px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.03);
  }

  .matrix-badge-hot {
    font-size: 0.6rem;
    padding: 1px 4px;
  }

  /* 4. HERO SECTION MOBILE */
  .hero-cyber-section {
    padding: 24px 0 35px;
  }

  .hero-badge-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    margin-bottom: 12px;
  }

  .hero-main-title {
    font-size: 1.85rem;
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
  }

  .hero-description {
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 20px;
  }

  .hero-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 22px;
  }

  .btn-hero-main {
    padding: 12px 14px;
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .hero-features-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-top: 16px;
  }

  .hero-feat-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    padding: 8px 6px;
    text-align: center;
  }

  .feat-number {
    font-size: 1.05rem;
  }

  .feat-label {
    font-size: 0.7rem;
  }

  /* 5. HERO LAUNCHPAD CARD MOBILE */
  .hero-launchpad-card {
    padding: 16px;
    border-radius: var(--radius-md);
  }

  .launchpad-header {
    padding-bottom: 10px;
    margin-bottom: 12px;
  }

  .launchpad-title {
    font-size: 0.95rem;
  }

  .jackpot-display-box {
    padding: 12px 10px;
    margin-bottom: 14px;
  }

  .jackpot-subhead {
    font-size: 0.7rem;
    letter-spacing: 1px;
  }

  .jackpot-number-ticker {
    font-size: 1.55rem;
    letter-spacing: 0.5px;
    word-break: break-all;
  }

  .live-match-box {
    padding: 10px;
    margin-bottom: 14px;
  }

  .match-teams-row {
    font-size: 0.88rem;
    margin-bottom: 8px;
  }

  .odds-buttons-grid {
    gap: 6px;
  }

  .odds-btn {
    padding: 5px 2px;
  }

  .odds-type {
    font-size: 0.65rem;
  }

  .odds-val {
    font-size: 0.82rem;
  }

  .launchpad-action-btn {
    padding: 11px;
    font-size: 0.88rem;
  }

  /* 6. BENTO ADVANTAGES MOBILE */
  .section-bento {
    padding: 40px 0;
  }

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

  .section-title {
    font-size: 1.65rem;
    line-height: 1.3;
  }

  .section-desc {
    font-size: 0.9rem;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .bento-card {
    padding: 18px;
  }

  .bento-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  .bento-card h4 {
    font-size: 1.1rem;
    margin-bottom: 6px;
  }

  .bento-card p {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  /* 7. GAME LOBBY GRID MOBILE (2 COLUMNS APP-LIKE) */
  .section-games {
    padding: 40px 0;
  }

  .games-filter-tabs {
    gap: 6px;
    margin-bottom: 20px;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .games-filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .game-tab-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .game-card {
    border-radius: var(--radius-sm);
  }

  .game-thumb {
    height: 100px;
    font-size: 2.5rem;
  }

  .game-info {
    padding: 10px;
  }

  .game-info h5 {
    font-size: 0.9rem;
    margin-bottom: 4px;
  }

  .game-info p {
    font-size: 0.76rem;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .game-meta-row {
    font-size: 0.72rem;
    padding-top: 6px;
  }

  /* 8. LIVE WINNERS FEED MOBILE */
  .section-live-feed {
    padding: 30px 0;
  }

  .feed-header {
    margin-bottom: 14px;
  }

  .feed-title {
    font-size: 1.05rem;
  }

  .payout-stream-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .payout-card {
    padding: 10px 12px;
  }

  .payout-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .payout-user {
    font-size: 0.78rem;
  }

  .payout-game {
    font-size: 0.68rem;
  }

  .payout-amount {
    font-size: 0.82rem;
  }

  /* 9. SEO ARTICLE MOBILE */
  .section-seo-content {
    padding: 40px 0;
  }

  .toc-sidebar {
    padding: 14px;
    border-radius: var(--radius-sm);
  }

  .toc-title {
    font-size: 0.9rem;
    margin-bottom: 10px;
  }

  .toc-link {
    font-size: 0.82rem;
    padding: 4px 6px;
  }

  .seo-article-body {
    font-size: 0.94rem;
    line-height: 1.7;
  }

  .seo-article-body h2 {
    font-size: 1.45rem;
    margin-top: 28px;
    margin-bottom: 10px;
  }

  .seo-article-body h3 {
    font-size: 1.2rem;
    margin-top: 20px;
    margin-bottom: 8px;
  }

  .seo-callout-box {
    padding: 12px 14px;
    margin: 16px 0;
    font-size: 0.9rem;
  }

  .seo-table-wrap {
    margin: 16px 0;
  }

  .seo-table th, .seo-table td {
    padding: 9px 10px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .faq-question {
    padding: 14px 16px;
    font-size: 0.92rem;
  }

  .faq-answer {
    padding: 0 16px 14px;
    font-size: 0.88rem;
  }

  /* 10. FOOTER MOBILE */
  .site-footer {
    padding: 40px 0 20px;
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 30px;
  }

  .footer-heading {
    font-size: 0.95rem;
    margin-bottom: 12px;
  }

  .footer-links-list {
    gap: 7px;
    font-size: 0.84rem;
  }

  .footer-bottom-bar {
    padding-top: 18px;
    text-align: center;
    gap: 10px;
    font-size: 0.78rem;
  }

  /* 11. MOBILE BOTTOM BAR (APP-STYLE) */
  .mobile-bottom-nav {
    display: block;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  }

  .bottom-nav-item {
    font-size: 0.7rem;
    padding: 3px 0;
  }

  .bottom-nav-icon {
    font-size: 1.3rem;
  }

  .bottom-center-cta {
    width: 50px;
    height: 50px;
    margin-top: -22px;
    font-size: 1.35rem;
    box-shadow: 0 4px 18px rgba(255, 26, 64, 0.6);
  }

  .back-to-top {
    bottom: calc(75px + env(safe-area-inset-bottom, 0px));
    right: 14px;
    width: 40px;
    height: 40px;
  }
}

/* ===================================================================
   VERY SMALL MOBILE SCREENS (<= 400px)
   =================================================================== */
@media (max-width: 400px) {
  .hero-main-title {
    font-size: 1.6rem;
  }

  .hero-action-row {
    grid-template-columns: 1fr;
  }

  .btn-hero-main {
    width: 100%;
    text-align: center;
  }

  .header-auth-group .btn-login {
    display: none; /* Keep Register CTA high contrast */
  }

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

  .game-thumb {
    height: 120px;
  }
}
