/* 随机转盘抽取器样式 */

/* 基础布局 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
    font-weight: 300;
    letter-spacing: 1px;
}

h1 i {
    margin-right: 10px;
    color: var(--primary-color);
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.left-panel {
    flex: 1;
    min-width: 300px;
}

.right-panel {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 液态毛玻璃卡片样式 */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 转盘容器 */
.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.wheel-header h2 {
    margin: 0;
    font-weight: 400;
    color: var(--text-color);
}

.wheel-controls {
    display: flex;
    gap: 10px;
}

.wheel-wrapper {
    position: relative;
    margin: 20px 0;
    width: 500px;
    height: 500px;
    max-width: 100%;
}

#wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--danger-color);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    z-index: 10;
}

.wheel-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    width: 100%;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

/* 按钮样式 */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-small {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary-bg);
    color: var(--text-color);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-dark);
    transform: translateY(-1px);
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

/* 结果区域 */
.results-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 400;
    color: var(--text-color);
}

.results-list {
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin-bottom: 15px;
}

.empty-results {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 20px;
}

.result-item {
    padding: 10px 15px;
    margin-bottom: 8px;
    background: var(--card-bg);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-index {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 10px;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.results-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 转盘列表和选项列表 */
.wheel-list-container,
.options-list-container {
    margin-bottom: 20px;
}

.wheel-list-header,
.options-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.wheel-list-header h4,
.options-list-header h4 {
    margin: 0;
    font-weight: 400;
    color: var(--text-color);
}

.wheel-list,
.options-list {
    max-height: 200px;
    overflow-y: auto;
}

.wheel-item,
.option-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
    cursor: pointer;
}

.wheel-item:hover,
.option-item:hover {
    background: rgba(0, 0, 0, 0.1);
}

.wheel-item.active,
.option-item.editing {
    background: var(--primary-light);
    border-left: 4px solid var(--primary-color);
}

.wheel-name {
    font-weight: 500;
}

.wheel-options-count {
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.option-name {
    flex: 1;
}

.option-weight {
    margin: 0 15px;
    font-size: 14px;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.item-actions {
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wheel-item:hover .item-actions,
.option-item:hover .item-actions {
    opacity: 1;
}

.item-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.item-action-btn:hover {
    color: var(--primary-color);
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 12px;
}

.current-wheel-info,
.quick-actions,
.data-actions {
    margin-top: 20px;
}

.quick-actions,
.data-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.data-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--card-border);
    font-size: 13px;
    color: var(--text-secondary);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--card-border);
}

.modal-header h3 {
    margin: 0;
    font-weight: 400;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--card-border);
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-secondary);
    font-size: 14px;
    border-top: 1px solid var(--card-border);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 1100px) {
    .main-content {
        flex-direction: column;
    }

    .wheel-wrapper {
        width: 400px;
        height: 400px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .wheel-wrapper {
        width: 300px;
        height: 300px;
    }

    .wheel-stats {
        flex-direction: column;
        gap: 15px;
    }

    .wheel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .wheel-controls {
        width: 100%;
        justify-content: center;
    }

    .btn-primary,
    .btn-secondary,
    .btn-danger {
        padding: 8px 16px;
    }
}

/* 浅色/深色模式变量 */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --primary-light: rgba(52, 152, 219, 0.1);
    --secondary-bg: rgba(255, 255, 255, 0.1);
    --secondary-hover: rgba(255, 255, 255, 0.2);
    --danger-color: #e74c3c;
    --danger-dark: #c0392b;
    --text-color: #333;
    --text-secondary: #666;
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    --bg-color: #e8f4fc;
    /* 浅蓝色背景 */
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #3498db;
        --primary-dark: #2980b9;
        --primary-light: rgba(52, 152, 219, 0.2);
        --secondary-bg: rgba(0, 0, 0, 0.2);
        --secondary-hover: rgba(0, 0, 0, 0.3);
        --danger-color: #e74c3c;
        --danger-dark: #c0392b;
        --text-color: #f0f0f0;
        --text-secondary: #aaa;
        --card-bg: rgba(0, 0, 0, 0.2);
        --card-border: rgba(255, 255, 255, 0.1);
        --bg-color: #0a1a2a;
        /* 深蓝色背景 */
    }
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}