* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 80px 1.5rem 2rem;
    margin: 0;
}
.navbar {
    height: 80px !important;
}
.container-main {
    max-width: 1400px;
    width: 100%;
    background: #ffffff;
    border-radius: 2rem;
    padding: 2rem;
    box-shadow: 0 5px 15px 2px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
	margin-top: 20px;
}

.header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9edf4;
}


h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: #333;
    text-align: center;
}


 h1 i {
    color: #0D6EFD;
    margin-right: 10px;
}


.tool-intro {
    margin-bottom: 1.5rem;
    padding: 0.8rem 1.2rem;
    background: #f0f7ff;
    border-radius: 10px;
    border-left: 4px solid #0D6EFD;
}

.tool-intro p {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
}

.tool-intro strong {
    color: #0b1a33;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

/* ===== 左侧转盘 ===== */
.wheel-panel {
    background: #f8f9fa;
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e9edf4;
}

.panel-title {
    font-weight: 600;
    color: #0b1a33;
    font-size: 1rem;
    margin-bottom: 0.8rem;
    border-bottom: 2px solid #0D6EFD;
    padding-bottom: 0.3rem;
    display: inline-block;
}

.wheel-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
	margin-top:20px;
    aspect-ratio: 1;
}

.wheel-container canvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #0D6EFD;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
    transition: 0.15s;
    z-index: 10;
    user-select: none;
    border: 4px solid white;
}

.wheel-center:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 6px 25px rgba(13, 110, 253, 0.5);
}

.wheel-center:active {
    transform: translate(-50%, -50%) scale(0.93);
}

.wheel-center.spinning {
    pointer-events: none;
    opacity: 0.7;
}

.wheel-center span {
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.wheel-pointer {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #ef4444;
    z-index: 5;
    filter: drop-shadow(0 2px 8px rgba(239, 68, 68, 0.4));
}

.wheel-result {
    text-align: center;
    margin-top: 1rem;
    padding: 0.8rem;
    background: #ffffff;
    border-radius: 0.8rem;
    border: 2px solid #e9edf4;
    font-size: 1.2rem;
    font-weight: 600;
    color: #0b1a33;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-result.win {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #92400e;
}

/* ===== 右侧面板 ===== */
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-section,
.history-section {
    background: #f8f9fa;
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e9edf4;
}

.prize-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 0.8rem;
}

.prize-list::-webkit-scrollbar {
    width: 4px;
}

.prize-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.prize-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: #ffffff;
    border-radius: 0.5rem;
    margin-bottom: 0.3rem;
    border: 1px solid #e2e8f0;
    transition: 0.15s;
}

.prize-item:hover {
    border-color: #0D6EFD;
}

.prize-item .color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid #e2e8f0;
}

.prize-item .prize-name {
    flex: 1;
    font-size: 0.9rem;
    color: #0b1a33;
}

.prize-item .prize-edit-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    transition: 0.15s;
}

.prize-item .prize-edit-btn:hover {
    color: #0D6EFD;
    background: #f0f4ff;
}

.prize-item .prize-delete-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    transition: 0.15s;
}

.prize-item .prize-delete-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

.prize-item .prize-color-input {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
}

.prize-item .prize-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.prize-item .prize-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.add-prize-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.prize-input {
    flex: 1;
    min-width: 100px;
    padding: 0.4rem 0.6rem;
    border: 1px solid #dce2ec;
    border-radius: 0.4rem;
    font-size: 0.85rem;
    outline: none;
}

.prize-input:focus {
    border-color: #0D6EFD;
}

.color-input {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid #dce2ec;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.btn-add-prize {
    padding: 0.3rem 0.8rem;
    background: #0D6EFD;
    color: white;
    border: none;
    border-radius: 0.4rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.15s;
    white-space: nowrap;
}

.btn-add-prize:hover {
    background: #0b5ed7;
}

.prize-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.btn-reset-prizes {
    padding: 0.2rem 0.8rem;
    background: #e9edf4;
    color: #475569;
    border: none;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.15s;
}

.btn-reset-prizes:hover {
    background: #dce2ec;
    color: #0b1a33;
}

.prize-count {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ===== 历史记录 ===== */
.history-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    color: #64748b;
}

.history-stats strong {
    color: #0b1a33;
}

.btn-clear-history {
    padding: 0.2rem 0.8rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.15s;
}

.btn-clear-history:hover {
    background: #dc2626;
}

.history-list {
    max-height: 220px;
    overflow-y: auto;
}

.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0.6rem;
    background: #ffffff;
    border-radius: 0.4rem;
    margin-bottom: 0.25rem;
    border: 1px solid #f1f4f9;
    font-size: 0.85rem;
}

.history-item .h-prize {
    font-weight: 600;
    color: #0b1a33;
}

.history-item .h-time {
    color: #94a3b8;
    font-size: 0.75rem;
}

.history-item .h-index {
    color: #cbd5e1;
    font-size: 0.7rem;
    margin-right: 0.4rem;
}

.empty-history {
    color: #94a3b8;
    font-style: italic;
    padding: 1rem 0;
    text-align: center;
    font-size: 0.9rem;
}

@media (max-width: 992px) { .d-lg-flex { display: none; } }

/* ===== 响应式 ===== */
@media (max-width: 820px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .right-panel {
        flex-direction: column;
    }
    .wheel-container {
        max-width: 400px;
    }
    .wheel-center {
        width: 80px;
        height: 80px;
        font-size: 0.85rem;
    }
}

@media (max-width: 500px) {
    .container-main {
        padding: 1rem;
    }
    .wheel-panel,
    .settings-section,
    .history-section {
        padding: 1rem;
        border-radius: 1rem;
    }
    .header h1 {
        font-size: 1.3rem;
    }
    .header .subtitle {
        display: none;
    }
    .wheel-container {
        max-width: 300px;
    }
    .wheel-center {
        width: 56px;
        height: 56px;
        font-size: 0.7rem;
    }
    .wheel-center span {
        font-size: 0.8rem;
    }
    .wheel-pointer {
        top: -14px;
        border-left-width: 14px;
        border-right-width: 14px;
        border-top-width: 28px;
    }
    .add-prize-row {
        flex-wrap: wrap;
    }
    .prize-input {
        min-width: 80px;
        flex: 1 1 100%;
    }
    .history-item {
        font-size: 0.75rem;
        flex-wrap: wrap;
        gap: 0.2rem;
    }
    .wheel-result {
        font-size: 1rem;
        min-height: 44px;
    }
}