/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 菜单打开时，页面内容不可滚动 */
body.menu-open {
    overflow: hidden;
}

/* 移动端菜单背景遮罩 */
.nav-menu.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

/* 基础样式 */
body {
    font-family: 'Press Start 2P', cursive;
    background-color: #0b1120;
    color: #00f0ff;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* CRT扫描线效果 */
.crt-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
    opacity: 0.4;
    animation: scanline-flicker 0.15s infinite;
}

@keyframes scanline-flicker {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.35; }
}

/* 页面过渡效果 */
.page-transition {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #ff2a6d;
    z-index: 1001;
    transition: left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.page-transition.active {
    left: 100%;
}

/* 头部样式 */
.arcade-header {
    background-color: #1a1a2e;
    border-bottom: 4px solid #ff2a6d;
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 15px;
    text-shadow: 3px 3px 0 #ff2a6d;
    letter-spacing: 2px;
}

.logo h1 span {
    color: #ff2a6d;
    text-shadow: 3px 3px 0 #00f0ff;
}

.nav-menu ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-button {
    background-color: #1a1a2e;
    border: 2px solid #00f0ff;
    color: #00f0ff;
    padding: 10px 15px;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    cursor: pointer;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    position: relative;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 #00f0ff;
}

.nav-button:hover {
    background-color: #00f0ff;
    color: #1a1a2e;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #ff2a6d;
}

.nav-button.active {
    background-color: #ff2a6d;
    border-color: #ff2a6d;
    color: #1a1a2e;
    box-shadow: 4px 4px 0 #00f0ff;
}

/* 菜单按钮样式 */
.menu-toggle-btn, .close-menu-btn {
    display: none;
    background-color: #1a1a2e;
    border: 2px solid #00f0ff;
    color: #00f0ff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    box-shadow: 3px 3px 0 #ff2a6d;
    transition: all 0.2s;
}

.menu-toggle-btn:hover, .close-menu-btn:hover {
    background-color: #00f0ff;
    color: #1a1a2e;
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #ff2a6d;
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
    .arcade-header {
        padding: 15px;
        flex-direction: row;
        align-items: center;
    }
    
    .logo h1 {
        font-size: 18px;
        margin-bottom: 0;
        text-align: left;
    }
    
    .menu-toggle-btn {
        display: block;
    }
    
    .close-menu-btn {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        z-index: 102;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -300px;
        width: 250px;
        height: 100vh;
        background-color: #1a1a2e;
        border-left: 4px solid #ff2a6d;
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        z-index: 101;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-button {
        width: 100%;
        text-align: center;
    }
}

/* Banner轮播 */
.banner-section {
    padding: 30px 0;
    position: relative;
}

.banner-carousel {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border: 5px solid #ff2a6d;
    box-shadow: 0 0 20px rgba(255, 42, 109, 0.7);
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    position: relative;
    background-color: #1a1a2e;
}

.carousel-item img {
    width: 100%;
    /* height: auto; */
    height: 500px;
    display: block;
    /* object-fit: cover; */
    border: 4px solid #00f0ff;
}

/* 移动端轮播图大小调整 */
@media (max-width: 768px) {
    .banner-section {
        padding: 15px 0;
    }
    
    .banner-carousel {
        border-width: 3px;
        box-shadow: 0 0 15px rgba(255, 42, 109, 0.7);
    }
    
    .carousel-item img {
        height: 250px; /* 移动端高度减小一半 */
        border-width: 2px;
    }
    
    .carousel-caption {
        padding: 10px;
    }
    
    .carousel-caption h3 {
        font-size: 16px;
    }
    
    .carousel-controls .carousel-btn {
        font-size: 18px;
        width: 30px;
        height: 30px;
    }
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(10, 10, 30, 0.9);
    padding: 15px;
    border-top: 3px solid #ff2a6d;
}

.carousel-caption h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #ff2a6d;
}

.carousel-caption p {
    font-size: 12px;
    max-height: 60px;
    overflow: hidden;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
}

.carousel-btn {
    background-color: rgba(10, 10, 30, 0.8);
    border: 3px solid #00f0ff;
    color: #00f0ff;
    font-size: 24px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 3px 3px 0 #ff2a6d;
}

.carousel-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #ff2a6d;
}

.carousel-indicators {
    display: none; /* 隐藏轮播图指示点 */
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    gap: 10px;
}

.indicator {
    width: 15px;
    height: 15px;
    background-color: #0b1120;
    border: 2px solid #00f0ff;
    cursor: pointer;
    transition: all 0.2s;
}

.indicator.active {
    background-color: #ff2a6d;
    border-color: #ff2a6d;
}

/* 游戏分区样式 */
.games-section {
    padding: 40px 20px;
}

.section-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 30px;
    color: #ff2a6d;
    text-shadow: 3px 3px 0 #00f0ff;
    text-transform: uppercase;
}

.game-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.category-btn {
    background-color: #1a1a2e;
    border: 2px solid #00f0ff;
    color: #00f0ff;
    padding: 10px 15px;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 3px 3px 0 #00f0ff;
}

.category-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #ff2a6d;
}

.category-btn.active {
    background-color: #ff2a6d;
    border-color: #ff2a6d;
    color: #1a1a2e;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

.game-card {
    background-color: #1a1a2e;
    border: 4px solid #00f0ff;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 5px 5px 0 #00f0ff;
    cursor: pointer;
    transform: scale(1);
    text-decoration: none;
    display: block;
    color: inherit;
}

.game-card:hover {
    transform: scale(1.05) translate(-5px, -5px);
    box-shadow: 10px 10px 0 #ff2a6d;
    border-color: #ff2a6d;
}

.game-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 3px solid #00f0ff;
    image-rendering: pixelated;
}

.game-card-content {
    padding: 15px;
}

.game-card-title {
    font-size: 16px;
    margin-bottom: 10px;
    color: #ff2a6d;
}

.game-card-desc {
    font-size: 10px;
    height: 60px;
    overflow: hidden;
    margin-bottom: 15px;
}

.play-button {
    display: block;
    background-color: #00f0ff;
    color: #1a1a2e;
    text-align: center;
    padding: 10px;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s;
    cursor: pointer;
}

.play-button:hover {
    background-color: #ff2a6d;
    transform: scale(0.95);
}

/* 高分榜样式 */
.leaderboard-section {
    padding: 40px 20px;
    background-color: #1a1a2e;
    border-top: 5px solid #ff2a6d;
    border-bottom: 5px solid #ff2a6d;
}

.leaderboard-container {
    max-width: 1000px;
    margin: 0 auto;
}

.game-selector {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 30px;
    padding: 15px;
    background-color: #0b1120;
    border: 3px solid #00f0ff;
    color: #00f0ff;
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    cursor: pointer;
}

.leaderboard-table {
    overflow-x: auto;
    border: 4px solid #00f0ff;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: center;
    border: 2px solid #0b1120;
}

th {
    background-color: #ff2a6d;
    color: #1a1a2e;
    font-size: 14px;
}

td {
    background-color: #0b1120;
    font-size: 12px;
}

tr:nth-child(even) td {
    background-color: #121a30;
}

/* 页脚样式 */
.arcade-footer {
    background-color: #1a1a2e;
    padding: 30px 20px;
    text-align: center;
    border-top: 4px solid #00f0ff;
}

.footer-content p {
    font-size: 12px;
    margin-bottom: 10px;
}

/* 游戏详情页样式 */
.game-detail-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.game-detail-header {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
    background-color: #1a1a2e;
    padding: 20px;
    border: 4px solid #00f0ff;
    box-shadow: 5px 5px 0 #ff2a6d;
}

.game-detail-image {
    flex: 1;
    min-width: 300px;
    border: 3px solid #ff2a6d;
}

.game-detail-image img {
    width: 100%;
    height: auto;
    image-rendering: pixelated;
}

.game-detail-info {
    flex: 2;
    min-width: 300px;
}

.game-detail-title {
    font-size: 24px;
    color: #ff2a6d;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 #00f0ff;
}

.game-detail-description {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.game-detail-stats {
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.stat-label {
    color: #ff2a6d;
}

.play-now-button {
    display: inline-block;
    background-color: #00f0ff;
    color: #1a1a2e;
    padding: 15px 30px;
    font-size: 16px;
    text-decoration: none;
    margin-right: 15px;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 #ff2a6d;
}

.play-now-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #ff2a6d;
}

.upload-score-button {
    display: inline-block;
    background-color: #1a1a2e;
    border: 3px solid #ff2a6d;
    color: #ff2a6d;
    padding: 12px 25px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.upload-score-button:hover {
    background-color: #ff2a6d;
    color: #1a1a2e;
    transform: translate(-2px, -2px);
}

.game-instructions {
    margin-bottom: 40px;
    background-color: #1a1a2e;
    padding: 20px;
    border: 4px solid #00f0ff;
}

.game-instructions h3 {
    color: #ff2a6d;
    margin-bottom: 15px;
    font-size: 18px;
}

.game-instructions ul {
    list-style: none;
    padding-left: 20px;
}

.game-instructions li {
    margin-bottom: 10px;
    font-size: 14px;
    position: relative;
}

.game-instructions li:before {
    content: "►";
    color: #00f0ff;
    position: absolute;
    left: -20px;
}

/* 上传页面样式 */
.upload-section {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.upload-form-container {
    background-color: #1a1a2e;
    padding: 30px;
    border: 4px solid #00f0ff;
    box-shadow: 5px 5px 0 #ff2a6d;
}

.upload-form h3 {
    color: #ff2a6d;
    margin-bottom: 20px;
    text-align: center;
    font-size: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #00f0ff;
    font-size: 14px;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px;
    background-color: #0b1120;
    border: 3px solid #00f0ff;
    color: #00f0ff;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
}

.form-submit-button {
    width: 100%;
    background-color: #ff2a6d;
    color: #1a1a2e;
    padding: 15px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 #00f0ff;
}

.form-submit-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #00f0ff;
}

.file-upload-area {
    border: 3px dashed #00f0ff;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.file-upload-area:hover {
    border-color: #ff2a6d;
    background-color: rgba(255, 42, 109, 0.1);
}

.file-upload-text {
    font-size: 12px;
    color: #00f0ff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 20px;
    }
    
    .nav-menu ul {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-button {
        width: 200px;
        text-align: center;
    }
    
    .carousel-caption h3 {
        font-size: 14px;
    }
    
    .carousel-caption p {
        font-size: 10px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-detail-header {
        flex-direction: column;
    }
    
    .game-detail-info {
        text-align: center;
    }
    
    .play-now-button,
    .upload-score-button {
        display: block;
        margin: 10px auto;
    }
    
    th, td {
        padding: 10px 5px;
        font-size: 10px;
    }
    
    .game-categories {
        flex-direction: column;
        align-items: center;
    }
    
    .category-btn {
        width: 200px;
        text-align: center;
    }
}

/* 霓虹效果动画 */
@keyframes neon-flicker {
    0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% {
        opacity: 1;
    }
    20%, 21.999%, 63%, 63.999%, 65%, 69.999% {
        opacity: 0.4;
    }
}

.section-title,
.logo h1 {
    animation: neon-flicker 2s infinite alternate;
}



/* 像素化按钮点击效果 */
button:active,
.nav-button:active,
.play-button:active,
.play-now-button:active,
.upload-score-button:active,
.form-submit-button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0;
}

/* 隐藏文件上传输入框 */
#score-file-upload {
    display: none;
}