.settings-btn,
.fullscreen-btn {
    position: absolute;
    top: 15px;
    background: transparent;
    border: none;
    color: var(--text-color, #f5f5f7);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s, color 0.3s ease;
    z-index: 20;
}

.settings-btn {
    right: 15px;
    width: 24px;
    height: 24px;
}

.fullscreen-btn {
    right: 50px;
    width: 24px;
    height: 24px;
}

.settings-btn:hover,
.fullscreen-btn:hover {
    opacity: 1;
}

.settings-btn:hover {
    transform: rotate(30deg);
}

.fullscreen-btn:hover {
    transform: scale(1.1);
}

@media (min-width: 768px) {
    .settings-btn {
        width: 32px;
        height: 32px;
    }
    .fullscreen-btn {
        width: 32px;
        height: 32px;
        right: 60px;
    }
}

@media (min-width: 2000px), (min-height: 1000px) {
    .settings-btn {
        position: fixed;
        top: auto;
        bottom: 30px;
        right: 30px;
    }
    .fullscreen-btn {
        position: fixed;
        top: auto;
        bottom: 30px;
        right: 80px;
    }
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 30px;
    flex-shrink: 0;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: .4s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 2px;
    bottom: 2px;
    background-color: #f5f5f7;
    transition: .4s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

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

input:focus + .slider {
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.3);
}

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

.slider.round {
    border-radius: 30px;
}

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

.color-picker {
    display: flex;
}

.color-picker input[type="radio"] {
    display: none;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
    margin: 0 5px;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.blue {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.color-option.orange {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.color-option.purple {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

.color-option.green {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

.color-option.white {
    background: #ffffff;
    border: 1px solid #ccc;
}

.color-option.black {
    background: #000000;
    border: 1px solid #666;
}

.color-picker input[type="radio"]:checked + .color-option {
    border-color: var(--primary-color);
    transform: scale(1.15);
}

.theme-icons {
    display: flex;
    gap: 8px;
}

.theme-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s, color 0.3s ease;
    color: var(--text-color, #f5f5f7);
}

.theme-icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.theme-icon-btn.active {
    border-color: var(--primary-color);
    background: rgba(0, 122, 255, 0.2);
}

.theme-icon-btn svg {
    width: 22px;
    height: 22px;
}

.theme-icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.theme-icon-btn .btn-label {
    font-size: 10px;
    margin-left: 2px;
}

.theme-icon-btn[data-value="12h"],
.theme-icon-btn[data-value="24h"] {
    width: auto;
    padding: 0 12px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.setting-item label:first-child {
    text-align: center;
    min-width: 80px;
    color: var(--text-color, #f5f5f7);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease;
}

.setting-item input[type="text"],
.setting-item input[type="number"],
.setting-item input[type="date"],
.setting-item input[type="time"],
.setting-item select {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color, #f5f5f7);
    text-align: center;
    transition: color 0.3s ease;
}

#target-date::placeholder,
.setting-item input[type="text"]::placeholder {
    color: var(--text-color, #f5f5f7);
    opacity: 0.8;
}

.setting-item select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f5f5f7' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    cursor: pointer;
}

.setting-item select option {
    background: #f5f5f7;
    color: #1a1a2e;
    padding: 10px;
}

.setting-hint {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 10px;
    font-style: italic;
    text-align: center;
    color: var(--text-color, #f5f5f7);
    transition: color 0.3s ease;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    max-width: 280px;
    justify-content: flex-end;
    margin: -4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent;
    transition: all 0.2s, color 0.3s ease;
    margin: 4px;
    color: var(--text-color, #f5f5f7);
}

.checkbox-label:hover {
    background: rgba(255, 255, 255, 0.2);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + span {
    color: var(--primary-color);
    font-weight: bold;
}

.setting-item.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.setting-item.disabled label:first-child {
    color: #999;
}

.setting-item select:disabled {
    background-color: rgba(150, 150, 150, 0.3);
    cursor: not-allowed;
    opacity: 0.6;
}

body.no-animation .slider,
body.no-animation .slider:before,
body.no-animation .color-option,
body.no-animation .theme-icon-btn,
body.no-animation .settings-btn,
body.no-animation .fullscreen-btn,
body.no-animation .checkbox-label {
    transition: none;
}

body.no-animation .close-btn,
body.no-animation .setting-item label:first-child,
body.no-animation .setting-item input[type="text"],
body.no-animation .setting-item input[type="number"],
body.no-animation .setting-item input[type="date"],
body.no-animation .setting-item input[type="time"],
body.no-animation .setting-item select,
body.no-animation .setting-hint {
    transition: none;
}
