/* 3D Styled CSS for Crazy Cattle 3D */
:root {
    --primary: #ff6b35;
    --secondary: #2e5bff;
    --dark: #1a2238;
    --light: #f8f8f8;
    --accent: #5ce1e6;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    --heading-font-weight: 800;
    --body-font-weight: 400;
    --header-height: 80px;
    --primary-color: #ff6b35;
    --secondary-color: #2A3648;
    --text-color: #ffffff;
    --highlight-shadow: rgba(255, 107, 53, 0.4);
    --primary-hover: #ff9955;
    --secondary-hover: #3a6eff;
    --border-radius: 5px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, var(--dark) 0%, #2a3752 100%);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    perspective: 1200px;
    background-attachment: fixed;
    font-weight: var(--body-font-weight);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
}

/* Improved Layout Structure */
section {
    position: relative;
    margin-bottom: 70px !important;
    padding: 80px 0;
    overflow: hidden;
    content-visibility: auto;
    contain-intrinsic-size: 1px 1000px; /* 预估高度以避免布局偏移 */
}

section:first-of-type {
    padding-top: 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.section-header p {
    font-size: 1.25rem;
    margin-top: 15px;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Improved 3D Header Styling */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    position: relative;
    z-index: 10;
    transform-style: preserve-3d;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    transform: translateZ(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.logo-img {
    width: 65px;
    height: 65px;
    margin-right: 20px;
    filter: drop-shadow(0 5px 15px rgba(92, 225, 230, 0.6));
    animation: pulse 4s infinite alternate;
}

@keyframes pulse {
    0% {
        filter: drop-shadow(0 5px 15px rgba(92, 225, 230, 0.4));
    }
    100% {
        filter: drop-shadow(0 5px 25px rgba(92, 225, 230, 0.8));
    }
}

.logo-text {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--light);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3),
                 0 8px 16px rgba(0, 0, 0, 0.2);
    letter-spacing: 1.5px;
    background: linear-gradient(to right, var(--light) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav li {
    margin-left: 10px;
}

.nav-btn {
    text-decoration: none;
    color: var(--light);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 12px 24px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-speed), color var(--transition-speed);
    transform: translateZ(15px);
    display: inline-block;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    will-change: transform, color;
}

.nav-btn::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    transform: rotate(30deg);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateZ(25px) translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.8px;
    will-change: transform;
    color: var(--primary-color);
}

.nav-btn:hover::after {
    opacity: 1;
}

/* Enhanced 3D Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    background-image: url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    transform-style: preserve-3d;
    overflow: hidden;
    margin-bottom: 0 !important;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 34, 56, 0.85) 0%, rgba(46, 91, 255, 0.45) 100%);
    z-index: 1;
    backdrop-filter: blur(2px);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 60px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3),
                0 0 30px rgba(92, 225, 230, 0.2);
    transform: translateZ(50px);
    animation: float 8s ease-in-out infinite;
    contain: layout style;
    will-change: transform;
}

@keyframes float {
    0%, 100% { transform: translateZ(50px) translateY(0px); }
    50% { transform: translateZ(80px) translateY(-15px); }
}

/* Typography Improvements */
h1, h2, h3 {
    font-weight: var(--heading-font-weight);
    color: var(--light);
    line-height: 1.2;
    letter-spacing: 0.5px;
}

h1 {
    font-size: 4.2rem;
    font-weight: 900;
    margin-bottom: 35px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3),
                 0 10px 20px rgba(0, 0, 0, 0.2);
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

h1::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 5px;
    background: linear-gradient(to right, var(--accent), var(--primary));
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba(92, 225, 230, 0.6);
}

h2 {
    font-size: 3.2rem;
    margin-bottom: 25px;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    position: relative;
    display: inline-block;
}

h2::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 4px;
    background: linear-gradient(to right, var(--accent), var(--secondary));
    border-radius: 2px;
    box-shadow: 0 3px 10px rgba(92, 225, 230, 0.6);
}

h3 {
    font-size: 1.9rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--light);
    position: relative;
    padding-bottom: 15px;
}

h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

p {
    font-size: 1.15rem;
    line-height: 1.75;
    margin-bottom: 20px;
}

.tagline {
    font-size: 1.8rem;
    margin-bottom: 50px;
    color: var(--light);
    opacity: 0.95;
    line-height: 1.5;
    font-weight: 500;
    text-shadow: var(--text-shadow);
}

.cta-button {
    display: inline-block;
    padding: 25px 70px;
    background: linear-gradient(135deg, var(--primary) 0%, #ff8e61 100%);
    color: var(--light);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.5),
                0 5px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateZ(20px);
    position: relative;
    overflow: visible;
    letter-spacing: 1.5px;
    cursor: pointer;
    min-width: 220px;
    z-index: 10;
    -webkit-tap-highlight-color: rgba(255, 107, 53, 0.5);
    will-change: transform;
}

/* 扩展点击区域的透明伪元素 */
.cta-button::before {
    content: "";
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: transparent;
    z-index: -1;
    cursor: pointer;
}

/* 按钮视觉效果添加到伪元素中 */
.cta-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%, rgba(255, 255, 255, 0.3) 100%);
    transform: translateX(-100%) rotate(45deg);
    transition: transform 0.6s ease;
    pointer-events: none;
    border-radius: 50px; /* 确保效果不超出按钮 */
}

.cta-button:hover {
    transform: translateZ(30px) translateY(-8px);
    box-shadow: 0 20px 35px rgba(255, 107, 53, 0.6),
                0 10px 20px rgba(0, 0, 0, 0.4);
}

.cta-button:hover::after {
    transform: translateX(100%) rotate(45deg);
    opacity: 1;
}

.cta-button:active {
    transform: translateZ(15px) translateY(0);
    box-shadow: 0 8px 16px rgba(255, 107, 53, 0.4),
                0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease;
    background: linear-gradient(135deg, #ff8e61 0%, var(--primary) 100%);
}

/* Improved Game Section */
section::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle at 50% 50%, rgba(46, 91, 255, 0.08), transparent 70%);
    z-index: -1;
}

.game-section {
    text-align: center;
    position: relative;
    z-index: 2;
    padding-top: 60px;
}

.game-container {
    margin-top: 40px;
    perspective: 1200px;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: var(--border-radius);
    contain: size layout;
}

/* 修改iframe-container样式以适应新的位置 - 提高优先级 */
body main > .iframe-container {
    position: relative !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto 60px auto !important;
    padding: 40px 30px !important;
    background: linear-gradient(135deg, rgba(26, 34, 56, 0.95) 0%, rgba(42, 55, 72, 0.95) 100%) !important;
    border-radius: 0 !important;
    overflow: visible !important;
    transform: none !important;
    transition: none !important;
    min-height: 500px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    padding-bottom: 0 !important;
}

body main > .iframe-container::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, rgba(26, 34, 56, 0.8) 0%, rgba(42, 55, 72, 0.8) 100%) !important;
    z-index: -1 !important;
    border-radius: 0 !important;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.3) !important;
    transform: none !important;
}

/* 保持游戏区域内的iframe-container原有样式 */
.game-container .iframe-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin-bottom: 40px;
    transform-style: preserve-3d;
    transform: rotateX(2deg);
    transition: transform 0.5s ease;
    background-color: rgba(45, 55, 72, 0.7);
    border-radius: 20px;
    overflow: hidden;
}

.game-container .iframe-container:hover {
    transform: rotateX(0deg) scale(1.02);
}

.game-container .iframe-container::before {
    content: "";
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 25px;
    z-index: -1;
    transform: translateZ(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* 顶部游戏容器内的游戏元素样式 - 提高优先级 */
body main > .iframe-container .game-placeholder,
body main > .iframe-container .game-loading,
body main > .iframe-container .game-error,
body main > .iframe-container iframe {
    position: relative !important;
    width: 100% !important;
    max-width: 1140px !important;
    margin: 0 auto !important;
    border-radius: 20px !important;
    background: rgba(45, 55, 72, 0.9) !important;
    min-height: 400px !important;
}

body main > .iframe-container iframe {
    height: 600px !important;
    min-height: 600px !important;
    padding-bottom: 0 !important;
}

/* 确保游戏占位符在顶部有正确的样式 - 提高优先级 */
body main > .iframe-container .game-placeholder {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-image: url('../assets/images/crazy-cattle-3d-game.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    position: relative !important;
    overflow: hidden !important;
    height: 100% !important;
    width: 100% !important;
}

body main > .iframe-container .game-placeholder::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(26, 34, 56, 0.7) !important;
    z-index: 1 !important;
}

body main > .iframe-container .game-placeholder-content {
    position: relative !important;
    z-index: 2 !important;
    text-align: center !important;
    color: white !important;
    padding: 2rem !important;
    background-color: rgba(42, 54, 72, 0.85) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(5px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
}

/* 顶部游戏容器的加载和错误状态样式 - 提高优先级 */
body main > .iframe-container .game-loading,
body main > .iframe-container .game-error {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(42, 54, 72, 0.95) !important;
    color: white !important;
    text-align: center !important;
    height: 100% !important;
    width: 100% !important;
}

.game-instructions {
    max-width: 900px;
    margin: 40px auto 0;
    padding: 40px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    transform: translateZ(15px);
    position: relative;
    overflow: hidden;
}

.instruction-title {
    text-align: center;
    margin-bottom: 25px;
}

.game-instructions::before {
    content: "";
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0.5;
}

.game-instructions p {
    margin-bottom: 15px;
    font-size: 1.15rem;
    text-align: left;
}

/* Enhanced About Section */
.about-section {
    position: relative;
    overflow: hidden;
    padding-top: 100px;
    margin-bottom: 50px !important;
}

.about-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 50px;
}

.about-text {
    max-width: 900px;
    padding: 50px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    transform: translateZ(25px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.about-text::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.about-text:hover {
    transform: translateZ(40px) translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.about-text:hover::before {
    opacity: 1;
}

.about-text p {
    margin-bottom: 25px;
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: left;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.disclaimer {
    margin-top: 40px;
    padding: 25px;
    background: rgba(255, 107, 53, 0.15);
    border-radius: 15px;
    border-left: 4px solid var(--primary);
}

.disclaimer h3 {
    text-align: left;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.disclaimer h3::after {
    left: 20px;
    transform: none;
    width: 60px;
    background: var(--primary);
}

.disclaimer p {
    margin-bottom: 0;
    font-size: 1.1rem;
}

/* Improved Features Section */
.features-section {
    text-align: center;
    position: relative;
    padding-top: 100px;
    padding-bottom: 70px !important;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    margin-top: 50px;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    padding: 60px 35px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateZ(10px);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.feature-card:hover {
    transform: translateZ(40px) translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

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

.feature-icon {
    font-size: 4rem;
    margin-bottom: 30px;
    display: inline-block;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.2);
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.feature-card h3 {
    margin-bottom: 25px;
}

.feature-card p {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-top: auto;
}

/* Enhanced Footer */
footer {
    padding: 50px 0 40px !important;
    background: #1A2330 !important; /* 更深的背景色，与语言栏形成对比 */
    backdrop-filter: blur(10px);
    text-align: center;
    position: relative;
    z-index: 5;
    margin-top: 0 !important;
    box-shadow: inset 0 15px 15px -15px rgba(0, 0, 0, 0.5) !important; /* 内阴影效果 */
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.7) !important; /* 提高文字对比度 */
    margin-bottom: 20px;
    font-size: 0.95rem !important;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
}

.footer-links a:hover {
    color: #ff6b35 !important;
}

/* Responsive Design with Improved Aesthetics */
@media (max-width: 1200px) {
    .container {
        padding: 0 40px;
    }
    
    section {
        padding: 90px 0;
    }
}

@media (max-width: 992px) {
    body {
        font-size: 15px;
    }
    
    .container {
        padding: 0 30px;
    }
    
    h1 {
        font-size: 3.4rem;
    }
    
    h2 {
        font-size: 2.8rem;
    }
    
    .hero-content {
        padding: 45px;
    }
    
    .tagline {
        font-size: 1.5rem;
    }
    
    section {
        margin-bottom: 80px;
        padding: 70px 0;
    }
    
    .game-instructions, 
    .about-text {
        padding: 35px;
    }
    
    .videos-section, 
    .about-section, 
    .features-section {
        padding-top: 80px;
    }
    
    .features-section {
        padding-bottom: 90px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 25px;
    }
    
    .container {
        padding: 0 25px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav li {
        margin: 8px;
    }
    
    h1 {
        font-size: 2.8rem;
    }
    
    h2 {
        font-size: 2.4rem;
    }
    
    h3 {
        font-size: 1.7rem;
    }
    
    .hero-content {
        padding: 35px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin-left: auto;
        margin-right: auto;
        gap: 35px;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-text {
        padding: 35px;
    }
    
    section {
        margin-bottom: 50px !important;
        padding: 60px 0;
    }
    
    .cta-button {
        padding: 20px 50px;
        font-size: 1.3rem;
    }
    
    .cta-button::before {
        top: -30px;
        left: -30px;
        right: -30px;
        bottom: -30px;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .game-instructions, 
    .about-text {
        padding: 30px;
    }
    
    .feature-card {
        padding: 45px 30px;
    }
    
    .videos-section, 
    .about-section, 
    .features-section {
        padding-top: 70px;
    }
    
    .features-section {
        padding-bottom: 80px;
    }
    
    .features-grid,
    .videos-container {
        margin-top: 40px;
    }
    
    .hero-content {
        position: relative;
        padding-bottom: 70px;
    }
    
    .hero-content::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 70%;
        transform: translate(-50%, -50%);
        width: 280px;
        height: 120px;
        z-index: 5;
        cursor: pointer;
    }
    
    footer {
        padding-top: 40px !important;
    }
    
    :root {
        --header-height: 70px;
    }
    
    /* 移动端顶部游戏容器样式 */
    body main > .iframe-container {
        padding: 20px 15px !important;
        min-height: 400px !important;
        margin-bottom: 40px !important;
    }
    
    body main > .iframe-container .game-placeholder,
    body main > .iframe-container .game-loading,
    body main > .iframe-container .game-error,
    body main > .iframe-container iframe {
        min-height: 300px !important;
        border-radius: 15px !important;
    }
    
    body main > .iframe-container iframe {
        height: 400px !important;
        min-height: 400px !important;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .logo-text {
        font-size: 1.8rem;
    }
    
    .logo-img {
        width: 50px;
        height: 50px;
        margin-right: 15px;
    }
    
    h1 {
        font-size: 2.4rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.6rem;
    }
    
    p {
        font-size: 1.05rem;
    }
    
    .cta-button {
        padding: 16px 40px;
        font-size: 1.2rem;
        min-width: 160px;
    }
    
    .hero-content {
        padding: 25px;
    }
    
    .tagline {
        font-size: 1.3rem;
        margin-bottom: 35px;
    }
    
    .about-text p,
    .game-instructions p {
        font-size: 1.05rem;
        line-height: 1.6;
    }
    
    section {
        margin-bottom: 50px;
        padding: 50px 0;
    }
    
    .feature-icon {
        font-size: 3rem;
        margin-bottom: 20px;
    }
    
    .feature-card {
        padding: 35px 25px;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    .section-header p {
        font-size: 1.1rem;
    }
    
    .disclaimer {
        padding: 20px;
        margin-top: 30px;
    }
    
    .videos-section, 
    .about-section, 
    .features-section {
        padding-top: 60px;
    }
    
    .features-section {
        padding-bottom: 70px;
    }
    
    .game-container,
    .features-grid,
    .videos-container {
        margin-top: 30px;
    }
    
    .hero-content::after {
        width: 240px;
        height: 100px;
    }
}

/* 添加视频部分的样式 */
.videos-section {
    text-align: center;
    position: relative;
    padding-top: 100px;
    padding-bottom: 100px;
}

.videos-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 50px;
    margin-top: 50px;
    transform-style: preserve-3d;
    perspective: 1200px;
}

.video-wrapper {
    transform-style: preserve-3d;
    transition: all 0.4s ease;
}

.video-card {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateZ(15px);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.video-card:hover {
    transform: translateZ(40px) translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

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

.video-iframe-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 25px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transform: translateZ(10px);
    transition: all 0.4s ease;
    background-color: rgba(45, 55, 72, 0.7);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%23f9f9f9' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5l-6 4.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.video-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: opacity;
}

.video-iframe-container iframe[src] {
    opacity: 1;
}

.video-card h3 {
    margin-bottom: 15px;
    font-size: 1.8rem;
    color: var(--accent);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.video-card p {
    margin-top: 15px;
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* 视频部分的响应式设计 */
@media (max-width: 1200px) {
    .videos-container {
        grid-template-columns: 1fr;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .video-card {
        padding: 25px;
    }
    
    .video-card h3 {
        font-size: 1.6rem;
    }
    
    .video-iframe-container {
        margin: 20px 0;
    }
}

@media (max-width: 576px) {
    .videos-container {
        max-width: 100%;
    }
    
    .video-card {
        padding: 20px;
    }
    
    .video-card h3 {
        font-size: 1.4rem;
    }
    
    .video-iframe-container {
        margin: 15px 0;
    }
    
    .video-card p {
        font-size: 1rem;
    }
}

/* Language Bar Improvements */
.language-bar {
    width: 100%;
    padding: 25px 0;
    margin: 0;
    background-color: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
    z-index: 100;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.language-btn {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 10px 20px;
    border-radius: 40px;
    background-color: rgba(45, 58, 79, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25), inset 0 1px rgba(255, 255, 255, 0.1);
    display: inline-block;
    min-width: 100px;
    text-align: center;
    transition: all 0.2s ease-in-out;
    transform: translateZ(0);
}

.language-btn:hover {
    background-color: rgba(45, 58, 79, 0.98);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateZ(15px) translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.2);
}

.language-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-hover);
    font-weight: 700;
    transform: translateZ(15px) translateY(0);
    box-shadow: 0 8px 16px var(--highlight-shadow), 0 4px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 992px) {
    .language-bar {
        padding: 20px 0;
        gap: 10px;
    }
    
    .language-btn {
        font-size: 1rem;
        padding: 8px 16px;
        min-width: 90px;
    }
}

@media (max-width: 576px) {
    .language-bar {
        padding: 15px 0;
        gap: 8px;
    }
    
    .language-btn {
        font-size: 0.9rem;
        padding: 6px 12px;
        min-width: 80px;
        letter-spacing: 0.3px;
    }
}

/* 移除导航下拉样式 */
.nav-dropdown {
  display: none;
}

/* 针对低性能设备的优化 */
@media (prefers-reduced-motion: reduce) {
    .iframe-container,
    .video-iframe-container,
    .feature-card,
    .video-card,
    .about-text {
        transform: none !important;
        transition: opacity 0.3s ease !important;
    }
    
    .iframe-container:hover,
    .video-card:hover,
    .feature-card:hover,
    .about-text:hover,
    .video-card:hover .video-iframe-container {
        transform: none !important;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3) !important;
    }
}

/* FAQ Section Styles */
.faq-section {
    text-align: center;
    position: relative;
    padding-top: 100px;
    padding-bottom: 100px;
    background: rgba(26, 35, 48, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.faq-container {
    max-width: 900px;
    margin: 40px auto 0;
    transform-style: preserve-3d;
}

.faq-item {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.faq-question {
    padding: 20px 25px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question::after {
    content: "+";
    font-size: 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.faq-item.active .faq-question {
    background-color: rgba(255, 107, 53, 0.15);
    color: var(--accent);
}

.faq-item.active .faq-question::after {
    content: "−";
    transform: rotate(180deg);
}

.faq-answer {
    overflow: hidden;
    height: 0;
    opacity: 0;
    transition: height var(--transition-speed), opacity var(--transition-speed);
    padding: 0 25px;
    font-size: 1.1rem;
    line-height: 1.6;
    will-change: height, opacity;
}

.faq-item.active .faq-answer {
    height: auto;
    opacity: 1;
}

/* FAQ Responsive Design */
@media (max-width: 992px) {
    .faq-section {
        padding-top: 80px;
        padding-bottom: 80px;
    }
    
    .faq-container {
        max-width: 800px;
    }
    
    .faq-question {
        font-size: 1.15rem;
        padding: 18px 22px;
    }
}

@media (max-width: 768px) {
    .faq-section {
        padding-top: 70px;
        padding-bottom: 70px;
    }
    
    .faq-container {
        max-width: 100%;
    }
    
    .faq-question {
        font-size: 1.1rem;
        padding: 15px 20px;
    }
    
    .faq-item.active .faq-answer {
        padding: 5px 20px 20px;
    }
}

@media (max-width: 576px) {
    .faq-section {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 15px;
    }
    
    .faq-item.active .faq-answer {
        padding: 5px 15px 15px;
        font-size: 1rem;
    }
}

/* 添加性能优化：使用transform和opacity进行动画 */
.faq-question,
.cta-button,
.nav-btn,
.language-btn {
    will-change: transform;
    transform: translateZ(0);
}

/* 使用合成属性提高渲染性能 */
.hero-content {
    contain: layout style;
}

/* 使用CSS变量优化布局计算 */
:root {
    --header-height: 80px;
    --primary-color: #ff6b35;
    --secondary-color: #2A3648;
    --text-color: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --highlight-shadow: rgba(255, 107, 53, 0.4);
}

/* 优化FAQ动画 */
.faq-answer {
    overflow: hidden;
    height: 0;
    opacity: 0;
    transition: height var(--transition-speed), opacity var(--transition-speed);
    will-change: height, opacity;
}

.faq-item.active .faq-answer {
    height: auto;
    opacity: 1;
}

/* 优化滚动性能 */
html {
    scroll-behavior: smooth;
}

/* 设置按钮和导航项的动画使用transform */
.nav-btn:hover,
.language-btn:hover,
.cta-button:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

.cta-button:active {
    transform: translateY(1px);
}

/* 使用CSS类代替JS操作样式 */
.button-active {
    transform: translateZ(15px) translateY(0) !important;
    box-shadow: 0 8px 16px rgba(255, 107, 53, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s ease !important;
}

/* 优化图像和iframe容器，减少布局变化 */
.iframe-container,
.video-iframe-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    overflow: hidden;
}

.iframe-container iframe,
.video-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    will-change: opacity;
}

/* 优化响应式布局，减少媒体查询中的重复计算 */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    /* 移动端顶部游戏容器样式 */
    body main > .iframe-container {
        padding: 20px 15px !important;
        min-height: 400px !important;
        margin-bottom: 40px !important;
    }
    
    body main > .iframe-container .game-placeholder,
    body main > .iframe-container .game-loading,
    body main > .iframe-container .game-error,
    body main > .iframe-container iframe {
        min-height: 300px !important;
        border-radius: 15px !important;
    }
    
    body main > .iframe-container iframe {
        height: 400px !important;
        min-height: 400px !important;
    }
}

.game-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(42, 54, 72, 0.6);
    z-index: 10;
    border-radius: 8px;
    overflow: hidden;
}

.game-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.7;
    transition: all 0.5s ease;
}

.game-placeholder:hover .game-background-image {
    transform: scale(1.05);
    opacity: 0.8;
}

.game-placeholder-content {
    text-align: center;
    padding: 2rem;
    max-width: 80%;
    background-color: rgba(42, 54, 72, 0.85);
    border-radius: 16px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.play-button-overlay {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.6);
    transition: all 0.3s ease;
}

.game-placeholder:hover .play-button-overlay {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 40px rgba(255, 107, 53, 0.8);
}

.play-text {
    display: block;
    margin-top: 10px;
    color: white;
    font-weight: 700;
    font-size: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Game iframe placeholder and loading styles */
.game-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(42, 54, 72, 0.95);
    border-radius: 8px;
    overflow: hidden;
}

.game-placeholder .sheep-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.game-placeholder h3 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.game-placeholder p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.loading-spinner {
    width: 70px;
    height: 70px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color, #ff6b35);
    animation: spin 1s linear infinite;
    margin-bottom: 2rem;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
}

.loading-indicator span {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.loading-progress {
    width: 250px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    margin-top: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.loading-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary-color, #ff6b35) 0%, #ff9955 100%);
    border-radius: 5px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.game-error,
.game-placeholder,
.game-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(42, 54, 72, 0.95);
    z-index: 20;
    border-radius: 20px;
    overflow: hidden;
}

.game-error .error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.game-error .error-message {
    text-align: center;
    padding: 2rem;
    max-width: 80%;
}

.game-error h3 {
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.game-error p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

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

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

/* 游戏容器内的iframe样式 */
.game-container .iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    background-color: #000;
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: opacity;
}

.game-container .iframe-container iframe[src] {
    opacity: 1;
}

/* 强制性样式规则 - 确保顶部游戏容器正确显示 */
html body main .iframe-container {
    background: linear-gradient(135deg, #1a2238 0%, #2a3748 100%) !important;
    padding: 40px 30px !important;
    min-height: 650px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 60px auto !important;
    max-width: 1200px !important;
    width: 100% !important;
    position: relative !important;
    border-radius: 0 !important;
    overflow: visible !important;
    transform: none !important;
    transition: none !important;
    height: auto !important;
    padding-bottom: 0 !important;
}

/* 强制性背景样式 */
html body main .iframe-container::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, rgba(26, 34, 56, 0.8) 0%, rgba(42, 55, 72, 0.8) 100%) !important;
    z-index: -1 !important;
    border-radius: 0 !important;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.3) !important;
    transform: none !important;
}

/* 强制性游戏元素样式 */
html body main .iframe-container .game-placeholder,
html body main .iframe-container .game-loading,
html body main .iframe-container .game-error,
html body main .iframe-container iframe {
    position: relative !important;
    width: 100% !important;
    max-width: 1140px !important;
    margin: 0 auto !important;
    border-radius: 20px !important;
    background: rgba(45, 55, 72, 0.9) !important;
    min-height: 600px !important;
}

/* 移动端强制性样式 */
@media (max-width: 768px) {
    html body main .iframe-container {
        padding: 20px 15px !important;
        min-height: 500px !important;
        margin-bottom: 40px !important;
    }
    
    html body main .iframe-container .game-placeholder,
    html body main .iframe-container .game-loading,
    html body main .iframe-container .game-error,
    html body main .iframe-container iframe {
        min-height: 450px !important;
        border-radius: 15px !important;
    }
    
    html body main .iframe-container iframe {
        height: 500px !important;
        min-height: 500px !important;
    }
} 