.settings-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #080808;
    padding: 25px 25px;
    border-radius: 15px;
    width: 590px;
    z-index: 999999;
    color: #e0e0e0;
    text-align: center;
    display: none;
    transition: all 0.1s ease;
    height: 430px;
    max-height: 80vh;
    flex-direction: column;
}

#settings-menu h2 {
    color: #e0e0e0;
    margin-bottom: 15px;
    margin-top: -15px;
    margin-left: 0;
    text-align: left;
    font-size: 20px;
    font-weight: lighter;
}

#settings-menu label {
    display: block;
    margin-bottom: 15px;
    text-align: left;
    font-size: 17px;
    font-weight: 500;
    color: #e0e0e0;
    cursor: text;
}

#settings-menu p {
    font-size: 14px;
    color: #818181;
    margin-top: -10px;
    text-align: left;
    font-weight: 500;
    margin-bottom: 10px;
    transition: color 0.1s ease;
}

#settings-menu select {
    width: 100%;
    padding: 7px;
    margin-bottom: 15px;
    background-color: #1b1b1b;
    color: #e0e0e0;
    border: 2px solid #4141411a;
    border-radius: 15px;
    font-size: 18px;
    outline: none;
    transition: all 0.1s ease;
}

#settings-menu select:focus {
    transform: scale(1.02);
}

#close-settings-menu {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #131313;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #888888;
    cursor: pointer;
    z-index: 1000;
    outline: none;
    display: inline-flex;
    transition: all 0.1s ease;
}

#close-settings-menu:hover {
    color: #ffffff;
    transform: scale(1.1);
}

#close-game-menu i {
    font-size: 11.5px;
    line-height: 0;
}

#settings-menu select:hover {
    background-color: #333;
}

.settings-menu.open {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.1s forwards;
}

.settings-menu.close {
    animation: fadeOut 0.1s forwards;
}

.transport-selector, .search-engine-selector, .backend-selector, .decoy-selector, .cloak-link-selector, .game-source-selector {
    position: relative;
    width: 100%;
    max-width: 255px;
    margin-bottom: 15px;
    user-select: none;
}

.transport-selected, .search-engine-selected, .backend-selected, .decoy-selected, .cloak-link-selected, .game-source-selected {
    background-color: #181818;
    border: 2px solid #ffffff00;
    color: #e0e0e0;
    padding: 8px;
    border-radius: 13px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transport-selected:hover, .search-engine-selected:hover, .backend-selected:hover, .decoy-selected:hover, .cloak-link-selected:hover, .game-source-selected:hover {
    background-color: #333;
}

.transport-selected::after, .search-engine-selected::after, .backend-selected::after, .decoy-selected::after, .cloak-link-selected::after, .game-source-selected::after {
    content: "\f107";
    font-family: "Font Awesome 6 Pro";
    font-weight: 900;
    font-size: 0.8em;
    color: #9b9b9b;
    transition: all 0.12s ease;
}

.transport-selected.transport-arrow-active::after, .search-engine-selected.search-engine-arrow-active::after, .backend-selected.backend-arrow-active::after, .decoy-selected.decoy-arrow-active::after, .cloak-link-selected.cloak-link-arrow-active::after, .game-source-selected.game-source-arrow-active::after {
    transform: rotate(180deg);
}

.transport-options, .search-engine-options, .backend-options, .decoy-options, .cloak-link-options, .game-source-options {
    position: absolute;
    top: 100%;
    margin-top: 5px;
    left: 0;
    right: 0;
    color: #9b9b9b;
    background-color: #181818;
    border: 2px solid #ffffff00;
    border-radius: 13px;
    max-height: 0;
    text-align: left;
    overflow: hidden;
    margin-top: -5px;
    transition: all 0.12s ease;
    opacity: 0;
    z-index: 10;
    padding: 3px 0;
    pointer-events: none;
}

.transport-options.transport-show, .search-engine-options.search-engine-show, .backend-options.backend-show, .decoy-options.decoy-show, .cloak-link-options.cloak-link-show, .game-source-options.game-source-show {
    max-height: 400px;
    opacity: 1;
    margin-top: 5px;
    pointer-events: auto;
}

.transport-options div, .search-engine-options div, .backend-options div, .decoy-options div, .cloak-link-options div, .game-source-options div {
    padding: 7px;
    border-radius: 8px;
    cursor: pointer;
    width: 93%;
    margin: 0 auto;
}

.transport-options div:hover, .search-engine-options div:hover, .backend-options div:hover, .decoy-options div:hover, .cloak-link-options div:hover, .game-source-options div:hover {
    background-color: #333;
    color: #d6d6d6;
}

#wisp-server {
    width: 100%;
    max-width: 270px;
    padding: 10px 15px;
    margin-left: 0;
    background-color: #181818;
    color: #e0e0e0;
    margin-left: -38px;
    border: 2px solid #00000000;
    font-size: 0.8em;
    border-radius: 15px;
    outline: none;
    transition: all 0.1s ease;
}

#wisp-server:hover,
#wisp-server:focus {
    background-color: #222222;
}

#wisp-server::placeholder {
    color: #525252;
}

#save-wisp-url {
    padding: 8px 10px;
    background-color: #c4c4c4;
    border: 2px solid #4141411a;
    color: #000000;
    font-size: 16px;
    margin-left: 5px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.1s ease;
}

#save-wisp-url:hover {
    background-color: #ffffff;
}

#save-wisp-url:active {
    transform: scale(0.95);
}

input[type="checkbox"] {
    appearance: none;
    width: 64px;
    height: 33px;
    margin-left: -343px;
    background-color: #2e2e2e;
    margin-bottom: 5px;
    border-radius: 30px;
    position: relative;
    outline: none;
    cursor: pointer;
    transition: background-color 0.1s;
}

input[type="checkbox"]:checked {
    background-color: #808080;
}

input[type="checkbox"]::before {
    content: '';
    width: 20px;
    height: 20px;
    background-color: #dddddd;
    border-radius: 50%;
    position: absolute;
    top: 7px;
    left: 6px;
    transition: all 0.1s ease;
}

input[type="checkbox"]:hover::before {
    width: 23px;
    height: 23px;
    top: 5px;
    left: 5px;
    background-color: #ffffff;
}

input[type="checkbox"]:checked::before {
    transform: translateX(33px);
}

input[type="checkbox"]:checked:hover::before {
    transform: translateX(32px);
}

.settings-container {
    display: flex;
    gap: 15px;
    margin-top: 5px;
    flex: 1;
    min-height: 0;
}

.settings-tabs {
    display: flex;
    flex-direction: column;
    flex: 0 0 170px;
    gap: 5px;
    overflow-y: hidden;
}

.settings {
    transition: all 1 ease;
}

.settings.active-icon {
    color: #ffffff;
}

.tab-button {
    background-color: transparent;
    border: none;
    color: #888888;
    padding: 12px 14px;
    border-radius: 11px;
    font-size: 17px;
    cursor: pointer;
    margin: 0;
    width: 170px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tab-button i {
    text-align: center;
}

.tab-button:hover {
    color: #c2c2c2;
}

.tab-button.active {
    background-color: #0e0e0e;
    color: #ffffff;
}

.settings-content-wrapper {
    flex: 1;
    position: relative;
    overflow-y: auto;
}

.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
}

.settings-version-label {
    margin-top: auto;
    font-size: 14px;
    color: #5a5a5a;
    cursor: text;
    text-align: left;
    padding-left: 2px;
}

.settings-item {
    border-radius: 14px;
    padding: 15px;
    border: 1px solid #1f1f1f80;
    margin-bottom: 10px;
    box-sizing: border-box;
    text-align: left;
}

.settings-item:last-child {
    margin-bottom: 0;
}

.settings-item label {
    margin-top: 0;
    margin-bottom: 5px;
}

.settings-item p {
    margin-top: 0;
}

.settings-item p:last-of-type {
    margin-bottom: 15px;
}

.settings-item .transport-selector,
.settings-item .search-engine-selector,
.settings-item .backend-selector,
.settings-item .decoy-selector,
.settings-item .cloak-link-selector,
.settings-item .game-source-selector {
    margin-bottom: 0;
}

.settings-item input[type="checkbox"] {
    margin-left: 0;
    margin-bottom: 0;
}

.settings-item #wisp-server {
    margin-left: 0;
    margin-bottom: 0;
    max-width: calc(100% - 80px);
    display: inline-block;
    box-sizing: border-box;
}

.settings-item #save-wisp-url {
    margin-left: 5px;
    display: inline-block;
    vertical-align: top;
    width: 65px;
    box-sizing: border-box;
}

.settings-item .data-action-btn {
    margin-bottom: 10px;
}

.settings-item .data-action-btn:last-child {
    margin-bottom: 0;
}