/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%), 
              url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(255,255,255,.3)' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-blend-mode: overlay;
    animation: background-shift 30s ease infinite alternate;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    overflow-x: hidden;
    position: fixed;
    width: 100%;
    transition: all 0.5s ease;
}

.main-container {
    text-align: center;
    padding: 20px;
    margin-top: -100px;
}

/* 优化标题样式 - 减小尺寸并调整风格 */
h1 {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    background: linear-gradient(45deg, #FF69B4, #FF9E80, #FF69B4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 30px; /* 减小下边距 */
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8),
                2px 2px 0 rgba(0, 0, 0, 0.15); /* 减小文字阴影 */
    position: relative;
    z-index: 10;
    font-size: 40px; /* 减小字体大小 */
    font-weight: bold;
    letter-spacing: 2px; /* 减小字母间距 */
    animation: titlePulse 2s infinite;
    padding: 12px 25px; /* 减小内边距 */
    border: 2px solid rgba(255, 105, 180, 0.5); /* 减小边框宽度 */
    border-radius: 12px; /* 减小圆角 */
    display: inline-block; /* 使标题宽度适应内容 */
    transform-style: preserve-3d;
}

/* 修改标题背景 */
h1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9); /* 增加不透明度 */
    border-radius: 8px; /* 减小圆角 */
    z-index: -1;
    box-shadow: 0 4px 10px rgba(255, 182, 193, 0.3); /* 减小阴影 */
}

/* 优化光晕效果 */
h1::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: radial-gradient(circle, rgba(255, 105, 180, 0.4), rgba(255, 105, 180, 0) 70%);
    z-index: -2;
    border-radius: 14px;
    filter: blur(4px);
}

/* 调整标题脉动动画 - 减小幅度 */
@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); } /* 减小放大比例 */
}

/* 标题字符动画调整 */
.title-char {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    display: inline-block;
    animation: title-bounce 2s ease-in-out infinite;
    transform-style: preserve-3d;
    transform: translateZ(0);
}

/* 调整字符动画 - 减小幅度 */
@keyframes title-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); } /* 减小上下移动幅度 */
}

/* 移除装饰元素相关样式 */
.title-decoration {
    display: none;
}

/* 深色主题适配 */
body.dark-theme h1 {
    background: linear-gradient(45deg, #64FFDA, #00BFA5, #64FFDA);
    border-color: rgba(100, 255, 218, 0.5);
    text-shadow: 1px 1px 0 rgba(40, 44, 52, 0.8),
                2px 2px 0 rgba(0, 0, 0, 0.2);
}

body.dark-theme h1::before {
    background: rgba(40, 44, 52, 0.9);
    box-shadow: 0 4px 10px rgba(63, 81, 181, 0.3);
}

body.dark-theme h1::after {
    background: radial-gradient(circle, rgba(100, 255, 218, 0.4), rgba(100, 255, 218, 0) 70%);
}

/* 转盘容器样式 */
.wheel-container {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 0 auto;
}

/* 转盘样式 */
.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    transition: transform 5s cubic-bezier(0.25, 0.1, 0.25, 1);
    transform-style: preserve-3d;
    box-shadow: 0 0 50px rgba(255,182,193,0.4);
    border: 15px solid #fff;
    background: #fff;
    will-change: transform;
    backface-visibility: hidden;
}

/* 扇形区域样式 */
.sector {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: 100% 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    overflow: hidden;
}

.sector span {
    transform: rotate(-15deg) translateX(35px); /* 从-45度改为-15度，相当于顺时针旋转了30度 */
    white-space: nowrap;
    position: relative;
    left: 30px;
}

/* 各扇形区域的颜色和旋转角度 */
.one {
    background: linear-gradient(45deg, #FFB6C1, #FFC0CB);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.two {
    background: linear-gradient(45deg, #98FB98, #90EE90);
    transform: rotate(45deg);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.three {
    background: linear-gradient(45deg, #87CEEB, #00BFFF);
    transform: rotate(90deg);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.four {
    background: linear-gradient(45deg, #DDA0DD, #EE82EE);
    transform: rotate(135deg);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.five {
    background: linear-gradient(45deg, #FFA500, #FFD700);
    transform: rotate(180deg);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.six {
    background: linear-gradient(45deg, #40E0D0, #48D1CC);
    transform: rotate(225deg);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.seven {
    background: linear-gradient(45deg, #BA55D3, #DA70D6);
    transform: rotate(270deg);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.eight {
    background: linear-gradient(45deg, #FF69B4, #FFB6C1);
    transform: rotate(315deg);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

/* 按钮与指针样式 */
.button-with-pointer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

#spin-button {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(145deg, #FF4081, #FF80AB);
    border: 4px solid #fff;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 64, 129, 0.4);
    position: relative;
    z-index: 200;
    animation: buttonBreath 3s infinite ease-in-out;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

@keyframes buttonBreath {
    0%, 100% {
        transform: scale(1) translateZ(0);
        box-shadow: 0 6px 20px rgba(255, 64, 129, 0.4);
    }
    50% {
        transform: scale(1.05) translateZ(10px);
        box-shadow: 0 10px 25px rgba(255, 64, 129, 0.6);
    }
}

#spin-button:hover {
    transform: scale(1.1) translateZ(15px);
    box-shadow: 0 10px 30px rgba(255, 64, 129, 0.7);
}

#spin-button:active {
    transform: scale(0.95);
    box-shadow: 0 3px 10px rgba(255, 64, 129, 0.3);
}

#spin-button::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.5;
}

.pointer {
    position: absolute;
    bottom: 90%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 35px solid #FF69B4;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    animation: wiggle 1s infinite;
    z-index: 150;
}

.pointer::after {
    content: '';
    position: absolute;
    left: -23px;
    top: -3px;
    width: 0;
    height: 0;
    border-left: 23px solid transparent;
    border-right: 23px solid transparent;
    border-bottom: 38px solid #fff;
    z-index: -1;
}

/* 弹窗样式 */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background: white;
    padding: 35px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(255,182,193,0.3);
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 5px solid #FFB6C1;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes wiggle {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    25% { transform: translateX(-50%) rotate(-5deg); }
    75% { transform: translateX(-50%) rotate(5deg); }
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.popup h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.popup p {
    color: #34495e;
    margin-bottom: 20px;
    font-size: 18px;
}

#close-popup {
    background: #FFB6C1;
    color: white;
    border: 3px solid #fff;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

#close-popup:hover {
    background: #2980b9;
}

/* 右侧功能按钮区样式 */
.control-panel {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: linear-gradient(145deg, #FF69B4, #FFB6C1);
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255,182,193,0.3);
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255,182,193,0.5);
}

.control-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(255,182,193,0.2);
}

.control-btn.muted i::before {
    content: "\f6a9";
}

.control-btn.dark-theme i::before {
    content: "\f186";
}

/* 历史记录列表样式 */
#history-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
}

#history-list p {
    margin: 8px 0;
    padding: 8px;
    background: rgba(255, 182, 193, 0.1);
    border-radius: 5px;
    font-size: 16px;
}

#close-history {
    background: #FFB6C1;
    color: white;
    border: 3px solid #fff;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

#close-history:hover {
    background: #2980b9;
}
#history-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    background: transparent;
}

#history-popup .popup-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(255,182,193,0.3);
    animation: slideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 3px solid #FFB6C1;
    max-width: 300px;
    position: absolute;
    right: 100px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateX(100px) translateY(-50%) scale(0.8);
        box-shadow: 0 0 0 rgba(255,182,193,0);
    }
    50% {
        opacity: 0.8;
        transform: translateX(10px) translateY(-50%) scale(1.02);
    }
    70% {
        transform: translateX(-5px) translateY(-50%) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(-50%) scale(1);
        box-shadow: 0 8px 32px rgba(255,182,193,0.3);
    }
}

/* 3D立体可爱卡通风格的动态背景 */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    top: -50px;
    animation: float-animation linear infinite;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2));
    transform-style: preserve-3d;
    will-change: transform;
}

@keyframes float-animation {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 100px)) 
                   translateX(var(--path-x)) 
                   rotate(var(--rotate)) 
                   scale(0.8);
        opacity: 0;
    }
}

.cloud {
    position: absolute;
    width: 150px;
    height: 60px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    animation: cloud-float 20s linear infinite;
    z-index: -1;
}

.cloud:before, .cloud:after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.cloud:before {
    width: 80px;
    height: 80px;
    top: -30px;
    left: 25px;
}

.cloud:after {
    width: 60px;
    height: 60px;
    top: -20px;
    right: 25px;
}

@keyframes cloud-float {
    0% {
        transform: translateX(-150px);
    }
    100% {
        transform: translateX(calc(100vw + 150px));
    }
}

/* 3D立体可爱卡通风格的标题 */
h1 {
    position: relative;
    font-family: 'Comic Sans MS', 'Bubblegum Sans', cursive;
    text-shadow: none;
    background: none;
    color: #FF4081;
    padding: 20px 40px;
    margin-bottom: 50px;
    border: none;
    transform-style: preserve-3d;
    perspective: 500px;
}

h1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    border-radius: 20px;
    transform: translateZ(-10px);
    box-shadow: 
        0 10px 30px rgba(255, 64, 129, 0.3),
        0 0 0 5px rgba(255, 64, 129, 0.2);
    z-index: -1;
}

.title-char {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    display: inline-block;
    animation: title-bounce 2s ease-in-out infinite;
    transform-origin: bottom center;
    text-shadow: 
        3px 3px 0 #FF9E80,
        6px 6px 0 rgba(0, 0, 0, 0.1);
}

@keyframes title-bounce {
    0%, 100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
    30% {
        transform: translateY(-15px) scale(1.1) rotate(-5deg);
    }
    60% {
        transform: translateY(5px) scale(0.95) rotate(5deg);
    }
}

.title-decoration {
    display: inline-block;
    font-size: 1.2em;
    animation: spin-decoration 4s linear infinite;
    margin: 0 15px;
    vertical-align: middle;
}

.title-decoration.left {
    animation-direction: normal;
}

.title-decoration.right {
    animation-direction: reverse;
}

@keyframes spin-decoration {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 增强转盘的3D效果 */
.wheel-container {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.wheel {
    transform-style: preserve-3d;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.2),
        0 0 0 10px rgba(255, 255, 255, 0.8),
        0 0 0 15px rgba(255, 182, 193, 0.3);
}

/* 增强按钮的3D效果 */
#spin-button {
    transform-style: preserve-3d;
    position: relative;
    overflow: visible;
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.2),
        0 0 0 5px rgba(255, 255, 255, 0.5);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#spin-button::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    z-index: -1;
    filter: blur(5px);
}

/* 增强弹窗的3D效果 */
.popup-content {
    transform-style: preserve-3d;
    perspective: 1000px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.3),
        0 0 0 10px rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    overflow: hidden;
}

.popup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(90deg, #FF4081, #FF80AB, #FF4081);
    z-index: 1;
}

/* 增强控制按钮的3D效果 */
.control-btn {
    transform-style: preserve-3d;
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.2),
        0 0 0 3px rgba(255, 255, 255, 0.5);
}

.control-btn:hover {
    transform: scale(1.1) translateZ(10px);
}

/* 暗色主题样式 */
body.dark-theme {
    background-image: linear-gradient(135deg, #2c3e50 0%, #3498db 100%), 
                      url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(100, 255, 218, 0.1)' fill-rule='evenodd'/%3E%3C/svg%3E") !important;
    background-blend-mode: overlay;
    color: #E0E0E0;
}

body.dark-theme .wheel {
    border-color: #3F51B5;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 0 10px rgba(63, 81, 181, 0.5),
        0 0 0 15px rgba(100, 255, 218, 0.2);
}

body.dark-theme .pointer {
    border-bottom-color: #64FFDA;
}

body.dark-theme .pointer::after {
    border-bottom-color: #3F51B5;
}

body.dark-theme h1::before {
    background: #282C34;
    box-shadow: 
        0 10px 30px rgba(100, 255, 218, 0.3),
        0 0 0 5px rgba(63, 81, 181, 0.3);
}

body.dark-theme .popup {
    background: rgba(0, 0, 0, 0.7);
}

body.dark-theme .sound-style-btn {
    background: #282C34;
    border-color: #3F51B5;
    color: #E0E0E0;
}

body.dark-theme .sound-style-btn i {
    color: #64FFDA;
}

body.dark-theme .sound-style-btn.active {
    background: #3F51B5;
    border-color: #64FFDA;
}

body.dark-theme .sound-style-btn span {
    color: #E0E0E0;
}

body.dark-theme #history-list p {
    background: rgba(63, 81, 181, 0.2);
    color: #E0E0E0;
}

/* 暗色主题下的动画效果增强 */
body.dark-theme .floating-element {
    filter: drop-shadow(0 0 10px rgba(100, 255, 218, 0.5));
}

body.dark-theme .title-decoration {
    filter: hue-rotate(180deg);
}

body.dark-theme #spin-button {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(100, 255, 218, 0.4);
}

body.dark-theme .control-btn {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3),
                0 0 10px rgba(100, 255, 218, 0.3);
}

/* 暗色主题下的转场动画 */
.theme-transition {
    transition: all 0.5s ease;
}

/* 修改深色主题下弹窗顶部装饰条的样式 */
body.dark-theme .popup-content::before {
    background: linear-gradient(90deg, #3F51B5, #64FFDA, #3F51B5);
}

/* 修改深色主题下弹窗按钮的样式 */
body.dark-theme #close-popup,
body.dark-theme #close-history,
body.dark-theme #close-sound-popup,
body.dark-theme .control-btn-small {
    background: #3F51B5;
    border-color: #64FFDA;
    color: white;
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.2);
}

body.dark-theme #close-popup:hover,
body.dark-theme #close-history:hover,
body.dark-theme #close-sound-popup:hover,
body.dark-theme .control-btn-small:hover {
    background: #5C6BC0;
    box-shadow: 0 5px 20px rgba(100, 255, 218, 0.4);
}

/* 修改深色主题下音效选择弹窗的样式 */
body.dark-theme #sound-style-popup .popup-content {
    background: rgba(40, 44, 52, 0.95);
    border: 2px solid #3F51B5;
}

body.dark-theme #sound-style-popup h2 {
    color: #64FFDA;
}

/* 优化背景设计 - 添加到CSS文件末尾 */

/* 基础背景渐变优化 */
body {
    background-image: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%), 
                      url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(255,255,255,.3)' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-blend-mode: overlay;
    animation: background-shift 30s ease infinite alternate;
}

/* 添加动态背景色彩变化 */
@keyframes background-shift {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 100%;
    }
}

/* 添加彩色气泡装饰 */
.background-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 182, 193, 0.2) 0%, rgba(255, 182, 193, 0) 20%),
        radial-gradient(circle at 75% 15%, rgba(135, 206, 250, 0.2) 0%, rgba(135, 206, 250, 0) 20%),
        radial-gradient(circle at 85% 60%, rgba(152, 251, 152, 0.2) 0%, rgba(152, 251, 152, 0) 25%),
        radial-gradient(circle at 40% 70%, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0) 25%),
        radial-gradient(circle at 10% 90%, rgba(221, 160, 221, 0.2) 0%, rgba(221, 160, 221, 0) 20%);
    z-index: -2;
    pointer-events: none;
}

/* 添加彩虹色彩带 */
.rainbow-ribbon {
    position: fixed;
    top: 0;
    left: -10%;
    width: 120%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 0, 0, 0) 0%,
        rgba(255, 0, 0, 0.05) 10%,
        rgba(255, 165, 0, 0.05) 20%,
        rgba(255, 255, 0, 0.05) 30%,
        rgba(0, 128, 0, 0.05) 40%,
        rgba(0, 0, 255, 0.05) 50%,
        rgba(75, 0, 130, 0.05) 60%,
        rgba(238, 130, 238, 0.05) 70%,
        rgba(238, 130, 238, 0) 80%);
    transform: rotate(-20deg);
    z-index: -3;
    pointer-events: none;
}

/* 添加闪烁星星 */
.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    filter: blur(1px);
    opacity: 0;
    animation: twinkle 5s infinite;
    pointer-events: none;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 0.8; transform: scale(1); }
}

/* 深色主题背景优化 */
body.dark-theme {
    background-image: linear-gradient(135deg, #2c3e50 0%, #3498db 100%), 
                      url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(100, 255, 218, 0.1)' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-blend-mode: overlay;
}

body.dark-theme .background-container::before {
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(100, 255, 218, 0.2) 0%, rgba(100, 255, 218, 0) 20%),
        radial-gradient(circle at 75% 15%, rgba(63, 81, 181, 0.2) 0%, rgba(63, 81, 181, 0) 20%),
        radial-gradient(circle at 85% 60%, rgba(103, 58, 183, 0.2) 0%, rgba(103, 58, 183, 0) 25%),
        radial-gradient(circle at 40% 70%, rgba(33, 150, 243, 0.2) 0%, rgba(33, 150, 243, 0) 25%),
        radial-gradient(circle at 10% 90%, rgba(0, 150, 136, 0.2) 0%, rgba(0, 150, 136, 0) 20%);
}

body.dark-theme .rainbow-ribbon {
    background: linear-gradient(90deg, 
        rgba(63, 81, 181, 0) 0%,
        rgba(63, 81, 181, 0.05) 10%,
        rgba(103, 58, 183, 0.05) 20%,
        rgba(33, 150, 243, 0.05) 30%,
        rgba(0, 150, 136, 0.05) 40%,
        rgba(76, 175, 80, 0.05) 50%,
        rgba(255, 193, 7, 0.05) 60%,
        rgba(255, 87, 34, 0.05) 70%,
        rgba(255, 87, 34, 0) 80%);
    opacity: 0.7;
}

body.dark-theme .star {
    background-color: #64FFDA;
    box-shadow: 0 0 5px #64FFDA;
}

/* 优化中奖弹窗样式 */
#result-popup .popup-content {
    position: relative;
    overflow: hidden;
    padding-top: 30px;
}

/* 添加庆祝彩带装饰 */
#result-popup .popup-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40L0 0H20L40 20' fill='rgba(255,105,180,0.05)' /%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.828-1.415 1.415L51.8 0h2.827zM5.373 0l-.83.828L5.96 2.243 8.2 0H5.374zM48.97 0l3.657 3.657-1.414 1.414L46.143 0h2.828zM11.03 0L7.372 3.657 8.787 5.07 13.857 0H11.03zm32.284 0L49.8 6.485 48.384 7.9l-7.9-7.9h2.83zM16.686 0L10.2 6.485 11.616 7.9l7.9-7.9h-2.83zm20.97 0l9.315 9.314-1.414 1.414L34.828 0h2.83zM22.344 0L13.03 9.314l1.414 1.414L25.172 0h-2.83zM32 0l12.142 12.142-1.414 1.414L30 .828 17.272 13.556l-1.414-1.414L28 0h4zM.284 0l28 28-1.414 1.414L0 2.544V0h.284zM0 5.373l25.456 25.455-1.414 1.415L0 8.2V5.374zm0 5.656l22.627 22.627-1.414 1.414L0 13.86v-2.83zm0 5.656l19.8 19.8-1.415 1.413L0 19.514v-2.83zm0 5.657l16.97 16.97-1.414 1.415L0 25.172v-2.83zM0 28l14.142 14.142-1.414 1.414L0 30.828V28zm0 5.657L11.314 44.97 9.9 46.386l-9.9-9.9v-2.828zm0 5.657L8.485 47.8 7.07 49.212 0 42.143v-2.83zm0 5.657l5.657 5.657-1.414 1.415L0 47.8v-2.83zm0 5.657l2.828 2.83-1.414 1.413L0 53.456v-2.83zM54.627 60L30 35.373 5.373 60H8.2L30 38.2 51.8 60h2.827zm-5.656 0L30 41.03 11.03 60h2.828L30 43.858 46.142 60h2.83zm-5.656 0L30 46.686 16.686 60h2.83L30 49.515 40.485 60h2.83zm-5.657 0L30 52.343 22.344 60h2.83L30 55.172 34.828 60h2.83zM32 60l-2-2-2 2h4zM59.716 0l-28 28 1.414 1.414L60 2.544V0h-.284zM60 5.373L34.544 30.828l1.414 1.415L60 8.2V5.374zm0 5.656L37.373 33.656l1.414 1.414L60 13.86v-2.83zm0 5.656l-19.8 19.8 1.415 1.413L60 19.514v-2.83zm0 5.657l-16.97 16.97 1.414 1.415L60 25.172v-2.83zM60 28L45.858 42.142l1.414 1.414L60 30.828V28zm0 5.657L48.686 44.97l1.415 1.415 9.9-9.9v-2.828zm0 5.657L51.515 47.8l1.414 1.414L60 42.143v-2.83zm0 5.657l-5.657 5.657 1.414 1.415L60 47.8v-2.83zm0 5.657l-2.828 2.83 1.414 1.413L60 53.456v-2.83zM39.9 16.385l1.414-1.414L30 3.658 18.686 14.97l1.415 1.415 9.9-9.9 9.9 9.9zm-2.83 2.828l1.415-1.414L30 9.313 21.515 17.8l1.414 1.413L30 11.8l7.07 7.414v-.002zm-2.827 2.83l1.414-1.416L30 14.97l-5.657 5.657 1.414 1.415L30 17.8l4.243 4.242zm-2.83 2.827l1.415-1.414L30 20.626l-2.828 2.83 1.414 1.414L30 23.456l1.414 1.414zM56.87 59.414L58.284 58 30 29.716 1.716 58l1.414 1.414L30 32.544l26.87 26.87z' fill='rgba(100,255,218,0.05)' fill-rule='evenodd'/%3E%3C/svg%3E");
    z-index: -1;
}

/* 优化中奖标题 */
#result-popup h2 {
    color: #FF4081;
    font-size: 28px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 rgba(255, 158, 128, 0.5);
    animation: winTitlePulse 1s infinite alternate;
}

@keyframes winTitlePulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* 优化中奖内容显示 - 修改现有的 #prize-text 样式 */
#prize-text {
    font-size: 42px;
    font-weight: bold;
    color: #FF4081;
    /* 移除渐变背景和透明文字，改为实色文字 */
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    color: #FF4081;
    display: block;
    margin: 25px 0;
    padding: 20px;
    border-radius: 15px;
    position: relative;
    animation: prizeGlow 2s infinite alternate;
    /* 增强文字阴影使其更清晰 */
    text-shadow: 
        2px 2px 0 #fff,
        -2px -2px 0 #fff,
        2px -2px 0 #fff,
        -2px 2px 0 #fff,
        0 0 8px rgba(255, 64, 129, 0.7);
    letter-spacing: 2px;
}

/* 修改背景和边框，使内容更加突出 */
#prize-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* 增加白色背景不透明度 */
    background: rgba(255, 255, 255, 0.95);
    /* 加粗边框 */
    border: 4px dashed #FF4081;
    border-radius: 10px;
    z-index: -1;
    animation: borderRotate 10s linear infinite;
    /* 添加明显的阴影 */
    box-shadow: 
        0 0 0 4px rgba(255, 255, 255, 0.8),
        0 10px 20px rgba(0, 0, 0, 0.2);
}

/* 调整动画效果 */
@keyframes prizeGlow {
    0% { 
        transform: scale(1);
        text-shadow: 
            2px 2px 0 #fff,
            -2px -2px 0 #fff,
            2px -2px 0 #fff,
            -2px 2px 0 #fff,
            0 0 8px rgba(255, 64, 129, 0.7);
    }
    100% { 
        transform: scale(1.05); 
        text-shadow: 
            2px 2px 0 #fff,
            -2px -2px 0 #fff,
            2px -2px 0 #fff,
            -2px 2px 0 #fff,
            0 0 15px rgba(255, 64, 129, 1);
    }
}

/* 深色主题下的优化 */
body.dark-theme #prize-text {
    color: #64FFDA;
    background: none;
    text-shadow: 
        2px 2px 0 #282C34,
        -2px -2px 0 #282C34,
        2px -2px 0 #282C34,
        -2px 2px 0 #282C34,
        0 0 8px rgba(100, 255, 218, 0.7);
}

body.dark-theme #prize-text::before {
    background: rgba(40, 44, 52, 0.95);
    border: 4px dashed #64FFDA;
    box-shadow: 
        0 0 0 4px rgba(40, 44, 52, 0.8),
        0 10px 20px rgba(0, 0, 0, 0.4);
}

body.dark-theme @keyframes prizeGlow {
    0% { 
        text-shadow: 
            2px 2px 0 #282C34,
            -2px -2px 0 #282C34,
            2px -2px 0 #282C34,
            -2px 2px 0 #282C34,
            0 0 8px rgba(100, 255, 218, 0.7);
    }
    100% { 
        text-shadow: 
            2px 2px 0 #282C34,
            -2px -2px 0 #282C34,
            2px -2px 0 #282C34,
            -2px 2px 0 #282C34,
            0 0 15px rgba(100, 255, 218, 1);
    }
}

/* 添加庆祝图标 */
#prize-text::after {
    content: '🎉';
    position: absolute;
    font-size: 24px;
    right: -10px;
    top: -10px;
    animation: bounce 0.5s infinite alternate;
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

/* 深色主题下的中奖弹窗样式 */
body.dark-theme #result-popup h2 {
    color: #64FFDA;
    text-shadow: 2px 2px 0 rgba(0, 135, 134, 0.5);
}

body.dark-theme #result-popup .popup-content::after {
    background-image: 
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40L0 0H20L40 20' fill='rgba(100,255,218,0.05)' /%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.828-1.415 1.415L51.8 0h2.827zM5.373 0l-.83.828L5.96 2.243 8.2 0H5.374zM48.97 0l3.657 3.657-1.414 1.414L46.143 0h2.828zM11.03 0L7.372 3.657 8.787 5.07 13.857 0H11.03zm32.284 0L49.8 6.485 48.384 7.9l-7.9-7.9h2.83zM16.686 0L10.2 6.485 11.616 7.9l7.9-7.9h-2.83zm20.97 0l9.315 9.314-1.414 1.414L34.828 0h2.83zM22.344 0L13.03 9.314l1.414 1.414L25.172 0h-2.83zM32 0l12.142 12.142-1.414 1.414L30 .828 17.272 13.556l-1.414-1.414L28 0h4zM.284 0l28 28-1.414 1.414L0 2.544V0h.284zM0 5.373l25.456 25.455-1.414 1.415L0 8.2V5.374zm0 5.656l22.627 22.627-1.414 1.414L0 13.86v-2.83zm0 5.656l19.8 19.8-1.415 1.413L0 19.514v-2.83zm0 5.657l16.97 16.97-1.414 1.415L0 25.172v-2.83zM0 28l14.142 14.142-1.414 1.414L0 30.828V28zm0 5.657L11.314 44.97 9.9 46.386l-9.9-9.9v-2.828zm0 5.657L8.485 47.8 7.07 49.212 0 42.143v-2.83zm0 5.657l5.657 5.657-1.414 1.415L0 47.8v-2.83zm0 5.657l2.828 2.83-1.414 1.413L0 53.456v-2.83zM54.627 60L30 35.373 5.373 60H8.2L30 38.2 51.8 60h2.827zm-5.656 0L30 41.03 11.03 60h2.828L30 43.858 46.142 60h2.83zm-5.656 0L30 46.686 16.686 60h2.83L30 49.515 40.485 60h2.83zm-5.657 0L30 52.343 22.344 60h2.83L30 55.172 34.828 60h2.83zM32 60l-2-2-2 2h4zM59.716 0l-28 28 1.414 1.414L60 2.544V0h-.284zM60 5.373L34.544 30.828l1.414 1.415L60 8.2V5.374zm0 5.656L37.373 33.656l1.414 1.414L60 13.86v-2.83zm0 5.656l-19.8 19.8 1.415 1.413L60 19.514v-2.83zm0 5.657l-16.97 16.97 1.414 1.415L60 25.172v-2.83zM60 28L45.858 42.142l1.414 1.414L60 30.828V28zm0 5.657L48.686 44.97l1.415 1.415 9.9-9.9v-2.828zm0 5.657L51.515 47.8l1.414 1.414L60 42.143v-2.83zm0 5.657l-5.657 5.657 1.414 1.415L60 47.8v-2.83zm0 5.657l-2.828 2.83 1.414 1.413L60 53.456v-2.83zM39.9 16.385l1.414-1.414L30 3.658 18.686 14.97l1.415 1.415 9.9-9.9 9.9 9.9zm-2.83 2.828l1.415-1.414L30 9.313 21.515 17.8l1.414 1.413L30 11.8l7.07 7.414v-.002zm-2.827 2.83l1.414-1.416L30 14.97l-5.657 5.657 1.414 1.415L30 17.8l4.243 4.242zm-2.83 2.827l1.415-1.414L30 20.626l-2.828 2.83 1.414 1.414L30 23.456l1.414 1.414zM56.87 59.414L58.284 58 30 29.716 1.716 58l1.414 1.414L30 32.544l26.87 26.87z' fill='rgba(100,255,218,0.05)' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* 标题编辑按钮样式 */
.title-edit-btn {
    position: static; /* 移除绝对定位 */
    top: auto;
    right: auto;
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #FF69B4, #FF80AB);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
    transition: all 0.3s ease;
    z-index: 100;
    margin: 10px 0; /* 添加上下边距 */
}

/* 调整编辑按钮悬停效果，与其他控制按钮一致 */
.title-edit-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.6);
}

/* 调整编辑按钮点击效果，与其他控制按钮一致 */
.title-edit-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
}

/* 深色主题适配 */
body.dark-theme .title-edit-btn {
    background: linear-gradient(145deg, #3F51B5, #5C6BC0);
    box-shadow: 0 6px 20px rgba(63, 81, 181, 0.4),
                0 0 15px rgba(100, 255, 218, 0.3);
}

body.dark-theme .title-edit-btn:hover {
    box-shadow: 0 10px 25px rgba(63, 81, 181, 0.6),
                0 0 20px rgba(100, 255, 218, 0.5);
}

/* 标题编辑弹窗样式 */
#title-edit-popup {
    display: none;
}

#title-edit-popup .popup-content {
    max-width: 300px;
    padding: 25px;
}

#title-edit-popup h2 {
    color: #FF4081;
    margin-bottom: 20px;
    font-size: 24px;
}

#custom-title-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #FF80AB;
    border-radius: 10px;
    font-size: 18px;
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    margin-bottom: 20px;
    outline: none;
    transition: all 0.3s ease;
}

#custom-title-input:focus {
    border-color: #FF4081;
    box-shadow: 0 0 10px rgba(255, 64, 129, 0.3);
}

.popup-buttons {
    display: flex;
    justify-content: space-between;
}

.popup-buttons button {
    padding: 8px 20px;
    border: none;
    border-radius: 20px;
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#save-title-btn {
    background: linear-gradient(145deg, #FF4081, #FF80AB);
    color: white;
}

#save-title-btn:hover {
    background: linear-gradient(145deg, #FF80AB, #FF4081);
    transform: scale(1.05);
}

#cancel-title-edit-btn {
    background: #f0f0f0;
    color: #666;
}

#cancel-title-edit-btn:hover {
    background: #e0e0e0;
    transform: scale(1.05);
}

body.dark-theme #title-edit-popup h2 {
    color: #64FFDA;
}

body.dark-theme #custom-title-input {
    border-color: #5C6BC0;
    background: #282C34;
    color: #fff;
}

body.dark-theme #custom-title-input:focus {
    border-color: #64FFDA;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}

body.dark-theme #save-title-btn {
    background: linear-gradient(145deg, #3F51B5, #5C6BC0);
}

body.dark-theme #save-title-btn:hover {
    background: linear-gradient(145deg, #5C6BC0, #3F51B5);
}

body.dark-theme #cancel-title-edit-btn {
    background: #3A3F4B;
    color: #ddd;
}

body.dark-theme #cancel-title-edit-btn:hover {
    background: #32363F;
}

/* 表情符号选择器样式 */
#emoji-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 15px;
}

.emoji-tabs {
    display: flex;
    overflow-x: auto;
    margin-bottom: 10px;
    padding-bottom: 5px;
    scrollbar-width: thin;
}

.emoji-tabs::-webkit-scrollbar {
    height: 5px;
}

.emoji-tabs::-webkit-scrollbar-thumb {
    background: #FFB6C1;
    border-radius: 10px;
}

.emoji-tab {
    padding: 5px 10px;
    margin-right: 5px;
    border: 1px solid #FFB6C1;
    border-radius: 15px;
    background: white;
    color: #FF69B4;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.emoji-tab.active {
    background: #FF69B4;
    color: white;
}

.emoji-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #FFB6C1;
    border-radius: 10px;
    scrollbar-width: thin;
}

.emoji-content::-webkit-scrollbar {
    width: 5px;
}

.emoji-content::-webkit-scrollbar-thumb {
    background: #FFB6C1;
    border-radius: 10px;
}

.emoji-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #FFB6C1;
    background: white;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emoji-btn:hover {
    transform: scale(1.1);
    background: #FFF0F5;
    border-color: #FF69B4;
}

.emoji-btn:active {
    transform: scale(0.95);
}

/* 深色主题适配 */
body.dark-theme .emoji-tab {
    border-color: #5C6BC0;
    background: #282C34;
    color: #64FFDA;
}

body.dark-theme .emoji-tab.active {
    background: #3F51B5;
    color: white;
}

body.dark-theme .emoji-content {
    border-color: #5C6BC0;
    background: #1E2127;
}

body.dark-theme .emoji-tabs::-webkit-scrollbar-thumb,
body.dark-theme .emoji-content::-webkit-scrollbar-thumb {
    background: #5C6BC0;
}

/* 提示消息样式 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 16px;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.toast.fade-out {
    opacity: 0;
}

/* 深色主题适配 */
body.dark-theme .emoji-btn {
    background: #282C34;
    border-color: #5C6BC0;
    color: white;
}

body.dark-theme .emoji-btn:hover {
    background: #32363F;
    border-color: #64FFDA;
}