* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

img {
    max-width: 100%;
}

h1 {
    color: rgb(60, 211, 91);
    text-align: center;
    padding: 40px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

ul {
    list-style: none;
}

.page-header {
    background-color: rgb(71, 19, 114);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.preview {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
}

.preview video {
    background-color: rgb(87, 17, 133);
    width: 100%;
    border: 5px solid rgb(26, 197, 92);
    margin-top: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.screenshots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 40px;
    row-gap: 40px;
    padding: 40px 0;
}

.screenshot {
    max-width: 320px;
    min-width: 280px;
    border-radius: 20px;
    border: 5px solid rgb(97, 15, 122);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.screenshot:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.game-wrapper {
    margin-left: auto;
    margin-right: auto;
    background-color: rgb(55, 13, 92);
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.webgl {
    outline: none;
    display: block;
}

.page-footer {
    background-color: rgb(57, 22, 115);
    color: rgb(25, 148, 68);
    padding: 20px;
    text-align: center;
    font-size: 1.2rem;
    box-shadow: 0 -4px 8px rgba(0,0,0,0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-footer button {
    padding: 10px 20px;
    background-color: rgb(60, 211, 91);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.page-footer button:hover {
    background-color: rgb(50, 180, 80);
    transform: scale(1.05);
}

/* 游戏控制界面样式 */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.game-controls button {
    padding: 15px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    color: white;
    border: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.game-controls button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

.game-controls #startButton {
    background-color: #4CAF50;
}

.game-controls #pauseButton {
    background-color: #FFC107;
}

.game-controls #exitButton {
    background-color: #f44336;
}

/* 游戏UI样式 */
#gameOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

#gameOverlay h1 {
    color: white;
    margin-bottom: 30px;
    font-size: 3rem;
    text-align: center;
    padding: 0;
}

#gameOverlay button {
    padding: 15px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    color: white;
    border: none;
    border-radius: 5px;
    margin: 10px;
    transition: all 0.3s ease;
    min-width: 200px;
    text-align: center;
}

#gameOverlay button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

#gameOverlay button:first-of-type {
    background-color: #4CAF50;
}

#gameOverlay button:last-of-type {
    background-color: #f44336;
}

#scoreDisplay {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 24px;
    font-family: Arial, sans-serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    z-index: 1001;
    background-color: rgba(0,0,0,0.7);
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 排行榜模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: rgba(71, 19, 114, 0.95);
    margin: 5% auto;
    padding: 30px;
    border: 3px solid rgb(60, 211, 91);
    border-radius: 15px;
    width: 80%;
    max-width: 700px;
    color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.modal-content h2 {
    color: rgb(60, 211, 91);
    text-align: center;
    margin-bottom: 20px;
    font-size: 2rem;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: white;
}

.leaderboard-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.leaderboard-controls button {
    padding: 10px 20px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.leaderboard-controls button:hover {
    background-color: #d32f2f;
    transform: scale(1.05);
}

#leaderboardTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#leaderboardTable th, #leaderboardTable td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid rgba(60, 211, 91, 0.3);
}

#leaderboardTable th {
    background-color: rgba(60, 211, 91, 0.2);
    color: rgb(60, 211, 91);
    font-size: 1.1rem;
}

#leaderboardTable tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

#leaderboardTable tr:hover {
    background-color: rgba(60, 211, 91, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
        padding: 20px;
    }
    
    .preview video {
        margin-top: 20px;
    }
    
    .screenshots {
        flex-direction: column;
        align-items: center;
        row-gap: 20px;
    }
    
    .screenshot {
        max-width: 90%;
    }
    
    #gameOverlay h1 {
        font-size: 2rem;
    }
    
    #gameOverlay button {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    #scoreDisplay {
        font-size: 18px;
        padding: 8px 16px;
    }

    .modal-content {
        width: 95%;
        padding: 15px;
    }

    #leaderboardTable th, #leaderboardTable td {
        padding: 8px;
        font-size: 0.9rem;
    }

    .page-footer {
        flex-direction: column;
        gap: 10px;
    }
}