/* Settings Modal Background */
#settings-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Settings 主容器 */
.settings-container {
    display: flex;
    background-color: white;
    width: 600px;
    max-width: 90%;
    min-height: 300px; 
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* 侧边栏 (Tabs) */
.settings-sidebar {
    display: flex;
    flex-direction: column;
    width: 180px;
    background-color: var(--primary-color);
    padding: 30px;
    color: white;
}

.settings-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    font-size: 1rem;
    color: white;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 8px;
}

.settings-tab i {
    font-size: 1.2rem;
}

.settings-tab:hover {
    background-color: #387b70; /* 比 active 颜色更浅 */
}

.settings-tab.active {
    background-color: #21655d;
}

/* Settings 内容区域 */
.settings-content {
    flex: 1;
    padding: 25px;
    position: relative;
}

.settings-content h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* 关闭按钮 */
.settings-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 20px;
    cursor: pointer;
    color: #999;
}

.settings-close-btn:hover {
    color: black;
}

/* 设置项默认隐藏，只有 `active` 类的显示 */
.settings-page {
    display: none;
    height: 100%;
    overflow-y: auto;
    padding-right: 10px;
}

.settings-page.active {
    display: block;
}

/* 输入框 & 按钮样式 */
.settings-input {
    width: 95%;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin-top: 8px;
}

.settings-input:focus{
    outline: 1px solid var(--primary-color);
}

.settings-button {
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
}

.settings-button:hover {
    background-color: #21655d;
}

/* 危险操作按钮 */
.settings-danger-button {
    background-color: red;
}

.settings-danger-button:hover {
    background-color: darkred;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 12px;  /* 设置 switch 和文字之间的间距 */
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

/* 🌙 美化 switch 开关 */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0; /* 让 switch 不会因为容器缩小而变形 */
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* 滑块样式 */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(20px);
}
