/* ==========================================
   设置面板样式
   ========================================== */

/* 设置面板主容器 - 复用词库管理器样式 */
.settings-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(to bottom, rgba(40, 40, 60, 0.95), rgba(20, 20, 40, 0.95));
    border-radius: 15px;
    padding: 0;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    z-index: 3000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 100px rgba(51, 204, 51, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(70, 230, 70, 0.3);
}

.settings-panel.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.settings-panel .library-manager-header h2 {
    font-size: 1.8em;
}

/* 设置区域样式 */
.settings-section {
    padding: 15px;
    border-bottom: 1px solid #444;
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section .section-title {
    font-size: 1.3em;
    color: #eee;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #555;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    color: white;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
}

.switch-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.switch-label {
    color: white;
    font-size: 16px;
}

.switch-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: 5px;
    font-style: italic;
}

/* 无限生命开关样式 */
.infinite-life-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.infinite-life-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.infinite-life-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.infinite-life-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .infinite-life-slider {
    background-color: #8e44ad;
}

input:focus + .infinite-life-slider {
    box-shadow: 0 0 1px #8e44ad;
}

input:checked + .infinite-life-slider:before {
    transform: translateX(30px);
}

/* 通用开关样式 */
.switch-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.switch-label {
    font-size: 1.1em;
    color: #ccc;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* 圆形滑块 */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* 设置项样式 */
.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.slider-label {
    margin-right: 10px;
    color: #ccc;
}

.volume-control-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 300px;
}

#volumeSlider {
    flex-grow: 1;
    max-width: 200px;
    margin-right: 10px;
    accent-color: #4CAF50;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
}

#volumeSlider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.slider-value-display {
    min-width: 40px;
    text-align: right;
    color: #fff;
}

/* 语言选择器样式 */
.language-settings-section {
    /* 与其他设置区域保持一致 */
}

.select-label {
    margin-right: 10px;
    line-height: 38px;
    font-size: 16px;
    color: #e0e0e0;
}

#languageSelector {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: rgba(255, 255, 255, 0.1);
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27292.4%27%20height%3D%27292.4%27%3E%3Cpath%20fill%3D%27%23ffffff%27%20d%3D%27M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.4-5.4-13z%27%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    padding: 0 35px 0 15px;
    font-size: 16px;
    cursor: pointer;
    height: 38px;
    line-height: 38px;
    min-width: 180px;
    box-sizing: border-box;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

#languageSelector:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 215, 0, 0.7);
}

#languageSelector:focus {
    outline: none;
    border-color: #e0af00;
    box-shadow: 0 0 8px rgba(224, 175, 0, 0.3);
}

#languageSelector option {
    background-color: #2c2c54;
    color: white;
    padding: 10px 15px;
}

/* 确保语言选择器设置项对齐 */
.language-settings-section .settings-item {
    display: flex;
    align-items: center;
}

/* 自定义通知样式 */
.custom-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, top 0.3s ease-in-out;
    font-size: 1.1em;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.custom-notification.show {
    opacity: 1;
    top: 40px;
}

.custom-notification .notification-title {
    font-weight: bold;
}

.custom-notification.success {
    background-color: rgba(40, 167, 69, 0.9);
}

.custom-notification.error {
    background-color: rgba(220, 53, 69, 0.9);
}

.custom-notification.info {
    background-color: rgba(23, 162, 184, 0.9);
}

/* 生存模式开关样式 */
.survival-mode-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.survival-mode-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.survival-mode-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.survival-mode-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .survival-mode-slider {
    background-color: #e74c3c;
}

input:focus + .survival-mode-slider {
    box-shadow: 0 0 1px #e74c3c;
}

input:checked + .survival-mode-slider:before {
    transform: translateX(30px);
}

/* 音乐开关样式 */
.music-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.music-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.music-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.music-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .music-slider {
    background-color: #3498db;
}

input:focus + .music-slider {
    box-shadow: 0 0 1px #3498db;
}

input:checked + .music-slider:before {
    transform: translateX(30px);
}

/* 音量控制特殊样式 */
.volume-settings-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.volume-warning {
    color: #ffa726;
    font-size: 12px;
    font-style: italic;
    margin-top: 5px;
    padding: 5px 10px;
    background: rgba(255, 167, 38, 0.1);
    border-radius: 4px;
    border-left: 3px solid #ffa726;
}

.volume-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.volume-disabled .volume-warning {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border-left-color: #ff6b6b;
}

/* 更新日志设置样式 */
.changelog-settings-section {
    /* 与其他设置区域保持一致 */
}

.changelog-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.changelog-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    justify-content: center;
}

.changelog-button:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.changelog-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.changelog-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}