/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

body {
    background-color: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

/* 转盘样式 */
.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 30px;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    transform: rotate(0deg);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    background: white;
}

.wheel svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* 确保转盘是圆形的 */
.wheel::before {
    content: '';
    display: block;
    padding-top: 100%;
}

/* 转盘中心点 */
.wheel::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #333;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #ff4757;
    z-index: 10;
}

/* 控制区域 */
.controls {
    margin-bottom: 30px;
}

.btn {
    padding: 12px 25px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0 10px;
}

.btn:hover {
    background-color: #3a7bc8;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.spin-btn {
    background-color: #ff4757;
    font-size: 18px;
    padding: 15px 40px;
    margin-bottom: 20px;
}

.spin-btn:hover {
    background-color: #ff6b81;
}

.result {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    min-height: 36px;
    margin-top: 15px;
}

/* 选项面板 */
.options-panel {
    background-color: #f1f2f6;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
}

.options-panel h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.input-group {
    display: flex;
    margin-bottom: 20px;
}

.input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 30px 0 0 30px;
    font-size: 16px;
    outline: none;
}

.input-group button {
    border-radius: 0 30px 30px 0;
    padding: 12px 20px;
}

.add-btn {
    background-color: #2ecc71;
}

.add-btn:hover {
    background-color: #27ae60;
}

/* 选项列表 */
.options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.option-item {
    background-color: white;
    padding: 8px 15px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.option-item span {
    margin-right: 8px;
}

.delete-btn {
    background: none;
    border: none;
    color: #ff4757;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

/* 预设选项 */
.preset-options h3 {
    color: #666;
    margin: 20px 0 15px;
    font-size: 16px;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.preset-btn {
    padding: 8px 15px;
    background-color: #dfe4ea;
    color: #333;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    background-color: #ced6e0;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .wheel-container {
        width: 250px;
        height: 250px;
    }
    
    .preset-buttons {
        justify-content: flex-start;
    }
}

/* 结果动画 */
.result {
    transition: opacity 0.2s ease-in-out;
}

/* 转盘容器增强 */
.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 30px;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    background: white;
}

/* 指针样式优化 */
.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 #ff4757;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
    z-index: 10;
}

.pointer::after {
    content: '';
    position: absolute;
    top: -28px;
    left: -5px;
    width: 10px;
    height: 10px;
    background: #ff4757;
    border-radius: 50%;
}

/* 按钮动画增强 */
.spin-btn {
    background: linear-gradient(145deg, #ff4757, #ff6b81);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
    transition: all 0.3s ease;
}

.spin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
}

.spin-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 71, 87, 0.3);
}

.spin-btn:disabled,
.spin-btn.spinning {
    background: #ccc;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.wheel.spinning {
    filter: drop-shadow(0 0 10px rgba(255, 71, 87, 0.5));
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 71, 87, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

.spin-btn.spinning::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 选项列表样式优化 */
.option-item {
    transition: all 0.2s ease;
}

.option-item:hover {
    transform: translateX(5px);
    background-color: #f8f9fa;
}

.delete-btn {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.option-item:hover .delete-btn {
    opacity: 1;
}

/* 预设按钮样式优化 */
.preset-btn {
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background-color: #4a90e2;
    color: white;
    transform: translateY(-2px);
}

/* 输入框样式优化 */
.input-group input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* 添加响应式优化 */
@media (max-width: 400px) {
    .wheel-container {
        width: 250px;
        height: 250px;
    }
    
    .pointer {
        border-left-width: 12px;
        border-right-width: 12px;
        border-top-width: 24px;
    }
}