/* 基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #5A3823;
    color: #FFFFFF;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    overflow: hidden;
}

/* 顶部信息区 */
.top-panel {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 800px;
    padding: 10px;
    background-color: #000;
    border: 3px solid #D4AF37;
    position: relative;
}

.jackpot-panel, .score-panel {
    display: flex;
    flex-direction: column;
}

.label {
    font-size: 14px;
    margin-bottom: 5px;
    text-shadow: 1px 1px 0 #FFFF00;
}

.jackpot-value, .score-value {
    font-family: 'Digital Numbers', 'Courier New', monospace;
    font-size: 24px;
    padding: 5px 10px;
    background-color: #000;
    border: 2px solid #D4AF37;
    min-width: 120px;
    text-align: center;
}

.jackpot-value {
    color: #FFFF00;
    background-color: #000;
}

.score-value {
    color: #FFFFFF;
    background-color: #006400;
}

.win-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #FF0000;
    color: #FFFF00;
    padding: 5px 15px;
    border: 2px solid #D4AF37;
    display: none;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
}

/* 核心显示区 */
.game-container {
    position: relative;
    width: 90vmin;
    height: 90vmin;
    max-width: 500px;
    max-height: 500px;
    margin: 10px 0;
}

/* 外层跑马轨道 */
.raceway {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid #D4AF37;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.raceway-lights {
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: #808080;
    border: 1px solid #000;
}

.raceway-lights.active {
    background-color: #FF0000;
    box-shadow: 0 0 5px #FF0000;
}

.raceway-lights.highlight {
    background-color: #FFFF00;
    box-shadow: 0 0 10px #FFFF00;
}

/* 中间核心转盘 */
.core-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 3px solid #D4AF37;
    border-radius: 50%;
    background-color: #333;
    transition: transform 2s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.spinner-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: bottom right;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.spinner-segment:nth-child(1) { transform: rotate(0deg) skew(45deg); }
.spinner-segment:nth-child(2) { transform: rotate(45deg) skew(45deg); }
.spinner-segment:nth-child(3) { transform: rotate(90deg) skew(45deg); }
.spinner-segment:nth-child(4) { transform: rotate(135deg) skew(45deg); }
.spinner-segment:nth-child(5) { transform: rotate(180deg) skew(45deg); }
.spinner-segment:nth-child(6) { transform: rotate(225deg) skew(45deg); }
.spinner-segment:nth-child(7) { transform: rotate(270deg) skew(45deg); }
.spinner-segment:nth-child(8) { transform: rotate(315deg) skew(45deg); }

.segment-symbol {
    transform: skew(-45deg) rotate(22.5deg);
    font-size: 12px;
    font-weight: bold;
}

.spinner-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 50px;
    background-color: #D4AF37;
    z-index: 10;
}

.spinner-pointer::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background-color: #D4AF37;
    border-radius: 50%;
}

/* 底部操作区 */
.control-panel {
    display: flex;
    width: 100%;
    max-width: 800px;
    background-color: #000;
    border: 3px solid #D4AF37;
    padding: 15px;
    gap: 15px;
}

.section-title {
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
    color: #FFFF00;
}

.bet-section, .symbols-section, .functions-section {
    flex: 1;
}

.bet-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.bet-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 5px;
    background-color: #C02727;
    color: #FFFFFF;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s;
}

.bet-btn.active {
    border: 2px solid #FFFF00;
}

.bet-btn:active {
    transform: translateY(1px);
}

.bet-btn:disabled {
    background-color: #666;
    cursor: not-allowed;
}

.symbol-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.symbol-btn {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid #D4AF37;
    background-color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s;
}

.symbol-btn:active {
    transform: translateY(1px);
}

.symbol-btn.betted {
    background-color: #444;
    box-shadow: 0 0 5px #FFFF00;
}

.function-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.func-btn {
    height: 40px;
    border: none;
    border-radius: 5px;
    color: #FFFFFF;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s;
}

.func-btn:active {
    transform: translateY(1px);
}

.clear-btn {
    background-color: #27C027;
}

.start-btn {
    background-color: #2727C0;
}

.cashout-btn {
    background-color: #C02727;
}

.func-btn:disabled {
    background-color: #666;
    cursor: not-allowed;
}

/* 提示弹窗 */
.message-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #000;
    color: #FFFF00;
    padding: 15px 30px;
    border: 2px solid #FFFF00;
    font-weight: bold;
    display: none;
    z-index: 100;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .control-panel {
        flex-direction: column;
    }
    
    .top-panel {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .jackpot-panel, .score-panel {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .jackpot-value, .score-value {
        min-width: 100px;
        font-size: 20px;
    }
}