/* Global Styles */
:root {
    --primary: #4dabf7;
    --secondary: #339af0;
    --dark: #212529;
    --light: #f8f9fa;
    --accent: #0ca678;
    --success: #20c997;
    --danger: #f03e3e;
    --warning: #fcc419;
    --info: #17a2b8;
    --text: #343a40;
    --text-secondary: #6c757d;
    --card-bg: #ffffff;
    --card-hover: #f8f9fa;
    --shadow: 0 4px 20px rgba(77, 171, 247, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, var(--light) 0%, #e9ecef 50%, #dee2e6 100%);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2rem;
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--accent);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 20px rgba(77, 171, 247, 0.6), 0 0 30px rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(77, 171, 247, 0.6);
}

/* Header/Navigation */
.header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

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

.logo h1 {
    margin: 0;
    font-size: 1.8rem;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav ul li {
    margin-left: 2rem;
}

.nav ul li a {
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    color: var(--text);
}

.nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav ul li a:hover::after,
.nav ul li a.active::after {
    width: 100%;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    width: 250px;
    border: 1px solid #e9ecef;
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    padding: 0.5rem;
}

.search-bar button {
    background: var(--primary);
    border: none;
    color: var(--text);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--secondary);
    transform: scale(1.1);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 8rem 0;
    overflow: hidden;
}

/* Video Background */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 18, 18, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 1), 0 0 30px rgba(255, 255, 255, 0.3);
    font-weight: 800;
}

.hero-content h2::after {
    display: none;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 1);
    font-weight: 600;
}

/* Featured Games */
.featured-games {
    padding: 5rem 0;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Game card animation styles */
.game-card {
    transition: all 0.5s ease;
}

/* Ensure proper display of exactly 9 cards */
.games-grid .game-card {
    opacity: 1;
    transform: translateY(0);
}

.game-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    cursor: pointer;
    position: relative;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    background: var(--card-hover);
}

/* About Us Section */
.about-section {
    padding: 5rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.about-text h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-features {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.about-features li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.about-features li i {
    margin-right: 1rem;
    color: var(--success);
}

.about-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

/* Team Section */
.team-section {
    padding: 5rem 0;
    background: rgba(30, 30, 30, 0.5);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member {
    text-align: center;
    transition: var(--transition);
}

.team-member:hover {
    transform: translateY(-10px);
}

.member-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--primary);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.team-member:hover .member-image {
    border-color: var(--accent);
}

.member-role {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Contact Info Section */
.contact-info {
    padding: 5rem 0;
    text-align: center;
}

.contact-details {
    max-width: 600px;
    margin: 0 auto;
}
}

.game-image {
    position: relative;
    overflow: hidden;
}

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

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

.game-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: var(--text);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.game-info {
    padding: 1.5rem;
}

.game-info h3 {
    margin-bottom: 1rem;
}

.game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-stats span {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.game-stats i {    margin-right: 5px;    color: var(--warning);}

/* 新的游戏卡片布局样式 */
.game-section {
    margin-bottom: 3rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.hot-label {
    background: var(--danger);
    color: white;
    padding: 0.5rem 2rem;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.5rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.category-title {
    color: var(--accent);
    font-size: 1.8rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* HOT游戏行布局 */
.game-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.hot-game {
    flex: 0 0 250px;
}

/* 游戏网格布局 */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

/* 调整游戏卡片大小 */
.game-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

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

.game-image {
    position: relative;
    overflow: hidden;
    height: 120px;
}

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

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

.game-info {
    background: #000;
    padding: 0.8rem;
    text-align: center;
}

.game-info h3 {
    margin: 0;
    font-size: 1rem;
    color: white;
    font-weight: 500;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .game-row {
        flex-direction: row;
        justify-content: space-between;
        gap: 1rem;
    }
    
    .hot-game {
        flex: 1;
        max-width: calc(50% - 0.5rem);
        min-width: 0;
    }
    
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* 小屏幕设备调整 */
    .hot-label {
        padding: 0.4rem 1.5rem;
        font-size: 1.2rem;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
}

/* Categories Section */
.categories {
    padding: 5rem 0;
    background: var(--light);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition), background 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.category-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.category-card.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.category-card.active i,
.category-card.active h3 {
    color: white;
}

.category-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

/* Category Selector Styles */
.category-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.category-dropdown {
    padding: 12px 24px;
    background: var(--card-bg);
    color: var(--text);
    border: 2px solid var(--primary);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    min-width: 200px;
    outline: none;
}

.category-dropdown:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.category-dropdown:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

.category-dropdown option {
    background: var(--dark);
    color: var(--text);
    padding: 10px;
}

/* Responsive adjustments for category selector */
@media (max-width: 768px) {
    .category-selector {
        flex-direction: column;
        width: 100%;
    }
    
    .category-dropdown {
        width: 100%;
        max-width: 300px;
    }
}

/* Newsletter */
.newsletter {
    padding: 5rem 0;
    text-align: center;
}

.newsletter form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    margin-top: 2rem;
}

.newsletter input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    background: var(--card-bg);
    color: var(--text);
    outline: none;
}

.newsletter button {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Footer */
.footer {
    background: #e9ecef;
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Game Detail Page Styles */
.game-detail {
    padding: 3rem 0;
}

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

.game-sidebar {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.game-main-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.game-main-image img {
    width: 100%;
    height: auto;
}

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

.game-info-detail {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.game-detail-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.game-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-meta-item {
    display: flex;
    align-items: center;
}

.game-meta-item i {
    margin-right: 10px;
    color: var(--accent);
}

.game-description {
    margin-bottom: 2rem;
}

.game-screenshots {
    margin-top: 3rem;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.screenshot-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.screenshot-item:hover {
    transform: scale(1.02);
}

.screenshot-item img {
    width: 100%;
    height: auto;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .game-detail-content {
        grid-template-columns: 1fr;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav ul li {
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 6rem 0;
    }
    
    .newsletter form {
        flex-direction: column;
    }
    
    .newsletter button {
        border-radius: var(--border-radius);
        margin-top: 1rem;
    }
    
    /* 手机端两列游戏卡片布局 */
    .container {
        padding: 0 4px;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
        margin-top: 0.5rem;
    }
    
    .game-card {
        border-radius: 8px;
        box-shadow: none;
        margin: 0;
    }
    
    .game-image {
        height: 100px;
        overflow: hidden;
    }
    
    .game-image img {
        height: 100% !important;
        object-fit: cover !important;
    }
    
    .game-category {
        top: 5px;
        right: 5px;
        padding: 3px 8px;
        font-size: 0.7rem;
    }
    
    .game-info {
        padding: 0.8rem;
    }
    
    .game-info h3 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .game-stats span {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .btn-primary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* 保持两列布局 */
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 小屏幕进一步优化 */
    .game-image {
        height: 80px;
    }
    
    .game-info h3 {
        font-size: 0.85rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card,
.category-card,
.hero-content {
    animation: fadeIn 0.6s ease-out;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 10px;
}

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

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

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

/* Mobile Responsive - Hide video and hero section on mobile */
@media (max-width: 768px) {
    .hero {
        display: none;
    }
    
    .hero-video {
        display: none;
    }
}