.settings-modal {
    position: fixed;
    inset: 0;
    background: rgba(8, 10, 12, 0.78);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.settings-modal.open {
    display: flex;
}

.settings-dialog {
    width: min(460px, 100%);
    background: linear-gradient(180deg, #313739, #23282a);
    border: 1px solid rgba(160,170,169,0.25);
    border-radius: 18px;
    box-shadow:
        0 18px 42px rgba(0,0,0,0.50),
        inset 0 0 0 1px rgba(255,255,255,0.03);
    padding: 20px;
    color: #fff;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(248,245,70,0.16);
}

.settings-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: #F8F546;
}

.settings-close {
    border: none;
    background: linear-gradient(180deg, #4a4f51, #2e3234);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.25);
}

.settings-close:hover {
    background: linear-gradient(180deg, #F8F546, #d9d53b);
    color: #111;
}

.settings-section {
    margin-top: 12px;
}

.settings-label {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    display: block;
    color: #EAEAEA;
}

.settings-option-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.settings-option-btn {
    border: 1px solid rgba(160,170,169,0.18);
    background: linear-gradient(180deg, #394042, #2a2f31);
    color: #fff;
    border-radius: 14px;
    padding: 10px 12px;
    cursor: pointer;
    min-width: 110px;
    transition: 0.18s ease;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.025),
        0 4px 10px rgba(0,0,0,0.22);
}

.settings-option-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(248,245,70,0.35);
    box-shadow:
        0 0 14px rgba(248,245,70,0.14),
        0 6px 14px rgba(0,0,0,0.26);
}

.settings-option-btn.active {
    border-color: #F8F546;
    box-shadow:
        0 0 14px rgba(248,245,70,0.22),
        inset 0 0 8px rgba(248,245,70,0.08);
}

.settings-option-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.settings-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
}

.settings-preview-box {
    border-radius: 10px;
    border: 2px solid rgba(160,170,169,0.35);
    background: #1b1f20;
}

.settings-size-label {
    margin-top: 6px;
    font-size: 11px;
    color: #A0AAA9;
    text-align: center;
}

:root.rotation-size-small {
    --rotation-slot-size: 56px;
    --rotation-gap: 10px;
    --rotation-arrow-size: 16px;
    --rotation-arrow-width: 20px;
}

:root.rotation-size-medium {
    --rotation-slot-size: 72px;
    --rotation-gap: 14px;
    --rotation-arrow-size: 18px;
    --rotation-arrow-width: 24px;
}

:root.rotation-size-large {
    --rotation-slot-size: 88px;
    --rotation-gap: 18px;
    --rotation-arrow-size: 22px;
    --rotation-arrow-width: 30px;
}

:root.rotation-size-xl {
    --rotation-slot-size: 104px;
    --rotation-gap: 22px;
    --rotation-arrow-size: 26px;
    --rotation-arrow-width: 36px;
}

:root.rotation-size-xxl {
    --rotation-slot-size: 120px;
    --rotation-gap: 26px;
    --rotation-arrow-size: 30px;
    --rotation-arrow-width: 42px;
}
