/* Global Style Settings */
:root {
    /* Primary Colors */
    --primary-color: #FF6B35; /* Popcorn orange */
    --primary-dark: #E55A25; /* Darker orange for hover states */
    --primary-light: #FF8F6A; /* Lighter orange for backgrounds */
    
    /* Secondary Colors */
    --secondary-color: #5F4BB6; /* Deep purple */
    --secondary-dark: #4A3A8F; /* Darker purple for hover states */
    --secondary-light: #7A69D1; /* Lighter purple for backgrounds */
    
    /* Accent Colors */
    --accent-color: #FFC93C; /* Butter yellow */
    --accent-dark: #EDBA2F; /* Darker yellow */
    --accent-light: #FFD665; /* Lighter yellow */
    
    /* Neutral Colors */
    --dark-color: #222831;
    --dark-color-alt: #393E46;
    --light-color: #F8F9FA;
    --light-color-alt: #E9ECEF;
    
    /* Text Colors */
    --text-color: #333333;
    --text-color-light: #666666;
    --text-color-lighter: #888888;
    
    /* Status Colors */
    --success-color: #28A745;
    --warning-color: #FFC107;
    --error-color: #DC3545;
    --info-color: #17A2B8;
    
    /* UI Elements */
    --border-radius-sm: 4px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.12);
    --transition-fast: all 0.2s ease;
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 64px;
    
    /* Container */
    --container-max-width: 1200px;
    --container-padding: 0 20px;
}

/* CSS Reset & Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 62.5%; /* 10px base for easier rem calculations */
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem; /* 16px */
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Accessibility Focus Styles */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image: url('../images/popcorn-pattern-light.png');
    background-repeat: repeat;
    background-size: 300px;
    background-attachment: fixed;
}

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--container-padding);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--space-md);
    color: var(--dark-color);
}

h1 {
    font-size: 3.5rem; /* 35px */
}

h2 {
    font-size: 2.8rem; /* 28px */
}

h3 {
    font-size: 2.2rem; /* 22px */
}

h4 {
    font-size: 1.8rem; /* 18px */
}

h5, h6 {
    font-size: 1.6rem; /* 16px */
}

p {
    margin-bottom: var(--space-md);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul, ol {
    list-style-type: none;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
    vertical-align: middle; /* Removes extra space below images */
}

/* Buttons & Inputs */
button, 
.btn-primary, 
.btn-secondary {
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 1.6rem;
    font-weight: 500;
    padding: 1rem 2.4rem;
    border-radius: var(--border-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--box-shadow);
}

.btn-primary:hover, 
.btn-primary:focus {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: var(--box-shadow);
}

.btn-secondary:hover, 
.btn-secondary:focus {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

input, 
textarea, 
select {
    font-family: inherit;
    font-size: 1.6rem;
    padding: 1rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    transition: var(--transition);
    width: 100%;
}

input:focus, 
textarea:focus, 
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}

/* Section Titles */
.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin: var(--space-sm) auto 0;
    border-radius: 2px;
}

/* Header & Navigation */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

header.scrolled {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--dark-color);
    font-size: 2.4rem;
    font-weight: 700;
}

.logo-text {
    background: linear-gradient(135deg, #FF6B35, #5F4BB6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    font-size: 2.2rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.logo img {
    height: 48px;
    width: 48px;
    margin-right: var(--space-sm);
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.logo svg {
    transition: transform 0.3s ease;
}

.logo a:hover svg {
    transform: scale(1.1);
}

.logo a:hover #popcorn_group, 
.logo a:hover #footer_popcorn_group {
    animation: wiggle 1s ease;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(5deg); }
}

/* 导航菜单优化样式 */
nav ul {
    display: flex;
    gap: 2rem;
}

nav a {
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    color: var(--dark-color);
    position: relative;
    transition: all 0.3s ease;
    font-size: 1.6rem;
}

nav a:hover {
    color: var(--primary-color);
    background-color: rgba(255, 107, 53, 0.08);
    transform: translateY(-2px);
}

nav a.active {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: all 0.3s ease;
    transform: translateX(-50%);
    opacity: 0;
}

nav a:hover::after {
    width: 50%;
    opacity: 1;
}

nav a.active::after {
    display: none;
}

.search-box {
    display: flex;
    position: relative;
}

.search-box input {
    padding: 1rem 4rem 1rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1.4rem;
    width: 220px;
    transition: var(--transition);
}

.search-box input:focus {
    width: 260px;
}

.search-box button {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-color-lighter);
    padding: 0;
    font-size: 1.5rem;
}

.search-box button:hover {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 2.2rem;
    color: var(--dark-color);
    padding: 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #FF6B35, #E94560);
    padding: 7rem 0;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 4rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/popcorn-pattern.png') center/cover;
    opacity: 0.1;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
    margin: 0 auto 3.5rem;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-center {
    text-align: center;
}

.hero-title {
    font-size: 5.2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    line-height: 1.1;
    color: white;
    text-shadow: 0 4px 12px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #ffffff, #ffe8c8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
    transform: perspective(500px) translateZ(0);
    transition: transform 0.3s ease;
}

.hero-title:hover {
    transform: perspective(500px) translateZ(20px);
}

.hero-description {
    font-size: 2.4rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    animation: fadeIn 1s ease-out 0.3s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-content .highlight {
    color: #FFC93C;
    position: relative;
    display: inline-block;
    background: linear-gradient(to right, #FFC93C, #FFE08A);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    font-weight: 900;
    transition: all 0.3s ease;
}

.hero-content .highlight:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

.hero-buttons {
    display: none;
}

.btn-play {
    display: none;
}

.btn-explore {
    display: none;
}

.hero-features {
    display: none;
}

.feature {
    display: none;
}

.hero-image {
    display: none;
}

.game-display-box {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    aspect-ratio: 16 / 9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.popcorn-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/popcorn-real.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    z-index: 1;
    opacity: 1;
}

.game-display-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(95, 75, 182, 0.2));
    z-index: 2;
}

.game-display-box:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 70%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 2;
    animation: none;
}

.game-display-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.game-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    overflow: hidden;
    display: block;
    text-decoration: none;
    z-index: 3;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: var(--border-radius-lg);
}

.game-thumbnail:hover img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    border-radius: var(--border-radius-lg);
}

.play-button {
    width: 90px;
    height: 90px;
    background-color: #FFC93C;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.8rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, background-color 0.3s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 201, 60, 0.7);
    }
    
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(255, 201, 60, 0);
    }
    
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 201, 60, 0);
    }
}

.play-button i {
    font-size: 3.5rem;
    color: white;
    margin-left: 0.5rem; /* Slightly right-aligned for visual center */
}

.game-thumbnail:hover .play-button {
    transform: scale(1.1);
    background-color: #FFD966;
}

.play-overlay span {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    text-transform: uppercase;
}

/* Categories Section */
.categories {
    padding: 6rem 0;
    background-color: var(--light-color);
    position: relative;
}

.categories::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background-image: url('../images/popcorn-bottom.png');
    background-repeat: repeat-x;
    background-size: contain;
    opacity: 0.03;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.category-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
    color: white;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover .icon {
    color: white;
}

.category-card .icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

.category-card h3 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 0;
    transition: var(--transition);
}

/* Popular Games Section */
.popular-games {
    padding: 6rem 0;
    background-color: white;
    position: relative;
}

.popular-games::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/popcorn-pattern-light.png') center/cover;
    opacity: 0.05;
    z-index: 1;
}

.popular-games .container {
    position: relative;
    z-index: 2;
}

.popular-games-slider {
    margin-bottom: 4rem;
}

.popular-game {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(95, 75, 182, 0.05));
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.popular-game:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.popular-game-image {
    position: relative;
    width: 40%;
    flex-shrink: 0;
}

.popular-game-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.popular-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--accent-color);
    color: var(--dark-color);
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.popular-game-info {
    padding: 3rem;
    flex: 1;
}

.popular-game-info h3 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.popular-game-info p {
    font-size: 1.8rem;
    color: var(--text-color-light);
    margin-bottom: 2rem;
}

.player-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 3rem;
    text-align: center;
}

.stat-item {
    padding: 2rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    min-width: 200px;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.stat-number {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.6rem;
    color: var(--text-color-light);
}

/* Newsletter Section */
.newsletter {
    padding: 6rem 0;
    background-color: var(--dark-color);
    color: white;
    position: relative;
    overflow: hidden;
}

.newsletter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/popcorn-pattern-dark.png');
    background-repeat: repeat;
    background-size: 200px;
    opacity: 0.05;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.newsletter-content h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: white;
}

.newsletter-content p {
    margin-bottom: 3rem;
    opacity: 0.8;
    font-size: 1.6rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    margin: 0 auto;
    max-width: 500px;
}

.newsletter-form input {
    flex: 1;
    padding: 1.2rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.6rem;
}

.newsletter-form input:focus {
    outline: none;
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #333333, #222222);
    color: #ffffff;
    padding: 3rem 0 1.5rem;
    border-top: 4px solid #FF6B35;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    flex: 1;
    max-width: 400px;
}

.footer-logo svg {
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.footer-logo p {
    font-size: 1.2rem;
    line-height: 1.5;
    color: #f1f1f1;
    margin-bottom: 1rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.footer-links {
    flex: 1;
    max-width: 300px;
}

.footer-links h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #FF6B35;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-links h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(to right, #FF6B35, #5F4BB6);
    border-radius: 1.5px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    font-size: 1.05rem;
}

.footer-links ul li a:hover {
    color: #FF6B35;
    transform: translateX(5px);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.95rem;
    color: #aaaaaa;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary-color);
    color: white;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--box-shadow);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
}

/* Game Page Styles */
.game-container {
    padding: 4rem 0;
    background-color: white;
}

.game-iframe-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 3rem;
    border: 2px solid rgba(255, 107, 53, 0.1);
}

.game-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.game-controls {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.game-controls button {
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    background-color: var(--light-color-alt);
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.game-controls button:hover {
    background-color: var(--primary-color);
    color: white;
}

.game-details {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: var(--box-shadow);
}

.game-details h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.game-meta {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color-lighter);
    flex-wrap: wrap;
}

.game-meta div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.game-description {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.game-description h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.game-description h3 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: var(--dark-color);
}

.game-description p {
    margin-bottom: 1.5rem;
}

.game-description ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.game-description ul li {
    list-style-type: disc;
    margin-bottom: 0.8rem;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.game-tag {
    background-color: var(--light-color-alt);
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    font-size: 1.4rem;
    color: var(--text-color-lighter);
    transition: var(--transition);
}

.game-tag:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Skip Link (Accessibility) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Animation Effects */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.game-card, 
.category-card,
.popular-game,
.stat-item {
    animation: fadeIn 0.5s ease-out forwards;
}

.games-grid .game-card:nth-child(1) { animation-delay: 0.1s; }
.games-grid .game-card:nth-child(2) { animation-delay: 0.2s; }
.games-grid .game-card:nth-child(3) { animation-delay: 0.3s; }
.games-grid .game-card:nth-child(4) { animation-delay: 0.4s; }
.games-grid .game-card:nth-child(5) { animation-delay: 0.5s; }
.games-grid .game-card:nth-child(6) { animation-delay: 0.6s; }

.player-stats .stat-item:nth-child(1) { animation-delay: 0.1s; }
.player-stats .stat-item:nth-child(2) { animation-delay: 0.2s; }
.player-stats .stat-item:nth-child(3) { animation-delay: 0.3s; }

/* Utility Classes */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    html {
        font-size: 56.25%; /* 9px */
    }
    
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .popular-game {
        flex-direction: column;
    }
    
    .popular-game-image {
        width: 100%;
    }
    
    .player-stats {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
    
    .stat-item {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 50%; /* 8px */
    }
    
    header .container {
        flex-wrap: wrap;
    }
    
    nav {
        order: 3;
        width: 100%;
        margin-top: 1.5rem;
        display: none;
    }
    
    nav.active {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    nav a {
        display: block;
        padding: 1.2rem;
    }
    
    nav a::after {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .search-box {
        flex: 1;
        margin-left: 2rem;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .search-box input:focus {
        width: 100%;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .game-meta {
        gap: 1rem;
    }
    
    .game-controls {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-section {
        padding: 6rem 0;
    }
    
    .section-title {
        font-size: 2.4rem;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .game-details {
        padding: 2rem;
    }
    
    .popular-game-info {
        padding: 2rem;
    }
    
    .popular-game-info h3 {
        font-size: 2.4rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-logo img {
        margin: 0 auto 1.5rem;
    }
    
    .social-icons {
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .wrapper {
        background-image: none;
    }
    
    header, 
    .hero-section, 
    .newsletter, 
    footer, 
    .game-controls, 
    .back-to-top {
        display: none !important;
    }
    
    .container {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }
    
    .game-card, 
    .category-card,
    .popular-game,
    .stat-item {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .game-card::before, 
    .category-card::before {
        display: none;
    }
    
    a {
        text-decoration: none !important;
        color: var(--text-color) !important;
    }
    
    .overlay {
        display: none;
    }
}

/* Game Card Styles */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 4rem;
}

.game-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.game-card::before {
    content: '';
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 50px;
    height: 50px;
    background-image: url('../images/popcorn-icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    transition: var(--transition);
    transform: rotate(15deg);
}

.game-card:hover::before {
    opacity: 0.2;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.game-thumb {
    position: relative;
    overflow: hidden;
    padding-top: 70%;
}

.game-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.game-card:hover .game-thumb img {
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.game-card:hover .overlay {
    opacity: 1;
}

.play-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transform: translateY(20px);
    transition: var(--transition);
}

.game-card:hover .play-btn {
    transform: translateY(0);
}

.play-btn:hover {
    background-color: var(--primary-dark);
}

.game-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: var(--dark-color);
}

.rating {
    display: flex;
    align-items: center;
    gap: 2px;
    color: var(--accent-color);
    font-size: 1.4rem;
}

.rating i {
    /* Add a subtle text shadow to make stars stand out */
    text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
}

.rating span {
    color: var(--text-color-lighter);
    margin-left: 0.5rem;
}

.view-more {
    text-align: center;
    margin-top: 2rem;
}

/* Styling for embedded iframe in game cards */
.game-card .game-thumb iframe {
    width: 100%;
    height: 167px;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    overflow: hidden;
}

.game-card:hover .game-thumb iframe {
    transform: scale(1.02);
    box-shadow: var(--box-shadow-hover);
}

/* Animation for 7th card */
.games-grid .game-card:nth-child(7) { animation-delay: 0.7s; }

/* 游戏模态框样式 */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.game-modal-content {
    background-color: white;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 95%;
    max-width: 1080px;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
}

.game-modal-header h2 {
    margin: 0;
    font-size: 2.2rem;
    color: white;
}

.modal-controls {
    display: flex;
    gap: 1rem;
}

.icon-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.5rem;
    border-radius: 50%;
}

.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.game-modal-body {
    padding: 0;
    position: relative;
}

.game-modal .game-iframe-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.game-modal .game-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 防止游戏跳转的遮罩层 */
.iframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 5;
    display: none;
}

.iframe-overlay.active {
    display: block;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .game-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .game-modal-header h2 {
        font-size: 1.8rem;
    }
    
    .icon-btn {
        font-size: 1.6rem;
    }
} 