/* ============================================
   TAPPLAY Theme - Responsive CSS (moban-46)
   ============================================ */

/* === TABLET LANDSCAPE (max-width: 1024px) === */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

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

    .steps-container {
        flex-direction: column;
        gap: 20px;
    }

    .step-connector {
        transform: rotate(90deg);
        padding: 10px 0;
    }

    .step-card {
        max-width: 100%;
    }

    .hero-brand {
        font-size: 42px;
    }

    .hero-tagline {
        font-size: 18px;
    }

    .tapplay-hero {
        padding: 60px 30px;
        min-height: 480px;
    }

    .cta-title {
        font-size: 26px;
    }

    .floating-sidebar {
        right: 8px;
    }

    .sidebar-btn {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    .content-area {
        flex-direction: column;
    }
}

/* === TABLET PORTRAIT (max-width: 768px) === */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    /* Header */
    .header-top {
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-time {
        display: none;
    }

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

    .btn-login,
    .btn-register,
    .btn-demo {
        padding: 6px 14px;
        font-size: 12px;
    }

    .logo img {
        height: 40px;
    }

    /* Navigation */
    .mobile-menu-toggle {
        display: block;
    }

    .main-navigation .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #111;
        border-top: 1px solid rgba(0, 200, 83, 0.2);
        z-index: 1000;
        padding: 10px 0;
    }

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

    .nav-link {
        padding: 12px 20px;
        font-size: 14px;
    }

    .has-dropdown .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        background: rgba(0, 200, 83, 0.05);
        padding-left: 20px;
        display: none;
    }

    .has-dropdown.open .sub-menu {
        display: block;
    }

    /* Hero */
    .tapplay-hero {
        padding: 50px 20px;
        min-height: 420px;
    }

    .hero-brand {
        font-size: 34px;
        letter-spacing: 2px;
    }

    .hero-tagline {
        font-size: 16px;
    }

    .hero-description {
        font-size: 14px;
    }

    .hero-stats-row {
        gap: 15px;
    }

    .hero-stat-number {
        font-size: 22px;
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: center;
    }

    .btn-tactile-primary,
    .btn-tactile-outline {
        padding: 16px 40px;
        font-size: 14px;
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .gesture-hand {
        display: none;
    }

    /* Card Stack */
    .card-stack-section {
        padding: 40px 15px;
    }

    .card-stack-wrapper {
        height: 380px;
    }

    .stack-card-image {
        height: 170px;
    }

    /* Features */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .feature-card {
        padding: 20px 15px;
    }

    .feature-title {
        font-size: 16px;
    }

    /* Games */
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .game-card-image {
        height: 140px;
    }

    /* Articles */
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Related */
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer */
    .footer-columns-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

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

    /* CTA */
    .footer-cta-section {
        padding: 50px 20px;
    }

    .cta-title {
        font-size: 22px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-tactile-cta,
    .btn-tactile-secondary {
        padding: 16px 36px;
        font-size: 15px;
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    /* Section titles */
    .section-title {
        font-size: 22px;
    }

    /* Sidebar */
    .floating-sidebar {
        bottom: 15px;
        top: auto;
        transform: none;
        flex-direction: row;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(17, 17, 17, 0.95);
        padding: 8px 12px;
        border-radius: 16px;
        border: 1px solid rgba(0, 200, 83, 0.2);
        backdrop-filter: blur(10px);
    }

    .sidebar-btn {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        font-size: 15px;
    }

    .sidebar-btn[data-tooltip]:hover::after {
        display: none;
    }

    /* Single article */
    .single-article {
        padding: 20px;
    }

    .article-title {
        font-size: 22px;
    }

    /* Announcement modal */
    .announcement-content {
        padding: 25px 20px;
    }

    .announcement-title {
        font-size: 17px;
    }
}

/* === MOBILE (max-width: 480px) === */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    /* Header */
    .header-btn-group .btn-demo {
        display: none;
    }

    .btn-login,
    .btn-register {
        padding: 6px 12px;
        font-size: 11px;
    }

    /* Hero */
    .tapplay-hero {
        padding: 40px 15px;
        min-height: 380px;
        border-radius: 16px;
    }

    .hero-brand {
        font-size: 28px;
    }

    .hero-tagline {
        font-size: 14px;
    }

    .hero-description {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .hero-stats-row {
        gap: 10px;
    }

    .hero-stat-number {
        font-size: 18px;
    }

    .hero-stat-label {
        font-size: 11px;
    }

    .btn-tactile-primary,
    .btn-tactile-outline {
        padding: 14px 30px;
        font-size: 13px;
    }

    /* Card Stack */
    .card-stack-container {
        max-width: 100%;
    }

    .card-stack-wrapper {
        height: 360px;
    }

    .stack-card {
        border-radius: 16px;
    }

    .stack-card-image {
        height: 150px;
    }

    .stack-card-content {
        padding: 15px;
    }

    .stack-card-name {
        font-size: 17px;
    }

    .stack-card-desc {
        font-size: 13px;
    }

    .card-stack-controls {
        gap: 20px;
    }

    .stack-control-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding: 25px 20px;
    }

    .feature-icon {
        width: 64px;
        height: 64px;
    }

    .feature-icon i {
        font-size: 26px;
    }

    /* Games */
    .games-grid {
        grid-template-columns: 1fr;
    }

    .game-card {
        display: flex;
        flex-direction: row;
    }

    .game-card-image {
        width: 120px;
        height: auto;
        min-height: 140px;
        flex-shrink: 0;
    }

    .game-card-body {
        flex: 1;
        padding: 15px;
    }

    .game-card-name {
        font-size: 15px;
    }

    .btn-tactile-game {
        padding: 10px 16px;
        font-size: 12px;
    }

    /* Steps */
    .steps-container {
        gap: 15px;
    }

    .step-card {
        padding: 25px 18px;
    }

    .step-title {
        font-size: 17px;
    }

    .step-connector {
        transform: rotate(90deg);
        padding: 5px 0;
    }

    /* Articles */
    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-card {
        display: flex;
        flex-direction: row;
    }

    .article-card-thumb {
        width: 120px;
        height: auto;
        min-height: 140px;
        flex-shrink: 0;
    }

    /* Related */
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer */
    .footer-columns-grid {
        grid-template-columns: 1fr;
    }

    .footer-col h4 {
        font-size: 14px;
    }

    .license-icons {
        gap: 15px;
    }

    .license-item {
        font-size: 11px;
    }

    /* CTA */
    .footer-cta-section {
        padding: 40px 15px;
        border-radius: 16px;
    }

    .cta-title {
        font-size: 20px;
    }

    .cta-description {
        font-size: 14px;
    }

    .cta-stats-row {
        gap: 15px;
    }

    .cta-stat {
        font-size: 13px;
    }

    .btn-tactile-cta,
    .btn-tactile-secondary {
        padding: 14px 28px;
        font-size: 14px;
    }

    /* Section titles */
    .section-title {
        font-size: 20px;
    }

    .section-subtitle {
        font-size: 13px;
    }

    /* Single article */
    .single-article {
        padding: 15px;
        border-radius: 14px;
    }

    .article-title {
        font-size: 20px;
    }

    .article-content {
        font-size: 14px;
    }

    /* Provider tabs */
    .provider-tabs {
        gap: 6px;
    }

    .provider-tab {
        padding: 6px 14px;
        font-size: 12px;
    }

    /* Sidebar */
    .floating-sidebar {
        padding: 6px 10px;
    }

    .sidebar-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    /* Notification bar */
    .notification-content {
        font-size: 12px;
    }

    /* Announcement */
    .announcement-content {
        padding: 20px 15px;
        border-radius: 16px;
    }

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

    .announcement-text {
        font-size: 12px;
    }

    .announcement-cta {
        padding: 12px 30px;
        font-size: 13px;
    }
}

/* === SMALL MOBILE (max-width: 360px) === */
@media (max-width: 360px) {
    .hero-brand {
        font-size: 24px;
    }

    .hero-tagline {
        font-size: 13px;
    }

    .hero-stats-row {
        flex-direction: column;
        gap: 8px;
    }

    .btn-tactile-primary,
    .btn-tactile-outline {
        padding: 12px 24px;
        font-size: 12px;
    }

    .card-stack-wrapper {
        height: 340px;
    }

    .stack-card-image {
        height: 130px;
    }

    .cta-title {
        font-size: 18px;
    }

    .section-title {
        font-size: 18px;
    }
}

/* === LARGE DESKTOP (min-width: 1400px) === */
@media (min-width: 1400px) {
    .container {
        max-width: 1300px;
    }

    .hero-brand {
        font-size: 64px;
    }

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

    .features-grid {
        gap: 30px;
    }

    .games-grid {
        gap: 30px;
    }
}

/* === PRINT === */
@media print {
    .site-header,
    .site-footer,
    .floating-sidebar,
    .announcement-modal,
    .notification-bar {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }
}

/* === Mobile Optimization Additions === */
@media (max-width: 768px) {
  .nav-link, .btn-login, .btn-register, .btn-demo,
  a, button, .sidebar-btn {
    min-height: 44px;
    min-width: 44px;
  }
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  body {
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
  }
  img {
    max-width: 100%;
    height: auto;
  }
  .site-footer {
    padding-bottom: env(safe-area-inset-bottom, 20px);
  }
  .site-header {
    padding-top: env(safe-area-inset-top, 0px);
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
  .article-card {
    margin-bottom: 20px;
  }
  .content-area {
    padding: 10px;
  }
}
@media (max-width: 360px) {
  .container {
    padding: 0 10px;
  }
  h1, .hero-title {
    font-size: 24px !important;
  }
  h2 {
    font-size: 20px !important;
  }
}
