/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #7ED321;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(126, 211, 33, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    color: white;
}

.back-to-top:hover {
    background: #6BC218;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(126, 211, 33, 0.4);
}

/* Header */
.header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 30px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
    font-size: 24px;
    font-weight: 700;
}

.logo svg {
    width: 40px;
    height: 40px;
}

.nav {
    display: flex;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    text-decoration: none;
    color: #666;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    color: #7ED321;
}

.nav-item:hover {
    background: rgba(126, 211, 33, 0.1);
    color: #7ED321;
}

.search-btn {
    width: 44px;
    height: 44px;
    background: #7ED321;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-btn.active {
    background: #6BC218;
}

.search-btn svg {
    width: 20px;
    height: 20px;
    color: white;
}

.search-btn:hover {
    background: #6BC218;
    transform: scale(1.05);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    font-size: 36px;
    cursor: pointer;
    color: #333;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 80px;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 18px;
    font-weight: 500;
}

.mobile-nav-item svg {
    width: 24px;
    height: 24px;
    color: #7ED321;
}

.mobile-nav-item:hover {
    background: rgba(126, 211, 33, 0.1);
    color: #7ED321;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    position: relative;
}

.search-close {
    position: absolute;
    top: -50px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    font-size: 40px;
    cursor: pointer;
    color: #333;
}

.search-box {
    display: flex;
    gap: 10px;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-box input {
    flex: 1;
    border: none;
    background: none;
    padding: 15px 20px;
    font-size: 18px;
    outline: none;
}

/* Search Section */
.main-content {
    min-height: calc(100vh - 400px);
    padding: 40px 0 60px;
}

.search-header {
    margin-bottom: 40px;
    text-align: center;
}

.search-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.search-description {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto 25px;
    padding: 0 20px;
}

.search-box-main {
    display: flex;
    gap: 10px;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: auto;
}

.search-box-main input {
    flex: 1;
    border: none;
    background: none;
    padding: 15px 20px;
    font-size: 16px;
    outline: none;
}

.search-submit {
    width: 50px;
    height: 50px;
    background: #7ED321;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.search-submit svg {
    width: 24px;
    height: 24px;
    color: white;
}

.search-submit:hover {
    background: #6BC218;
    transform: scale(1.05);
}

.search-results {
    margin-bottom: 40px;
}

.results-info {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.results-info strong {
    color: #7ED321;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-results h2 {
    font-size: 24px;
    color: #666;
    margin-bottom: 10px;
}

.no-results p {
    color: #999;
}

/* Recommended Section */
.recommended-section {
    margin-top: 50px;
    margin-bottom: 50px;
}

.section-header {
    margin-bottom: 25px;
}

.section-header-content {
    text-align: center;
}

.section-subtitle {
    font-size: 16px;
    color: #666;
    margin-top: 8px;
    font-weight: 400;
}

.section-description {
    background: linear-gradient(135deg, rgba(126, 211, 33, 0.08) 0%, rgba(95, 184, 23, 0.05) 100%);
    padding: 20px 30px;
    border-radius: 12px;
    border-left: 4px solid #7ED321;
    line-height: 1.8;
    color: #555;
    font-size: 15px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.initial-games {
    margin-top: 40px;
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 25px;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #7ED321 0%, #5FB817 100%);
    border-radius: 2px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.game-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.game-card-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.game-card-content {
    padding: 15px;
}

.game-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-card-category {
    font-size: 14px;
    color: #7ED321;
    font-weight: 500;
}

.load-more {
    display: block;
    margin: 40px auto 0;
    padding: 15px 40px;
    background: #7ED321;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more:hover {
    background: #6BC218;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(126, 211, 33, 0.3);
}

/* Footer */
.footer {
    background: #f8f9fa;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.footer-logo svg {
    width: 40px;
    height: 40px;
}

.footer-desc {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(126, 211, 33, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7ED321;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #7ED321;
    color: white;
    transform: translateY(-3px);
}

.social-links svg {
    width: 20px;
    height: 20px;
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: all 0.3s ease;
     color: #7ED321;
}

.footer-links a:hover {
    color: #7ED321;
    transform: translateX(3px);
}

.footer-links a:hover svg {
    transform: scale(1.1);
}

.footer-bottom {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    text-align: center;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav {
        display: none;
    }

    .search-title {
        font-size: 28px;
    }

    .search-description {
        font-size: 15px;
    }

    .section-title {
        font-size: 26px;
    }

    .section-description {
        padding: 15px 20px;
        font-size: 14px;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .search-title {
        font-size: 24px;
    }

    .search-description {
        font-size: 14px;
        padding: 0 10px;
    }

    .search-box-main {
        max-width: 100%;
    }

    .section-title {
        font-size: 22px;
    }

    .section-subtitle {
        font-size: 14px;
    }

    .section-description {
        padding: 15px;
        font-size: 13px;
        border-left-width: 3px;
    }

    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .game-card-title {
        font-size: 14px;
    }

    .game-card-category {
        font-size: 12px;
    }

    .load-more {
        padding: 12px 30px;
        font-size: 14px;
    }
}