/* Mobile Responsive Styles for Bomba Patch */
/* These styles only apply to mobile devices, preserving PC layout */

/* Base Mobile Styles */
@media only screen and (max-width: 768px) {
    /* Reset and Base */
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Allow text selection for content */
    p, span, h1, h2, h3, h4, h5, h6, li, td, th {
        -webkit-user-select: text;
        user-select: text;
    }
    
    /* Improve touch targets */
    a, button, .btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Container adjustments */
    .container {
        padding: 0 15px !important;
        max-width: 100% !important;
    }
    
    /* Navigation Mobile Optimizations */
    .navbar {
        padding: 0 !important;
        position: fixed !important;
        top: 0;
        width: 100%;
        z-index: 9999;
        background: rgba(255, 255, 255, 0.98) !important;
    }
    
    .nav-wrapper {
        padding: 0.75rem 0 !important;
        position: relative;
    }
    
    .logo {
        font-size: 1.25rem !important;
    }
    
    /* Mobile Menu Button */
    .mobile-menu-btn {
        display: flex !important;
        flex-direction: column;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        margin-right: -0.5rem;
        z-index: 1001;
    }
    
    .mobile-menu-btn span {
        width: 25px;
        height: 2px;
        background: #4a5568;
        margin: 3px 0;
        transition: 0.3s;
        border-radius: 2px;
    }
    
    /* Mobile Menu Active State */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Mobile Navigation Menu */
    .nav-menu {
        display: none !important;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        display: flex !important;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu li a {
        padding: 1rem 1.5rem !important;
        width: 100%;
        border-radius: 0 !important;
        border-bottom: 1px solid #f0f0f0;
        font-size: 1rem;
    }
    
    /* Hero Section Mobile */
    .hero {
        margin-top: 60px !important;
        padding: 40px 0 !important;
        min-height: auto !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-description {
        font-size: 1rem !important;
        padding: 0 10px;
    }
    
    .hero-buttons {
        flex-direction: column !important;
        width: 100%;
        padding: 0 15px;
    }
    
    .hero-buttons .btn {
        width: 100% !important;
        margin: 0.5rem 0 !important;
        padding: 1rem !important;
        font-size: 1rem !important;
    }
    
    .hero-stats {
        flex-wrap: wrap !important;
        gap: 1rem !important;
        margin-top: 2rem !important;
    }
    
    .stat {
        flex: 1 1 45%;
        min-width: 120px;
    }
    
    .stat-number {
        font-size: 1.75rem !important;
    }
    
    .stat-label {
        font-size: 0.75rem !important;
    }
    
    /* Features Section Mobile */
    .features, .screenshots, .download, .installation, .faq, .cta {
        padding: 40px 0 !important;
    }
    
    .section-title {
        font-size: 1.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .section-subtitle {
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
        padding: 0 15px;
    }
    
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .feature-card {
        padding: 1.5rem !important;
    }
    
    .feature-card h3 {
        font-size: 1.25rem !important;
    }
    
    .feature-card p {
        font-size: 0.95rem !important;
    }
    
    .feature-icon {
        width: 48px !important;
        height: 48px !important;
    }
    
    /* Screenshots Section Mobile */
    .screenshot-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .screenshot-card {
        border-radius: 0.75rem !important;
    }
    
    .screenshot-card img {
        height: 200px !important;
    }
    
    /* Download Section Mobile */
    .download-cards {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .download-card {
        padding: 1.5rem !important;
    }
    
    .download-card h3 {
        font-size: 1.25rem !important;
    }
    
    .download-card.featured {
        transform: scale(1) !important;
    }
    
    .badge {
        top: -8px !important;
        right: 15px !important;
        font-size: 0.75rem !important;
        padding: 0.4rem 0.8rem !important;
    }
    
    /* Installation Steps Mobile */
    .installation-steps {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .step {
        padding: 0 1rem;
    }
    
    .step-number {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.25rem !important;
    }
    
    /* FAQ Section Mobile */
    .faq-items {
        padding: 0 !important;
    }
    
    .faq-item {
        padding: 1.5rem !important;
        margin-bottom: 0.75rem !important;
        border-radius: 0.75rem !important;
    }
    
    .faq-question {
        font-size: 1.1rem !important;
    }
    
    .faq-answer {
        font-size: 0.95rem !important;
    }
    
    /* CTA Section Mobile */
    .cta {
        padding: 50px 0 !important;
    }
    
    .cta-content h2 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem !important;
    }
    
    .cta-content p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .cta-buttons {
        flex-direction: column !important;
        width: 100%;
        padding: 0 15px;
    }
    
    .cta-buttons .btn {
        width: 100% !important;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 40px 0 20px !important;
    }
    
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center;
    }
    
    .footer-section h3 {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }
    
    .footer-section p {
        font-size: 0.95rem !important;
    }
    
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1.5rem;
    }
    
    .footer-links li {
        margin-bottom: 0.5rem !important;
    }
    
    .footer-bottom {
        padding-top: 1.5rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Tables Mobile */
    table {
        font-size: 0.875rem !important;
    }
    
    .specs-table, .comparison-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Legal Pages Mobile */
    .legal-header {
        padding: 3rem 0 !important;
    }
    
    .legal-header h1 {
        font-size: 1.75rem !important;
    }
    
    .legal-content {
        padding: 1.5rem !important;
        margin: 1.5rem auto !important;
        border-radius: 0.75rem !important;
    }
    
    .legal-content h2 {
        font-size: 1.25rem !important;
    }
    
    .legal-content h3 {
        font-size: 1.1rem !important;
    }
    
    /* Forms and Inputs Mobile */
    input, textarea, select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 0.75rem !important;
    }
    
    /* Image Galleries Mobile */
    .league-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
        gap: 1rem !important;
    }
    
    .league-item {
        padding: 1rem !important;
        font-size: 0.9rem;
    }
    
    /* Cards and Boxes Mobile */
    .update-card, .content-card, .feature-highlight {
        padding: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .download-box {
        padding: 1.5rem !important;
    }
    
    .setting-box {
        padding: 1.25rem !important;
        margin-bottom: 1.25rem !important;
    }
    
    /* Timeline Mobile */
    .timeline-item {
        padding-left: 2rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .timeline-item::before {
        width: 0.75rem !important;
        height: 0.75rem !important;
    }
    
    /* Specific Page Adjustments */
    .hero-apk, .hero-pcsx2, .hero-2024, .hero-2025 {
        padding: 3rem 0 !important;
    }
    
    .requirements-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    /* Hide overflow on mobile to prevent horizontal scroll */
    body {
        overflow-x: hidden !important;
    }
    
    /* Ensure images don't overflow */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Button improvements for touch */
    .btn-download, .btn-primary, .btn-secondary, .btn-large {
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
        border-radius: 8px !important;
    }
    
    /* Improve readability */
    p, li, td {
        line-height: 1.7 !important;
    }
    
    /* Share FAB adjustments */
    .share-fab {
        bottom: 20px !important;
        right: 20px !important;
    }
    
    .share-fab-button {
        width: 48px !important;
        height: 48px !important;
    }
    
    .share-option {
        width: 40px !important;
        height: 40px !important;
    }
}

/* Tablet Styles (between mobile and desktop) */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 90% !important;
        padding: 0 30px !important;
    }
    
    .features-grid, .screenshot-grid, .download-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
}

/* Landscape Mobile Adjustments */
@media only screen and (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 30px 0 !important;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
    }
    
    .hero-stats {
        margin-top: 1rem !important;
    }
    
    .nav-menu {
        max-height: calc(100vh - 50px);
        overflow-y: auto;
    }
}

/* High DPI Screen Adjustments */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min-resolution: 192dpi) {
    /* Sharper borders and shadows for retina displays */
    .feature-card, .download-card, .screenshot-card {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }
}

/* Accessibility Improvements for Mobile */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Dark Mode Support for Mobile */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
    /* Optional: Add dark mode styles for mobile if needed */
}