:root {
    --bg-primary: #0f0f23;      /* 深邃星空蓝 */
    --bg-secondary: #1a1a2e;     /* 卡片背景 */
    --accent-primary: #00d4aa;   /* 霓虹青 */
    --accent-secondary: #ff6b90;  /* 霓虹粉 */
    --accent-secondary--literal: #5be9fc;  /* 霓虹粉 */
    --accent-glow: rgba(0, 212, 170, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --border-glow: rgba(0, 212, 170, 0.2);
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
    display: flex;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(ellipse at 20% 80%, rgba(0, 212, 170, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 107, 157, 0.15) 0%, transparent 50%);
    color: var(--text-primary);
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 80px;
    width: 100%; 
    padding-bottom: 20px;
}

.wheel-container {
    position: relative;
    width: 90vw;
    height: 90vw;
    max-width: 400px;            /* 最大不超过 400px */
    max-height: 400px;
    margin-bottom: 40px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: conic-gradient(
        from 0deg,
        var(--accent-primary) 0deg,
        var(--accent-secondary) 180deg,
        var(--accent-primary) 360deg
    );
    border: 3px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        inset 0 0 60px rgba(0, 0, 0, 0.5),
        0 0 40px var(--accent-glow);
}

.wheel-section {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    background: #02ffff;
    left: 0;
    transform-origin: 50% 50%;
    opacity: 1;
    transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 2;
}

.sector1-label {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: clamp(14px, 4vw, 20px); 
    font-weight: bold;
    text-align: center;
    z-index: 3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.sector2-label {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    color: #333333;
    font-size: clamp(14px, 4vw, 20px); 
    font-weight: bold;
    text-align: center;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.pointer {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 5;
}

.pointer-triangle {
    position: absolute;
    top: 2%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: clamp(8px, 3vw, 12px) solid transparent;
    border-right: clamp(8px, 3vw, 12px) solid transparent;
    border-top: clamp(20px, 8vw, 32px) solid #ff3366;
    border-top-color: #ff3366;
    filter: drop-shadow(0 0 10px #ff3366);
}

.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;  
    transform: translate(-50%, -50%);
    width: clamp(12px, 5vw, 20px);      
    height: clamp(12px, 5vw, 20px);
    border-radius: 50%;
    border: 3px solid #fff;
    z-index: 10;
    background: radial-gradient(circle, #ffffff 0%, var(--accent-primary) 100%);
    box-shadow: 0 0 20px var(--accent-primary);
}

.result {
    margin-top: 30px;
    font-size: 32px;
    font-weight: bold;
    min-height: 50px;
      
    /* 初始状态 */
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    filter: none;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* 渐变文字 */
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary--literal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    /* 霓虹光晕 */
    filter: drop-shadow(0 0 10px rgba(0, 212, 170, 0.5));
    text-align: center;
}

.result.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 10px rgba(0, 212, 170, 0.5));
    animation: resultGlow 2s ease-in-out infinite alternate;
}

@keyframes resultGlow {
    from {
        filter: drop-shadow(0 0 10px rgba(6, 233, 233, 0.5));
    }
    to {
        filter: drop-shadow(0 0 20px rgba(0, 212, 170, 0.8)) 
                drop-shadow(0 0 40px rgba(255, 107, 157, 0.4));
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;        /* 改为圆角矩形，原来是 999px */
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 霓虹光效 */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    box-shadow: 0 0 20px currentColor;   /* 霓虹发光 */
    transform: translateY(-2px);
}

.btn:active {
    transform: scale(0.96);
}

.config-btn {
    width: 120px;
    height: 40px;
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.config-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--accent-primary);
}

.spin-btn {
    margin-top: 24px;
    width: 220px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-primary), #00a884);
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.spin-btn:hover {
    box-shadow: 0 0 30px var(--accent-primary), 0 0 60px rgba(0, 212, 170, 0.3);
}

.spin-btn[disabled] {
    background: #333;
    color: #666;
    box-shadow: none;
    cursor: not-allowed;
}

.footer {
    margin-top: auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0.6;
    cursor: pointer;
    user-select: none;
}

.footer-text {
    font-size: 14px;
    color: #666;
    text-decoration: underline;
}

.footer-icon {
    font-size: 12px;
    color: #666;
}

.config-mask {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;  
    opacity: 0;             /* 完全透明 */
    pointer-events: none;   /* 不响应鼠标 */
    transition: opacity 0.3s;  /* 淡入淡出动画 */
    backdrop-filter: blur(10px);
    background: rgba(15, 15, 35, 0.8);
}

/* 显示状态 */
.config-mask.show {
  opacity: 1;
  pointer-events: auto;   /* 恢复鼠标响应 */
}

.config-panel {
    width: 320px; 
    border-radius: 16px;
    padding: 32px;
    background: rgba(26, 26, 46, 0.9);
    border: 1px solid var(--border-glow);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

.config-title {
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 24px;
}

.config-row {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.config-label {
    min-width: 140px;
    max-width: 140px;
    font-size: 16px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.config-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s;
}

.config-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-glow);
}

.config-row-note {
    justify-content: flex-start;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.config-row-note .config-label {
    min-width: auto;
    color: var(--accent-primary);
}

.config-actions {
  margin-top: 32px;
  display: flex;
  justify-content: flex-end;
}

/* 配置弹窗按钮样式 - 与主按钮风格一致 */
.config-actions .btn-mini {
    margin-left: 10px;
    width: 90px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: transparent;
}

/* 取消按钮 - 霓虹粉风格 */
#cancelBtn {
    color: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

#cancelBtn:hover {
    background: var(--accent-secondary);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--accent-secondary);
    transform: translateY(-2px);
}

/* 确定按钮 - 霓虹青风格（与主按钮一致） */
#confirmBtn {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

#confirmBtn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--accent-primary);
    transform: translateY(-2px);
}

/* 按钮点击效果 */
.config-actions .btn-mini:active {
    transform: scale(0.96);
}

/* 光效动画 - 与主按钮一致 */
.config-actions .btn-mini::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.config-actions .btn-mini:hover::before {
    left: 100%;
}

/* 彩纸动画遮罩层 */
.confetti-mask {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 200;
    overflow: hidden;
}

/* 单个彩纸条 */
.confetti-item {
    position: absolute;
    will-change: transform, opacity;
    animation-fill-mode: forwards;
}

/* 基础下落动画 */
.confetti-fall {
    animation-name: confetti-drop;
    animation-timing-function: linear;
}

@keyframes confetti-drop {
    0% {
        transform: translateY(-10vh) rotate(var(--start-rotate, 0deg));
        opacity: 0;
    }
    8% {
        opacity: 1;
    }
    92% {
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) translateX(var(--drift-x, 0)) rotate(var(--end-rotate, 360deg));
        opacity: 0;
    }
}

.confetti-sway-1 {
    animation-name: sway-1;
    animation-timing-function: ease-in;
}

.confetti-sway-2 {
    animation-name: sway-2;
    animation-timing-function: ease-in;
}

@keyframes sway-1 {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) translateX(15vw) rotate(720deg);
        opacity: 0;
    }
}

@keyframes sway-2 {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) translateX(-15vw) rotate(-720deg);
        opacity: 0;
    }
}

.confetti-spiral {
    animation-name: spiral-fall;
    animation-timing-function: linear;
}

@keyframes spiral-fall {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) translateX(20vw) rotate(1080deg) scale(0.6);
        opacity: 0;
    }
}
