* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    height: 100vh;
    overflow: hidden;
    user-select: none;
}

#game-container {
    position: relative;
    width: 1024px;
    height: 768px;
    margin: 0 auto;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    overflow: hidden;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: linear-gradient(135deg, #2d3047 0%, #1c1e30 100%);
    padding: 40px;
    border-radius: 15px;
    border: 2px solid #4a4e8c;
    box-shadow: 0 0 30px rgba(74, 78, 140, 0.5);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.modal-content h2 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.5em;
    color: #6a9ee5;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(106, 158, 229, 0.5);
}

#player-name {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #4a4e8c;
    border-radius: 8px;
    color: #fff;
    margin-bottom: 25px;
    outline: none;
    transition: all 0.3s;
}

#player-name:focus {
    border-color: #6a9ee5;
    box-shadow: 0 0 15px rgba(106, 158, 229, 0.5);
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

button, .gender-btn {
    padding: 12px 30px;
    font-size: 1.1em;
    background: linear-gradient(135deg, #4a4e8c 0%, #3a3e6c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: bold;
    min-width: 120px;
}

button:hover, .gender-btn:hover {
    background: linear-gradient(135deg, #5a5eac 0%, #4a4e8c 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.gender-options {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.gender-btn {
    padding: 15px 40px;
    font-size: 1.3em;
}

/* 加载遮罩 */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(106, 158, 229, 0.3);
    border-top: 5px solid #6a9ee5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-text {
    font-size: 1.2em;
    color: #6a9ee5;
    font-weight: bold;
}

/* 键盘提示 */
#keyboard-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9em;
    color: #aaa;
    border-left: 3px solid #6a9ee5;
}

/* 响应式设计 */
@media (max-width: 1100px) {
    #game-container {
        width: 90vw;
        height: 70vh;
        margin-top: 5vh;
    }
    
    .modal-content {
        width: 95%;
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .modal-content h2 {
        font-size: 2em;
    }
    
    .gender-options {
        flex-direction: column;
        align-items: center;
    }
    
    #keyboard-hint {
        display: none;
    }
}