/* ==================== 设置气泡 ==================== */
.settings-bubble {
    position: fixed;
    width: 300px;
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
    z-index: 101;
}

.settings-bubble.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.settings-bubble .bubble-content {
    padding: 1rem;
}

.settings-bubble .bubble-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(135, 206, 235, 0.2);
}

.settings-bubble .bubble-item {
    margin-bottom: 0.75rem;
}

.settings-bubble .bubble-item label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.settings-bubble .bubble-item input[type="range"] {
    width: calc(100% - 60px);
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(135, 206, 235, 0.3);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.settings-bubble .bubble-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.settings-bubble .bubble-item input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.settings-bubble .bubble-item.opacity-input {
    width: 50px !important;
    padding: 4px 8px;
    border: 1px solid rgba(135, 206, 235, 0.3);
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.8);
}

/* 带分割线的滑动开关项 */
.settings-bubble .bubble-item.remember-check {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(135, 206, 235, 0.2);
    margin-top: 0.5rem;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-bubble .bubble-item.remember-check label {
    cursor: pointer;
}

/* 不带分割线的滑动开关项 */
.settings-bubble .bubble-item:has(.toggle-switch):not(.remember-check) {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 滑动开关项的文字样式统一 */
.settings-bubble .bubble-item:has(.toggle-switch) span {
    font-size: 0.85rem;
    color: var(--text-dark);
}

/* 滑动开关样式 */
.toggle-switch {
    position: relative;
    width: 42px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-switch .slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.3s ease;
}

.toggle-switch .slider::before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .slider {
    background-color: var(--primary);
}

.toggle-switch input:checked + .slider::before {
    transform: translateX(18px);
}

.settings-bubble .bubble-item.remember-check span {
    font-size: 0.85rem;
    color: var(--text-dark);
}

.opacity-input {
    width: 50px;
    padding: 4px 8px;
    border: 1px solid rgba(135, 206, 235, 0.3);
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.opacity-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.1);
}

/* ==================== 千歌风格垂直Dock ==================== */
.chika-dock {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 50;
    padding: 10px;
    margin: 0;
    left: auto;
    transition: opacity 0.5s ease-in-out;
}

.chika-dock.dock-dynamic-mode {
    opacity: 0;
}

.chika-dock.dock-dynamic-mode:hover {
    opacity: 1;
}

/* 单个图标动态模式 */
.chika-dock.dock-individual-mode {
    opacity: 1 !important; /* Dock容器始终可见 */
}

.chika-dock.dock-individual-mode .dock-item {
    opacity: 0; /* 默认隐藏所有图标 */
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chika-dock.dock-individual-mode .dock-item:hover,
.chika-dock.dock-individual-mode .dock-item.active {
    opacity: 1; /* hover或激活时显示 */
}

/* 禁用状态的开关 */
.toggle-switch.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.toggle-switch.disabled input {
    pointer-events: none;
}

.dock-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    font-size: 26px;
    color: #000;
    text-decoration: none !important;
    opacity: 0.95;
    border-radius: 50% !important;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    cursor: pointer !important;
    position: relative !important;
    background: transparent !important;
    border: none !important;
}

.dock-item:hover {
    opacity: 1 !important;
    transform: scale(1.2) !important;
}

.dock-item.active {
    opacity: 1 !important;
    transform: scale(1.25) !important;
    box-shadow: 0 0 8px rgba(255, 165, 0, 0.4) !important;
    background: rgba(135, 206, 235, 0.15) !important;
}

/* 标签文字 */
.dock-label {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 15px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'ZCOOL KuaiLe', cursive;
    color: var(--text-dark);
    white-space: normal;
    text-align: center;
    min-width: 80px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    line-height: 1.4;
    z-index: 150;
}

/* Dock标签删除线样式 - 思维走廊 */
.dock-label .strikethrough-text {
    position: relative;
    display: inline-block;
}

.dock-label .strikethrough-text::before,
.dock-label .strikethrough-text::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #333;
}

.dock-label .strikethrough-text::before {
    top: 30%;
}

.dock-label .strikethrough-text::after {
    top: 48%;
}

/* 打赏气泡删除线样式 - 欢迎打赏 */
.reward-strikethrough {
    position: relative;
    display: inline-block;
}

.reward-strikethrough::before,
.reward-strikethrough::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #333;
}

.reward-strikethrough::before {
    top: 40%;
}

.reward-strikethrough::after {
    top: 52%;
}

.dock-label::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(255, 255, 255, 0.95);
}

.dock-item:hover .dock-label {
    opacity: 1;
}

/* 打赏气泡 */
.reward-bubble {
    position: fixed;
    width: 300px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateX(10px);
    overflow: hidden;
}

.reward-bubble.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* 打赏标签页 */
.reward-tabs {
    display: flex;
    border-bottom: 1px solid rgba(135, 206, 235, 0.3);
}

.reward-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.reward-tab:hover {
    color: var(--primary);
}

.reward-tab.active {
    color: var(--mandarin);
    background: rgba(255, 165, 0, 0.1);
    border-bottom: 2px solid var(--mandarin);
}

/* 二维码内容 */
.reward-content {
    padding: 20px;
}

.reward-qrcode {
    display: none;
}

.reward-qrcode.active {
    display: block;
}

.reward-qrcode img {
    width: 100%;
    border-radius: 8px;
}

.reward-text {
    text-align: center;
    margin-bottom: 15px;
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.8;
}

/* 响应式 - 中等屏幕缩小Dock */
@media (max-width: 1200px) {
    .dock-item {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
    
    .chika-dock {
        right: 15px;
        gap: 12px;
    }
}

/* 响应式 - 小屏幕进一步缩小Dock */
@media (max-width: 992px) {
    .dock-item {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .chika-dock {
        right: 10px;
        gap: 10px;
    }
}

/* 响应式 - 移动端隐藏Dock */
@media (max-width: 768px) {
    .chika-dock {
        display: none;
    }

    .reward-bubble {
        right: 10px !important;
        left: 10px !important;
        width: auto;
        max-width: 320px;
        margin: 0 auto;
    }

    .reward-bubble.show {
        top: 50% !important;
        transform: translateY(-50%);
    }
}

/* ========== 风格切换气泡样式 ========== */
.styleSwitch-bubble {
    position: fixed;
    width: 300px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    right: 80px;
}

.styleSwitch-bubble.active {
    opacity: 1;
    visibility: visible;
}

.styleSwitch-bubble .styleSwitch-content {
    padding: 15px;
}

.styleSwitch-bubble .styleSwitch-title {
    font-size: 16px;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 12px;
    text-align: center;
    font-family: 'ZCOOL KuaiLe', cursive;
}

.styleSwitch-bubble .styleSwitch-list {
    max-height: 250px; /* 约等于5个风格项的高度 */
    overflow-y: auto;
}

/* 滚动条样式 */
.styleSwitch-bubble .styleSwitch-list::-webkit-scrollbar {
    width: 6px;
}

.styleSwitch-bubble .styleSwitch-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.styleSwitch-bubble .styleSwitch-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.styleSwitch-bubble .styleSwitch-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.styleSwitch-bubble .styleSwitch-item {
    padding: 10px 15px;
    margin-bottom: 8px;
    background: rgba(135, 206, 235, 0.1);
    border: 1px solid rgba(135, 206, 235, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 15px;
    color: #2C3E50;
}

.styleSwitch-bubble .styleSwitch-item:last-child {
    margin-bottom: 0;
}

.styleSwitch-bubble .styleSwitch-item:hover {
    background: rgba(135, 206, 235, 0.25);
    transform: translateX(-3px);
    box-shadow: 0 3px 10px rgba(135, 206, 235, 0.2);
}

.styleSwitch-bubble .styleSwitch-item.active {
    background: rgba(135, 206, 235, 0.35);
    border-color: rgba(135, 206, 235, 0.5);
    color: #2980B9;
    font-weight: 600;
}

/* 风格切换气泡响应式 */
@media (max-width: 768px) {
    .styleSwitch-bubble {
        right: 10px !important;
        left: 10px !important;
        width: auto;
        max-width: 320px;
        margin: 0 auto;
    }

    .styleSwitch-bubble.active {
        top: 50% !important;
        transform: translateY(-50%);
    }

    .styleSwitch-bubble .styleSwitch-arrow {
        display: none;
    }
}
