/* minikitpro - Responsive Styles */

/* Hide mobile buttons on desktop */
@media (min-width: 769px) {
    .mobile-menu-toggle,
    .search-toggle {
        display: none !important;
    }
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .games-masonry {
        columns: 2;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Header Mobile */
    .header-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 0;
        position: relative;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
    }

    .logo h1 {
        font-size: 1.8rem;
        font-weight: 800;
        margin: 0;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(33, 34, 51, 1);
        backdrop-filter: blur(20px);
        z-index: 9999;
        padding-top: 100px;
    }

    .nav-menu.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }

    .nav-menu .nav-link {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1.5rem 2rem;
        color: #EFF0F7;
        text-decoration: none;
        transition: all 0.3s ease;
        font-size: 1.2rem;
        font-weight: 500;
        margin: 0.5rem 0;
        border-radius: 12px;
        min-width: 200px;
        background: rgba(255, 255, 255, 0.05);
    }

    .nav-menu .nav-link:hover {
        background: rgba(104, 66, 255, 0.2);
        color: #A48EFF;
        transform: scale(1.05);
    }

    .nav-menu .nav-link i {
        margin-right: 1rem;
        font-size: 1.3rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: #A48EFF;
        font-size: 1.4rem;
        cursor: pointer;
        padding: 0.8rem;
        border-radius: 12px;
        transition: all 0.3s ease;
        min-width: 44px;
        min-height: 44px;
        order: 1;
    }

    .mobile-menu-toggle:hover {
        background: rgba(104, 66, 255, 0.15);
        color: #6842FF;
        transform: scale(1.05);
    }

    .mobile-menu-toggle.active {
        background: rgba(104, 66, 255, 0.2);
        color: #6842FF;
    }

    .mobile-menu-toggle .fa-bars {
        display: block;
    }

    .mobile-menu-toggle .fa-times {
        display: none;
    }

    .mobile-menu-toggle.active .fa-bars {
        display: none;
    }

    .mobile-menu-toggle.active .fa-times {
        display: block;
    }
    
    .search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: #A48EFF;
        font-size: 1.4rem;
        cursor: pointer;
        padding: 0.8rem;
        border-radius: 12px;
        transition: all 0.3s ease;
        min-width: 44px;
        min-height: 44px;
        order: 3;
    }

    .search-toggle:hover {
        background: rgba(104, 66, 255, 0.15);
        color: #6842FF;
        transform: scale(1.05);
    }

    .search-toggle.active {
        background: rgba(104, 66, 255, 0.2);
        color: #6842FF;
    }

    .search-toggle .fa-search {
        display: block;
    }

    .search-toggle .fa-times {
        display: none;
    }

    .search-toggle.active .fa-search {
        display: none;
    }

    .search-toggle.active .fa-times {
        display: block;
    }

    .search-box {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(33, 34, 51, 0.98);
        backdrop-filter: blur(20px);
        z-index: 9998;
        padding-top: 120px;
        border-radius: 0px;
        border: none;
    }

    .search-box.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
    }

    .search-container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        width: 90%;
        max-width: 500px;
    }

    .search-box input {
        flex: 1;
        font-size: 1.2rem;
        color: #EFF0F7;
        padding: 1.5rem 2rem;
        background: rgba(26, 27, 40, 0.8);
        border: 2px solid rgba(104, 66, 255, 0.3);
        border-radius: 25px;
        outline: none;
        transition: all 0.3s ease;
        text-align: center;
    }

    .search-box input:focus {
        border-color: #6842FF;
        box-shadow: 0 0 30px rgba(104, 66, 255, 0.5);
        transform: scale(1.02);
    }

    .search-box input::placeholder {
        color: rgba(255, 255, 255, 0.7);
        font-size: 1rem;
    }

    .search-btn {
        background: linear-gradient(135deg, #6842FF 0%, #A48EFF 100%);
        border: none;
        color: white;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        font-size: 1.2rem;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 20px rgba(104, 66, 255, 0.3);
    }

    .search-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 25px rgba(104, 66, 255, 0.5);
    }

    .search-btn:active {
        transform: scale(0.95);
    }
    
    /* Game Details Mobile */
    .game-details {
        margin-top: 80px;
        padding: 1rem 0;
    }

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

    .game-header {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .game-thumbnail {
        max-width: 300px;
        margin: 0 auto;
    }

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

    .game-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .play-game-btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }

    /* Hero Mobile */
    .hero-banner {
        min-height: 60vh;
        margin-top: 80px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        max-width: 100%;
    }

    .hero-right {
        order: -1;
        margin-bottom: 1rem;
    }

    .game-showcase {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-nav {
        padding: 0 1rem;
    }
    
    .hero-nav button {
        width: 40px;
        height: 40px;
    }
    
    /* Sections Mobile */
    section {
        padding: 2rem 0;
    }
    
    section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    /* Category Grid Mobile */
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
    
    .category-card i {
        font-size: 2.5rem;
    }
    
    /* Games Grid Mobile */
    .games-grid, .search-results-grid, .category-games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* No Results Mobile */
    .no-results {
        padding: 3rem 1rem;
        text-align: center;
    }

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

    .search-suggestions {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .suggestion-btn {
        width: 100%;
        max-width: 200px;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .games-masonry {
        columns: 1;
    }
    
    .games-scroll .game-card {
        min-width: 250px;
    }
    
    /* Game Card Mobile */
    .game-card img {
        height: 180px;
    }
    
    .game-card-content {
        padding: 1rem;
    }
    
    .game-card h3 {
        font-size: 1.1rem;
    }
    
    .game-card p {
        font-size: 0.85rem;
    }
    
    /* Section Header Mobile */
    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .section-header h2 {
        margin-bottom: 0;
    }
    
    /* Footer Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    /* Search Box Small Mobile */
    .search-box {
        /* max-width: 250px; */
        min-width: 180px;
    }

    .search-box input {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    /* Header Small Mobile */
    .logo h1 {
        font-size: 1.4rem;
        font-weight: 700;
        text-shadow: 0 0 15px rgba(104, 66, 255, 0.8);
    }

    .header-content {
        padding: 1rem 0;
    }
    
    /* Game Details Small Mobile */
    .game-details {
        padding: 1rem 0;
    }

    .game-header {
        gap: 1rem;
    }

    .game-thumbnail {
        max-width: 250px;
    }

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

    .breadcrumb {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    /* Search Page Mobile */
    .search-hero {
        padding: 2rem 0;
        margin-top: 80px;
    }

    .search-hero-pattern {
        background-size: 150px 150px;
        opacity: 0.5;
    }

    .search-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .search-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        margin: 0 auto;
    }

    .search-hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .search-hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .main-search-box {
        flex-direction: column;
        gap: 1rem;
        max-width: 100%;
        width: 100%;
    }

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

    .main-search-box button {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }

    .search-filters {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        width: 100%;
        padding: 0.8rem;
        font-size: 1rem;
    }

    /* Category Page Mobile */
    .category-hero {
        padding: 2rem 0;
        margin-top: 80px;
    }

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

    .category-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        margin: 0 auto;
    }

    .category-info h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .category-stats {
        justify-content: center;
        gap: 2rem;
    }

    /* Category Filters Mobile */
    .category-filters {
        padding: 1rem 0;
        position: relative;
        top: 0;
    }

    .filters-content {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
        text-align: center;
    }

    .filter-group label {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }

    .filter-group select {
        width: 100%;
        padding: 0.8rem 1rem;
        font-size: 1rem;
        text-align: center;
    }

    .view-toggle {
        justify-content: center;
        width: fit-content;
        margin: 0 auto;
    }

    .view-btn {
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
    }

    .games-per-page {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .games-per-page select {
        width: 100%;
        max-width: 200px;
    }

    /* Search Page Small Mobile */
    .search-hero-pattern {
        background-size: 100px 100px;
        opacity: 0.3;
    }

    .search-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .search-hero h1 {
        font-size: 1.8rem;
    }

    .main-search-box input {
        padding: 0.8rem;
    }

    .main-search-box button {
        padding: 0.8rem;
    }

    /* Category Page Small Mobile */
    .category-hero {
        padding: 1.5rem 0;
    }

    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

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

    .category-stats {
        gap: 1.5rem;
    }

    /* Footer Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 0 1rem;
    }

    .footer-brand {
        text-align: center;
        gap: 1.5rem;
    }

    .footer-stats {
        justify-content: center;
        gap: 1rem;
    }

    .stat-item {
        min-width: 70px;
        padding: 0.8rem;
    }

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

    .footer-links {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-column a {
        justify-content: center;
        padding: 0.5rem;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-pattern {
        background-size: 150px 150px;
        opacity: 0.5;
    }

    .footer-decoration {
        display: none;
    }

    /* Category Filters Small Mobile */
    .filter-group select {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .view-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    /* Hero Small Mobile */
    .hero-banner {
        min-height: 50vh;
        margin-top: 90px;
    }

    .hero-title {
        font-size: 2rem;
        font-weight: 800;
        line-height: 1.3;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
        color: rgba(255, 255, 255, 0.95);
    }
    
    .btn-primary, .btn-secondary {
        padding: 1rem 1.8rem;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 12px;
        text-shadow: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .btn-primary {
        background: linear-gradient(135deg, #6842FF 0%, #A48EFF 100%);
        color: white;
    }
    
    /* Category Small Mobile */
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .category-card {
        padding: 1rem;
    }
    
    .category-card i {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .category-card h3 {
        font-size: 0.9rem;
    }
    
    .category-card p {
        font-size: 0.8rem;
    }
    
    /* Games Small Mobile */
    .games-scroll .game-card {
        min-width: 220px;
    }
    
    .game-card img {
        height: 150px;
    }
    
    .game-card-content {
        padding: 0.8rem;
    }
    
    .game-card h3 {
        font-size: 1rem;
    }
    
    .game-card p {
        font-size: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .tag {
        padding: 0.2rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .play-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Sections Small Mobile */
    section {
        padding: 1.5rem 0;
    }
    
    section h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    /* Scroll Controls Small Mobile */
    .scroll-btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    /* Hero Navigation Small Mobile */
    .hero-nav button {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .hero-dots {
        bottom: 1rem;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .game-card:hover,
    .category-card:hover {
        transform: none;
    }
    
    .game-card:active,
    .category-card:active {
        transform: scale(0.98);
    }
    
    .cta-btn:hover,
    .play-btn:hover {
        transform: none;
    }
    
    .cta-btn:active,
    .play-btn:active {
        transform: scale(0.95);
    }
    
    /* Increase touch targets */
    .nav-menu a,
    .dropdown-menu a {
        padding: 0.8rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .scroll-btn,
    .hero-nav button {
        min-width: 44px;
        min-height: 44px;
    }
    
    .dot {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .dot::before {
        content: '';
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        transition: all 0.3s ease;
    }
    
    .dot.active::before {
        background: white;
        transform: scale(1.2);
    }
}

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

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        height: 70vh;
    }
    
    .hero-content h2 {
        font-size: 2.2rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .games-scroll {
        max-height: 400px;
        overflow-y: hidden;
    }
}

/* Print Styles */
@media print {
    .header,
    .hero,
    .footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .game-card {
        break-inside: avoid;
        border: 1px solid #ccc;
        margin-bottom: 1rem;
    }
    
    .games-grid, .search-results-grid, .category-games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .game-card {
        min-height: 200px;
    }

    .game-card h3 {
        font-size: 0.9rem;
        line-height: 1.2;
    }

    .game-card .category {
        font-size: 0.7rem;
    }

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

    /* Footer Small Mobile */
    .footer-content {
        padding: 1.5rem 0 1rem;
    }

    .footer-brand {
        gap: 1rem;
    }

    .footer-logo h3 {
        font-size: 1.5rem;
    }

    .footer-logo p {
        font-size: 0.9rem;
    }

    .footer-stats {
        gap: 0.8rem;
    }

    .stat-item {
        min-width: 60px;
        padding: 0.6rem;
    }

    .stat-number {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .footer-links {
        gap: 1.5rem;
    }

    .footer-column h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .footer-column a {
        font-size: 0.9rem;
        padding: 0.3rem;
    }

    .footer-bottom {
        padding: 1.5rem 0;
    }

    .footer-bottom p {
        font-size: 0.8rem;
    }

    .social-link {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .footer-pattern {
        background-size: 100px 100px;
        opacity: 0.3;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-slide {
        transition: none;
    }
    
    .games-scroll {
        scroll-behavior: auto;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    }
    
    .header {
        background: rgba(45, 55, 72, 0.95);
    }
    
    .nav-menu a {
        color: #e2e8f0;
    }
    
    .search-box {
        background: rgba(45, 55, 72, 0.8);
    }
    
    .game-card,
    .category-card {
        background: rgba(45, 55, 72, 0.9);
        color: #e2e8f0;
    }
    
    .game-card h3,
    .category-card h3 {
        color: #e2e8f0;
    }
    
    .game-card p,
    .category-card p {
        color: #a0aec0;
    }
}
