/* ====================================================
   TANDAO SPACE - MOBILE UI STYLES (SMARTPHONES)
   Applied strictly for screens <= 768px
   ==================================================== */

@media (max-width: 768px) {
  /* Global full-width safety */
  body, html, .site-wrapper {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  /* Mobile Header */
  .navbar {
    padding: 0 1rem !important;
    height: 62px !important;
  }

  .nav-inner {
    height: 62px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }

  .nav-logo-sub {
    display: none !important;
  }

  .nav-logo-name {
    font-size: 1.25rem !important;
  }

  .nav-logo-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 18px !important;
  }

  .nav-links,
  .nav-actions {
    display: none !important;
  }

  /* Hamburger Toggle Button */
  .nav-toggle-btn {
    display: flex !important;
    background: #F3EEFF;
    border: 1.5px solid #D8C4FF;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4.5px;
    padding: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }

  .nav-toggle-btn span {
    display: block;
    width: 20px;
    height: 2.2px;
    background: var(--purple-dark);
    border-radius: 99px;
    transition: all 0.25s ease;
  }

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

  /* Mobile Nav Dropdown Drawer (Clean, No Emojis) */
  .mobile-nav-dropdown {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(200, 182, 255, 0.4);
    box-shadow: 0 16px 40px rgba(45, 27, 105, 0.18);
    padding: 0.85rem 1rem 1.2rem;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 99999;
    animation: slideDownNav 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes slideDownNav {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .mobile-nav-dropdown.show {
    display: flex !important;
  }

  .mobile-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #FAF8FF;
    border: 1px solid #EBE4FF;
    border-radius: 12px;
    color: #2D1B69;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.2s ease;
  }

  .mobile-nav-item:hover,
  .mobile-nav-item.active {
    background: #F0E8FF;
    border-color: #C8B6FF;
    color: #7C3AED;
  }

  /* Horizontal Category Scroll Carousel */
  .mobile-cat-scroll {
    display: flex !important;
    gap: 8px;
    overflow-x: auto;
    padding: 0.65rem 1rem;
    margin-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .mobile-cat-scroll::-webkit-scrollbar { display: none; }

  .mobile-cat-pill {
    flex-shrink: 0;
    background: white;
    border: 1.5px solid rgba(124, 58, 237, 0.25);
    border-radius: 50px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 800;
    color: #4C1D95;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
  .mobile-cat-pill.active {
    background: linear-gradient(135deg, #7C3AED 0%, #EC4899 100%);
    color: white;
    border-color: transparent;
  }

  /* Mobile Full-Width Stacked Hero */
  .hero {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 1.2rem 1rem 2rem !important;
    min-height: auto !important;
    gap: 1.5rem !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .hero-content {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .hero-badge {
    font-size: 0.72rem;
    padding: 0.35rem 0.95rem;
    margin-bottom: 0.8rem;
    color: #7C3AED;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
  }

  .hero-title {
    font-size: clamp(2rem, 6.5vw, 2.4rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 0.8rem !important;
    color: #1E1B4B !important;
    width: 100% !important;
  }

  .hero-title .highlight {
    background: linear-gradient(135deg, #EC4899 0%, #F59E0B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #EC4899;
    display: inline-block;
  }

  .hero-desc {
    font-size: 0.92rem !important;
    line-height: 1.6 !important;
    margin: 0 auto 1.4rem !important;
    color: #4B5563 !important;
    max-width: 100% !important;
  }

  .hero-cta {
    width: 100% !important;
    justify-content: center !important;
    gap: 0.75rem !important;
  }

  .hero-cta .btn-big {
    padding: 0.7rem 1.4rem;
    font-size: 0.92rem;
  }

  .hero-cta .btn-play {
    padding: 0.7rem 1.2rem;
    font-size: 0.88rem;
  }

  .hero-stats {
    display: none !important;
  }

  .hero-visual {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0.5rem auto 0 !important;
    display: flex !important;
    justify-content: center !important;
  }

  .hero-card {
    width: 100% !important;
    max-width: 440px !important;
    border-radius: 20px !important;
    margin: 0 auto !important;
  }

  .hero-card-img {
    width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
  }

  .hero-card-footer {
    padding: 0.9rem 1.1rem;
  }

  .hero-card-info h3 {
    font-size: 1.08rem;
  }

  .floating-chip {
    display: none !important;
  }

  /* Mobile Games Grid (2 Columns) */
  section {
    padding: 2.2rem 1rem !important;
  }

  .section-title {
    font-size: 1.7rem !important;
    margin-bottom: 0.4rem !important;
  }

  .section-sub {
    font-size: 0.9rem !important;
    margin-bottom: 1.2rem !important;
  }

  .filters-hub {
    margin: 1.2rem auto 1.8rem !important;
    gap: 0.8rem !important;
    width: 100% !important;
  }

  .cat-filter {
    display: none !important;
  }

  .age-filter-bar {
    width: 100% !important;
    overflow-x: auto !important;
    padding: 0.6rem 0.8rem !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    border-radius: 16px !important;
    display: flex !important;
    justify-content: flex-start !important;
  }
  .age-filter-bar::-webkit-scrollbar { display: none !important; }

  .age-filter-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: max-content !important;
  }

  .age-filter-title {
    font-size: 0.82rem !important;
    white-space: nowrap !important;
  }

  .age-filter-pills {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
  }

  .age-filter-btn {
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .games-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .game-card {
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(124, 92, 191, 0.08) !important;
  }

  .game-card-img-wrap {
    height: 125px !important;
  }

  .game-card-body {
    padding: 10px !important;
  }

  .game-card-title {
    font-size: 0.92rem !important;
    margin-bottom: 4px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .game-card-desc {
    display: none !important;
  }

  .game-card-meta {
    font-size: 0.72rem !important;
    margin-bottom: 6px !important;
  }

  .game-card-footer {
    padding-top: 6px !important;
  }

  .btn-card-play {
    padding: 4px 10px !important;
    font-size: 0.78rem !important;
    border-radius: 50px !important;
  }

  /* Other Sections on Mobile */
  .features-grid,
  .steps-grid,
  .featured-big-card,
  .footer-inner,
  .form-grid-2 {
    grid-template-columns: 1fr !important;
  }

  .yt-section {
    margin: 0 !important;
    width: 100% !important;
    border-radius: 18px !important;
  }

  .hide-mobile {
    display: none !important;
  }

  /* Fixed Bottom App Navigation Bar (Professional SVG Design) */
  .mobile-bottom-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 64px !important;
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(200, 182, 255, 0.35) !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    z-index: 9999 !important;
    box-shadow: 0 -6px 25px rgba(45, 27, 105, 0.08) !important;
    padding: 0 4px !important;
  }

  .bottom-tab {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    color: #64748B !important;
    font-weight: 800 !important;
    font-size: 0.7rem !important;
    gap: 3px !important;
    flex: 1 !important;
    padding: 4px 0 !important;
    transition: all 0.2s ease !important;
  }

  .bottom-tab svg {
    width: 22px;
    height: 22px;
    stroke: #64748B;
    stroke-width: 2;
    fill: none;
    transition: all 0.2s ease;
  }

  .bottom-tab:hover,
  .bottom-tab.active {
    color: #7C3AED !important;
  }

  .bottom-tab:hover svg,
  .bottom-tab.active svg {
    stroke: #7C3AED;
    transform: translateY(-2px);
  }

  /* Padding at bottom of page so bottom bar never covers content */
  .site-wrapper {
    padding-bottom: 74px !important;
  }
}
