/* easyaider - Responsive Styles */

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .games-grid .game-card {
        flex-direction: column;
        gap: 1rem;
        border-radius:15px
    }

    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large devices (desktops, 992px and up) */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .games-grid .game-card {
        flex-direction: column;
        gap: 1rem;
    }

    .popular-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-links {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Category Page */
    .category-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .category-info h1 {
        font-size: 2.2rem;
    }

    .category-stats {
        justify-content: center;
    }

    .filters-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }

    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 40px 0;
    }

    .hero-main-title {
        font-size: 2.8rem;
    }

    .hero-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

    .hero-card {
        padding: 1.5rem;
    }

    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .card-text h3 {
        font-size: 1rem;
    }

    .card-text p {
        font-size: 0.8rem;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .nav-menu {
        order: 3;
        width: 100%;
        background: rgba(33, 34, 51, 0.95);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 1rem;
        padding: 1rem 0;
        display: none;
    }

    .nav-menu.active {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.5rem;
    }

        /* Full-screen overlay for mobile menu */
        .nav-menu.active {
           position: fixed;
        top: 51px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        overflow-y: auto;
        padding: 1rem 1rem 2rem;
        padding-top: calc(64px + 1rem);
        background: #212233;
        backdrop-filter: blur(8px);
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        height: 100vh;
        }

        .nav-menu.active .nav-link {
            width: 100%;
            justify-content: flex-start;
            color: #FFFFFF;
            font-size: 1.1rem;
            font-weight: 600;
            padding: 1rem 1.5rem;
        }

        .nav-menu.active .nav-link i {
            font-size: 1.3rem;
            opacity: 1;
            color: #A48EFF;
        }

        /* Full-screen overlay for mobile search */
        .search-box.active {
           position: fixed;
        top: 51px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        background: #212233;
        backdrop-filter: blur(8px);
        display: flex
;
        align-items: flex-start;
        justify-content: center;
        padding: 1rem;
        padding-top: calc(64px + 1rem);
        overflow-y: auto;
        height: 100vh;
        }

        .search-box.active .search-container {
            width: 100%;
            max-width: 680px;
            background: rgba(26, 27, 40, 0.85);
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            padding: 0.75rem;
            display: flex;
        }

        .search-box.active input {
            width: 100%;
            font-size: 1rem;
        }


    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .search-box {
        order: 4;
        width: 100%;
        margin-top: 1rem;
        display: none;
    }

    .search-box.active {
        display: flex;
    }

    .hero-banner {
        padding: 140px 0 80px;
        min-height: 500px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 0 20px;
    }

    .hero-left {
        padding-right: 0;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-features {
        justify-content: center;
    }

    .hero-right {
        max-width: 100%;
    }

    .game-showcase {
        padding: 1.2rem;
    }

    .showcase-games {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .games-grid .game-card {
        flex-direction: column;
        gap: 0.8rem;
    }

    .games-grid .game-card-image {
        height: 150px;
    }

    .games-grid .game-card:nth-child(even) {
        direction: ltr;
    }

    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

    .popular-card-image {
        height: 150px;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .category-card {
        padding: 1.5rem 1rem;
    }

    .category-card i {
        font-size: 2rem;
    }

    .category-card h3 {
        font-size: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Game Details */
    .game-details {
        padding: 100px 0 60px;
    }

    .game-header {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }

    .game-meta h1 {
        font-size: 2rem;
    }

    .game-stats {
        gap: 1.5rem;
    }

    .game-description, .game-instructions, .game-tags {
        padding: 1.5rem;
    }

    .game-description h3, .game-instructions h3, .game-tags h3 {
        font-size: 1.5rem;
    }

    .related-games {
        padding: 1.5rem;
    }

    .related-games h3 {
        font-size: 1.5rem;
    }

    .related-games-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Game Details */
    .game-details {
        padding: 100px 0 60px;
    }

    .game-header {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }

    .game-meta h1 {
        font-size: 2rem;
    }

    .game-stats {
        gap: 1.5rem;
    }

    .game-description, .game-instructions, .game-tags {
        padding: 1.5rem;
    }

    .game-description h3, .game-instructions h3, .game-tags h3 {
        font-size: 1.5rem;
    }

    .related-games {
        padding: 1.5rem;
    }

    .related-games h3 {
        font-size: 1.5rem;
    }

    /* Game Details */
    .game-details {
        padding: 100px 0 60px;
    }

    .game-header {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }

    .game-meta h1 {
        font-size: 2rem;
    }

    .game-stats {
        gap: 1.5rem;
    }

    .game-description, .game-instructions, .game-tags {
        padding: 1.5rem;
    }

    .game-description h3, .game-instructions h3, .game-tags h3 {
        font-size: 1.5rem;
    }

    .related-games {
        padding: 1.5rem;
    }

    .related-games h3 {
        font-size: 1.5rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }

    .mobile-menu-toggle,
    .search-toggle {
        display: block !important;
    }

    .hero-banner {
        padding: 50px 0 40px;
        min-height: 450px;
    }

    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 30px 0;
    }

    .hero-main-title {
        font-size: 2rem;
    }

    .title-line {
        display: inline;
    }

    .title-highlight {
        display: inline;
    }

    .hero-main-desc {
        font-size: 1rem;
    }

    .hero-btn-group {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-primary, .btn-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }

    .btn-primary::before,
    .btn-secondary::before {
        display: none;
    }

    .hero-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero-card {
        padding: 1.2rem;
    }

    .card-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .card-text h3 {
        font-size: 0.95rem;
    }

    .card-text p {
        font-size: 0.75rem;
    }

    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-right {
        max-width: 100%;
    }

    .game-showcase {
        padding: 1rem;
    }

    .showcase-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .showcase-nav {
        align-self: flex-end;
    }

    .showcase-games {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .games-grid .game-card {
        flex-direction: column;
        gap: 0.8rem;
    }

    .games-grid .game-card-image {
        height: 220px;
    }

    .games-scroll {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem 0.5rem;
    }

    .games-scroll .game-card {
        width: 100%;
    }

    .popular-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .popular-card-image {
        height: 140px;
    }

    .popular-header h2 {
        font-size: 1.8rem;
    }

    .popular-subtitle {
        font-size: 0.95rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .category-card {
        padding: 1.2rem 1rem;
    }

    .category-card i {
        font-size: 1.8rem;
    }

    .category-card h3 {
        font-size: 0.95rem;
    }

    .category-card p {
        font-size: 0.75rem;
    }

    .footer-links {
        grid-template-columns: 1fr 1fr;
    }


    /* Center footer content on mobile */
    .footer-content { text-align: center; }
    .footer-brand { align-items: center; }
    .footer-links { justify-items: center; }
    .footer-column { text-align: center; }
    .footer-column h4::after { left: 50%; transform: translateX(-50%); }
    .footer-column a { justify-content: center; }


    /* New Games: full-width card + overlay arrows */
    .scroll-container { position: relative; }
    .games-scroll { padding: 0.5rem 0; scroll-snap-type: x mandatory; }
    .games-scroll > .game-card { flex: 0 0 100%; min-width: 100%; scroll-snap-align: center; }
    .scroll-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; z-index: 3; }
    .scroll-btn-left { left: 6px; }
    .scroll-btn-right { right: 6px; }
    .scroll-btn:hover { transform: translateY(-50%) scale(1.08); }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .search-box input {
        width: 150px;
    }

    /* Search Page adjustments to prevent overflow */
    .search-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .main-search-box {
        width: 100%;
        max-width: 100%;
    }
    .main-search-box input {
        min-width: 0; /* allow shrinking inside flex container */
    }
    .main-search-box button {
        flex-shrink: 0;
    }


    /* Game Details */
    .game-details {
        padding: 80px 0 40px;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }

    .game-header {
        padding: 1rem;
    }

    .game-meta h1 {
        font-size: 1.8rem;
    }

    .game-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .game-actions {
        flex-direction: column;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .game-description, .game-instructions, .game-tags {
        padding: 1rem;
    }

    .game-description h3, .game-instructions h3, .game-tags h3 {
        font-size: 1.3rem;
    }

    .game-description p, .game-instructions p {
        font-size: 1rem;
    }

    .related-games {
        padding: 1rem;
    }

    .related-games h3 {
        font-size: 1.3rem;
    }

    .related-games-grid {
        grid-template-columns: 1fr;
    }

    .error-message {
        padding: 2rem 1rem;
    }

    .error-message h2 {
        font-size: 1.5rem;
    }

    /* Category Page */
    .category-hero {
        padding: 80px 0 40px;
    }

    .category-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .category-icon {
        width: 70px;
        height: 70px;
    }

    .category-icon i {
        font-size: 2rem;
    }

    .category-info h1 {
        font-size: 1.8rem;
    }

    .category-info p {
        font-size: 1rem;
    }

    .category-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .category-stats .stat-number {
        font-size: 1.5rem;
    }

    .filters-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-group {
        width: 100%;
        justify-content: space-between;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 15px;
    }

    .header-content {
        padding: 0.8rem 0;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .search-box input {
        width: 120px;
        font-size: 0.85rem;
    }

    .hero-banner {
        padding: 120px 0 60px;
        min-height: 400px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .btn-primary, .btn-secondary {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }

    .hero-right {
        max-width: 100%;
    }

    .game-showcase {
        padding: 0.8rem;
    }

    .showcase-header h3 {
        font-size: 1.2rem;
    }

    .showcase-games {
        gap: 0.6rem;
    }

    .showcase-game-info h4 {
        font-size: 0.8rem;
    }

    .category-nav h2,
    .featured-games h2,
    .new-games h2,
    .popular-games h2 {
        font-size: 1.8rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .footer-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .showcase-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .showcase-nav {
        align-self: flex-end;
    }

    /* Game Details */
    .game-header {
        padding: 0.8rem;
    }

    .game-meta h1 {
        font-size: 1.5rem;
    }

    .game-category {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .stat {
        font-size: 0.8rem;
    }

    .play-game-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .game-actions .btn-primary,
    .game-actions .btn-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Category Page */
    .category-hero {
        padding: 60px 0 30px;
    }

    .category-header {
        gap: 0.8rem;
    }

    .category-icon {
        width: 60px;
        height: 60px;
    }

    .category-icon i {
        font-size: 1.5rem;
    }

    .category-info h1 {
        font-size: 1.5rem;
    }

    .category-info p {
        font-size: 0.9rem;
    }

    .category-stats .stat-number {
        font-size: 1.2rem;
    }

    .category-stats .stat-label {
        font-size: 0.8rem;
    }

    .filters-content {
        gap: 0.8rem;
    }

    .filter-group label {
        font-size: 0.8rem;
    }

    .filter-group select {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .other-categories h2 {
        font-size: 1.8rem;
    }

    /* Search Page */
    .search-hero {
        padding: 60px 0 30px;
    }

    .search-header {
        gap: 0.8rem;
    }

    .search-icon {
        width: 60px;
        height: 60px;
    }

    .search-icon i {
        font-size: 1.5rem;
    }

    .search-info h1 {
        font-size: 1.5rem;
    }

    .search-info p {
        font-size: 0.9rem;
    }

    .main-search-box input {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .main-search-box button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Stack search input and button on very small screens */
    .main-search-box {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        gap: 0.75rem;
    }
    .main-search-box input {
        width: 100%;
        min-width: 0;
    }
    .main-search-box button {
        width: 100%;
        justify-content: center;
    }


    .search-results-header h2 {
        font-size: 1.5rem;
    }

    .search-filters .filter-group label {
        font-size: 0.8rem;
    }

    .search-filters .filter-group select {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .no-results h3 {
        font-size: 1.5rem;
    }

    .no-results p {
        font-size: 0.9rem;
    }

    .search-suggestions h4 {
        font-size: 1rem;
    }

    .popular-categories h2 {
        font-size: 1.8rem;
    }
}

/* Mobile-specific optimizations */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .hero-badge {
        font-size: 0.7rem;
    }

    .btn-primary, .btn-secondary {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }

    .feature {
        font-size: 0.8rem;
    }

    .category-card {
        padding: 1.5rem 1rem;
    }

    .category-card h3 {
        font-size: 1.2rem;
    }

    .game-card-content {
        padding: 1rem;
    }

    .game-card-content h3 {
        font-size: 1.1rem;
    }

    .game-card-content p {
        font-size: 0.9rem;
    }

    .tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .play-btn {
        font-size: 0.9rem;
        padding: 0.7rem;
    }
}

/* Landscape orientation for mobile devices */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-banner {
        padding: 80px 0 40px;
        min-height: auto;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .games-scroll {
        flex-wrap: nowrap;
    }
}

/* High resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .logo h1 {
        text-shadow: 0 0 10px rgba(104, 66, 255, 0.5);
    }

    .hero-title {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: #0C0D14;
        color: #F9FAFF;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-card:hover,
    .category-card:hover,
    .game-card:hover,
    .nav-link:hover,
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .header,
    .hero-banner,
    .footer,
    .nav-menu,
    .mobile-menu-toggle,
    .search-toggle,
    .search-box,
    .btn-primary,
    .btn-secondary {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .game-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}