/* Mobile Responsive Styles for COINPAYOT NFT */

/* Base Mobile Styles */
@media (max-width: 768px) {
  /* General Mobile Optimizations */
  * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
  
  /* Allow text selection for specific elements */
  p, span, h1, h2, h3, h4, h5, h6, input, textarea {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
  }

  /* Body and Container */
  body {
    font-size: 14px;
    line-height: 1.4;
    overflow-x: hidden;
  }

  .container {
    padding: 0 15px;
    max-width: 100%;
  }

  /* Header Mobile Styles */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0;
  }

  .navbar-brand {
    font-size: 18px;
    font-weight: 700;
  }

  .navbar-brand img {
    height: 30px;
    width: auto;
  }

  /* Mobile Navigation */
  .navbar-nav {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    flex-direction: column;
    padding: 20px;
    transition: left 0.3s ease;
    z-index: 999;
  }

  .navbar-nav.active {
    left: 0;
  }

  .navbar-nav .nav-item {
    margin: 10px 0;
    width: 100%;
  }

  .navbar-nav .nav-link {
    padding: 15px 20px;
    font-size: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
  }

  .navbar-nav .nav-link:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateX(5px);
  }

  /* Mobile Menu Toggle */
  .navbar-toggler {
    border: none;
    padding: 8px;
    background: transparent;
    color: white;
    font-size: 20px;
  }

  .navbar-toggler:focus {
    outline: none;
    box-shadow: none;
  }

  /* Connect Wallet Button Mobile */
  .connect-wallet-btn {
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 8px;
    min-width: 120px;
    text-align: center;
  }

  /* Hero Section Mobile */
  .hero-section {
    padding: 80px 0 40px;
    text-align: center;
  }

  .hero-section h1 {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 20px;
  }

  .hero-section p {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .hero-buttons .btn {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
  }

  /* Quick Stats Mobile */
  .quick-stats {
    padding: 30px 0;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stat-item {
    padding: 20px;
    text-align: center;
  }

  .stat-item h4 {
    font-size: 24px;
    margin-bottom: 5px;
  }

  .stat-item small {
    font-size: 12px;
  }

  /* Features Section Mobile */
  .features-section {
    padding: 40px 0;
  }

  .feature-card {
    margin-bottom: 30px;
    padding: 25px;
  }

  .feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .feature-card p {
    font-size: 14px;
  }

  /* Games Section Mobile */
  .games-section {
    padding: 40px 0;
  }

  .game-card {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
  }

  .game-card img {
    height: 200px;
    object-fit: cover;
  }

  .game-card .card-body {
    padding: 20px;
  }

  .game-card h5 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  /* Footer Mobile */
  .footer {
    padding: 40px 0 20px;
    text-align: center;
  }

  .footer-content {
    flex-direction: column;
    gap: 30px;
  }

  .footer-section {
    margin-bottom: 30px;
  }

  .footer-section h4 {
    font-size: 18px;
    margin-bottom: 15px;
  }

  .footer-section ul {
    list-style: none;
    padding: 0;
  }

  .footer-section ul li {
    margin-bottom: 10px;
  }

  .footer-section ul li a {
    font-size: 14px;
    color: #ccc;
    text-decoration: none;
  }

  /* Wallet Modal Mobile */
  .wallet-modal-content {
    margin: 20px;
    padding: 25px;
    max-width: 100%;
  }

  .wallet-modal-title {
    font-size: 20px;
  }

  .wallet-option {
    padding: 15px;
    margin-bottom: 10px;
  }

  .wallet-option img {
    width: 28px;
    height: 28px;
  }

  .wallet-option span {
    font-size: 14px;
  }

  /* Notifications Mobile */
  .notification {
    right: 10px;
    left: 10px;
    max-width: none;
    font-size: 14px;
    padding: 12px 15px;
  }

  /* PWA Specific Styles */
  .pwa-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: none;
  }

  .pwa-install-prompt.show {
    display: block;
  }

  .pwa-install-prompt h4 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .pwa-install-prompt p {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.9;
  }

  .pwa-buttons {
    display: flex;
    gap: 10px;
  }

  .pwa-buttons .btn {
    flex: 1;
    padding: 10px;
    font-size: 14px;
  }

  /* Touch-friendly buttons */
  .btn {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }

  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
  }

  /* Hide scrollbar but keep functionality */
  ::-webkit-scrollbar {
    width: 0px;
    background: transparent;
  }

  /* Loading states */
  .loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
  }

  .loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  /* Safe area for notched devices */
  .safe-area-top {
    padding-top: env(safe-area-inset-top);
  }

  .safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* Landscape orientation */
  @media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
      padding: 60px 0 20px;
    }

    .hero-section h1 {
      font-size: 24px;
    }

    .navbar-nav {
      top: 50px;
      height: calc(100vh - 50px);
    }
  }

  /* Extra small devices */
  @media (max-width: 480px) {
    .container {
      padding: 0 10px;
    }

    .hero-section h1 {
      font-size: 24px;
    }

    .hero-section p {
      font-size: 14px;
    }

    .stat-item h4 {
      font-size: 20px;
    }

    .feature-card {
      padding: 20px;
    }

    .game-card .card-body {
      padding: 15px;
    }
  }

  /* High DPI displays */
  @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .navbar-brand img {
      image-rendering: -webkit-optimize-contrast;
      image-rendering: crisp-edges;
    }
  }

  /* Reduced motion for accessibility */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }

  /* Dark mode support */
  @media (prefers-color-scheme: dark) {
    .wallet-modal-content {
      background: linear-gradient(135deg, #0a0a1a, #1a1a2e);
    }
  }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 90%;
  }

  .hero-section h1 {
    font-size: 32px;
  }

  .quick-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-card {
    margin-bottom: 25px;
  }
}

/* Large screens */
@media (min-width: 1025px) {
  .container {
    max-width: 1200px;
  }
}
