/* Cyberpunk Flat Style for Global Game Box */
:root {
    --cyber-black: #050505;
    --cyber-dark: #0b0c15;
    --cyber-gray: #1a1b26;
    --cyber-cyan: #00f3ff;
    --cyber-pink: #ff003c;
    --cyber-yellow: #fcee0a;
    --cyber-purple: #bc13fe;
    --cyber-text-main: #f0f0f0;
    --cyber-text-muted: #a0aec0;
    
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    
    --glow-cyan: 0 0 10px rgba(0, 243, 255, 0.5), 0 0 20px rgba(0, 243, 255, 0.3);
    --glow-pink: 0 0 10px rgba(255, 0, 60, 0.5), 0 0 20px rgba(255, 0, 60, 0.3);
    
    --clip-path-corner: polygon(
        10px 0, 100% 0, 
        100% calc(100% - 10px), calc(100% - 10px) 100%, 
        0 100%, 0 10px
    );
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--cyber-black);
    color: var(--cyber-text-main);
    overflow-x: hidden;
    line-height: 1.6;
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center top;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}

p, .text-muted {
    color: var(--cyber-text-muted) !important;
}

.lead {
    color: #fff !important;
    font-weight: 500;
}

/* Navbar */
.navbar {
    background-color: rgba(5, 5, 5, 0.9) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 243, 255, 0.3);
    padding: 1rem 0;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--cyber-cyan) !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.5);
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(0, 243, 255, 0.5));
    border: 1px solid var(--cyber-cyan);
    border-radius: 50%; /* Logo可以保持圆形或改为方形 */
}

.nav-link {
    font-family: var(--font-mono);
    color: var(--cyber-text-main) !important;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem;
    transition: all 0.3s ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--cyber-cyan);
    transition: width 0.3s ease;
    box-shadow: 0 0 5px var(--cyber-cyan);
}

.nav-link:hover, .nav-link.active {
    color: var(--cyber-cyan) !important;
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.5);
}

.nav-link:hover::before {
    width: 100%;
}

.navbar-toggler {
    border-color: var(--cyber-cyan);
    border-radius: 0;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 243, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 80px;
    background: radial-gradient(circle at center, #1a1b26 0%, #050505 100%); /* 深邃的径向渐变背景 */
}

.hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.42;
    pointer-events: none;
}

.hero-canvas-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, var(--cyber-black), transparent);
    pointer-events: none;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-section .container {
    position: relative;
    z-index: 3;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 0px var(--cyber-pink), -2px -2px 0px rgba(0,243,255,0.5);
    line-height: 1.1;
}

.hero-content .lead {
    font-family: var(--font-mono);
    color: var(--cyber-cyan);
    font-size: 1.2rem;
    border-left: 3px solid var(--cyber-pink);
    padding-left: 1rem;
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    border-radius: 0;
    clip-path: var(--clip-path-corner);
    position: relative;
    transition: all 0.3s ease;
    border: none;
    padding: 15px 30px;
}

.btn-primary, .btn-outline-light {
    background: transparent;
    color: var(--cyber-cyan);
    border: 1px solid var(--cyber-cyan);
    box-shadow: inset 0 0 10px rgba(0, 243, 255, 0.2);
}

.btn-primary:hover, .btn-outline-light:hover {
    background: var(--cyber-cyan);
    color: var(--cyber-black);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.6);
    transform: translateY(-2px);
    border-color: var(--cyber-cyan);
}

.btn-outline-light {
    color: #fff;
    border-color: #fff;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
}

.btn-outline-light:hover {
    background: #fff;
    color: var(--cyber-black);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Stats */
.stats {
    background: rgba(26, 27, 38, 0.6);
    border: 1px solid rgba(0, 243, 255, 0.2);
    padding: 30px;
    margin-top: 3rem;
    clip-path: var(--clip-path-corner);
    position: relative;
}

.stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--cyber-cyan);
    border-left: 2px solid var(--cyber-cyan);
}

.stats::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--cyber-cyan);
    border-right: 2px solid var(--cyber-cyan);
}

.stats h3 {
    color: var(--cyber-yellow);
    font-family: var(--font-mono);
    text-shadow: 0 0 5px rgba(252, 238, 10, 0.5);
}

/* Phone Mockup */
.phone-mockup-container {
    position: relative;
    max-width: 350px;
    margin: 0 auto;
    z-index: 1;
    filter: drop-shadow(0 0 20px rgba(0, 243, 255, 0.2));
    animation: floatPhone 3s ease-in-out infinite;
}

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

.phone-frame {
    position: relative;
    width: 100%;
    height: auto;
}

.phone-border {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 2;
    filter: hue-rotate(180deg) brightness(1.2) contrast(1.2); /* 调整颜色使其更冷 */
}

.phone-screen-content {
    position: absolute;
    top: 3.59375%;
    left: 6.7135%;
    width: 85.9485%;
    height: 93.59375%;
    overflow: hidden;
    z-index: 1;
    background: #000;
    border-radius: 5% 5% 5% 5% / 4% 4% 4% 4%;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Gallery Section */
.phone-gallery-section {
    background-color: var(--cyber-dark);
    position: relative;
    border-top: 1px solid rgba(0, 243, 255, 0.1);
    border-bottom: 1px solid rgba(0, 243, 255, 0.1);
}

.phone-gallery-carousel {
    max-width: 920px;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

/* 手机容器：宽度跟随父级（即 carousel-item），高度自动撑开 */
.phone-landscape {
    position: relative;
    width: 100% !important; /* 强制填满 carousel-item */
    max-width: none !important; /* 移除之前的最大宽度限制 */
    margin: 0; /* 移除 auto margin，由父级控制居中 */
    background: transparent !important;
}

/* 手机边框图片 */
.phone-landscape-border {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 2;
    filter: hue-rotate(180deg) brightness(1.2) contrast(1.2);
    /* 移除 object-fit: contain，让图片自然撑开容器，保证屏幕定位准确 */
    object-fit: fill !important; 
}

/* 屏幕内容区域 */
.phone-landscape-screen {
    position: absolute;
    top: 6.7135%;
    left: 2.8125%;
    width: 93.59375%;
    height: 85.9485%;
    /* 关键修复：移除背景色，防止溢出黑块 */
    background: transparent !important; 
    border-radius: 4% 4% 4% 4% / 6% 6% 6% 6%;
    overflow: hidden; /* 确保截图不溢出圆角 */
    z-index: 1;
    /* 可选：保留内阴影增加真实感 */
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.phone-landscape-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 截图填满屏幕区域 */
    display: block;
}

.section-tag {
    background: transparent;
    border: 1px solid var(--cyber-pink);
    color: var(--cyber-pink);
    font-family: var(--font-mono);
    padding: 5px 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 10px rgba(255, 0, 60, 0.2);
    clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%);
}

.phone-gallery-carousel .carousel-indicators button {
    background-color: var(--cyber-cyan);
    opacity: 0.3;
    border-radius: 0;
    width: 30px;
    height: 3px;
    margin: 0 5px;
}

.phone-gallery-carousel .carousel-indicators button.active {
    opacity: 1;
    box-shadow: 0 0 8px var(--cyber-cyan);
}

.phone-gallery-carousel .carousel-control-prev,
.phone-gallery-carousel .carousel-control-next {
    width: 8%;
}

.phone-gallery-carousel .carousel-control-prev-icon,
.phone-gallery-carousel .carousel-control-next-icon {
    filter: invert(1) drop-shadow(0 0 5px var(--cyber-cyan));
}

/* 轮播图样式 */
.carousel {
    width: 100%;
    height: 100%;
}

.carousel-inner {
    width: 100%;
    height: 100%;
    overflow: visible;
    transform-style: preserve-3d;
}

.carousel-item {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* 默认图片样式 - 适用于内容截图 */
.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border: none;
    display: block;
}

/* 强制完整显示 */
.phone-border, 
.phone-landscape-border {
    object-fit: contain !important;
    height: auto !important;
}

/* Phone Gallery Center Mode Styles */
#phoneGallery .carousel-inner {
    overflow: visible;
    padding: 20px 0; /* 为缩放留出空间 */
}

#phoneGallery .carousel-item {
    width: 60%; /* 中间项宽度 */
    margin: 0 auto; /* 居中 */
    opacity: 1;
    z-index: 10;
    transition: transform 0.6s ease, opacity 0.6s ease;
    /* 修正 Bootstrap 可能的 float 干扰 */
    float: none; 
    margin-right: auto;
}

/* 激活项 */
#phoneGallery .carousel-item.active {
    display: block;
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.2);
}

/* Phone Gallery Flat Mode Styles (Final Fix) */
#phoneGallery {
    /* 确保容器有足够的空间显示辉光 */
    padding: 40px 0;
    overflow: visible;
}

#phoneGallery .carousel-inner {
    overflow: visible !important;
    position: relative;
    /* 给一个最小高度，防止 absolute 元素塌陷，或者通过 JS 控制 */
    min-height: 400px; /* 根据实际图片比例可能需要调整 */
    display: flex;
    justify-content: center;
    align-items: center;
}

#phoneGallery .carousel-item {
    /* 通用重置 */
    display: block !important; /* 覆盖 Bootstrap 的 display: none */
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 70%; /* 主图宽度 */
    max-width: 800px;
    height: auto;
    
    /* 默认状态：隐藏在中心 */
    opacity: 0;
    z-index: 1;
    transform: translate(-50%, -50%) scale(0.8);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    /* 消除 Bootstrap 干扰 */
    float: none;
    margin-right: 0;
    
    /* 关键修复：确保背景透明，无边框 */
    background: transparent !important;
    border: none !important;
}

.phone-landscape {
    /* 确保内部容器也是透明的 */
    background: transparent !important;
}

/* 激活项 (Active) - 居中高亮 */
#phoneGallery .carousel-item.active {
    opacity: 1;
    z-index: 20;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: none !important; /* 移除辉光效果 */
}

/* 左侧预览图 (Start Visible) */
#phoneGallery .carousel-item-start-visible {
    opacity: 0.4;
    z-index: 10;
    /* 向左平移：保持垂直居中，水平向左移动 */
    transform: translate(-120%, -50%) scale(0.85); 
    pointer-events: none;
}

/* 右侧预览图 (End Visible) */
#phoneGallery .carousel-item-end-visible {
    opacity: 0.4;
    z-index: 10;
    /* 向右平移 */
    transform: translate(20%, -50%) scale(0.85);
    pointer-events: none;
}

/* 修正 Bootstrap 动画冲突 */
.carousel-item-next, .carousel-item-prev, .carousel-item.active {
    display: block;
}

/* 响应式调整 */
@media (max-width: 992px) {
    #phoneGallery .carousel-inner {
        min-height: 300px;
    }
    #phoneGallery .carousel-item {
        width: 80%;
    }
}

@media (max-width: 768px) {
    #phoneGallery {
        padding: 20px 0;
        overflow: hidden; /* 防止横向滚动条 */
    }

    #phoneGallery .carousel-inner {
        min-height: auto;
        display: block; /* 恢复标准块级流 */
        overflow: hidden !important; /* 必须隐藏溢出 */
    }
    
    #phoneGallery .carousel-item {
        /* 彻底重置为默认状态 */
        position: relative !important;
        display: none; /* 默认隐藏 */
        float: left;
        width: 100%;
        margin-right: -100%;
        backface-visibility: hidden;
        transition: transform 0.6s ease-in-out;
        
        /* 清除之前的所有自定义偏移 */
        top: auto !important;
        left: auto !important;
        transform: none !important;
        opacity: 1 !important;
        z-index: auto !important;
    }

    /* 激活项显示 */
    #phoneGallery .carousel-item.active,
    #phoneGallery .carousel-item-next,
    #phoneGallery .carousel-item-prev {
        display: block !important;
    }

    /* 恢复 Bootstrap 5 标准动画逻辑 */
    #phoneGallery .carousel-item-next:not(.carousel-item-start),
    #phoneGallery .active.carousel-item-end {
        transform: translateX(100%) !important;
    }

    #phoneGallery .carousel-item-prev:not(.carousel-item-end),
    #phoneGallery .active.carousel-item-start {
        transform: translateX(-100%) !important;
    }
    
    /* 侧边预览图彻底隐藏 */
    #phoneGallery .carousel-item-start-visible,
    #phoneGallery .carousel-item-end-visible {
        display: none !important;
    }
}

.section-tag {


/* Features Section */
.features-section {
    background-color: var(--cyber-black);
    position: relative;
}

.feature-card {
    background: var(--cyber-gray);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 20px;
    border-radius: 0;
    clip-path: var(--clip-path-corner);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--cyber-cyan);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: transparent;
    border: 2px solid var(--cyber-cyan);
    border-radius: 0; /* Square */
    color: var(--cyber-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    box-shadow: inset 0 0 15px rgba(0, 243, 255, 0.2);
    transform: rotate(45deg); /* Diamond shape */
}

.feature-icon i {
    transform: rotate(-45deg); /* Counter rotate icon */
}

.feature-card:hover .feature-icon {
    background: var(--cyber-cyan);
    color: var(--cyber-black);
    transform: rotate(45deg) scale(1.1);
    box-shadow: 0 0 20px var(--cyber-cyan);
}

.feature-card h4 {
    color: #fff;
    margin-top: 15px;
}

/* Games Section */
.games-section {
    background-color: var(--cyber-dark) !important;
}

.game-category {
    background: rgba(26, 27, 38, 0.8);
    border: 1px solid rgba(255, 0, 60, 0.3);
    padding: 30px;
    border-radius: 0;
    clip-path: polygon(
        20px 0, 100% 0, 
        100% calc(100% - 20px), calc(100% - 20px) 100%, 
        0 100%, 0 20px
    );
    transition: all 0.3s ease;
}

.game-category:hover {
    border-color: var(--cyber-pink);
    box-shadow: 0 0 20px rgba(255, 0, 60, 0.2);
    transform: translateY(-5px);
}

.category-header {
    border-bottom: 1px solid rgba(255, 0, 60, 0.3);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.category-header i {
    color: var(--cyber-pink);
    font-size: 2.5rem;
    background: none;
    -webkit-text-fill-color: initial;
    text-shadow: 0 0 10px rgba(255, 0, 60, 0.5);
}

.category-header h3 {
    color: #fff;
    margin-top: 10px;
}

.game-item {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid transparent;
    border-radius: 0;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    color: #fff; /* 确保游戏名称是白色 */
}

.game-item:hover {
    background: rgba(255, 0, 60, 0.1);
    border-left-color: var(--cyber-pink);
    transform: translateX(5px);
    color: var(--cyber-cyan); /* Hover时变色 */
}

.game-item i {
    color: var(--cyber-cyan);
}

.game-item:hover i {
    color: var(--cyber-pink);
}

/* Download Section */
.download-section {
    background: linear-gradient(45deg, var(--cyber-black) 0%, #100010 100%);
    position: relative;
}

.download-content h2 {
    color: var(--cyber-cyan);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.download-features {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    border-radius: 0;
}

.download-features span {
    color: #fff; /* 确保功能描述文字是白色 */
}

.download-features i {
    color: var(--cyber-cyan) !important;
    text-shadow: 0 0 5px var(--cyber-cyan);
}

.download-buttons .btn {
    background: var(--cyber-pink);
    color: white;
    border: none;
    box-shadow: 0 0 15px rgba(255, 0, 60, 0.4);
    border-radius: 0;
}

.download-buttons .btn:hover {
    background: #ff1a53;
    box-shadow: 0 0 30px rgba(255, 0, 60, 0.7);
    transform: scale(1.02);
}

.qr-code {
    background: var(--cyber-gray);
    padding: 15px;
    border: 1px solid var(--cyber-cyan);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
    border-radius: 0;
    position: relative;
}

.qr-code::before, .qr-code::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--cyber-cyan);
    transition: all 0.3s ease;
}

.qr-code::before {
    top: -5px;
    left: -5px;
    border-right: none;
    border-bottom: none;
}

.qr-code::after {
    bottom: -5px;
    right: -5px;
    border-left: none;
    border-top: none;
}

.qr-image {
    border-radius: 0;
    filter: contrast(1.1);
}

/* Footer */
.footer {
    background-color: #000 !important;
    border-top: 2px solid var(--cyber-gray);
    padding-top: 3rem;
}

.footer h5 {
    color: var(--cyber-cyan);
    margin-bottom: 1.5rem;
}

/* Back to Top */
.back-to-top {
    background: var(--cyber-black);
    border: 1px solid var(--cyber-cyan);
    border-radius: 0;
    color: var(--cyber-cyan);
    width: 45px;
    height: 45px;
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top i {
    transform: rotate(-45deg);
}

.back-to-top:hover {
    background: var(--cyber-cyan);
    color: var(--cyber-black);
    box-shadow: 0 0 20px var(--cyber-cyan);
}

/* Animations */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.navbar-brand:hover {
    animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .phone-mockup-container {
        margin-top: 2rem;
    }
    
    .feature-card, .game-category {
        margin-bottom: 20px;
    }
    
    .stats {
        margin-top: 2rem;
        padding: 20px;
    }
}
