
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0891b2;
    --secondary-color: #0e7490;
    --accent-color: #06b6d4;
    --bg-color: #042f2e;
    --bg-secondary: #134e4a;
    --text-color: #ccfbf1;
    --text-secondary: #99f6e4;
    --card-bg: #134e4a;
    --card-hover: #0f766e;
    --border-color: #14b8a6;
    --shadow: rgba(8, 145, 178, 0.25);
    --shadow-lg: rgba(8, 145, 178, 0.35);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Nunito', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.2) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(8, 145, 178, 0.2) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.85;
    overflow-x: hidden;
}


.game-card a,
.game-card-large a,
.game-card-small a,
.game-card-title,
.game-card-large-title,
.game-card-small-title {
    text-decoration: none !important;
}

.game-card a:hover,
.game-card a:visited,
.game-card a:link,
.game-card-large a:hover,
.game-card-large a:visited,
.game-card-large a:link,
.game-card-small a:hover,
.game-card-small a:visited,
.game-card-small a:link,
.game-card-title:hover,
.game-card-title:visited,
.game-card-title:link,
.game-card-large-title:hover,
.game-card-large-title:visited,
.game-card-large-title:link,
.game-card-small-title:hover,
.game-card-small-title:visited,
.game-card-small-title:link {
    text-decoration: none !important;
}


::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}


.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(4, 47, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}


.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.dropdown-toggle .fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.dropdown.active .dropdown-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    padding: 0.5rem 0;
    list-style: none;
}


.more-dropdown .dropdown-menu {
    right: 0;
    left: auto;
}

.categories-dropdown .dropdown-menu {
    right: 0;
    left: auto;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0;
}

.dropdown-menu a:hover {
    background: rgba(59,130,246,0.1);
    color: var(--primary-color);
}

.dropdown-menu a i {
    width: 18px;
    text-align: center;
    opacity: 0.7;
}


.categories-menu {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 250px;
    padding: 0.5rem 0;
}

.categories-menu::-webkit-scrollbar {
    width: 6px;
}

.categories-menu::-webkit-scrollbar-track {
    background: transparent;
}

.categories-menu::-webkit-scrollbar-thumb {
    background: rgba(59,130,246,0.3);
    border-radius: 3px;
}

.categories-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(59,130,246,0.5);
}

.categories-menu .category-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0;
    border: none;
    background: transparent;
}

.categories-menu .category-item:hover {
    background: rgba(59,130,246,0.1);
    color: var(--primary-color);
}

.categories-menu .category-item .category-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.categories-menu .category-item span:last-child {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 0.875rem;
}


@media (max-width: 768px) {
    .categories-dropdown .dropdown-menu {
        display: none;
    }
    
    .categories-dropdown .categories-btn {
        cursor: pointer;
    }
}


.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    border-radius: 2px;
    transition: var(--transition);
}


.search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.search-form {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-color);
    font-size: 0.9375rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    outline: none;
    will-change: border-color, box-shadow;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: var(--card-bg);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-btn-left {
    position: absolute;
    left: 0.75rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
    z-index: 1;
    will-change: color;
}

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

.search-btn-right {
    position: absolute;
    right: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    z-index: 2;
    will-change: transform;
}

.search-btn-right:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.search-btn-right i {
    display: inline-block;
    font-size: 0.875rem;
}

.search-btn-right span {
    display: inline-block;
}

@media (max-width: 767px) {
    .search-btn-right span {
        display: none;
    }
}


.search-results-container {
    max-width: 1400px;
    margin: 0 auto;
}

.search-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.search-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.search-info {
    color: var(--text-secondary);
    font-size: 1rem;
}

.search-info strong {
    color: var(--primary-color);
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.no-results h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.no-results p {
    font-size: 1rem;
    color: var(--text-secondary);
}


.mobile-menu {
    position: fixed;
    right: -300px;
    top: 0;
    width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    z-index: 1002;
    transition: var(--transition);
    overflow-y: auto;
    box-shadow: -4px 0 12px var(--shadow-lg);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

/* 移动菜单中的搜索框 - 在移动端隐藏 */
@media (max-width: 768px) {
    .mobile-menu-overlay .search-wrapper,
    .mobile-menu .search-wrapper,
    .mobile-nav .search-wrapper {
        display: none !important;
    }
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-color);
}

.close-mobile-menu {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

.close-mobile-menu:hover {
    color: var(--primary-color);
}

.mobile-menu-nav {
    padding: 1rem 0;
}

.mobile-menu-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-links li {
    margin: 0;
}

.mobile-menu-links a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
    background: rgba(59,130,246,0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.mobile-menu-links a i {
    width: 20px;
    text-align: center;
    opacity: 0.7;
}


.sidebar {
    position: fixed;
    right: -300px;
    top: 0;
    width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    z-index: 1002;
    transition: var(--transition);
    overflow-y: auto;
    box-shadow: -4px 0 12px var(--shadow-lg);
}

.sidebar.active {
    right: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.close-sidebar {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.close-sidebar:hover {
    background: var(--card-hover);
}

.category-list {
    padding: 1rem 0;
}

.category-item {
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.category-item:hover {
    background: var(--card-hover);
    border-left-color: var(--primary-color);
    transform: translateX(-4px);
}

.category-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}


.main-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 3rem 2.5rem;
    overflow-x: visible;
}


.hero-banner-section {
    margin-bottom: 3rem;
}

.hero-banner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.hero-banner-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    display: block;
    transition: var(--transition);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    border: 2px solid var(--border-color);
}

.hero-banner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(6,182,212,0.1));
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
    pointer-events: none;
}

.hero-banner-card:hover::before {
    opacity: 1;
}

.hero-banner-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.hero-banner-large {
    min-height: 380px;
}

.hero-banner-small {
    min-height: 380px;
}

.hero-banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1);
}

.hero-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.6) 100%);
    z-index: 2;
}

.hero-banner-card:hover .hero-banner-image img {
    filter: brightness(1);
}

.hero-banner-content {
    position: relative;
    z-index: 3;
    padding: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    padding: 0.625rem 1.25rem;
    border-radius: 25px;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(6,182,212,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-banner-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    letter-spacing: -0.3px;
}

.hero-banner-small .hero-banner-title {
    font-size: 1.625rem;
}

.hero-banner-desc {
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 1.25rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

.hero-banner-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.hero-banner-meta .stars {
    color: #ffc107;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.hero-banner-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.hero-banner-tags .tag {
    background: rgba(255,255,255,0.25);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 15px;
    font-size: 0.8125rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
}

.hero-banner-tags .tag:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-2px);
}


.home-main {
    max-width: 100%;
    margin: 0 auto;
}

.home-main {
    min-width: 0;
}

.home-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}


.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    margin-top: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.section-header h2,
.section-header h3 {
    color: var(--text-color);
}

.section-header::after {
    display: none;
}

@keyframes slideInLeft {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 80px;
        opacity: 1;
    }
}

.view-all-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.view-all-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.3s ease;
    will-change: left;
}

.view-all-link:hover::before {
    left: 100%;
}

.view-all-link:hover {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-color: transparent;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}


.sidebar-widget {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.widget-link {
    display: block;
    margin-top: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.widget-link:hover {
    color: var(--accent-color);
}


.quick-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-stat-item {
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 14px;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.quick-stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: var(--transition);
}

.quick-stat-item:hover::before {
    opacity: 1;
}

.quick-stat-item:hover {
    background: var(--card-hover);
    border-color: rgba(59,130,246,0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.quick-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.quick-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


.top-games-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.top-game-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.top-game-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: var(--transition);
}

.top-game-item:hover::before {
    opacity: 1;
}

.top-game-item:hover {
    background: var(--card-hover);
    transform: translateX(8px);
    border-color: rgba(59,130,246,0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.top-game-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 30px;
    text-align: center;
}

.top-game-item:nth-child(1) .top-game-rank { color: #ffd700; }
.top-game-item:nth-child(2) .top-game-rank { color: #c0c0c0; }
.top-game-item:nth-child(3) .top-game-rank { color: #cd7f32; }

.top-game-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.top-game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-game-info {
    flex: 1;
    min-width: 0;
}

.top-game-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-game-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}


.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.popular-tags-full {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    padding: 1.25rem 0;
}

.popular-tag-item {
    background: var(--card-bg);
    color: var(--text-color);
    padding: 0.625rem 1.25rem;
    border-radius: 16px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--border-color);
    display: inline-block;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px var(--shadow);
}

.popular-tag-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    transform: translate(-50%, -50%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.popular-tag-item:hover::before {
    width: 200px;
    height: 200px;
    opacity: 1;
}

.popular-tag-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.25);
}

.popular-tag-item > * {
    position: relative;
    z-index: 1;
}


.recent-games-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recent-game-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.recent-game-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: var(--transition);
}

.recent-game-item:hover::before {
    opacity: 1;
}

.recent-game-item:hover {
    background: var(--card-hover);
    transform: translateX(8px);
    border-color: rgba(59,130,246,0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.recent-game-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-game-info {
    flex: 1;
    min-width: 0;
}

.recent-game-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-game-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}



.games-scroll-container {
    position: relative;
    overflow: hidden;
}

.games-scroll-wrapper {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1.5rem 0.5rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-secondary);
    margin: 0 -0.5rem;
}

.games-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}

.games-scroll-wrapper::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.games-scroll-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

.games-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.featured-game-card {
    flex: 0 0 300px;
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
}

.featured-game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59,130,246,0.05), rgba(6,182,212,0.05));
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
    pointer-events: none;
}

.featured-game-card:hover::before {
    opacity: 1;
}

.featured-game-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
    border-color: rgba(59,130,246,0.3);
}

.featured-game-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: var(--bg-secondary);
    z-index: 2;
}

.featured-game-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--bg-secondary);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-game-card:hover .featured-game-image img {
    transform: scale(1.08);
}

.featured-game-content {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    background: var(--card-bg);
}

.featured-game-title {
    font-size: 1.1875rem;
    font-weight: 700;
    margin-bottom: 0.875rem;
    color: var(--text-color);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    letter-spacing: -0.2px;
}

.featured-game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.featured-game-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.featured-game-tags .tag {
    background: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}


.hero {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 16px;
    margin-bottom: 3.5rem;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
    color: var(--text-color);
}

.hero h1,
.hero h2,
.hero h3,
.hero p {
    color: var(--text-color);
}

.games-section:first-of-type {
    margin-top: 0;
}

.games-section:first-of-type .section-header {
    margin-top: 0;
}


.game-detail .games-section {
    margin-bottom: 3rem;
}

.game-detail .games-section .section-title {
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-color);
}

.game-detail .games-section .section-title i {
    color: var(--primary-color);
}


.game-detail .games-section {
    margin-bottom: 3rem;
}

.game-detail .games-section .section-title {
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-color);
}

.game-detail .games-section .section-title i {
    color: var(--primary-color);
}

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

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}


.categories-section {
    margin-bottom: 3rem;
    margin-top: 0;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 800;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    letter-spacing: -0.3px;
    line-height: 1.2;
    position: relative;
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 1.75rem;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 2rem;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
    opacity: 0.4;
    filter: blur(6px);
    z-index: -1;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        opacity: 0.3;
        filter: blur(6px);
    }
    to {
        opacity: 0.5;
        filter: blur(8px);
    }
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    overflow: visible;
}

.category-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 1.75rem 1.25rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    overflow: visible;
    position: relative;
    transition: var(--transition);
    border: 2px solid var(--border-color);
    animation: fadeIn 0.6s ease-out;
    animation-fill-mode: both;
    z-index: 1;
    box-shadow: 0 1px 4px var(--shadow);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(6,182,212,0.1));
    opacity: 0;
    transition: var(--transition);
    border-radius: 16px;
    z-index: 0;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59,130,246,0.05), rgba(6,182,212,0.05));
    opacity: 0;
    transition: var(--transition);
    border-radius: 16px;
    z-index: 0;
    pointer-events: none;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: rgba(59,130,246,0.5);
    box-shadow: 0 16px 40px rgba(59,130,246,0.3), 0 0 20px rgba(6,182,212,0.2);
}

.category-card > * {
    position: relative;
    z-index: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: var(--transition);
}

.category-card:hover::before {
    left: 100%;
}

.category-card:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px var(--shadow-lg);
}

.category-card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
    transition: var(--transition);
}

.category-card:hover .category-card-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 4px 12px rgba(59,130,246,0.4));
}

.category-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.category-card .count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.375rem 0.875rem;
    background: rgba(59,130,246,0.15);
    border-radius: 14px;
    display: inline-block;
    margin-top: 0.625rem;
    border: 1px solid rgba(59,130,246,0.2);
    transition: var(--transition);
}

.category-card:hover .count {
    background: rgba(59,130,246,0.25);
    border-color: rgba(59,130,246,0.4);
    transform: scale(1.05);
}


.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    overflow: visible;
    position: relative;
    padding: 0.5rem 0;
}


.game-detail .games-grid {
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    justify-items: start;
    align-items: start;
}

.game-detail .games-grid .game-card {
    max-width: 280px;
    width: 100%;
    justify-self: start;
}


.game-detail .games-grid.few-games {
    grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
    justify-content: start;
}

.game-detail .games-grid.few-games .game-card {
    max-width: 280px;
}

@media (min-width: 1200px) {
    .game-detail .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.75rem;
    }
    
    .game-detail .games-grid .game-card {
        max-width: 300px;
    }
    
    .game-detail .games-grid.few-games {
        grid-template-columns: repeat(auto-fill, minmax(250px, 300px));
    }
    
    .game-detail .games-grid.few-games .game-card {
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .game-detail .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .game-detail .games-grid .game-card {
        max-width: 200px;
    }
    
    .game-detail .games-grid.few-games {
        grid-template-columns: repeat(auto-fill, minmax(160px, 200px));
    }
    
    .game-detail .games-grid.few-games .game-card {
        max-width: 200px;
    }
}


.games-grid .game-card {
    max-width: 400px;
    justify-self: start;
}


.games-grid.few-games {
    grid-template-columns: repeat(auto-fit, minmax(240px, 400px));
    justify-items: center;
}

.games-grid.few-games .game-card {
    max-width: 400px;
    width: 100%;
    justify-self: center;
}

.games-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59,130,246,0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(6,182,212,0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}



.games-section:not(.game-detail .games-section) .games-grid > .game-card:last-child:nth-child(4n+1) {
    grid-column: 1 / -1;
    max-width: 50%;
    margin-left: auto;
    margin-right: auto;
}

.games-section:not(.game-detail .games-section) .games-grid > .game-card:nth-last-child(2):nth-child(4n+2),
.games-section:not(.game-detail .games-section) .games-grid > .game-card:nth-last-child(1):nth-child(4n+2) {
    grid-column: span 2;
}


.game-detail .games-grid .game-card:last-child {
    grid-column: auto;
    max-width: 280px;
}

@media (min-width: 1200px) {
    .game-detail .games-grid .game-card:last-child {
        max-width: 300px;
    }
}


.search-results-container .games-grid .game-card {
    max-width: 400px;
    justify-self: start;
}


.search-results-container .games-grid.few-games {
    grid-template-columns: repeat(auto-fit, minmax(240px, 400px));
    justify-items: center;
}

.search-results-container .games-grid.few-games .game-card {
    max-width: 400px;
    width: 100%;
    justify-self: center;
}

.game-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    flex-direction: column;
}

.game-card > * {
    position: relative;
    z-index: 1;
}

.game-card a {
    text-decoration: none !important;
}

.game-card a:hover,
.game-card a:visited,
.game-card a:link {
    text-decoration: none !important;
}

.game-card,
.game-card * {
    text-decoration: none !important;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    opacity: 0;
    transition: var(--transition);
    border-radius: 16px;
    z-index: 0;
    pointer-events: none;
}

.game-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: transparent;
    border-radius: 18px;
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
    filter: blur(8px);
}

.game-card:hover::before {
    opacity: 0;
}

.game-card:hover::after {
    opacity: 0;
}

.game-card > a {
    display: block;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    position: relative;
    z-index: 1;
}

.game-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(59,130,246,0.2);
    z-index: 10;
}

.game-card-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%; 
    overflow: hidden;
    background: var(--bg-color);
    border-radius: 16px 16px 0 0;
}

.game-card-image-gradient {
    display: none;
}

.game-card-overlay {
    display: none;
}

.game-card-play-btn {
    display: none;
}

.game-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    border-radius: 0;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}


.game-card-large-image img,
.game-card-small-image img,
.featured-game-image img,
.recommended-game-image img,
.recommended-icon-image img {
    border-radius: 0;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.game-card:hover .game-card-image img {
    transform: scale(1.05);
}


.game-card-large {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
    z-index: 1;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow);
}

.game-card-large > a {
    display: block;
    overflow: hidden;
    border-radius: 16px;
}

.game-card-large:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(59,130,246,0.2);
    border-color: var(--primary-color);
    z-index: 10;
}

.game-card-large-image {
    position: relative;
    width: 100%;
    padding-top: 60%;
    overflow: hidden;
}

.game-card-large-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.game-card-large:hover .game-card-large-image img {
    transform: scale(1.1);
}

.game-card-large-content {
    padding: 1.5rem;
}

.game-card-large-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.875rem;
    color: var(--text-color);
    text-decoration: none !important;
    letter-spacing: -0.2px;
    line-height: 1.4;
}

.game-card-large-title:hover,
.game-card-large-title:visited,
.game-card-large-title:link {
    text-decoration: none !important;
}

.game-card-large-title:hover,
.game-card-large-title:visited,
.game-card-large-title:link {
    text-decoration: none !important;
}

.game-card-large-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card-large-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}


.game-card-small {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: visible;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
    z-index: 1;
}


.recommended-game-card {
    flex: 0 0 180px;
    background: var(--card-bg);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px var(--shadow);
    position: relative;
}

.recommended-game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59,130,246,0.05), rgba(6,182,212,0.05));
    opacity: 0;
    transition: var(--transition);
    border-radius: 12px;
    z-index: 0;
    pointer-events: none;
}

.recommended-game-card:hover::before {
    opacity: 1;
}

.recommended-game-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(59,130,246,0.2);
}

.recommended-game-image {
    position: relative;
    width: 100%;
    padding-top: 70%;
    overflow: hidden;
    background: var(--bg-color);
    border-radius: 8px 8px 0 0;
}

.recommended-game-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.recommended-game-card:hover .recommended-game-image img {
    transform: scale(1.08);
}

.recommended-game-info {
    padding: 0.875rem;
    position: relative;
    z-index: 1;
    background: var(--card-bg);
}

.recommended-game-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    text-decoration: none;
}

.recommended-game-card:hover .recommended-game-title {
    color: var(--text-color);
}

.recommended-game-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.recommended-game-rating .stars-small {
    color: #ffc107;
    font-size: 0.75rem;
}

.recommended-game-rating span {
    font-weight: 500;
    color: var(--text-color);
}
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
    z-index: 1;
}

.game-card-small > a {
    display: block;
    overflow: hidden;
    border-radius: 12px;
}

.game-card-small:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--shadow-lg);
    z-index: 10;
}

.game-card-small-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
}

.game-card-small-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.game-card-small:hover .game-card-small-image img {
    transform: scale(1.1);
}

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

.game-card-small-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    text-decoration: none !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.game-card-small-title:hover,
.game-card-small-title:visited,
.game-card-small-title:link {
    text-decoration: none !important;
}

.game-card-small-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.stars-small {
    font-size: 0.75rem;
    color: #ffc107;
    display: flex;
    align-items: center;
    gap: 2px;
}

.stars-small .star {
    font-size: 0.75rem;
    line-height: 1;
    width: auto;
}


.recommended-game-icon {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--bg-secondary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.05);
}

.recommended-icon-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 11px;
    background: var(--bg-secondary);
}

.recommended-icon-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    border-radius: 11px;
}

.recommended-icon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    position: relative;
    z-index: 0;
}

.recommended-game-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border-color: rgba(59,130,246,0.3);
    background: var(--bg-secondary);
}

.recommended-game-icon:hover .recommended-icon-image::before {
    opacity: 0;
}

.recommended-game-icon:hover .recommended-icon-image img {
    transform: scale(1.05);
}


.recommended-game-hover-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.7), transparent);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    pointer-events: none;
}

.recommended-game-icon:hover .recommended-game-hover-info {
    opacity: 1;
    transform: translateY(0);
}

.recommended-game-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.375rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.recommended-game-rating {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.9);
}

.recommended-game-rating .stars-small {
    color: #ffc107;
    font-size: 0.6875rem;
}

.recommended-game-rating span {
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.recommended-section {
    margin-bottom: 2rem;
    margin-top: 0;
}

.recommended-games-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.75rem;
    margin-bottom: 3rem;
    max-width: 100%;
    grid-auto-rows: auto;
}


.recommended-games-grid::after {
    content: '';
    grid-column: 1 / -1;
    height: 0;
}

@media (max-width: 1599px) {
    .recommended-games-grid {
        grid-template-columns: repeat(7, 1fr);
    }
}

@media (max-width: 1399px) {
    .recommended-games-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1199px) {
    .recommended-games-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 991px) {
    .recommended-games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.625rem;
    }
}

@media (max-width: 767px) {
    .recommended-games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
}

@media (max-width: 479px) {
    .recommended-games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

.game-card-content {
    padding: 1.5rem;
    position: relative;
    background: var(--card-bg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-card-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59,130,246,0.3), transparent);
    opacity: 0;
    transition: var(--transition);
}

.game-card:hover .game-card-content::before {
    opacity: 1;
}

.game-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    color: var(--text-color);
    text-decoration: none !important;
    letter-spacing: -0.1px;
}

.game-card-title:hover {
    text-decoration: none;
    color: var(--text-color);
}


.game-detail .games-grid .game-card-title {
    -webkit-line-clamp: 1;
    line-height: 1.4;
}

.game-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.game-card-meta .rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.rating-value {
    font-weight: 600;
    color: var(--text-color);
}

.game-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reviews-count {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
    font-size: 0.8125rem;
}

.reviews-count i {
    font-size: 0.75rem;
    color: var(--primary-color);
}

.mobile-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(59,130,246,0.2);
    color: var(--primary-color);
    font-size: 0.75rem;
    border: 1px solid rgba(59,130,246,0.3);
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating span {
    color: var(--text-color);
}

.rating .rating-value {
    font-weight: 600;
    color: var(--text-color);
}

.rating .reviews-count {
    color: var(--text-secondary);
    font-weight: 400;
}

.stars {
    display: flex;
    gap: 2px;
    color: #ffc107;
}

.star {
    color: #fbbf24;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-block;
    line-height: 1;
    width: 1em;
    text-align: center;
}

.star.empty {
    color: #475569;
}

.game-card-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-top: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(59,130,246,0.3) transparent;
    -webkit-overflow-scrolling: touch;
}

.game-card-tags::-webkit-scrollbar {
    height: 4px;
}

.game-card-tags::-webkit-scrollbar-track {
    background: transparent;
}

.game-card-tags::-webkit-scrollbar-thumb {
    background: rgba(59,130,246,0.3);
    border-radius: 2px;
}

.game-card-tags::-webkit-scrollbar-thumb:hover {
    background: rgba(59,130,246,0.5);
}

.tag {
    background: rgba(59,130,246,0.1);
    color: var(--primary-color);
    padding: 0.375rem 0.875rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid rgba(59,130,246,0.2);
    flex-shrink: 0;
    white-space: nowrap;
    box-sizing: border-box;
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59,130,246,0.3);
}


.game-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    z-index: 4;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    animation: pulse 2s infinite;
}

.game-badge i {
    font-size: 0.625rem;
}

.game-badge-top {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #ffffff;
}

.game-badge-hot {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.game-badge-new {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.game-rank-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    z-index: 4;
    box-shadow: 0 4px 12px rgba(59,130,246,0.5);
    border: 2px solid rgba(255,255,255,0.3);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.05);
    }
}


.game-detail {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}


.game-detail-content {
    margin-top: 2rem;
}

#gameInstructionsAndDescription {
    margin-bottom: 2rem;
}

#gameInstructionsAndDescription .game-instructions,
#gameInstructionsAndDescription .game-description {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow);
}

#gameInstructionsAndDescription h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

#gameInstructionsAndDescription p {
    color: var(--text-secondary);
    line-height: 1.7;
}

#relatedGames,
#categoryGames {
    margin-bottom: 3rem;
}

#relatedGames::before {
    content: 'Similar Games';
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

#categoryGames::before {
    content: 'More from This Category';
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

#relatedGames .games-grid,
#categoryGames .games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

#gameStats {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow);
    color: var(--text-color);
}

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

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.stat-icon {
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color) !important;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary) !important;
}

#sidebarGames {
    background: transparent;
}

#topGamesSidebar {
    margin-bottom: 1.5rem;
}

.game-detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

.game-detail-main {
    min-width: 0; 
}

.game-detail-sidebar {
    position: relative;
}


.sidebar-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-title i {
    color: var(--primary-color);
}

.sidebar-games-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-game-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.sidebar-game-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.sidebar-game-rank {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 24px;
    text-align: center;
}

.sidebar-game-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.sidebar-game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-game-info {
    flex: 1;
    min-width: 0;
}

.sidebar-game-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.25rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.sidebar-game-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.stars-small {
    font-size: 0.75rem;
    color: #ffc107;
    display: flex;
    align-items: center;
    gap: 2px;
}

.stars-small .star {
    font-size: 0.75rem;
    line-height: 1;
    width: auto;
}

.rating-value-small {
    color: var(--text-secondary);
    font-weight: 500;
}


@media (max-width: 1024px) {
    .game-detail-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .game-detail-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
    
    .sidebar-games-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .game-detail {
        padding: 1rem;
    }
    
    .game-detail-layout {
        gap: 1.5rem;
    }
    
    .sidebar-section {
        padding: 1rem;
    }
    
    .sidebar-games-list {
        grid-template-columns: 1fr;
    }
}

.game-detail-header {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out;
    background: var(--card-bg);
    border-radius: 14px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow);
    color: var(--text-color);
}

@media (max-width: 768px) {
    .game-detail {
        padding: 1rem;
    }
    
    .game-detail-header {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
        margin-bottom: 2rem;
    }
}

/* ============================================
   移动端详情页边距优化 (480px及以下)
   ============================================ */
@media (max-width: 480px) {
    .game-detail {
        padding: 0.75rem !important;
    }
    
    .game-detail-header {
        gap: 1rem !important;
        padding: 0.75rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .game-detail-layout {
        gap: 1rem !important;
    }
    
    .sidebar-section {
        padding: 0.75rem !important;
    }
}

.game-detail-image {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 24px var(--shadow-lg);
}

.game-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.game-detail-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: var(--text-color);
}

.game-detail-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.game-detail-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.game-detail-rating .rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.game-detail-rating .rating .stars {
    color: #ffc107;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 2px;
}

.game-detail-rating .rating .stars .star {
    font-size: 1.25rem;
    line-height: 1;
    width: auto;
}

.game-detail-rating .rating span {
    color: var(--text-color) !important;
    font-size: 1.5rem;
    font-weight: 600;
}

.game-detail-rating .rating .rating-value {
    color: var(--text-color) !important;
    font-size: 1.5rem;
    font-weight: 600;
}

.game-detail-rating .rating .reviews-count {
    color: var(--text-secondary) !important;
    font-size: 1rem;
    font-weight: 400;
}

.game-detail-rating .rating span:last-child {
    color: var(--text-secondary) !important;
    font-size: 1rem;
    font-weight: 400;
}

.game-detail-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.game-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.meta-item {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 8px;
}

.meta-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.meta-value {
    font-weight: 600;
}


.game-quick-info {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    animation: fadeIn 0.6s ease-out;
}

.game-quick-info-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.game-quick-title h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
}

.game-quick-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.game-quick-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.game-quick-rating .stars {
    font-size: 1rem;
    color: #ffc107;
}

.game-quick-rating .rating-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.game-quick-rating .reviews-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.mobile-badge-quick {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .game-quick-info {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .game-quick-info-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .game-quick-title h1 {
        font-size: 1.5rem;
    }
    
    .game-quick-meta {
        width: 100%;
        justify-content: space-between;
    }
}

.game-iframe-container {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 2px 8px var(--shadow);
    animation: fadeIn 0.8s ease-out;
    position: relative;
    border: 1px solid var(--border-color);
}

.game-iframe-wrapper {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
    margin-top: 1rem;
}

.game-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

.game-iframe-header {
    margin-bottom: 1rem;
}

.game-iframe-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.game-iframe-title-info {
    flex: 1;
    min-width: 0;
}

.game-iframe-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.3;
}

@media (max-width: 768px) {
    .game-iframe-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .game-iframe-title {
        font-size: 1.5rem;
    }
    
    .fullscreen-btn {
        align-self: flex-end;
    }
}

.fullscreen-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.fullscreen-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.game-iframe-wrapper {
    position: relative;
    padding-top: 56.25%; 
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.game-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}


.game-iframe-wrapper iframe {
    overflow: hidden !important;
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}

.game-iframe-wrapper iframe::-webkit-scrollbar {
    display: none; 
}


.game-iframe-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    margin: 0;
    padding: 0.5rem;
    border-radius: 0;
    background: #000;
    display: flex;
    flex-direction: column;
}

.game-iframe-container.fullscreen .game-iframe-header {
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    z-index: 10000;
}

.game-iframe-container.fullscreen .game-iframe-title {
    font-size: 1.25rem;
}

.game-iframe-container.fullscreen .game-iframe-wrapper {
    padding-top: 0;
    height: calc(100vh - 80px);
    width: 100%;
    flex: 1;
    min-height: 0;
}

.game-iframe-container.fullscreen .game-iframe-wrapper iframe {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden !important;
}


@media (max-width: 768px) {
    .game-iframe-container.fullscreen {
        padding: 0.25rem;
    }
    
    .game-iframe-container.fullscreen .game-iframe-header {
        padding: 0.5rem;
    }
    
    .game-iframe-container.fullscreen .game-iframe-header h2 {
        font-size: 1rem;
    }
    
    .fullscreen-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .game-iframe-container.fullscreen .game-iframe-wrapper {
        height: calc(100vh - 70px);
    }
}


.rankings-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.ranking-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0;
}

.ranking-tab {
    padding: 0.625rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.tab-icon {
    font-size: 1.1rem;
    line-height: 1;
    transition: var(--transition);
}

.ranking-tab:hover {
    color: var(--text-color);
    background: rgba(59,130,246,0.1);
    border-color: var(--primary-color);
}

.ranking-tab.active {
    color: var(--primary-color);
    background: rgba(59,130,246,0.15);
    border-color: var(--primary-color);
}


.top-three-section {
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out;
}

.podium-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 1.5rem;
    align-items: end;
    margin-bottom: 2rem;
}

.podium-item {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    overflow: hidden;
}

.podium-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.podium-first {
    order: 2;
    padding-top: 2rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, var(--card-bg) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.podium-second {
    order: 1;
}

.podium-third {
    order: 3;
}

.podium-crown {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    color: #ffd700;
    z-index: 10;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

.podium-medal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    z-index: 5;
}

.podium-medal i {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.podium-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.podium-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.podium-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.podium-item:hover .podium-image img {
    transform: scale(1.05);
}

.podium-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    pointer-events: none;
}

.podium-info {
    position: relative;
    z-index: 2;
}

.podium-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.podium-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.podium-title a:hover {
    color: var(--primary-color);
}

.podium-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.podium-rating {
    font-weight: 600;
    color: var(--primary-color);
}

.podium-reviews {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

#rankingContent {
    opacity: 1;
    transition: opacity 0.3s ease-in;
}

.rankings-main-section {
    margin-top: 0;
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    overflow: visible;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: visible;
}

.ranking-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: grid;
    grid-template-columns: auto 110px 1fr minmax(200px, auto);
    align-items: start;
    gap: 1.25rem;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: visible;
    position: relative;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ranking-item:hover {
    background: rgba(59,130,246,0.05);
    border-color: rgba(59,130,246,0.2);
    box-shadow: 0 4px 12px rgba(59,130,246,0.15);
    transform: translateY(-2px);
}

.ranking-number-wrapper {
    position: relative;
    min-width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.rank-badge {
    font-size: 3rem;
    line-height: 1;
    display: block;
    animation: pulse 2s ease-in-out infinite;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.rank-badge-gold {
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.7));
    animation: pulse 2s ease-in-out infinite;
}

.rank-badge-silver {
    filter: drop-shadow(0 4px 12px rgba(192, 192, 192, 0.7));
}

.rank-badge-bronze {
    filter: drop-shadow(0 4px 12px rgba(205, 127, 50, 0.7));
}

.ranking-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-align: center;
    min-width: 48px;
    width: 48px;
    height: 48px;
    padding: 0;
    background: linear-gradient(135deg, rgba(59,130,246,0.8), rgba(37,99,235,0.8));
    border: 2px solid rgba(59,130,246,0.5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59,130,246,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ranking-number::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.ranking-item:hover .ranking-number::before {
    left: 100%;
}

.ranking-top-1 .ranking-number {
    color: #fff;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border: 2px solid rgba(255, 215, 0, 0.8);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
    font-size: 1.6rem;
    width: 52px;
    height: 52px;
    min-width: 52px;
}

.ranking-top-2 .ranking-number {
    color: #fff;
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    border: 2px solid rgba(192, 192, 192, 0.8);
    box-shadow: 0 6px 20px rgba(192, 192, 192, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
    font-size: 1.55rem;
    width: 50px;
    height: 50px;
    min-width: 50px;
}

.ranking-top-3 .ranking-number {
    color: #fff;
    background: linear-gradient(135deg, #cd7f32, #e6a55d);
    border: 2px solid rgba(205, 127, 50, 0.8);
    box-shadow: 0 6px 20px rgba(205, 127, 50, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    min-width: 50px;
}

.ranking-top-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 215, 0, 0.02) 100%);
    border-color: rgba(255, 215, 0, 0.25);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.15);
}

.ranking-top-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.08) 0%, rgba(192, 192, 192, 0.02) 100%);
    border-color: rgba(192, 192, 192, 0.25);
    box-shadow: 0 4px 16px rgba(192, 192, 192, 0.15);
}

.ranking-top-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.08) 0%, rgba(205, 127, 50, 0.02) 100%);
    border-color: rgba(205, 127, 50, 0.25);
    box-shadow: 0 4px 16px rgba(205, 127, 50, 0.15);
}

.ranking-item-image {
    width: 110px;
    height: 75px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    background: var(--bg-secondary);
}

.ranking-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}


.ranking-item-info {
    flex: 1;
    min-width: 0;
    grid-column: 3;
}

.ranking-item-right {
    grid-column: 4;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 200px;
    max-width: none;
    width: auto;
    overflow: visible;
    padding-top: 0.25rem;
}


@media (max-width: 1024px) {
    .ranking-item {
        grid-template-columns: auto 90px 1fr;
        gap: 1rem;
    }
    
    .ranking-item-right {
        grid-column: 3;
        grid-row: 2;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        margin-top: 0.5rem;
        min-width: auto;
    }
    
    .ranking-item-categories,
    .ranking-item-tags {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .ranking-item {
        grid-template-columns: auto 80px 1fr;
        padding: 0.875rem 1rem;
        gap: 0.875rem;
    }
    
    .ranking-item-image {
        width: 80px;
        height: 60px;
    }
    
    .ranking-item-right {
        grid-column: 1 / -1;
        grid-row: 3;
        margin-top: 0.5rem;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
    }
    
    .ranking-item-title {
        font-size: 1rem;
    }
    
    .ranking-item-rating {
        font-size: 0.85rem;
    }
    
    .ranking-item-categories {
        justify-content: flex-start;
        max-width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .ranking-item-tags {
        display: none;
    }
}

.ranking-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}


.ranking-item-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    margin-top: 0.375rem;
}

.ranking-item-rating .stars {
    font-size: 0.85rem;
}

.ranking-item-rating > span:first-of-type {
    color: white;
    font-weight: 600;
}

.ranking-item-rating > span:last-of-type {
    color: var(--text-secondary);
}

.ranking-item-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    min-width: 200px;
    max-width: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(59,130,246,0.3) transparent;
    position: relative;
    z-index: 2;
}

.ranking-item-categories .tag,
.ranking-item-tags .tag {
    flex-shrink: 0;
    white-space: nowrap;
    min-width: fit-content;
}

.ranking-item-categories::-webkit-scrollbar {
    height: 4px;
}

.ranking-item-categories::-webkit-scrollbar-track {
    background: transparent;
}

.ranking-item-categories::-webkit-scrollbar-thumb {
    background: rgba(59,130,246,0.3);
    border-radius: 2px;
}

.ranking-item-categories::-webkit-scrollbar-thumb:hover {
    background: rgba(59,130,246,0.5);
}

.ranking-item-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    min-width: 200px;
    max-width: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(59,130,246,0.3) transparent;
    position: relative;
    z-index: 2;
}

.ranking-item-tags::-webkit-scrollbar {
    height: 4px;
}

.ranking-item-tags::-webkit-scrollbar-track {
    background: transparent;
}

.ranking-item-tags::-webkit-scrollbar-thumb {
    background: rgba(59,130,246,0.3);
    border-radius: 2px;
}

.ranking-item-tags::-webkit-scrollbar-thumb:hover {
    background: rgba(59,130,246,0.5);
}

.tag-link {
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.8rem;
}

.tag-link:hover {
    transform: translateY(-1px);
}


.rankings-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--primary-color);
    background: rgba(59,130,246,0.05);
}

.stat-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    opacity: 1;
    transition: opacity 0.2s ease-out;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


.load-more-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin-top: 1rem;
    gap: 1rem;
}

.load-more-indicator .spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

.load-more-indicator p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}


.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    margin-top: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}



.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.topic-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.topic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border-color: rgba(59,130,246,0.3);
}

.topic-card-header {
    padding: 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.topic-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.topic-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.topic-card-body {
    padding: 1.25rem;
}

.topic-images-collage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 70px);
    gap: 0.4rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    height: 220px;
}

.topic-image-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--bg-secondary);
}

.topic-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topic-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topic-game-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topic-view-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.topic-view-btn:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}


.back-to-topics-btn {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.back-to-topics-btn:hover {
    background: var(--card-hover);
    border-color: var(--primary-color);
    transform: translateX(-4px);
}

.topic-detail-header {
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    border-radius: 16px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.topic-detail-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.topic-detail-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
    position: relative;
    z-index: 1;
}

.topic-detail-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    position: relative;
    z-index: 1;
}

.topic-detail-subtitle {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.topic-detail-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 1rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.topic-detail-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.topic-detail-games {
    margin-top: 2rem;
}


@media (max-width: 768px) {
    .topics-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .topic-images-collage {
        height: 200px;
        grid-template-rows: repeat(3, 60px);
    }
    
    .topic-detail-header {
        padding: 2rem 1.5rem;
    }
    
    .topic-detail-icon {
        font-size: 3.5rem;
    }
    
    .topic-detail-title {
        font-size: 1.75rem;
    }
    
    .topic-detail-subtitle {
        font-size: 1rem;
    }
    
    .topic-detail-stats {
        flex-direction: column;
        gap: 1rem;
    }
}


@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


.category-card {
    position: relative;
}

.category-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: var(--transition);
}

.category-card:hover::after {
    width: 100%;
}


.game-card {
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 0;
    transition: var(--transition);
    border-radius: 16px;
    pointer-events: none;
}

.game-card:hover::before {
    opacity: 0;
}


.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.25rem;
    max-width: 100%;
}

@media (min-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

.stat-item {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.95) 100%);
    padding: 1.5rem 1rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 130px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(255, 255, 255, 0.95) 100%);
    transform: translateY(-6px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}

.stat-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.stat-item:hover .stat-icon {
    opacity: 1;
    transform: scale(1.1);
    color: var(--accent-color);
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-top: 0.25rem;
}


.stat-item-size .stat-value-size {
    font-size: 1.125rem;
    word-break: break-word;
    line-height: 1.4;
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}


.stat-item-published .stat-value-published {
    font-size: 0.9375rem;
    word-break: break-word;
    line-height: 1.4;
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

@media (min-width: 1200px) {
    .stat-item-size .stat-value-size {
        font-size: 1.25rem;
    }
    
    .stat-item-published .stat-value-published {
        font-size: 1rem;
    }
}

@media (min-width: 1400px) {
    .stat-item {
        padding: 1.25rem 0.75rem;
        min-height: 120px;
    }
    
    .stat-icon {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .stat-value {
        font-size: 1.625rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-item {
        padding: 1.25rem 0.75rem;
        min-height: 120px;
    }
    
    .stat-icon {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .stat-item-size .stat-value-size,
    .stat-item-published .stat-value-published {
        min-height: 2.4em;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-item-size .stat-value-size {
        font-size: 1rem;
    }
    
    .stat-item-published .stat-value-published {
        font-size: 0.875rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}


.game-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    max-width: 100%;
    overflow: hidden;
}

.tag-large {
    background: var(--card-bg);
    color: var(--text-color);
    padding: 0.75rem 1.25rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    white-space: nowrap;
    flex-shrink: 0;
}

.tag-large:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}


.game-detail-header .game-card-tags {
    flex-wrap: wrap !important;
    overflow: visible !important;
    max-width: 100%;
}

.tag-large:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}


@media (max-width: 1200px) {
    .home-layout {
        grid-template-columns: 1fr;
    }
    
    .home-sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    /* 隐藏所有搜索框 */
    .search-container,
    .search-form,
    .search-input,
    .search-btn-left,
    .search-btn-right,
    .search-wrapper {
        display: none !important;
    }

    .header {
        flex-wrap: nowrap !important;
        padding: 0.75rem 1rem !important;
        gap: 1rem !important;
    }
    
    .logo {
        font-size: 1.125rem !important;
        flex: 0 1 auto !important;
        min-width: 0;
        max-width: calc(100% - 50px);
    }

    .hero-banner-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-banner-large,
    .hero-banner-small {
        min-height: 300px;
    }
    
    .hero-banner-title {
        font-size: 1.75rem;
    }
    
    .hero-banner-content {
        padding: 2rem;
    }
    
    .featured-game-card {
        flex: 0 0 260px;
    }
    
    .games-grid-large {
        grid-template-columns: 1fr;
    }
    
    .games-grid-small {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .categories-btn {
        display: none;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .home-sidebar {
        grid-template-columns: 1fr;
    }
    
    .home-layout {
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0.75rem 1rem !important;
        flex-wrap: nowrap !important;
        gap: 1rem !important;
        min-height: 56px;
    }

    .logo {
        font-size: 1.125rem !important;
        flex: 0 1 auto !important;
        min-width: 0;
        max-width: calc(100% - 50px);
        overflow: hidden;
    }

    .search-container {
        display: none !important;
    }

    .nav-links {
        display: none !important;
    }

    .menu-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        padding: 0 !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer;
        z-index: 1001;
        order: 999;
    }

    .menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--text-color);
        margin: 3px 0;
        transition: all 0.3s;
    }

    .main-content {
        padding: 1rem;
    }

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

    .hero p {
        font-size: 1rem;
    }

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

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .game-detail-header {
        grid-template-columns: 1fr;
    }

    .game-detail-title {
        font-size: 1.75rem;
    }

    

    .ranking-number {
        min-width: auto;
    }
    
    .podium-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .podium-first,
    .podium-second,
    .podium-third {
        order: 0;
    }
}


.back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
    transition: var(--transition);
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.back-to-top-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 20px rgba(59,130,246,0.4);
}

@media (max-width: 768px) {
    .back-to-top-btn {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .back-to-top-btn {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}



    
    .section,
    .games-section {
        margin-bottom: 2rem !important;
    }
    
    .games-grid,
    .featured-grid {
        gap: 0.75rem !important;
    }
    
    .item-info,
    .game-card-content {
        padding: 0.875rem 0.75rem !important;
    }
    
    .section-title {
        margin-bottom: 0.75rem !important;
    }
}


/* ============================================
   移动端导航栏完整修复 (480px及以下)
   ============================================ */
@media (max-width: 480px) {
    /* 导航栏容器 */
    .top-nav,
    .nav-bar,
    .header,
    .site-header {
        padding: 0.5rem 0.75rem !important;
        min-height: 56px;
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
    }
    
    /* 导航栏包装器 - 关键修复 */
    .nav-wrapper,
    .header-container,
    .nav-content,
    .header-inner {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.5rem !important;
        flex-wrap: nowrap !important;
    }
    
    /* Logo和品牌 - 左侧 */
    .brand,
    .site-logo,
    .logo-wrapper,
    .brand-logo,
    .logo {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        font-size: 0.875rem !important;
        font-weight: 600;
        flex: 0 1 auto !important;
        min-width: 0;
        max-width: calc(100% - 50px);
        overflow: hidden;
    }
    
    .brand span,
    .site-logo span,
    .logo-wrapper span,
    .brand-logo span,
    .logo span {
        font-size: 0.875rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .brand img,
    .site-logo img,
    .logo-wrapper img,
    .brand-logo img,
    .logo img {
        height: 28px !important;
        width: auto !important;
        flex-shrink: 0;
    }
    
    /* 搜索框 - 完全隐藏 */
    .search-wrapper,
    .search-container,
    .search-box,
    .search-form,
    .search-input,
    .search-btn-left,
    .search-btn-right,
    .search-btn {
        display: none !important;
    }
    
    /* 移动菜单中的搜索框也隐藏 */
    .mobile-menu-overlay .search-wrapper,
    .mobile-menu .search-wrapper,
    .mobile-nav .search-wrapper {
        display: none !important;
    }
    
    /* 导航菜单 - 隐藏 */
    .nav-menu,
    .nav-links,
    .site-nav,
    .nav-actions,
    nav > ul {
        display: none !important;
    }
    
    /* 移动菜单按钮 - 右侧显示 */
    .mobile-menu-btn,
    .mobile-menu-toggle,
    .menu-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        padding: 0 !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer;
        z-index: 1001;
        order: 999;
    }
    
    .mobile-menu-btn span,
    .menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--text-color) !important;
        margin: 3px 0;
        transition: all 0.3s;
    }
    
    /* 移动菜单中的搜索框 - 完全隐藏 */
    .mobile-menu-overlay .search-wrapper,
    .mobile-menu .search-wrapper,
    .mobile-nav .search-wrapper {
        display: none !important;
    }
}

/* ============================================
   中等屏幕导航栏优化 (768px及以下)
   ============================================ */
@media (max-width: 768px) {
    .top-nav,
    .nav-bar,
    .header,
    .site-header {
        padding: 0.75rem 1rem;
    }
    
    .nav-wrapper,
    .header-container,
    .nav-content,
    .header-inner {
        padding: 0;
        gap: 1rem;
    }
    
    .brand,
    .site-logo,
    .logo-wrapper,
    .brand-logo,
    .logo {
        font-size: 1rem !important;
    }
    
    .brand img,
    .site-logo img,
    .logo-wrapper img,
    .brand-logo img,
    .logo img {
        height: 32px !important;
    }
    
    /* 隐藏所有搜索框 */
    .search-container,
    .search-form,
    .search-input,
    .search-btn-left,
    .search-btn-right,
    .search-wrapper,
    .search-btn {
        display: none !important;
    }
    
    /* 移动菜单中的搜索框也隐藏 */
    .mobile-menu-overlay .search-wrapper,
    .mobile-menu .search-wrapper,
    .mobile-nav .search-wrapper {
        display: none !important;
    }
    
    .nav-menu,
    .nav-links,
    .site-nav {
        display: none;
    }
    
    .mobile-menu-btn,
    .menu-toggle {
        display: flex !important;
    }
}
