/* ============================================
   Kinda Hard Golf - Responsive Styles
   Mobile-first responsive design
   ============================================ */

/* Tablet Styles (max-width: 768px) */
@media screen and (max-width: 768px) {
    /* Typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #3085D3;
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        box-shadow: var(--shadow-xl);
        transition: right 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        width: 100%;
        padding: 1rem;
        border-radius: var(--radius-md);
    }
    
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero Section */
    .hero {
        padding: 3rem 0 2rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    /* Game Section */
    .game-controls {
        padding: 0 1rem;
    }
    
    .game-iframe {
        height: 50vh !important; /* 50% viewport height for tablets */
        max-height: none !important; /* Remove height limit to show full game */
    }
    
    /* Allow scrolling within game container on mobile */
    .game-container {
        max-height: none !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Info Cards */
    .info-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Styles (max-width: 480px) */
@media screen and (max-width: 480px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    
    body {
        font-size: 14px;
    }
    
    /* Container */
    .container {
        padding: 0 15px;
    }
    
    /* Navigation */
    .logo {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        width: 100%;
        right: -100%;
    }
    
    /* Hero Section */
    .hero {
        padding: 2rem 0 1.5rem;
    }
    
    .hero-title {
        margin-bottom: 0.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    /* Game Section */
    .game-section {
        padding: 1.5rem 0 3rem;
    }
    
    .game-controls {
        flex-direction: column;
        width: 100%;
        padding: 0;
    }
    
    .game-controls .btn {
        width: 100%;
        justify-content: center;
    }
    
    .game-controls .btn-cta-play {
        background: linear-gradient(135deg, #FF6B6B, #FF8E53) !important;
        color: white !important;
        font-size: 1.125rem !important;
        font-weight: 700 !important;
        padding: 0.875rem 2rem !important;
        animation: ctaPulse 2s infinite !important;
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3) !important;
    }
    
    .game-container {
        border-radius: var(--radius-lg);
        margin-bottom: 2rem;
    }
    
    .game-iframe {
        height: 50vh !important; /* 50% viewport height for mobile to show buttons */
        max-height: none !important; /* Remove limit to ensure buttons are visible */
        min-height: 300px !important; /* Minimum height for game controls */
    }
    
    /* Allow scrolling for game content */
    .game-container {
        max-height: none !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        position: relative;
    }
    
    .loading {
        min-height: 50vh !important;
        max-height: none !important;
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .btn-large {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
    
    /* Info Cards */
    .info-card {
        padding: 1.5rem;
    }
    
    /* Features Section */
    .features {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    /* CTA Section */
    .cta {
        padding: 3rem 0;
    }
    
    .cta h2 {
        font-size: 1.75rem;
    }
    
    .cta p {
        font-size: 1rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-section {
        margin-bottom: 1rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Modal */
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .share-text {
        padding: 1rem;
        font-size: 0.875rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-buttons .btn {
        width: 100%;
    }
}

/* Small Mobile (max-width: 360px) */
@media screen and (max-width: 360px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .game-iframe {
        height: 50vh !important; /* 50% viewport height for small screens */
        max-height: none !important; /* Remove viewport limit */
        min-height: 300px !important; /* Minimum height for game functionality */
    }
    
    .game-container {
        max-height: none !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
}

/* Landscape Orientation Adjustments */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .navbar {
        padding: 0.5rem 0;
    }
    
    .hero {
        padding: 2rem 0 1rem;
    }
    
    .hero-stats {
        display: none;
    }
    
    .game-iframe {
        height: 50vh !important; /* 50% viewport height for landscape mode */
        max-height: none !important; /* Allow full height in landscape */
        min-height: 300px !important;
    }
    
    .game-container {
        max-height: none !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .features {
        padding: 2rem 0;
    }
    
    .cta {
        padding: 2rem 0;
    }
}

/* iPad Pro and Large Tablets */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* High Resolution Displays */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
    /* Optimize images for retina displays */
    .logo-icon,
    .feature-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .game-controls,
    .footer,
    .cta,
    .modal {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .game-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* CTA Button Pulse Animation */
@keyframes ctaPulse {
    0% {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 107, 107, 0.5);
    }
    100% {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
    /* Currently keeping light theme as per golf aesthetic */
}