/* Responsive Design */

/* Large Desktops */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .game-title {
        font-size: 3.5rem;
    }
    
    .game-iframe {
        height: 600px;
    }
}

/* Tablets and Small Desktops */
@media (max-width: 1199px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .game-title {
        font-size: 2.5rem;
        white-space: nowrap;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (max-width: 991px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1rem 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-section {
        padding: 90px 0 40px;
    }
    
    .game-title {
        font-size: 2.2rem;
    }
    
    .game-subtitle {
        font-size: 1.1rem;
    }
    
    .game-iframe, #eggy-car-game {
        height: 500px;
    }
    
    .game-stats {
        gap: 1rem;
    }
    
    .about-section h2 {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Landscape */
@media (max-width: 767px) {
    .nav-container {
        height: 60px;
        padding: 0 10px;
    }
    
    .nav-logo span {
        font-size: 1.3rem;
    }
    
    .nav-menu {
        top: 60px;
    }
    
    .hero-section {
        padding: 80px 0 30px;
        min-height: 90vh;
    }
    
    .game-title {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    
    .game-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .game-container {
        padding: 15px;
        border-radius: 15px;
        margin-bottom: 1.5rem;
    }
    
    .game-iframe, #eggy-car-game {
        height: 350px;
        border-radius: 10px;
    }
    
    .game-loading {
        height: 350px;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }
    
    .stat-item {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .content-section {
        padding: 50px 0;
    }
    
    .game-article h2 {
        padding: 1.5rem;
        font-size: 1.5rem;
    }
    
    .article-content {
        padding: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.2rem;
    }
    
    .widget h3 {
        font-size: 1.1rem;
        padding: 0.8rem 1rem;
    }
    
    .game-link,
    .category-link {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .about-section {
        padding: 50px 0;
    }
    
    .about-section h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .feature-card h3 {
        font-size: 1.2rem;
    }
    
    .footer {
        padding: 40px 0 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-section h3 {
        margin-bottom: 0.8rem;
    }
}

/* Mobile Portrait */
@media (max-width: 479px) {
    .nav-logo img {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }
    
    .nav-logo span {
        font-size: 1.2rem;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .hero-container {
        padding: 0 10px;
    }
    
    .game-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .game-subtitle {
        font-size: 0.9rem;
    }
    
    .game-container {
        padding: 10px;
    }
    
    .game-iframe, #eggy-car-game {
        height: 280px;
    }
    
    .game-loading {
        height: 280px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
    }
    
    .stat-item {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .game-article h2 {
        padding: 1rem;
        font-size: 1.3rem;
        line-height: 1.3;
    }
    
    .article-content {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .article-content h3 {
        font-size: 1.1rem;
    }
    
    .widget h3 {
        font-size: 1rem;
        padding: 0.6rem 0.8rem;
    }
    
    .game-link,
    .category-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .about-section h2 {
        font-size: 1.5rem;
    }
    
    .feature-card {
        padding: 1rem;
    }
    
    .feature-icon {
        font-size: 2rem;
    }
    
    .feature-card h3 {
        font-size: 1.1rem;
    }
    
    .feature-card p {
        font-size: 0.9rem;
    }
    
    .footer-section {
        font-size: 0.9rem;
    }
    
    .footer-bottom {
        font-size: 0.8rem;
        padding-top: 1.5rem;
    }
}

/* Very Small Screens */
@media (max-width: 359px) {
    .game-title {
        font-size: 1.3rem;
    }
    
    .game-iframe, #eggy-car-game {
        height: 250px;
    }
    
    .game-loading {
        height: 250px;
    }
    
    .game-container {
        margin-bottom: 1rem;
    }
    
    .stat-item {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}

/* Landscape Orientation for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 70px 0 20px;
    }
    
    .game-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .game-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .game-container {
        margin-bottom: 1rem;
    }
    
    .game-iframe, #eggy-car-game {
        height: 250px;
    }
    
    .game-loading {
        height: 250px;
    }
    
    .game-stats {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .nav-toggle,
    .game-container,
    .sidebar,
    .footer {
        display: none;
    }
    
    .hero-section {
        background: white;
        color: black;
        padding: 0;
        min-height: auto;
    }
    
    .game-title {
        color: black;
        text-shadow: none;
    }
    
    .content-section {
        background: white;
        padding: 20px 0;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .game-article {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .game-article h2 {
        background: #f8f9fa;
        color: black;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .navbar {
        background: white;
        border-bottom: 2px solid black;
    }
    
    .nav-link {
        color: black;
    }
    
    .nav-link:hover {
        color: #0066cc;
        background: #f0f0f0;
    }
    
    .game-container {
        border: 2px solid black;
    }
    
    .btn {
        background: black;
        color: white;
        border: 2px solid black;
    }
    
    .btn:hover {
        background: white;
        color: black;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .loading-spinner {
        animation: none;
        border: 4px solid #667eea;
    }
    
    html {
        scroll-behavior: auto;
    }
}