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

html,
body {
    width: 100%;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.container {
    text-align: center;
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    justify-items: center;
    align-items: center;
    width: min(94vw, 560px);
    min-height: 100dvh;
    margin-inline: auto;
    padding: 20px 0 24px;
}

/* 结果显示区域 */
.result-display {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    height: 40px;
    width: min(100%, 300px);
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    align-self: end;
    margin-bottom: 20px;
}

/* 转盘外包装 */
.wheel-wrapper {
    position: relative;
    width: min(88vw, 500px);
    aspect-ratio: 1 / 1;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-inline: auto;
}

/* 指针 */
.pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid #ff6b6b;
    z-index: 10;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
}

/* 转盘 */
.wheel {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.3));
    transition: transform 0.1s linear;
}

/* 转盘片段 - 扇形 */
.segment {
    transition: opacity 0.3s ease;
}

.segment:hover {
    opacity: 0.9;
}

.segment-1 {
    fill: #2ecc71;
}

.segment-2 {
    fill: #3498db;
}

.segment-3 {
    fill: #f39c12;
}

.segment-4 {
    fill: #9ccc65;
}

.segment-5 {
    fill: #95a5a6;
}

.segment-6 {
    fill: #8b6f47;
}

/* 文本样式 */
.text {
    fill: #fff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* 设置旋转中心为圆心 */
#wheelContent {
    transform-origin: 250px 250px;
}

/* 按钮 */
.spin-button {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    align-self: start;
    margin-top: 20px;
}

.spin-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.spin-button:active {
    transform: scale(0.95);
}

.spin-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 旋转动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinning {
    animation: spin 0.1s linear !important;
}
