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

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

h1 {
    margin-bottom: 30px;
    color: #2c3e50;
}

/* 开始界面样式 */
#start-screen {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#start-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

#start-button:hover {
    background-color: #2980b9;
}

.image-selector {
    margin: 15px 0;
}

select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-left: 10px;
}

/* 拼图游戏区域样式 */
#puzzle-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#timer, #moves {
    display: inline-block;
    margin: 0 15px 20px;
    font-size: 16px;
}

#target-board {
    width: 400px;
    height: 400px;
    margin: 0 auto 30px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 2px;
    background-color: #ecf0f1;
    border: 2px solid #3498db;
    border-radius: 5px;
}

.target-cell {
    background-color: rgba(189, 195, 199, 0.3);
    border: 1px dashed #bdc3c7;
    position: relative;
}

#pieces-selection {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.puzzle-piece {
    width: 90px;
    height: 90px;
    background-size: cover;
    border: 2px solid #3498db;
    cursor: pointer;
    transition: transform 0.2s;
    border-radius: 3px;
}

.puzzle-piece:hover {
    transform: scale(1.05);
}

.puzzle-piece.placed {
    opacity: 0.5;
    cursor: not-allowed;
}

.placed-piece {
    width: 100%;
    height: 100%;
    background-size: cover;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 0;
}

#reset-button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

#reset-button:hover {
    background-color: #c0392b;
}

/* 胜利界面样式 */
#win-screen {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#win-screen h2 {
    color: #27ae60;
    margin-bottom: 20px;
}

#game-stats {
    margin-bottom: 20px;
    font-size: 18px;
}

#spin-button {
    background-color: #f39c12;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#spin-button:hover {
    background-color: #d35400;
}

/* 转盘样式 */
#wheel-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.wheel-outer {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 30px auto;
}

.wheel-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    transform: rotate(0deg);
    box-shadow: 0 0 0 5px #f39c12, 0 0 0 10px #e67e22;
}

/* 修改转盘文字样式 */
.prize-name {
    color: white;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    width: max-content;
}

/* 调整转盘扇形样式 */
.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: bottom right;
    overflow: visible; /* 允许文字溢出扇形区域 */
}

.pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid #e74c3c;
    z-index: 10;
}

#prize-result {
    margin-top: 30px;
    padding: 20px;
    background-color: #f1c40f;
    border-radius: 10px;
    color: #7f8c8d;
}

#prize-result h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

#play-again {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
}

#play-again:hover {
    background-color: #2980b9;
}

/* 通用样式 */
.hidden {
    display: none;
}

/* 响应式设计 */
@media (max-width: 600px) {
    #target-board {
        width: 300px;
        height: 300px;
    }
    
    .puzzle-piece {
        width: 65px;
        height: 65px;
    }
}

/* 新增样式 */
.placed-piece.correct {
    cursor: not-allowed;
    opacity: 1;
    border: 2px solid #2ecc71 !important;
}

.target-cell.correct-cell {
    background-color: rgba(46, 204, 113, 0.2);
    border: 2px solid #27ae60;
}

.puzzle-piece.correct {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #2ecc71;
}