:root {
    /* Colors */
    --primary-color: #27ae60;
    --primary-dark: #44a08d;
    --primary-light: #a8e6cf;
    --secondary-color: #ff6b6b;
    --accent-color: #ffd166;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
}
/* Reset and Basic Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    overflow-x: hidden;
}

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

/* Header Styles */
.header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

.header nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    display: inline-block;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #3498db;
}

/* Main Content */
.main-content {
    margin-top: 85px;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #3498db;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    .header{
        height: fit-content;
    }
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        gap: 1rem;
        align-items: center;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}
/* 排查是否有隐藏样式，若有则删除/注释 */
/* 错误示例（需删除）：.star-empty { display: none; } */
.btn:hover {
    background: #2980b9;
}
.star-empty:before {
  content: "\f006"; /* fa-star-o 的Unicode编码 */
  color: #ccc;
}
/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Search Toggle Button */
.mobile-search-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.mobile-search-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-search-toggle svg {
    display: block;
}

/* Search Container */
.search-container {
    display: flex;
    align-items: center;
    margin-left: 2rem;
    position: relative;
}

.search-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 40px 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    width: 200px;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    width: 280px;
}

.search-button {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.search-button:hover {
    color: var(--primary-color);
}

/* Mobile Search Modal */
.mobile-search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.mobile-search-modal.active {
    display: flex;
}

.mobile-search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.mobile-search-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: white;
    border-radius: 12px;
    padding: 30px;
    animation: slideUp 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mobile-search-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.mobile-search-close:hover {
    color: var(--error-color);
}

.mobile-search-title {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.mobile-search-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-search-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.mobile-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.mobile-search-input::placeholder {
    color: #999;
}

.mobile-search-submit {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.mobile-search-submit:hover {
    background: var(--primary-dark);
}

/* Modal Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 992px) {
    .search-input {
        width: 160px;
    }
    
    .search-input:focus {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        margin-left: auto;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #2c3e50;
        flex-direction: column;
        padding: 1rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    /* 隐藏PC端搜索框 */
    .search-container {
        display: none !important;
    }
    
    .mobile-search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}


.text-line2{
  width: 100%!important;
  line-height: 1.4!important;
  display: -webkit-box!important;
  -webkit-line-clamp: 2!important;
  line-clamp: 2!important;
  -webkit-box-orient: vertical!important;
  overflow: hidden!important;
  text-overflow: ellipsis!important;
  word-break: break-all!important;
}

.text-line1{
  width: 100%!important;
  line-height: 1.4!important;
  display: -webkit-box!important;
  -webkit-line-clamp: 1!important;
  line-clamp: 1!important;
  -webkit-box-orient: vertical!important;
  overflow: hidden!important;
  text-overflow: ellipsis!important;
  word-break: break-all!important;
}


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

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.back-to-top:active {
    transform: translateY(-2px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
}



.popular-games-section {
            padding: 40px 0 !important;
            margin: 30px 0 !important;
        }

        .popular-games-section .section-title {
            color: #2c3e50 !important;
            border-bottom-color: rgba(255, 255, 255, 0.3) !important;
        }

        .popular-games-section .section-title+p {
            color: #333333!important;
            margin-bottom: 30px !important;
        }

        .popular-games-list {
            display: flex !important;
            flex-direction: column !important;
            gap: 20px !important;
        }

        .popular-game-item {
            background: rgba(255, 255, 255, 0.15) !important;
            backdrop-filter: blur(10px) !important;
            border-radius: 12px !important;
            padding: 20px !important;
            display: flex !important;
            align-items: center !important;
            gap: 20px !important;
            transition: transform 0.3s, background 0.3s !important;
        }

        .popular-game-item:hover {
            transform: translateX(5px) !important;
            background: rgba(255, 255, 255, 0.25) !important;
        }

        .popular-game-item a:first-child img {
            border-radius: 8px !important;
            width: 240px !important;
            height: 180px !important;
            object-fit: cover !important;
        }

        .popular-game-item .play-btn {
            background: #f39c12 !important;
            color: #ffffff !important;
            padding: 10px 25px !important;
            border-radius: 25px !important;
            text-decoration: none !important;
            font-weight: bold !important;
            transition: background 0.3s !important;
        }

        .popular-game-item .play-btn:hover {
            background: #e67e22 !important;
        }

        /* Recommended Games Section - Responsive Styles */
        .recommended-games-section {
            padding: 40px 0 !important;
            margin: 30px 0 !important;
        }

        .recommended-games-section .section-title {
            border-bottom-color: #667eea !important;
        }

        .recommended-games-section .section-title+p {
            color: #666 !important;
            margin-bottom: 30px !important;
        }

        .recommended-games-grid {
            display: grid !important;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
            gap: 20px !important;
        }

        .recommended-game-card {
            background: #ffffff !important;
            border-radius: 10px !important;
            overflow: hidden !important;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
            transition: transform 0.3s, box-shadow 0.3s !important;
        }

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

        .recommended-game-card img {
            width: 100% !important;
            height: 160px !important;
            object-fit: cover !important;
        }

        .recommended-game-card .badge {
            position: absolute !important;
            top: 10px !important;
            right: 10px !important;
            padding: 4px 10px !important;
            border-radius: 4px !important;
            font-size: 0.8rem !important;
            font-weight: bold !important;
            color: #ffffff !important;
        }

        .badge-hot {
            background: #e74c3c !important;
        }

        .badge-new {
            background: #27ae60 !important;
        }

        /* Mobile Responsive Styles */
        @media (max-width: 768px) {

            .popular-games-section,
            .recommended-games-section {
                padding: 20px 0 !important;
                margin: 20px 0 !important;
            }

            .popular-game-item {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 15px !important;
                padding: 15px !important;
            }

            .popular-game-item a:first-child {
                width: 100% !important;
            }

            .popular-game-item a:first-child img {
                width: 100% !important;
                height: auto !important;
                min-height: 220px !important;
            }

            .popular-game-item .play-btn {
                width: 100% !important;
                text-align: center !important;
                padding: 12px 20px !important;
            }

            .recommended-games-grid {
                grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
                gap: 15px !important;
            }

            .recommended-game-card img {
                height: 140px !important;
            }

            .recommended-game-card h3 {
                font-size: 1rem !important;
            }

            .recommended-game-card p {
                font-size: 0.85rem !important;
            }
        }

        @media (max-width: 480px) {

            .popular-games-section,
            .recommended-games-section {
                padding: 15px 0 !important;
                margin: 15px 0 !important;
            }

            .popular-game-item {
                padding: 12px !important;
                gap: 12px !important;
            }

            .popular-game-item h3 {
                font-size: 1.1rem !important;
            }

            .popular-game-item p {
                font-size: 0.85rem !important;
            }

            .recommended-games-grid {
                grid-template-columns: 1fr !important;
                gap: 12px !important;
            }

            .recommended-game-card img {
                height: 120px !important;
            }

            .recommended-game-card h3 {
                font-size: 0.95rem !important;
            }

            .recommended-game-card p {
                font-size: 0.8rem !important;
                display: -webkit-box !important;
                -webkit-line-clamp: 2 !important;
                -webkit-box-orient: vertical !important;
                overflow: hidden !important;
            }
        }

        @media (min-width: 769px) and (max-width: 1024px) {
            .recommended-games-grid {
                grid-template-columns: repeat(2, 1fr) !important;
            }
        }

        @media (min-width: 1025px) {
            .recommended-games-grid {
                grid-template-columns: repeat(4, 1fr) !important;
            }
        }