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

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    pointer-events: none;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    min-height: 100vh;
    padding: 20px;
}

/* 开始游戏页面 */
.start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
}

.start-box {
    background: transparent;
    border: none;
    padding: 50px 10px;
    border-radius: 25px;
    box-shadow: none;
    text-align: center;
    pointer-events: auto;
    animation: fadeInScale 0.5s ease-out;
}

/* 模式选择区域 */
.mode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.mode-buttons {
    display: flex;
    gap: 10px;
}

/* 游戏界面头部 */
.game-header {
    position: fixed;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 100;
}

.menu-btn {
    font-size: 1rem;
    font-weight: bold;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.settings-btn {
    font-size: 1rem;
    font-weight: bold;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.mode-btn {
    font-size: 1rem;
    font-weight: bold;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.mode-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    border-color: transparent;
}

.mode-name {
    font-size: 1rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 游戏主区域 - 左右布局 */
.game-main-area {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    align-items: flex-start;
}

.game-left-section {
    flex: 1.5;
}

.game-right-section {
    flex: 0.5;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 10px;
    margin: 10px;
    text-align: left;
}

.game-right-section h3 {
    font-size: 1.2rem;
    color: #000;
    margin-bottom: 12px;
    text-align: center;
}

.sign-list {
    max-height: 230px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sign-item {
    font-size: 0.95rem;
    color: #555;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 3px 10px;
    background: rgba(46, 204, 113, 0.05);
    width: 160px;
    box-sizing: border-box;
    text-align: center;
}

.sign-item:hover {
    background: rgba(46, 204, 113, 0.15);
    transform: translateX(5px);
}

.sign-item.selected {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    transform: translateX(5px);
}

.game-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.start-btn {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border: none;
    padding: 18px 60px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.4);
    margin-bottom: 30px;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(46, 204, 113, 0.5);
}

.game-rules {
    text-align: left;
    background: rgba(255, 255, 255, 0.95);
    padding: 25px 30px;
    border-radius: 15px;
}

.game-rules h3 {
    font-size: 1.4rem;
    color: #000;
    margin-bottom: 12px;
}

.game-rules p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
}

/* 准备倒计时 */
.ready-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
}

.ready-countdown {
    font-size: 8rem;
    font-weight: bold;
    color: #4CAF50;
    text-shadow: 0 0 20px rgba(76, 175, 80, 0.8);
    animation: scaleInOut 1s ease-in-out forwards;
}

@keyframes scaleInOut {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    20% {
        transform: scale(1.2);
        opacity: 1;
    }
    40% {
        transform: scale(1);
    }
    80% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* 游戏计时器 */
.timer-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.timer-text {
    font-size: 1rem;
    color: #666;
    margin-bottom: 5px;
}

.timer-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #e74c3c;
    text-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
}

.timer-value.warning {
    color: #e74c3c;
    animation: pulse 0.5s ease-in-out infinite;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: block;
    position: relative;
    z-index: 10;
}

.title {
    text-align: center;
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.game-area {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.main-game-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    max-width: 800px;
    margin: 0 auto;
}

.left-panel, .center-panel, .right-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.right-panel {
    gap: 16px;
}

.left-panel h3, .center-panel h3, .right-panel h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.target-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 30px;
    background: #fff;
    border-radius: 15px;
    min-height: 240px;
    justify-content: center;
}

.target-name {
    font-size: 1.9rem;
    font-weight: 700;
    color: #000;
    background: #fff;
    padding: 15px 25px;
    border-radius: 25px;
    text-align: center;
}

.validation-box {
    display: grid;
    grid-template-columns: repeat(2, 120px);
    grid-template-rows: repeat(2, 120px);
    gap: 0;
    width: 240px;
}

.validation-box.error-flash {
    animation: errorFlash 0.25s ease-in-out 4;
    border: 6px solid #ff4444;
    border-radius: 8px;
}

@keyframes errorFlash {
    0%, 100% {
        border-color: #ff0000;
        box-shadow: 0 0 30px rgba(255, 0, 0, 0.8), inset 0 0 20px rgba(255, 0, 0, 0.3);
    }
    50% {
        border-color: transparent;
        box-shadow: none;
    }
}

.slot {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    margin: 0;
}

.drop-zone {
    width: 120px;
    height: 120px;
    border: 3px dashed #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    transition: all 0.3s ease;
    position: relative;
}

.drop-zone.dragover {
    border-color: #667eea;
    background: #eef2ff;
}

.drop-zone.has-image {
    border-style: solid;
    border-color: #667eea;
    background: #fff;
}

.drop-zone img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

.drop-zone .remove-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drop-zone:hover .remove-btn {
    opacity: 1;
}

.drop-zone.has-image .remove-btn {
    opacity: 1;
}

.result {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    font-size: 1.35rem;
    font-weight: bold;
    transition: all 0.3s ease;
    border-radius: 15px;
    background: #f5f5f5;
    min-width: 200px;
}

.emoji-box {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    border: 2px solid #e6e6e6;
    border-radius: 18px;
    overflow: hidden;
}

.emoji-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
}

.emoji-box.has-emoji img {
    display: block;
}

.result.success {
    color: #2ecc71;
    background: #e8f5e9;
    animation: pulse 0.5s ease;
}

.result.failure {
    color: #e74c3c;
    background: #ffebee;
    animation: shake 0.5s ease;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes float-down {
    0% {
        transform: translateY(-100px) scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) scale(1);
        opacity: 0;
    }
}

@keyframes sway {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(20px);
    }
    75% {
        transform: translateX(-20px);
    }
}

.firework-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.firework {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: float-up 3s ease-out forwards;
}



#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
}

.success-box {
    background: transparent;
    border: none;
    padding: 40px 60px;
    border-radius: 20px;
    box-shadow: none;
    pointer-events: auto;
    animation: fadeInScale 0.5s ease-out;
}

.failure-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
}

.failure-box {
    background: transparent;
    border: none;
    padding: 40px 60px;
    border-radius: 20px;
    box-shadow: none;
    pointer-events: auto;
    animation: fadeInScale 0.5s ease-out;
}

.failure-emoji {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.failure-emoji img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.failure-text {
    font-size: 2.5rem;
    font-weight: bold;
    color: #e74c3c;
    text-shadow: 0 4px 20px rgba(231, 76, 60, 0.5);
    animation: shake 0.5s ease-in-out infinite;
}

/* 乌云下雨动画 */
.rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

/* 雨珠层 - 在下层 */
.rain-drops {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.rain-drop {
    position: absolute;
    width: 3px;
    height: 20px;
    background: linear-gradient(to bottom, transparent, #74b9ff);
    border-radius: 0 0 5px 5px;
    opacity: 0.8;
}

@keyframes rainFall {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0.3;
    }
}

/* 乌云层 - 在上层，遮住顶部的雨珠 */
.clouds-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px; /* 顶部一行高度 */
    z-index: 2;
    background: linear-gradient(to bottom, 
        rgba(108, 122, 137, 0.95) 0%, 
        rgba(108, 122, 137, 0.85) 70%, 
        rgba(108, 122, 137, 0) 100%
    );
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10px;
}

.cloud {
    position: relative;
    width: 150px;
    height: 80px;
    background: #6c7a89;
    border-radius: 50px;
    margin: 0 -20px;
    animation: cloudFloat 3s ease-in-out infinite;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.cloud::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: #6c7a89;
    border-radius: 50%;
    top: -40px;
    left: 20px;
}

.cloud::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: #6c7a89;
    border-radius: 50%;
    top: -50px;
    right: 10px;
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: slideIn 0.5s ease-out;
}

.failure-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: slideInShake 0.6s ease-out;
}

.game-over-text {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInScale 0.3s ease-out;
}

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

@keyframes slideInShake {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }
    20% {
        transform: translateY(0) translateX(-10px);
    }
    40% {
        transform: translateY(0) translateX(10px);
    }
    60% {
        transform: translateY(0) translateX(-5px);
    }
    80% {
        transform: translateY(0) translateX(5px);
    }
    100% {
        transform: translateY(0) translateX(0);
        opacity: 1;
    }
}

.success-emoji {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-emoji img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.success-text {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2ecc71;
    text-shadow: 0 4px 20px rgba(46, 204, 113, 0.5);
    animation: pulse 1s ease-in-out infinite;
}

.failure-text {
    font-size: 4rem;
    font-weight: bold;
    color: #e74c3c;
    text-shadow: 0 4px 20px rgba(231, 76, 60, 0.5);
    animation: shake 0.5s ease-in-out infinite;
}

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

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.countdown {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
    background: rgba(46, 204, 113, 0.1);
    border: 2px solid #2ecc71;
    padding: 15px 40px;
    border-radius: 50px;
    animation: countdownPulse 1s ease-in-out infinite;
}

.failure-countdown {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
    background: rgba(231, 76, 60, 0.1);
    border: 2px solid #e74c3c;
    padding: 15px 40px;
    border-radius: 50px;
    animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.selection-section {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.selection-section h2 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.puzzle-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 12px;
    max-width: 100%;
    margin: 0 auto;
}

.puzzle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: grab;
    transition: all 0.2s ease;
    padding: 8px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.puzzle-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.puzzle-item.dragging {
    opacity: 0.6;
    transform: scale(1.1);
    cursor: grabbing;
}

.puzzle-item.selected {
    outline: 3px solid #4CAF50;
    outline-offset: 2px;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
    cursor: pointer;
}

.puzzle-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

@media (max-width: 1200px) {
    .main-game-section {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .result {
        min-width: auto;
    }
}

@media (max-width: 900px) {
    .puzzle-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(6, 1fr);
    }
    
    .title {
        font-size: 1.8rem;
    }
}

@media (max-width: 600px) {
    .puzzle-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(9, 1fr);
    }
    
    .validation-box {
        grid-template-columns: repeat(2, 100px);
        grid-template-rows: repeat(2, 100px);
        width: 200px;
    }
    
    .drop-zone {
        width: 100px;
        height: 100px;
    }
    
    .puzzle-item img {
        width: 50px;
        height: 50px;
    }
    
    .target-letter {
        font-size: 3rem;
    }
    
    .target-name {
        font-size: 1rem;
    }
}

/* 设置弹窗样式 */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.settings-box {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 20px;
    padding: 30px;
    min-width: 350px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.settings-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.settings-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.settings-close-btn:hover {
    color: #ff4444;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setting-item label {
    font-size: 1rem;
    font-weight: 600;
    color: #555;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2ecc71, #27ae60);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2ecc71, #27ae60);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider-value {
    min-width: 60px;
    text-align: right;
    font-weight: bold;
    color: #2ecc71;
    font-size: 1rem;
}

/* 菜单弹窗样式 */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.menu-box {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 20px;
    padding: 30px;
    min-width: 350px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.menu-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.menu-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.menu-close-btn:hover {
    color: #ff4444;
}

.menu-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.menu-btn-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    background: linear-gradient(145deg, #f8f8f8, #e8e8e8);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    color: #333;
    text-align: center;
}

.menu-btn-item:hover {
    background: linear-gradient(145deg, #e8e8e8, #d8d8d8);
}

#quitGameBtn {
    background: linear-gradient(145deg, #f44336, #d32f2f);
    color: white;
    text-align: center;
}

#quitGameBtn:hover {
    background: linear-gradient(145deg, #d32f2f, #c62828);
}

#returnStartBtn {
    background: linear-gradient(145deg, #2196F3, #1976D2);
    color: white;
    text-align: center;
}

#returnStartBtn:hover {
    background: linear-gradient(145deg, #1976D2, #1565C0);
}
