:root {
    --primary-color: #FF4757;
    --secondary-color: #2ED573;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --wheel-colors: #FF4757, #2ED573, #5352ED, #FFA502;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f5f6fa;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

.wheel-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 20px 0;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow);
    margin-top: 60px;
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: transform 0.05s ease;
    transform: rotate(-90deg);
}

.pointer {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 60px;
    z-index: 10;
}

/* 箭头主体 */
.pointer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 40px;
    background: linear-gradient(to bottom, #FFD700, #FFA500);
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.pointer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 25px;
    background: linear-gradient(to bottom, #FFD700, #FFA500);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.8));
}

/* 箭头装饰 */
.pointer-decoration {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8),
                inset 0 0 5px rgba(255, 165, 0, 0.5);
    z-index: 11;
}

.control-panel {
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.mode-switch {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--light-color);
    padding-bottom: 15px;
}

.mode-switch button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    background: var(--light-color);
    color: var(--dark-color);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-switch button.active {
    background: var(--primary-color);
    color: white;
}

.prize-list {
    margin: 15px 0;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
    scroll-behavior: smooth;
}

/* 自定义滚动条样式 */
.prize-list::-webkit-scrollbar {
    width: 8px;
}

.prize-list::-webkit-scrollbar-track {
    background: var(--light-color);
    border-radius: 4px;
}

.prize-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.prize-list::-webkit-scrollbar-thumb:hover {
    background: #ff5252;
}

.prize-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    padding: 10px;
    background: var(--light-color);
    border-radius: 6px;
    animation: slideIn 0.3s ease;
}

.prize-item input[type="text"] {
    flex: 2;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.prize-item input[type="number"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.prize-item button {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    background: #e74c3c;
    color: white;
    cursor: pointer;
}

.action-button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 6px;
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-button:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

.action-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.action-button:disabled:hover {
    background: #ccc;
    transform: none;
}

#editPanel, #playPanel {
    display: none;
}

#editPanel.active, #playPanel.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-display {
    text-align: center;
    margin-bottom: 20px;
    min-height: 120px;
}

#statusText {
    font-size: 36px;
    color: var(--dark-color);
    margin: 0;
    transition: all 0.3s ease;
}

.result-text {
    font-size: 24px;
    color: var(--primary-color);
    margin-top: 10px;
    min-height: 36px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.5s ease;
}

.result-text.show {
    opacity: 1;
    transform: translateY(0);
}

.scheme-controls {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.action-button.secondary {
    background: var(--secondary-color);
}

.action-button.secondary:hover {
    background: #26ae60;
}

.scheme-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    z-index: 1001;
    min-width: 350px;
}

.scheme-dialog h3 {
    margin: 0 0 20px 0;
    color: var(--dark-color);
    font-size: 24px;
    text-align: center;
}

.scheme-dialog input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.scheme-list {
    max-height: 200px;
    overflow-y: auto;
    margin: 10px 0;
}

.scheme-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scheme-item .delete-scheme {
    padding: 5px 10px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scheme-item:hover .delete-scheme {
    opacity: 1;
}

.scheme-dialog .dialog-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.prize-controls {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.prize-controls .action-button {
    margin: 0;
}

.action-button.warning {
    background: #e74c3c;
}

.action-button.warning:hover {
    background: #c0392b;
}

/* 自定义确认弹窗样式 */
.confirm-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    z-index: 1001;
    min-width: 350px;
    text-align: center;
}

.confirm-dialog h3 {
    margin: 0 0 20px 0;
    color: var(--dark-color);
    font-size: 24px;
}

.confirm-dialog p {
    margin: 20px 0;
    color: var(--dark-color);
    font-size: 16px;
}

.confirm-dialog .dialog-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-dialog .dialog-buttons button {
    padding: 10px 20px;
    min-width: 100px;
}

.smart-prize-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    z-index: 1001;
    min-width: 400px;
}

.smart-prize-dialog h3 {
    margin: 0 0 20px 0;
    color: var(--dark-color);
    font-size: 24px;
    text-align: center;
}

.smart-prize-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.smart-prize-item {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.smart-prize-item:hover {
    background: var(--light-color);
}

.smart-prize-inputs {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.smart-prize-inputs input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.input-hint {
    color: #666;
    font-size: 14px;
    margin: 5px 0 15px;
    text-align: center;
}

.app-header {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark-color);
}

.app-header h1 {
    font-size: 28px;
    margin: 0;
    margin-bottom: 5px;
}

.version {
    font-size: 14px;
    color: #666;
}

.app-footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    color: #666;
    border-top: 1px solid #eee;
}

.app-footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.app-footer a:hover {
    color: #ff5252;
}

/* 遮罩层样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.color-schemes {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.scheme-button {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    background: #f5f6fa;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.scheme-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.scheme-button.active {
    background: var(--primary-color);
    color: white;
}

.fullscreen-button {
    margin-left: auto;  /* 将按钮推到右侧 */
}

.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #f5f6fa;
    z-index: 9999;
    padding: 0;
    overflow: hidden;
}

.fullscreen-mode .container {
    margin: 0;
    padding: 0;
}

.fullscreen-mode .wheel-container {
    width: min(80vh, 80vw);  /* 稍微减小尺寸 */
    height: min(80vh, 80vw);
    margin: 0;
    background: none;
    box-shadow: none;
    position: fixed;
    top: 55%;  /* 将转盘稍微下移 */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
}

.fullscreen-mode #wheelCanvas {
    width: 100%;
    height: 100%;
}

.fullscreen-mode .control-panel,
.fullscreen-mode .app-header,
.fullscreen-mode .app-footer,
.fullscreen-mode .container > *:not(.wheel-container):not(.status-display) {
    display: none;
}

.fullscreen-mode .status-display {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    margin: 0;
    padding: 15px 0;  /* 减小上下内边距 */
    background: rgba(255, 255, 255, 0.9);
    z-index: 10001;
    transform: none;
}

.fullscreen-mode .status-display h1 {
    margin: 0;
    font-size: 32px;  /* 减小标题字号 */
}

.fullscreen-mode .result-text {
    font-size: 28px;
    margin-top: 10px;
    transform: none;
}

.fullscreen-hint {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    opacity: 0.8;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.9);
    transform: none;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fullscreen-hint .hint-main {
    color: #666;
    font-size: 24px;
    flex: 1;
    text-align: center;
}

.fullscreen-hint .hint-copyright {
    color: #888;
    font-size: 14px;
    margin-left: 20px;
    white-space: nowrap;  /* 防止文字换行 */
}

.fullscreen-hint .hint-copyright a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    margin-left: 5px;
}

.fullscreen-hint .hint-copyright a:hover {
    color: #ff5252;
}

.exit-fullscreen {
    position: fixed;
    top: 15px;  /* 调整退出按钮位置 */
    right: 30px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    z-index: 10001;
    transition: all 0.3s ease;
}

.exit-fullscreen:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.fullscreen-mode .pointer {
    z-index: 10001;
    position: fixed;
    left: 50%;
    top: calc(55% - min(40vh, 40vw) - 50px);  /* 相应调整指针位置 */
    transform: translateX(-50%);
}

.fullscreen-mode .wheel-container,
.fullscreen-mode .status-display,
.fullscreen-mode .fullscreen-hint {
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 单独为转盘设置动画 */
.fullscreen-mode .wheel-container {
    animation: wheelFadeIn 0.3s ease forwards;
}

@keyframes wheelFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}