/* 全局样式 */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #00b894;
    --dark-color: #2d3436;
    --light-bg: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* 导航栏样式 */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(45, 52, 54, 0.95) !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand i {
    -webkit-text-fill-color: var(--primary-color);
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* 主页横幅样式 */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50px, -50px); }
}

.hero-content h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    animation: slideInLeft 1s ease;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.3rem;
    animation: slideInLeft 1s ease 0.2s;
    animation-fill-mode: both;
}

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

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.6);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.7);
    color: white;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-2px);
}

/* 统计数据样式 */
.stats {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stats h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stats p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* 品牌LOGO样式 */
.brand-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
}

/* 手机模型样式 */
.phone-mockup-container {
    position: relative;
    max-width: 350px;
    margin: 0 auto;
    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;
}

.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);
}

.phone-gallery-section {
    background: radial-gradient(120% 120% at 50% 0%, rgba(108, 92, 231, 0.25) 0%, rgba(10, 14, 37, 0.92) 60%, #050712 100%);
    color: #fff;
    position: relative;
    overflow: visible;
}

.phone-gallery-section .section-tag {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 999px;
    background: rgba(108, 92, 231, 0.18);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.phone-gallery-section .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

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

.phone-landscape {
    position: relative;
    width: min(90vw, 860px);
    margin: 0 auto;
}

.phone-landscape-border {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 2;
}

.phone-landscape-screen {
    position: absolute;
    top: 6.7135%;
    left: 2.8125%;
    width: 93.59375%;
    height: 85.9485%;
    background: #000;
    border-radius: 4% 4% 4% 4% / 6% 6% 6% 6%;
    overflow: visible;
    z-index: 1;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.35);
}

.phone-landscape-screen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.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 4px 8px rgba(0, 0, 0, 0.3));
}

.phone-gallery-carousel .carousel-indicators {
    position: static;
    margin-top: 1.5rem;
}

.phone-gallery-carousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.4);
    margin: 0 6px;
}

.phone-gallery-carousel .carousel-indicators button.active {
    background-color: #fff;
}

/* 轮播图样式 */
.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;
}

.carousel-indicators {
    bottom: 10px;
    z-index: 10;
}

.carousel-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 4px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
}

.carousel-indicators button.active {
    background-color: #fff;
}

.carousel-control-prev,
.carousel-control-next {
    width: 30px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* 轮播图触摸滑动优化 */
.carousel-item {
    transition: transform 0.6s ease-in-out;
}

/* 手机模具内的轮播图指示器优化 */
.phone-screen-content .carousel-indicators {
    margin-bottom: 5px;
}

.phone-screen-content .carousel-indicators button {
    width: 6px;
    height: 6px;
    margin: 0 2px;
}

/* 确保轮播图在手机模具中完美适配 */
@media (max-width: 768px) {
    .phone-screen-content .carousel-control-prev,
    .phone-screen-content .carousel-control-next {
        display: none;
    }
}

/* 修复轮播切换时的遮罩问题 */
.carousel-item {
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.carousel-item.active {
    z-index: 10;
}

/* 确保轮播动画期间内容完全可见 */
.phone-landscape-screen {
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* 特色功能样式 */
.features-section {
    padding: 100px 0;
}

.feature-card {
    padding: 40px 30px;
    border-radius: 20px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h4 {
    color: var(--dark-color);
    font-weight: bold;
    margin-bottom: 15px;
}

.feature-card p {
    color: #636e72;
    line-height: 1.6;
}

/* 游戏分类样式 */
.games-section {
    padding: 100px 0;
}

.game-category {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 100%;
    transition: all 0.3s ease;
}

.game-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.category-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f2f6;
}

.category-header i {
    font-size: 3rem;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.category-header h3 {
    color: var(--dark-color);
    font-weight: bold;
    margin-bottom: 0;
}

.game-list {
    margin-bottom: 20px;
}

.game-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.game-item:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(5px);
}

.game-item i {
    margin-right: 12px;
    font-size: 1.2rem;
}

.game-item span {
    font-weight: 500;
}

/* 下载区域样式 */
.download-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 100px 0;
}

.download-content h2 {
    color: var(--dark-color);
    margin-bottom: 20px;
}

.download-content p {
    color: #636e72;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.download-features {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.download-features i {
    font-size: 1.2rem;
}

.download-buttons .btn {
    background: var(--gradient-secondary);
    border: none;
    padding: 15px;
    font-weight: 600;
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.download-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

.qr-code {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 250px;
    margin: 0 auto;
}

.qr-image {
    width: 180px;
    height: 180px;
    border-radius: 10px;
    object-fit: contain;
    display: block;
}

/* 页脚样式 */
.footer {
    background: var(--dark-color) !important;
}

.footer h5 {
    color: white;
    font-weight: bold;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.6);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin: 0 auto;
        text-align: center;
        width: 100%;
        max-width: 300px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 200px;
        padding: 12px 20px;
        font-size: 1rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
    }
    
    .phone-mockup-container {
        margin-top: 50px;
        max-width: 280px;
    }
    
    .phone-screen-content {
        top: 3.59375%;
        left: 6.7135%;
        width: 85.9485%;
        height: 93.59375%;
    }
    
    .phone-landscape {
        width: min(95vw, 600px);
    }
    
    .phone-gallery-carousel .carousel-control-prev,
    .phone-gallery-carousel .carousel-control-next {
        width: 12%;
    }
    
    .feature-card {
        margin-bottom: 30px;
    }
    
    .game-category {
        margin-bottom: 30px;
    }
    
    .download-section .row {
        flex-direction: column-reverse;
    }
    
    .qr-code {
        margin-bottom: 40px;
    }
    
    .stats {
        margin-top: 30px;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .nav-link {
        padding: 10px 0;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 12px 20px;
        font-size: 1rem;
        min-height: 48px;
    }
    
    .hero-buttons {
        margin: 0 auto;
        text-align: center;
        width: 100%;
        max-width: 280px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 180px;
        padding: 12px 18px;
        font-size: 0.95rem;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .phone-landscape {
        width: min(95vw, 600px);
    }
    
    .phone-gallery-carousel .carousel-indicators {
        margin-top: 1rem;
    }
    
    .category-header i {
        font-size: 2rem;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* 平滑滚动和加载动画 */
html {
    scroll-behavior: smooth;
}

/* 确保锚点跳转工作正常 */
html, body {
    scroll-padding-top: 80px; /* 为固定导航栏留出空间 */
}

/* 确保目标区域可见 */
section[id] {
    scroll-margin-top: 80px;
}

section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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