/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    min-height: 100vh;
    padding: 40px;
    margin: 0;
    background: linear-gradient(45deg, #0f1016, #232b4a);
    position: relative;
    overflow-x: hidden;
    /* 启用硬件加速优化动画性能 */
    transform: translateZ(0);
    will-change: transform;
}

/* 添加多层星星效果 */
body::before {
    content: '';
    position: absolute;
    width: 300%;
    height: 300%;
    top: -100%;
    left: -100%;
    z-index: 0;
    background-image: 
        /* 大星星 - 明亮 */
        radial-gradient(circle, rgba(255,255,255,0.9) 0.5px, transparent 1px),
        /* 中等星星 - 中等亮度 */
        radial-gradient(circle, rgba(255,255,255,0.6) 0.5px, transparent 1px),
        /* 小星星 - 较暗 */
        radial-gradient(circle, rgba(255,255,255,0.4) 0.3px, transparent 0.8px),
        /* 微小星星 - 很暗 */
        radial-gradient(circle, rgba(255,255,255,0.2) 0.2px, transparent 0.5px),
        /* 星云效果 */
        radial-gradient(ellipse 400px 200px, rgba(100,150,255,0.1) 0%, transparent 50%);
    background-size: 
        800px 800px,
        600px 600px, 
        400px 400px,
        200px 200px,
        1200px 800px;
    background-position:
        0 0,
        100px 200px,
        300px 100px,
        500px 300px,
        200px 400px;
    animation: stars 180s linear infinite, twinkle 4s ease-in-out infinite alternate;
    /* 性能优化 */
    transform: translateZ(0);
    will-change: transform, opacity;
}

/* 添加流星效果 */
body::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, rgba(255,255,255,1), rgba(255,255,255,0));
    border-radius: 50%;
    box-shadow: 
        0 0 6px 2px rgba(255, 255, 255, 0.8),
        0 0 12px 4px rgba(100, 150, 255, 0.4),
        -20px -20px 40px 2px rgba(255, 255, 255, 0.2);
    animation: shootingStar 8s ease-in-out infinite;
    top: 10%;
    left: 80%;
}

/* 确保游戏容器在星空之上 */
.game-container {
    position: relative;
    z-index: 1;
    background-color: transparent;
    background: rgba(255, 255, 255, 0.95);
    margin-bottom: 40px;
}

/* 星星动画 - 更自然的移动 */
@keyframes stars {
    0% {
        transform: rotate(0deg) translateY(0) translateX(0);
    }
    25% {
        transform: rotate(2deg) translateY(-25%) translateX(10px);
    }
    50% {
        transform: rotate(0deg) translateY(-50%) translateX(0);
    }
    75% {
        transform: rotate(-2deg) translateY(-75%) translateX(-10px);
    }
    100% {
        transform: rotate(0deg) translateY(-100%) translateX(0);
    }
}

/* 星星闪烁动画 */
@keyframes twinkle {
    0% {
        opacity: 0.8;
        filter: brightness(1);
    }
    50% {
        opacity: 1;
        filter: brightness(1.2);
    }
    100% {
        opacity: 0.9;
        filter: brightness(0.9);
    }
}

/* 流星动画 - 更真实的轨迹 */
@keyframes shootingStar {
    0% {
        transform: translateX(100vw) translateY(-20vh) rotate(45deg) scale(0);
        opacity: 0;
    }
    5% {
        transform: translateX(95vw) translateY(-15vh) rotate(45deg) scale(1);
        opacity: 1;
    }
    15% {
        transform: translateX(70vw) translateY(10vh) rotate(45deg) scale(1);
        opacity: 1;
    }
    25% {
        transform: translateX(40vw) translateY(40vh) rotate(45deg) scale(0.8);
        opacity: 0.8;
    }
    35% {
        transform: translateX(10vw) translateY(70vh) rotate(45deg) scale(0.5);
        opacity: 0.4;
    }
    45% {
        transform: translateX(-20vw) translateY(100vh) rotate(45deg) scale(0);
        opacity: 0;
    }
    100% {
        transform: translateX(-20vw) translateY(100vh) rotate(45deg) scale(0);
        opacity: 0;
    }
}

/* 添加多个流星动画 */
@keyframes shootingStar2 {
    0% {
        transform: translateX(120vw) translateY(-10vh) rotate(35deg) scale(0);
        opacity: 0;
    }
    8% {
        transform: translateX(110vw) translateY(0vh) rotate(35deg) scale(1);
        opacity: 1;
    }
    20% {
        transform: translateX(80vw) translateY(30vh) rotate(35deg) scale(1);
        opacity: 1;
    }
    35% {
        transform: translateX(45vw) translateY(65vh) rotate(35deg) scale(0.7);
        opacity: 0.6;
    }
    50% {
        transform: translateX(10vw) translateY(100vh) rotate(35deg) scale(0.3);
        opacity: 0.2;
    }
    60% {
        transform: translateX(-10vw) translateY(120vh) rotate(35deg) scale(0);
        opacity: 0;
    }
    100% {
        transform: translateX(-10vw) translateY(120vh) rotate(35deg) scale(0);
        opacity: 0;
    }
}

@keyframes shootingStar3 {
    0% {
        transform: translateX(80vw) translateY(-30vh) rotate(55deg) scale(0);
        opacity: 0;
    }
    10% {
        transform: translateX(75vw) translateY(-20vh) rotate(55deg) scale(0.8);
        opacity: 0.8;
    }
    25% {
        transform: translateX(50vw) translateY(10vh) rotate(55deg) scale(1);
        opacity: 1;
    }
    40% {
        transform: translateX(20vw) translateY(45vh) rotate(55deg) scale(0.6);
        opacity: 0.5;
    }
    55% {
        transform: translateX(-10vw) translateY(80vh) rotate(55deg) scale(0.2);
        opacity: 0.1;
    }
    65% {
        transform: translateX(-30vw) translateY(110vh) rotate(55deg) scale(0);
        opacity: 0;
    }
    100% {
        transform: translateX(-30vw) translateY(110vh) rotate(55deg) scale(0);
        opacity: 0;
    }
}

/* 多个流星元素样式 */
.shooting-star {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
}

.shooting-star-1 {
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, rgba(255,255,255,1), rgba(255,255,255,0));
    box-shadow: 
        0 0 8px 3px rgba(255, 255, 255, 0.6),
        0 0 16px 6px rgba(100, 150, 255, 0.3),
        -25px -25px 50px 3px rgba(255, 255, 255, 0.15);
    animation: shootingStar2 12s ease-in-out infinite;
    animation-delay: 2s;
}

.shooting-star-2 {
    width: 1.5px;
    height: 1.5px;
    background: linear-gradient(35deg, rgba(255,200,100,1), rgba(255,200,100,0));
    box-shadow: 
        0 0 6px 2px rgba(255, 200, 100, 0.7),
        0 0 12px 4px rgba(255, 150, 50, 0.4),
        -15px -15px 30px 2px rgba(255, 200, 100, 0.2);
    animation: shootingStar3 15s ease-in-out infinite;
    animation-delay: 7s;
}

.shooting-star-3 {
    width: 1px;
    height: 1px;
    background: linear-gradient(55deg, rgba(150,200,255,1), rgba(150,200,255,0));
    box-shadow: 
        0 0 4px 1px rgba(150, 200, 255, 0.8),
        0 0 8px 2px rgba(100, 150, 255, 0.5),
        -10px -10px 20px 1px rgba(150, 200, 255, 0.3);
    animation: shootingStar2 10s ease-in-out infinite;
    animation-delay: 5s;
}

/* 游戏容器 */
.game-container {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 1000px;
    margin: 0 auto;
}

/* 通用隐藏类 */
.hidden { display: none !important; }

/* 模式标签 */
.mode-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 8px 0 14px;
}
.mode-tab {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: #bbb;
    cursor: pointer;
    transition: all .2s ease;
}
.mode-tab:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.mode-tab.active {
    color: #fff;
    background: linear-gradient(145deg, #1976D2, #1565C0);
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(21,101,192,0.35);
}

/* 关卡选择网格 */
.levels-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 14px;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef2f7 100%);
    border-radius: 12px;
}
.level-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform .15s ease, box-shadow .15s ease;
    cursor: pointer;
    position: relative;
}
.level-card:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,0.12); }
.level-card.locked { cursor: not-allowed; opacity: .6; }

/* 未点击过的关卡 - 半透明遮罩 */
.level-card.unplayed {
    position: relative;
}
.level-card.unplayed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    pointer-events: none;
    z-index: 1;
}

/* 已通关的关卡 - 正常显示（敞亮） */
.level-card.completed {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* 最后一次玩的关卡 - 突出显示 */
.level-card.last-played {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.3);
    border: 2px solid #2196F3;
    animation: pulse-glow 2s ease-in-out infinite;
}
.level-card.last-played:hover {
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
    transform: translateY(-3px);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(33, 150, 243, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(33, 150, 243, 0.5);
    }
}

.level-card .level-num { font-weight: 700; font-size: 18px; color: #1565C0; }
.level-card .stars { color: #FFC107; }
.level-card .best-time { font-size: 12px; color: #666; }
.level-card .lock { position: absolute; top: 8px; right: 8px; color: #999; }

/* 游戏主区域布局 */
.game-main {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    padding: 25px;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

#pause-overlay {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-color: rgba(15, 17, 26, 0.75);
    background-image: url('../image/sudoku.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: multiply;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    color: #ffffff;
    text-align: center;
    padding: 30px;
    z-index: 5;
    pointer-events: auto;
    cursor: pointer;
}

#pause-overlay.visible {
    display: flex;
}

.pause-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
}

.pause-content i {
    font-size: 48px;
}

.pause-content span {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 1px;
}

.right-button span {
    margin-left: 6px;
}

.game-main.paused .game-left,
.game-main.paused .game-left *,
.game-main.paused .control-panel,
.game-main.paused .control-panel * {
    pointer-events: none;
}

.game-main.paused .cell,
.game-main.paused .number-pad button {
    cursor: not-allowed !important;
    opacity: 0.7;
}

.game-main.paused .number-pad .delete-btn {
    opacity: 0.7;
}

.game-main.note-mode .cell.selected {
    border: 3px solid #2196F3;
    background-color: rgba(33, 150, 243, 0.1);
}

/* 左侧区域 */
.game-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: fit-content;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 15px;
}

/* 数独网格 */
.sudoku-grid {
    display: grid;
    grid-template-columns: repeat(9, 50px);
    gap: 1px;
    background: #999;
    border: 2px solid #333;
    width: fit-content;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.note-controls {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4ebf5 100%);
    border-radius: 12px;
    padding: 8px 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.note-controls-switch {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.note-controls .switch {
    margin: 0;
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.note-controls .switch span:first-child {
    font-size: 14px;
}

.candidate-switch {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15) 0%, rgba(33, 150, 243, 0.08) 100%);
}

.candidate-switch:hover {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.25) 0%, rgba(33, 150, 243, 0.15) 100%);
}

.note-mode-switch {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.08) 100%);
}

.note-mode-switch:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.25) 0%, rgba(76, 175, 80, 0.15) 100%);
}

.note-status {
    background: rgba(33, 150, 243, 0.08);
    border-left: 4px solid rgba(33, 150, 243, 0.6);
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 14px;
    color: #1f2a37;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.note-status.active {
    background: rgba(76, 175, 80, 0.12);
    border-color: rgba(76, 175, 80, 0.8);
    color: #1b5e20;
}

.note-status.flash {
    animation: noteFlash 0.6s ease;
}

@keyframes noteFlash {
    0% { box-shadow: 0 0 0 rgba(33, 150, 243, 0.4); }
    50% { box-shadow: 0 0 12px rgba(33, 150, 243, 0.5); }
    100% { box-shadow: 0 0 0 rgba(33, 150, 243, 0); }
}

.cell {
    width: 50px;
    height: 50px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-right: 1px solid #999;
    border-bottom: 1px solid #999;
    position: relative;
}

.cell::after {
    content: attr(data-notes);
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    font-size: 12px;
    color: #555;
    line-height: 1.1;
    white-space: pre-line;
    display: none;
    text-align: center;
    pointer-events: none;
}

.cell.show-notes::after {
    display: block;
}

/* 冲突笔记显示为红色加粗 */
.cell[data-conflict-notes]::after {
    color: #f44336;
    font-weight: 600;
}

.cell.show-candidates::after {
    content: attr(data-candidates);
    display: block;
}

.cell:nth-child(3n) {
    border-right: 2px solid #333;
}

.cell:nth-child(9n) {
    border-right: none !important;
}

.sudoku-grid > div:nth-child(n+19):nth-child(-n+27),
.sudoku-grid > div:nth-child(n+46):nth-child(-n+54) {
    border-bottom: 2px solid #333;
}

/* 控制面板 */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 150px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 15px;
}

/* 数字按钮面板 */
.number-pad {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    margin-top: 0px;
    padding: 15px;
    background: linear-gradient(135deg, #f1f8e9 0%, #dcedc8 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 游戏说明区域 */
.game-instructions {
    margin-top: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.instructions-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(33, 150, 243, 0.3);
}

.instructions-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.instruction-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #495057;
}

.instruction-item .bullet {
    color: #2196F3;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}

.instruction-item .text {
    flex: 1;
}

/* 按钮样式 */
button {
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(145deg, #4CAF50, #45a049);
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 数字按钮特殊样式 */
.number-pad button {
    width: 50px;
    height: 50px;
    font-size: 24px;
    background: linear-gradient(145deg, #4CAF50, #45a049);
    transition: all 0.3s ease;
}

/* 数字按钮选中状态 */
.number-pad .number.selected {
    background: linear-gradient(145deg, #1976D2, #1565C0) !important;
    transform: scale(0.95);
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

/* 游戏信息 */
.game-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 15px 25px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 难度选择 */
.difficulty-select {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.difficulty-select:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 在 style 标签中添加以式 */
.cell.conflict {
    background-color: #ffebee;
    color: #f44336;
}

.cell.hint {
    background-color: #e8f5e9;
    color: #4CAF50;
}

.cell.selected {
    background-color: #b8e0ff;
}

.cell.fixed {
    color: #1a237e;
    font-weight: bold;
}

.cell.user-input {
    color: #2196F3;
}

/* 游戏选项样式 */
.current-level-info {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15) 0%, rgba(33, 150, 243, 0.08) 100%);
    border-radius: 8px;
    border: 1px solid rgba(33, 150, 243, 0.3);
    margin-right: auto;
    margin-left: 0;
}

.level-badge {
    font-size: 14px;
    font-weight: 600;
    color: #1976D2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.level-badge span {
    color: #1565C0;
}

.game-options {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.mouse-mode {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.candidate-mode {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* 按钮悬浮效果 */
button:hover {
    background: linear-gradient(145deg, #2196F3, #1976D2) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 单元格悬浮效果 */
.cell:not(.fixed):hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

/* 错误提示动画 */
@keyframes errorShake {
    0% { transform: translateX(0); }
    25% { transform: translateX(3px); }
    75% { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}

.error-flash {
    animation: errorShake 0.4s ease;
    color: #f44336 !important;
    background: #ffebee;
}

/* 胜利动画容器 */
.victory-animation {
    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;
    animation: fadeIn 0.5s ease;
}

.victory-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.victory-text {
    font-size: 32px;
    color: #4CAF50;
    margin-bottom: 30px;
    font-weight: bold;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f00;
    animation: confetti-fall 3s linear infinite;
}

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

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

@keyframes confetti-fall {
    0% { transform: translateY(-100vh) rotate(0deg); }
    100% { transform: translateY(100vh) rotate(360deg); }
}

/* 控制面板按钮样式 */
.control-panel button {
    width: 100%;
    padding: 15px;
    font-weight: 500;
}

/* 按钮图标样式 */
.control-panel button i {
    font-size: 18px;
}

/* 删除键特殊样式 */
.number-pad .delete-btn {
    font-size: 36px;
    background: linear-gradient(145deg, #f44336, #e53935);
}

.number-pad .delete-btn:hover {
    background: linear-gradient(145deg, #2196F3, #1976D2) !important;
}

/* 选中状态的背��色 */
.cell.selected {
    background: #ffad4f !important; /* 替换为你想要的背景色 #e3f2fd*/
    box-shadow: inset 0 0 0 2px #2196F3;
}

/* 相同数字高亮 */
.cell.same-number {
    background: #f5c3fd; /* 替换为你想要的背景色 #f3e5f5，#f5c3fd*/
}

/* 数字按钮状态 */
.number-pad .number.completed {
    opacity: 0.6;
    background: linear-gradient(145deg, #9e9e9e, #757575) !important;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

.number-pad .number.completed:hover {
    background-color: #808080;
    transform: none;
    box-shadow: none;
}

.game-controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

.sound-mode {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* 美化复选框 */
.game-controls input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
    /* 优化按钮的悬浮效果 */
.right-button {
    transition: background 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.2s ease;
}

.right-button:hover {
    transform: scale(1.05);
    background: linear-gradient(145deg, #4CAF50, #45a049);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 添加光泽扫过动画 */
.right-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -200%;
    width: 80%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: left 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 0;
}

.right-button:hover::before {
    left: 100%;
}

/* 改进错误提示动画 */
.error-flash {
    animation: errorShake 0.4s cubic-bezier(0.25, 1.25, 0.5, 1.25);
    color: #f44336 !important;
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
}

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


/* 开关样式 */
.switch {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.switch input {
    display: none; /* 隐藏原始复选框 */
}

.slider {
    position: relative;
    width: 45px; /* 设置开关的宽度 */
    height: 20px; /* 设置开关的高度 */
    background-color: #aaa; /* 开关未选中时的背景 */
    border-radius: 34px; /* 圆角 */
    transition: background-color 0.2s;
    cursor: pointer; /* 手指指针 */
    margin-left: 10px; /* 标签和开关之间的间距 */
}

.slider::before {
    position: absolute;
    content: "";
    height: 15px; /* 内部圆的高度 */
    width: 15px; /* 内部圆的宽度 */
    left: 3px; /* 内部圆的初始位置 */
    bottom: 3px; /* 下边距 */
    background-color: white; /* 内部圆的颜色 */
    border-radius: 50%; /* 圆形 */
    transition: transform 0.2s; /* 圆形移动的过渡 */
}

/* 当复选框被选中时 */
input:checked + .slider {
    background-color: #4CAF50; /* 开关选中时的背景 */
}

input:checked + .slider::before {
    transform: translateX(25px); /* 圆形移动到右边 */
}