.settings-sections {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.settings-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-title {
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    padding-left: 4px;
}

body.useawp .section-title {
    color: rgba(130, 170, 140, 0.6);
}

body.kittycat .section-title {
    color: rgba(233, 186, 183, 0.6);
}

.settings-row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.settings-row .setting-card {
    flex: 1;
    min-width: 260px;
}

.setting-desc {
    color: rgba(255, 255, 255, 0.45);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    margin: -8px 0 12px 0;
    line-height: 1.4;
}

body.useawp .setting-desc {
    color: rgba(160, 190, 170, 0.5);
}

body.kittycat .setting-desc {
    color: rgba(233, 186, 183, 0.45);
}

@media (max-width: 768px) {
    .custom-dropdown {
        width: 160px;
        margin-left: 0;
    }

    .setting-option label {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .settings-sections {
        padding: 0 0.5rem;
        gap: 2rem;
    }

    .settings-row {
        flex-direction: column;
    }

    .settings-row .setting-card {
        min-width: unset;
        width: 100%;
    }

    .custom-dropdown {
        width: 100%;
        margin-left: 0;
    }

    .setting-option {
        flex-direction: column;
        align-items: flex-start;
    }

    .open-buttons {
        margin-left: 0;
        width: 100%;
    }

    .open-btn {
        width: 100%;
        justify-content: center;
    }
}

.custom-dropdown {
    position: relative;
    width: 200px;
    margin-left: 10px;
    flex-shrink: 0;
}

.dropdown-selected {
    background: rgb(40, 50, 70);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    min-width: 0;
}

.dropdown-selected:hover {
    background: rgb(50, 65, 90);
    border-color: rgba(255, 255, 255, 0.3);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

.dropdown-selected.active .dropdown-arrow {
    transform: rotate(180deg);
}

#selected-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 8px;
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgb(30, 30, 40);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin-top: 4px;
    z-index: 1000;
    max-height: 0;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    opacity: 0;
    min-width: 100%;
    box-sizing: border-box;
}

.dropdown-options.show {
    max-height: 200px;
    opacity: 1;
    overflow-y: auto;
}

.dropdown-option {
    padding: 10px 12px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-option.selected {
    background: rgba(100, 150, 255, 0.2);
    color: rgb(150, 180, 255);
}

.dropdown-option[data-value="custom"] {
    color: rgb(150, 200, 255);
    font-weight: 500;
}

.setting-option {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.setting-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.setting-option label span:first-child {
    flex-shrink: 0;
    min-width: fit-content;
}

.action-setting {
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
}

.action-setting > span {
    flex-shrink: 0;
    min-width: fit-content;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.action-setting .open-buttons {
    margin-left: 0;
}

body.useawp .action-setting {
    background: rgba(50, 85, 60, 0.18);
    border-color: rgba(100, 150, 110, 0.3);
}

body.kittycat .action-setting {
    background: rgba(126, 73, 56, 0.24);
    border-color: rgba(233, 186, 183, 0.28);
}

.settings-modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    padding: 1rem;
}

.settings-modal-overlay.active {
    display: flex;
}

.settings-modal {
    width: min(100%, 420px);
    background: rgba(20, 28, 48, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.settings-modal-header,
.settings-modal-body,
.settings-modal-actions {
    padding: 1rem 1.25rem;
}

.settings-modal-header {
    border-bottom: none;
}

.settings-modal-header h2 {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
}

.settings-modal-body p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    font-size: 0.92rem;
    line-height: 1.5;
}

.settings-modal-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    border-top: none;
}

.settings-modal-actions .open-btn[disabled] {
    opacity: 0.6;
    cursor: wait;
}

@media (max-width: 600px) {
    .action-setting {
        align-items: flex-start;
    }

    .action-setting .open-buttons {
        width: 100%;
    }

    .action-setting .open-btn {
        width: 100%;
        justify-content: center;
    }

    .settings-modal-actions {
        flex-direction: column-reverse;
    }

    .settings-modal-actions .open-btn {
        width: 100%;
        justify-content: center;
    }
}

body.useawp .settings-modal {
    background: rgba(16, 32, 24, 0.97);
    border-color: rgba(100, 150, 110, 0.25);
}

body.kittycat .settings-modal {
    background: rgba(45, 28, 24, 0.97);
    border-color: rgba(233, 186, 183, 0.25);
}

.custom-tab-cloak {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    margin-top: 15px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    box-sizing: border-box;
}

.custom-tab-cloak.show {
    max-height: 500px;
    opacity: 1;
    overflow: visible;
}

.custom-header h4 {
    color: rgb(150, 180, 255);
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.custom-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 10px 12px;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.input-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(150, 180, 255, 0.5);
    box-shadow: 0 0 0 2px rgba(150, 180, 255, 0.2);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.button-group {
    display: flex;
    justify-content: flex-start;
    margin-top: 10px;
}

.save-btn {
    background: linear-gradient(135deg, rgba(100, 150, 255, 0.2), rgba(150, 180, 255, 0.1));
    border: 1px solid rgba(150, 180, 255, 0.3);
    border-radius: 8px;
    padding: 12px 20px;
    color: white;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    position: relative;
    overflow: hidden;
}

.save-btn:hover {
    background: linear-gradient(135deg, rgba(100, 150, 255, 0.3), rgba(150, 180, 255, 0.2));
    border-color: rgba(150, 180, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(100, 150, 255, 0.3);
}

.save-btn:active {
    transform: translateY(0);
}

.save-btn.success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(129, 199, 132, 0.2));
    border-color: rgba(76, 175, 80, 0.5);
}

.save-btn.error {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.3), rgba(239, 83, 80, 0.2));
    border-color: rgba(244, 67, 54, 0.5);
}

body.useawp .custom-dropdown .dropdown-selected {
    background: rgb(35, 60, 45);
    border-color: rgba(100, 150, 110, 0.4);
}

body.useawp .custom-dropdown .dropdown-selected:hover {
    background: rgb(50, 85, 60);
    border-color: rgba(100, 150, 110, 0.6);
}

body.useawp .custom-dropdown .dropdown-options {
    background: rgb(15, 25, 20);
    border-color: rgba(100, 150, 110, 0.4);
}

body.useawp .custom-dropdown .dropdown-option:hover {
    background: rgba(70, 120, 85, 0.3);
}

body.useawp .custom-dropdown .dropdown-option.selected {
    background: rgba(130, 170, 140, 0.3);
    color: rgb(130, 170, 140);
}

body.useawp .custom-tab-cloak {
    background: rgba(50, 85, 60, 0.1);
    border-color: rgba(100, 150, 110, 0.2);
}

body.useawp .custom-header h4 {
    color: rgb(130, 170, 140);
}

body.useawp .input-group input:focus {
    border-color: rgba(130, 170, 140, 0.5);
    box-shadow: 0 0 0 2px rgba(130, 170, 140, 0.2);
}

body.useawp .save-btn {
    background: linear-gradient(135deg, rgba(130, 170, 140, 0.2), rgba(160, 190, 170, 0.1));
    border-color: rgba(130, 170, 140, 0.3);
}

body.useawp .save-btn:hover {
    background: linear-gradient(135deg, rgba(130, 170, 140, 0.3), rgba(160, 190, 170, 0.2));
    border-color: rgba(130, 170, 140, 0.5);
    box-shadow: 0 4px 12px rgba(130, 170, 140, 0.3);
}

body.kittycat .custom-dropdown .dropdown-selected {
    background: rgba(126, 73, 56, 0.6);
    border-color: rgba(233, 186, 183, 0.4);
}

body.kittycat .custom-dropdown .dropdown-selected:hover {
    background: rgba(126, 73, 56, 0.8);
    border-color: rgba(233, 186, 183, 0.6);
}

body.kittycat .custom-dropdown .dropdown-options {
    background: rgba(3, 3, 4, 0.95);
    border-color: rgba(233, 186, 183, 0.4);
}

body.kittycat .custom-dropdown .dropdown-option:hover {
    background: rgba(233, 186, 183, 0.15);
}

body.kittycat .custom-dropdown .dropdown-option.selected {
    background: rgba(233, 186, 183, 0.25);
    color: #E9BAB7;
}

body.kittycat .custom-tab-cloak {
    background: rgba(126, 73, 56, 0.3);
    border-color: rgba(233, 186, 183, 0.3);
}

body.kittycat .custom-header h4 {
    color: #E9BAB7;
}

body.kittycat .input-group input {
    background: rgba(174, 181, 194, 0.15);
    border-color: rgba(233, 186, 183, 0.3);
    color: #FFF;
}

body.kittycat .input-group input:focus {
    border-color: rgba(233, 186, 183, 0.6);
    box-shadow: 0 0 0 2px rgba(233, 186, 183, 0.2);
}

body.kittycat .save-btn {
    background: linear-gradient(135deg, rgba(233, 186, 183, 0.25), rgba(174, 181, 194, 0.15));
    border-color: rgba(233, 186, 183, 0.4);
}

body.kittycat .save-btn:hover {
    background: linear-gradient(135deg, rgba(233, 186, 183, 0.35), rgba(174, 181, 194, 0.25));
    border-color: rgba(233, 186, 183, 0.6);
    box-shadow: 0 4px 12px rgba(233, 186, 183, 0.3);
}

.proxy-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

.proxy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    color: white;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    text-decoration: none;
}

.proxy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.proxy-btn:active {
    transform: translateY(0);
}

.proxy-btn.active {
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.5);
    color: rgb(129, 199, 132);
}

.proxy-icon {
    font-size: 14px;
}

.proxy-text {
    font-size: 12px;
    white-space: nowrap;
}

body.useawp .proxy-btn {
    background: rgba(50, 85, 60, 0.3);
    border-color: rgba(100, 150, 110, 0.4);
}

body.useawp .proxy-btn:hover {
    background: rgba(50, 85, 60, 0.4);
    border-color: rgba(100, 150, 110, 0.6);
    box-shadow: 0 4px 12px rgba(100, 150, 110, 0.3);
}

body.useawp .proxy-btn.active {
    background: rgba(130, 170, 140, 0.3);
    border-color: rgba(130, 170, 140, 0.5);
    color: rgb(160, 190, 170);
}

body.cherryblossom .proxy-btn {
    background: rgba(139, 69, 101, 0.3);
    border-color: rgba(255, 182, 193, 0.4);
}

body.cherryblossom .proxy-btn:hover {
    background: rgba(139, 69, 101, 0.4);
    border-color: rgba(255, 182, 193, 0.6);
    box-shadow: 0 4px 12px rgba(255, 182, 193, 0.3);
}

body.cherryblossom .proxy-btn.active {
    background: rgba(255, 182, 193, 0.3);
    border-color: rgba(255, 182, 193, 0.5);
    color: rgb(255, 200, 210);
}

body.kittycat .proxy-btn {
    background: rgba(126, 73, 56, 0.4);
    border-color: rgba(233, 186, 183, 0.4);
}

body.kittycat .proxy-btn:hover {
    background: rgba(126, 73, 56, 0.6);
    border-color: rgba(233, 186, 183, 0.6);
    box-shadow: 0 4px 12px rgba(233, 186, 183, 0.3);
}

body.kittycat .proxy-btn.active {
    background: rgba(233, 186, 183, 0.3);
    border-color: rgba(233, 186, 183, 0.6);
    color: #E9BAB7;
}

.open-buttons {
    display: flex;
    gap: 10px;
    margin-left: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.open-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    color: white;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.open-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.open-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.btn-text {
    font-size: 13px;
    white-space: nowrap;
}

body.useawp .open-btn {
    background: rgba(50, 85, 60, 0.3);
    border-color: rgba(100, 150, 110, 0.4);
}

body.useawp .open-btn:hover {
    background: rgba(50, 85, 60, 0.4);
    border-color: rgba(100, 150, 110, 0.6);
    box-shadow: 0 4px 12px rgba(100, 150, 110, 0.3);
}

body.cherryblossom .open-btn {
    background: rgba(139, 69, 101, 0.3);
    border-color: rgba(255, 182, 193, 0.4);
}

body.cherryblossom .open-btn:hover {
    background: rgba(139, 69, 101, 0.4);
    border-color: rgba(255, 182, 193, 0.6);
    box-shadow: 0 4px 12px rgba(255, 182, 193, 0.3);
}

body.kittycat .open-btn {
    background: rgba(126, 73, 56, 0.4);
    border-color: rgba(233, 186, 183, 0.4);
}

body.kittycat .open-btn:hover {
    background: rgba(126, 73, 56, 0.6);
    border-color: rgba(233, 186, 183, 0.6);
    box-shadow: 0 4px 12px rgba(233, 186, 183, 0.3);
}
