/* 全局样式 */
:root {
    --primary-color: #2196F3;
    --secondary-color: #1976D2;
    --accent-color: #00ff9d;
    --text-color: #E3E3E3;
    --heading-color: #FFFFFF;
    --text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    --bg-color: #0a1929;
    --card-bg: rgba(255, 255, 255, 0.1);
    --spacing-unit: 0.5rem;
    --neon-glow: 0 0 10px var(--accent-color),
                 0 0 20px var(--accent-color),
                 0 0 30px var(--accent-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.4;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-weight: 400;
    font-size: 14px;
}

/* 标题文字 */
h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    text-shadow: var(--text-shadow);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 科技背景 */
.tech-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #0a192f, #112240, #1a365d, #2a4365);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    z-index: -1;
    opacity: 1;
}

.tech-background::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(4, 159, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 255, 157, 0.1) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

/* 导航栏 */
.header {
    background: rgba(10, 25, 41, 0.95);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 157, 0.2);
    box-shadow: 0 2px 10px rgba(0, 255, 157, 0.1);
    transition: all 0.3s ease;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

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

.company-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    text-shadow: var(--neon-glow);
    letter-spacing: 1px;
}

.company-name {
    font-size: 0.8rem;
    color: var(--text-color);
    letter-spacing: 0.5px;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* 导航链接 */
.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: rgba(25, 42, 86, 0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    transition: right 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.nav-links.active {
    right: 0;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    position: relative;
    transition: color 0.3s ease;
}

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

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

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

.contact-btn {
    background: var(--primary-color);
    color: white !important;
    border-radius: 25px;
    padding: 0.8rem 1.5rem !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 157, 0.3);
}

.contact-btn::after {
    display: none;
}

/* 英雄区域 */
.hero {
    padding: 8rem 1rem 4rem;
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(10, 25, 41, 0.8), rgba(10, 25, 41, 0.95));
    z-index: 1;
}

.hero-content {
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out forwards 0.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #00ff9d, #00a8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
    animation: float 8s ease-in-out infinite;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    opacity: 0.9;
    animation: fadeInUp 1s ease-out forwards 0.7s;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    animation: fadeInUp 1s ease-out forwards 0.9s;
}

/* 按钮样式 */
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2.5rem 0;
    animation: fadeInUp 1s ease-out forwards 1.1s;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    transition: transform 0.3s ease;
    transform: translateX(-100%);
}

.btn:hover::before {
    transform: translateX(0);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 255, 157, 0.2);
    border-color: var(--accent-color);
}

/* 统计数据区域 */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 0 2rem;
    animation: fadeInUp 1s ease-out forwards 1.3s;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 157, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-color), transparent);
    transition: height 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 255, 157, 0.2);
    border-color: rgba(0, 255, 157, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    text-shadow: var(--neon-glow);
    display: block;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-color);
    display: block;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 6rem 1rem 3rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding: 0 0.5rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}

/* 游戏区域 */
.games-section {
    padding: 2rem 1rem;
}

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

.section-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.section-description {
    font-size: 0.9rem;
}

/* 游戏导航 */
.games-nav {
    display: flex;
    overflow-x: auto;
    padding: 0.5rem;
    margin: 1rem 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 157, 0.1);
}

.games-nav::-webkit-scrollbar {
    display: none;
}

/* 游戏分类容器 */
.games-container {
    width: 100%;
    position: relative;
}

.game-category {
    display: none;
    width: 100%;
}

.game-category.active {
    display: block;
}

/* 导航按钮样式 */
.nav-btn {
    position: relative;
    padding: 0.8rem 1.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
    backdrop-filter: blur(5px);
}

.nav-btn:hover,
.nav-btn.active {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.nav-btn .btn-icon {
    margin-right: 0.5rem;
    font-size: 1.2em;
}

/* 游戏卡片网格布局 */
.game-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

@media (max-width: 768px) {
    .game-cards {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.5rem;
        padding: 0.5rem;
    }
}

.game-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    min-height: 320px;
    max-height: 400px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 255, 157, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(0, 255, 157, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.game-card img {
    width: 100%;
    height: 65%;
    object-fit: cover;
    border-bottom: 1px solid rgba(0, 255, 157, 0.2);
}

.card-content {
    padding: 0.5rem;
    background: rgba(10, 25, 41, 0.8);
    backdrop-filter: blur(5px);
}

.card-content h3 {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
    color: #fff;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.card-content p {
    display: none;
}

.tech-stats {
    display: none;
}

.tech-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(45deg, #00ff9d, #00a8ff);
    color: #0a1929;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.play-btn {
    width: 100%;
    padding: 0.4rem;
    background: linear-gradient(45deg, #00ff9d, #00a8ff);
    color: #0a1929;
    border: none;
    border-radius: 15px;
    font-size: 0.7rem;
    text-align: center;
    text-decoration: none;
    margin-top: 0.3rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    z-index: 1;
}

.btn-text {
    display: inline-block;
    color: #0a1929;
}

.btn-icon {
    display: inline-block;
    color: #0a1929;
}

.play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.play-btn:active::before {
    left: 100%;
}

/* 游戏弹窗 */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 41, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.game-modal-content {
    position: relative;
    width: 95%;
    height: 95%;
    background: rgba(10, 25, 41, 0.95);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 157, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.1);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 255, 157, 0.3);
    border-radius: 50%;
    color: var(--accent-color);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    padding: 0;
    text-shadow: var(--neon-glow);
    transition: all 0.3s ease;
}

.close-btn:active {
    transform: scale(0.9);
    background: rgba(0, 255, 157, 0.2);
}

.game-frame-container {
    width: 100%;
    height: 100%;
}

.game-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* 关于我们 */
.about {
    padding: 2rem 1rem;
}

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

.about-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
}

.about-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* 联系我们 */
.contact {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, rgba(10, 25, 41, 0.95) 0%, rgba(16, 39, 75, 0.95) 100%);
}

.contact-content {
    display: flex;
    justify-content: center;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 1.2rem 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 157, 0.1);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 255, 157, 0.15);
    border-color: rgba(0, 255, 157, 0.3);
}

.contact-icon {
    font-size: 1.8rem;
    color: var(--accent-color);
    width: 40px;
    display: flex;
    justify-content: center;
}

.contact-details h4 {
    color: var(--heading-color);
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.contact-details p {
    color: var(--text-color);
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* 响应式布局 */
@media (min-width: 768px) {
    .contact-info {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    
    .contact-icon {
        font-size: 2rem;
    }
}

@media (max-width: 767px) {
    .contact-info {
        grid-template-columns: 1fr;
    }
}

/* 页脚 */
.footer {
    background: rgba(10, 25, 41, 0.98);
    padding: 1rem;
    text-align: center;
    border-top: 1px solid rgba(0, 255, 157, 0.2);
}

.footer-bottom {
    font-size: 0.8rem;
    opacity: 0.8;
    color: var(--accent-color);
}

.footer-bottom p {
    margin: 0.3rem 0;
}