/* ===== RESPONSIVE DESIGN ===== */
/* Mobile-First Approach */

/* ===== BASE MOBILE STYLES ===== */
@media screen and (max-width: 767px) {
    /* Mobile navbar height variable */
    :root {
        --mobile-navbar-height: 80px;
    }
    
    /* Typography Adjustments */
    .main-title {
        font-size: 2.5rem;
        letter-spacing: 0.1em;
    }
    
    .subtitle {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Navigation */
    .nav-container {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .nav-logo .logo-text {
        font-size: 1.25rem;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px; /* Increased to account for mobile navbar height */
        flex-direction: column;
        background-color: rgba(10, 10, 10, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(10px);
        border-top: 2px solid var(--cyan);
        padding: var(--spacing-sm) 0;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: var(--spacing-xs) 0;
        width: 100%;
    }
    
    .nav-link {
        padding: var(--spacing-xs) var(--spacing-md);
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        text-align: center;
        position: relative;
    }
    
    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--cyan);
        transition: var(--transition-fast);
    }
    
    .nav-link:hover::after,
    .nav-link.active::after {
        width: 100%;
    }
    
    .hamburger {
        display: flex;
        min-height: 48px;
        min-width: 48px;
        align-items: center;
        justify-content: center;
        padding: var(--spacing-xs);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Hero Section */
    .hero {
        min-height: 50vh; /* Reduced from 80vh */
        padding: var(--spacing-md) var(--spacing-sm); /* Reduced from var(--spacing-lg) */
        padding-top: 5rem; /* Increased to account for fixed navbar */
        padding-bottom: 1.5rem; /* Added bottom padding */
    }
    
    .games-hero {
        min-height: 35vh; /* Reduced from 50vh */
        padding: var(--spacing-sm) var(--spacing-sm); /* Reduced from var(--spacing-md) */
        padding-top: 4rem; /* Increased to account for fixed navbar */
        padding-bottom: 0.5rem; /* Reduced from 1.5rem */
    }
    
    .game-hero {
        min-height: 50vh;
        padding-top: 5rem; /* Increased to account for fixed navbar */
    }
    
    .game-hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        text-align: center;
        padding: 0 var(--spacing-sm);
    }
    
    .game-hero-info {
        text-align: center;
        order: 2;
    }
    
    .game-hero-image {
        order: 1;
        margin-bottom: var(--spacing-sm);
    }
    
    .game-logo-img {
        max-width: 250px;
        width: 100%;
    }
    
    .game-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        margin-top: 0;
        width: 100%;
    }
    
    .dropdown-link {
        padding: var(--spacing-xs) var(--spacing-md);
        margin: 0;
        font-size: 0.9rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        text-align: center;
        position: relative;
    }
    
    .dropdown-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--cyan);
        transition: var(--transition-fast);
    }
    
    .dropdown-link:hover::after,
    .dropdown-link.active::after {
        width: 100%;
    }
    
    .screenshots-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .screenshot-img {
        width: 100%;
        max-width: 300px;
    }
    
    .screenshot-item {
        padding: var(--spacing-xs);
        min-height: 200px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .feature-card {
        max-width: 100%;
        padding: var(--spacing-md);
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .feature-icon {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .description-subtitle {
        font-size: 1.5rem;
    }
    
    .description-text {
        font-size: 1rem;
        text-align: left;
        line-height: 1.7;
    }
    
    .description-list {
        margin-left: var(--spacing-sm);
    }
    
    .description-list li {
        margin-bottom: var(--spacing-xs);
        line-height: 1.6;
    }
    
    .description-heading {
        font-size: 1.25rem;
    }
    
    .description-list li {
        padding-left: var(--spacing-sm);
    }
    
    .hero-content {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
        min-height: 48px;
        font-size: 1rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .game-actions .btn {
        max-width: 250px;
    }
    
    /* Games Grid */
    .games-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .game-card {
        margin: 0 var(--spacing-sm);
        min-height: 300px;
    }
    
    .game-card .game-btn {
        min-height: 48px;
        font-size: 1rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .game-image {
        height: 180px;
    }
    
    /* Studio Highlights */
    .highlights-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .highlight-card {
        padding: var(--spacing-md);
        margin: 0 var(--spacing-sm);
        min-height: 200px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Container */
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Better mobile spacing */
    .screenshots-section,
    .features-section,
    .description-section {
        padding: var(--spacing-lg) 0;
    }
    
    /* Contact page hero adjustment */
    .contact-hero {
        padding-top: 5rem; /* Account for fixed navbar */
    }
    
    .featured-games,
    .studio-highlights {
        padding: var(--spacing-lg) 0;
    }
    
    /* Improve mobile readability */
    .description-content {
        padding: 0 var(--spacing-sm);
    }
    
    .description-content h3,
    .description-content h4 {
        margin-top: var(--spacing-md);
        margin-bottom: var(--spacing-sm);
    }
    
    /* Spacing Adjustments */
    .featured-games,
    .studio-highlights {
        padding: var(--spacing-lg) 0;
    }
    
    /* News Ticker */
    .ticker-item {
        font-size: 0.875rem;
        margin-right: var(--spacing-lg);
        padding: 0.15rem 0.5rem;
        min-height: 32px;
        display: flex;
        align-items: center;
    }
    
    .ticker-content {
        padding: var(--spacing-xs) 0;
    }
    
    .news-ticker {
        padding: var(--spacing-xs) 0;
    }
    
    .ticker-container {
        padding: var(--spacing-xs) 0;
    }
}

/* ===== TABLET STYLES ===== */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    /* Typography */
    .main-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    /* Navigation */
    .nav-menu {
        gap: var(--spacing-sm);
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    /* Hero Section */
    .hero-buttons {
        gap: var(--spacing-sm);
    }
    
    /* Games Grid */
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    /* Studio Highlights */
    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    /* Container */
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* News Ticker */
    .ticker-item {
        font-size: 1rem;
        margin-right: var(--spacing-xl);
        padding: 0.2rem 0.75rem;
    }
    
    .news-ticker {
        padding: var(--spacing-xs) 0;
    }
}

/* ===== DESKTOP STYLES ===== */
@media screen and (min-width: 1024px) {
    /* Typography */
    .main-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    /* Navigation */
    .nav-menu {
        gap: var(--spacing-md);
    }
    
    /* Hero Section */
    .hero-buttons {
        gap: var(--spacing-md);
    }
    
    /* Games Grid */
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    /* News Ticker */
    .ticker-item {
        font-size: 1.1rem;
        margin-right: var(--spacing-xxl);
        padding: 0.25rem 0.75rem;
    }
    
    .news-ticker {
        padding: var(--spacing-xs) 0;
    }
    
    /* Studio Highlights */
    .highlights-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }
}

/* ===== LARGE DESKTOP STYLES ===== */
@media screen and (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .main-title {
        font-size: 5rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: var(--spacing-sm) 0;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: var(--spacing-sm);
    }
    
    .btn {
        width: auto;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .game-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .navbar,
    .hero-background,
    .particles-bg,
    .news-ticker,
    .social-links {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: var(--spacing-md) 0;
    }
    
    .main-title {
        color: black !important;
        text-shadow: none !important;
        animation: none !important;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .game-card {
        border: 1px solid #ccc;
        box-shadow: none !important;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@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;
    }
}

@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #333333;
        --bg-dark: #ffffff;
        --bg-charcoal: #f0f0f0;
        --cyan: #0066cc;
        --magenta: #cc0066;
        --green: #006600;
    }
    
    .game-card,
    .highlight-card {
        border-width: 3px;
    }
}

/* ===== FOCUS VISIBILITY ===== */
@media (any-hover: none) {
    .btn:hover,
    .nav-link:hover,
    .game-card:hover,
    .highlight-card:hover,
    .social-link:hover {
        transform: none;
        box-shadow: none;
    }
    
    .btn:focus,
    .nav-link:focus,
    .game-card:focus,
    .highlight-card:focus,
    .social-link:focus {
        outline: 3px solid var(--cyan);
        outline-offset: 2px;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (pointer: coarse) {
    .nav-link,
    .btn,
    .game-btn,
    .social-link {
        min-height: 48px;
        min-width: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .hamburger {
        min-height: 48px;
        min-width: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .screenshot-item {
        cursor: pointer;
    }
    
    .game-card {
        cursor: pointer;
    }
    
    .highlight-card {
        cursor: pointer;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    /* Already dark by default, but can add specific adjustments */
    .game-card,
    .highlight-card {
        background: rgba(26, 26, 26, 0.9);
    }
}

/* ===== LIGHT MODE SUPPORT ===== */
@media (prefers-color-scheme: light) {
    :root {
        --text-primary: #000000;
        --text-secondary: #333333;
        --text-muted: #666666;
        --bg-dark: #ffffff;
        --bg-charcoal: #f5f5f5;
        --bg-space: #f0f0f0;
    }
    
    .navbar {
        background: rgba(255, 255, 255, 0.95);
        border-bottom-color: var(--cyan);
    }
    
    .game-card,
    .highlight-card {
        background: var(--bg-dark);
        border-color: var(--cyan);
    }
    
    .hero {
        background: linear-gradient(135deg, var(--bg-space), var(--bg-charcoal));
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
@media (max-width: 767px) {
    /* Reduce animations on mobile for better performance */
    .particle,
    .sparkle,
    .energy-wave {
        display: none;
    }
    
    .grid-overlay {
        animation-duration: 30s;
    }
    
    .scan-lines {
        animation-duration: 15s;
    }
    
    /* Improve touch scrolling */
    .screenshots-section,
    .features-section,
    .description-section {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Optimize images for mobile */
    .screenshot-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    /* Reduce motion for better performance */
    .screenshot-item:hover {
        transform: none;
    }
    
    .game-card:hover {
        transform: none;
    }
    
    .highlight-card:hover {
        transform: none;
    }
}

/* ===== SPECIFIC DEVICE FIXES ===== */
/* iPhone SE and small devices */
@media screen and (max-width: 375px) {
    .main-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        gap: var(--spacing-xs);
    }
    
    .btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.875rem;
    }
    
    .game-hero {
        min-height: 40vh;
        padding-top: 4.5rem; /* Increased to account for fixed navbar */
    }
    
    .game-logo-img {
        max-width: 200px;
    }
    
    .screenshot-img {
        max-width: 250px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .description-subtitle {
        font-size: 1.25rem;
    }
    
    .description-heading {
        font-size: 1.1rem;
    }
}

/* iPad Pro */
@media screen and (min-width: 1024px) and (max-width: 1366px) and (orientation: portrait) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Ultra-wide screens */
@media screen and (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    .main-title {
        font-size: 6rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* ===== UTILITY CLASSES FOR RESPONSIVE DESIGN ===== */
.hide-mobile {
    display: none;
}

.show-mobile {
    display: block;
}

@media screen and (min-width: 768px) {
    .hide-mobile {
        display: block;
    }
    
    .show-mobile {
        display: none;
    }
}

.hide-tablet {
    display: none;
}

@media screen and (min-width: 1024px) {
    .hide-tablet {
        display: block;
    }
}

.text-center-mobile {
    text-align: center;
}

@media screen and (min-width: 768px) {
    .text-center-mobile {
        text-align: left;
    }
}

/* ===== RESPONSIVE SPACING ===== */
.responsive-padding {
    padding: var(--spacing-sm);
}

@media screen and (min-width: 768px) {
    .responsive-padding {
        padding: var(--spacing-md);
    }
}

@media screen and (min-width: 1024px) {
    .responsive-padding {
        padding: var(--spacing-lg);
    }
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
.responsive-text {
    font-size: 1rem;
}

@media screen and (min-width: 768px) {
    .responsive-text {
        font-size: 1.125rem;
    }
}

@media screen and (min-width: 1024px) {
    .responsive-text {
        font-size: 1.25rem;
    }
} 
p, span, a, li {
    color: inherit !important;
    font-family: inherit !important;
}

/* ===== CONTACT PAGE RESPONSIVE STYLES ===== */
@media screen and (max-width: 767px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form-container {
        padding: 1.5rem;
    }
    
    .newsletter-input-group {
        flex-direction: column;
    }
    
    .newsletter-btn {
        width: 100%;
    }
    
    .map-placeholder {
        height: 300px;
    }
    
    .map-info {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
        max-width: none;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .faq-answer {
        padding: 0 1rem;
    }
    
    .faq-question[aria-expanded="true"] + .faq-answer {
        padding: 1rem;
    }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    .contact-grid {
        grid-template-columns: 1.5fr 1fr;
        gap: 2rem;
    }
    
    .map-placeholder {
        height: 350px;
    }
}

@media screen and (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 2fr 1fr;
        gap: 3rem;
    }
    
    .map-placeholder {
        height: 400px;
    }
}