/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根元素样式 */
:root {
    --primary-color: #6a11cb;
    --primary-color-light: #2575fc;
    --secondary-color: #ff6b6b;
    --text-color: #333;
    --light-text: #666;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --border-radius: 12px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* 基础样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 游戏容器 */
.game-container {
    width: 100%;
    max-width: 600px;
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* 游戏标题 */
.game-header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
    color: white;
}

.game-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.game-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 游戏主内容 */
.game-main {
    padding: 30px;
}

/* 转盘容器 */
.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spinner-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    margin-bottom: 30px;
}

/* 转盘样式 */
.spinner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    transform-origin: center;
    transition: transform 3s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.spinner-section {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-origin: bottom center;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 转盘箭头 */
.spinner-arrow {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 30px solid var(--secondary-color);
    z-index: 10;
}

/* 旋转按钮 */
.spin-button {
    background: linear-gradient(135deg, var(--secondary-color), #ff8e53);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.spin-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.spin-button:active {
    transform: translateY(1px);
}

.spin-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-background);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
    color: white;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 30px 20px;
    text-align: center;
}

.task-result {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.6;
}

.modal-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

.new-task-button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.new-task-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.4);
}

.new-task-button:active {
    transform: translateY(0);
}