.night-mode-toggle {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
    margin-bottom: 10px;
}

.night-mode-label {
    margin-right: 10px;
    font-size: 14px;
    color: #333;
    transition: color 0.3s;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 24px;
}

.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: 0.4s;
    border-radius: 24px;
}

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

input:checked + .slider {
    background-color: #4a90e2;
}

input:checked + .slider:before {
    transform: translateX(16px);
}

/**
 * 暗黑模式
 */
body.night-mode {
    background-color: #1a1a1a;
    color: #f0f0f0;
}

.night-mode .night-mode-toggle {
    background-color: #333;
}

.night-mode .night-mode-label {
    color: #f0f0f0;
}
