*,
*::after,
*::before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Montserrat", sans-serif;
    font-size: 12px;
    background-color: #ecf0f3;
    color: #a0a5a8;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

select::-ms-expand {
    display: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.forms-slider,
.forms-track {
    display: contents;
}

.main {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);

    position: relative;
    width: 1000px;
    min-width: 1000px;
    min-height: 600px;
    height: 600px;
    padding: 25px;
    background-color: #ecf0f3;
    box-shadow: 10px 10px 10px #d1d9e6, -10px -10px 10px #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
}

@media (max-width: 1200px) {
    .main {
        transform: scale(0.7);
    }
}

@media (max-width: 1000px) {
    .main {
        transform: scale(0.6);
    }
}

@media (max-width: 800px) {
    .main {
        transform: scale(0.5);
    }
}

@media (max-width: 600px) {
    .main {
        transform: scale(0.4);
    }
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    width: 600px;
    height: 100%;
    padding: 25px;
    background-color: #ecf0f3;
    transition: 1.25s;
}

.form {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.form__input {
    width: 350px;
    height: 40px;
    margin: 4px 0;
    padding-left: 25px;
    font-size: 13px;
    letter-spacing: 0.15px;
    border: none;
    outline: none;
    font-family: "Montserrat", sans-serif;
    background-color: #ecf0f3;
    transition: 0.25s ease;
    border-radius: 8px;
    box-shadow: inset 2px 2px 4px #d1d9e6, inset -2px -2px 4px #f9f9f9;
    animation: fadeInUp 0.6s ease-out backwards;
}

.form__input:nth-child(1) {
    animation-delay: 0.1s;
}

.form__input:nth-child(2) {
    animation-delay: 0.2s;
}

.form__input:nth-child(3) {
    animation-delay: 0.3s;
}

.form__input:focus {
    box-shadow: inset 4px 4px 4px #d1d9e6, inset -4px -4px 4px #f9f9f9;
}

.form-group {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 10px 0;
    width: 100%;
}

select.form__input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a0a5a8' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 40px;
    color: #a0a5a8;
}

select.form__input:hover {
    box-shadow: 4px 4px 12px #d1d9e6, -4px -4px 12px #f9f9f9;
}

select.form__input option {
    background-color: #ecf0f3;
    color: #181818;
    padding: 10px;
}

.form__checkbox {
    margin-right: 10px;
}

.form__label {
    cursor: pointer;
}

.form-group-wrapper {
    width: 350px;
    position: relative;
    z-index: 1000;
}

/* Custom Dropdown Styling */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    z-index: 1;
}

.custom-select.open {
    z-index: 100;
}

.custom-select__trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    height: 40px;
    line-height: 40px;
    background: #ecf0f3;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: inset 2px 2px 4px #d1d9e6, inset -2px -2px 4px #f9f9f9;
    transition: all 0.3s ease;
}

.custom-select.open .custom-select__trigger {
    box-shadow: 2px 2px 4px #d1d9e6, -2px -2px 4px #f9f9f9;
}

.custom-select__trigger i {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.custom-select.open .custom-select__trigger i {
    transform: rotate(180deg);
}

.custom-select__options {
    position: absolute;
    display: block;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ecf0f3;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 99999;
    border-radius: 12px;
    box-shadow: 10px 10px 20px #d1d9e6, -10px -10px 20px #f9f9f9;
    overflow: hidden;
    padding: 8px;
    transform: translateY(-10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.custom-select.open .custom-select__options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
    box-shadow: 15px 15px 30px #d1d9e6, -15px -15px 30px #f9f9f9;
}

.custom-select__option {
    position: relative;
    display: block;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 2px 0;
}

.custom-select__option:hover {
    background: #e6ebef;
    color: #4B70E2;
}

.custom-select__option.selected {
    color: #4B70E2;
    background: #ecf0f3;
    box-shadow: inset 2px 2px 4px #d1d9e6, inset -2px -2px 4px #f9f9f9;
}

.checkbox-row {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    width: 100%;
    margin: 10px 0;
}

.checkbox-row .form-group {
    width: auto;
    margin: 0;
}

#expires_options,
#paste_expires_options {
    position: relative;
    z-index: 100;
}

#expires_options .form__input {
    width: 100%;
}

#paste_expires_options .form__input {
    width: 100%;
}

.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper .form__input {
    width: 100%;
    padding-right: 45px;
}

.toggle-password-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #a0a5a8;
    font-size: 16px;
    padding: 5px;
    transition: 0.2s;
}

.toggle-password-btn:hover {
    color: #4B70E2;
}


.password-tools-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.password-tool-btn {
    border: none;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 11px;
    font-family: "Montserrat", sans-serif;
    color: #4B70E2;
    background: #ecf0f3;
    box-shadow: 3px 3px 6px #d1d9e6, -3px -3px 6px #f9f9f9;
    cursor: pointer;
}

.password-tool-btn:active {
    box-shadow: inset 2px 2px 4px #d1d9e6, inset -2px -2px 4px #f9f9f9;
}

.password-copy-status {
    font-size: 11px;
    color: #7aa145;
    min-height: 14px;
}

.password-copy-status.is-error {
    color: #d9534f;
}

.password-strength-wrap {
    margin-top: 8px;
}

.password-strength-head {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 4px;
}

.password-strength-meter {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #dde3ec;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    width: 10%;
    border-radius: 999px;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.password-strength-fill.strength-weak {
    background: #e24b4b;
}

.password-strength-fill.strength-fair {
    background: #f2a93b;
}

.password-strength-fill.strength-strong {
    background: #95cc4b;
}

.password-strength-fill.strength-very-strong {
    background: #6fb63b;
}

.form__button {
    width: 180px;
    height: 50px;
    border-radius: 25px;
    margin-top: 50px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1.15px;
    background-color: #4B70E2;
    color: #f9f9f9;
    box-shadow: 8px 8px 16px #d1d9e6, -8px -8px 16px #f9f9f9;
    border: none;
    outline: none;
    cursor: pointer;
    transition: 0.25s;
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
    animation-delay: 0.4s;
}

.form__button:active {
    box-shadow: 4px 4px 12px #d1d9e6, -4px -4px 12px #f9f9f9;
}

.form__button:disabled {
    background-color: #a0a5a8;
    cursor: not-allowed;
}

.a-container {
    z-index: 100;
    left: calc(100% - 600px);
}

.b-container {
    left: calc(100% - 600px);
    z-index: 0;
}

.switch {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 400px;
    padding: 50px;
    z-index: 200;
    transition: 1.25s;
    background-color: #ecf0f3;
    overflow: hidden;
    box-shadow: 4px 4px 10px #d1d9e6, -4px -4px 10px #f9f9f9;
}

.switch__circle {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background-color: #ecf0f3;
    box-shadow: inset 8px 8px 12px #d1d9e6, inset -8px -8px 12px #f9f9f9;
    bottom: -60%;
    left: -60%;
    transition: 1.25s;
}

.switch__circle--t {
    top: -30%;
    left: 60%;
    width: 300px;
    height: 300px;
}

.switch__container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: absolute;
    width: 400px;
    padding: 50px 55px;
    transition: 1.25s;
}

.switch__button {
    width: 180px;
    height: 50px;
    border-radius: 25px;
    margin-top: 25px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1.15px;
    background-color: #4B70E2;
    color: #f9f9f9;
    box-shadow: 8px 8px 16px #d1d9e6, -8px -8px 16px #f9f9f9;
    border: none;
    outline: none;
    cursor: pointer;
    transition: 0.25s;
}

.switch__button:active {
    box-shadow: 4px 4px 12px #d1d9e6, -4px -4px 12px #f9f9f9;
}

.title {
    font-size: 34px;
    font-weight: 700;
    line-height: 3;
    color: #181818;
    animation: fadeInUp 0.8s ease-out backwards;
}

.about-me-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #4B70E2;
    color: #f9f9f9;
    padding: 10px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 4px 4px 8px #d1d9e6, -4px -4px 8px #f9f9f9;
    transition: 0.25s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.about-me-btn:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 12px #d1d9e6, -6px -6px 12px #f9f9f9;
}

.turnstile-container {
    margin: 50px 0 35px 0;
    display: flex;
    justify-content: center;
    transition: 1.25s;
    position: relative;
    z-index: 1;
}

.is-gx {
    animation: is-gx 1.25s;
}

@keyframes is-gx {

    0%,
    10%,
    100% {
        width: 400px;
    }

    30%,
    50% {
        width: 500px;
    }
}

.is-txr {
    left: calc(100% - 400px);
    transition: 1.25s;
    transform-origin: left;
}

.is-txl {
    left: 0;
    transition: 1.25s;
    transform-origin: right;
}

.is-z200 {
    z-index: 200;
    transition: 1.25s;
}

.is-hidden {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    transition: 1.25s;
}

/* Mobile Portrait and Small Screens Layout */
@media screen and (max-width: 768px) and (orientation: portrait),
screen and (max-width: 500px) {
    body {
        height: auto;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow-x: hidden;
        background-color: #ecf0f3;
    }

    .main {
        width: 100%;
        height: auto;
        min-height: 100vh;
        min-width: 0;
        border-radius: 0;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        transform: none !important;
        padding: 0;
        overflow: hidden;
        animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .forms-slider {
        display: block;
        width: 100%;
        overflow: hidden;
    }

    .forms-track {
        display: flex;
        width: 200%;
        transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
        /* Slightly bouncy slide */
    }

    .forms-track.is-switched {
        transform: translateX(-50%);
    }

    /* Switch Header Optimization */
    .switch {
        position: sticky;
        top: 0;
        width: 100%;
        height: auto;
        min-height: unset;
        padding: 20px 15px;
        order: -1;
        z-index: 1000;
        background-color: rgba(236, 240, 243, 0.85);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 8px 20px rgba(209, 217, 230, 0.4);
        border-radius: 0 0 20px 20px;
        flex-shrink: 0;
        left: 0 !important;
    }

    .switch__circle {
        display: none;
    }

    .switch__container {
        position: relative;
        width: 100%;
        height: auto;
        padding: 0;
        left: 0 !important;
        top: 0 !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        opacity: 1;
        visibility: visible;
        transition: none;
    }

    .switch__container.is-hidden {
        display: none;
        position: absolute;
    }

    .switch__title {
        font-size: 24px;
        line-height: 1.2;
        margin-bottom: 15px;
        animation: none;
    }

    .switch__button {
        width: 100%;
        max-width: 280px;
        height: 45px;
        margin-top: 0;
        font-size: 13px;
        border-radius: 15px;
        box-shadow: 4px 4px 8px #d1d9e6, -4px -4px 8px #f9f9f9;
    }

    /* Tools Container Optimization */
    #lookup-container {
        margin-top: 20px !important;
        gap: 20px !important;
        width: 100%;
        padding: 0 10px;
    }

    #lookup-container button,
    #lookup-container a {
        font-size: 0.85rem !important;
        color: #4B70E2 !important;
        font-weight: 600;
    }

    /* Forms Container Optimization */
    .container {
        position: relative !important;
        width: 50% !important;
        height: auto;
        min-height: unset;
        left: 0 !important;
        top: 0 !important;
        padding: 40px 20px;
        background-color: transparent;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        z-index: 1;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transition: none !important;
        flex-shrink: 0;
    }

    .a-container,
    .b-container {
        transition: none !important;
    }

    /* Toggling Logic for Mobile */
    .b-container {
        position: relative !important;
    }

    .a-container.is-txl {
        position: relative !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .b-container.is-z200 {
        position: relative !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 200;
        transform: none !important;
    }

    .form {
        width: 100%;
        height: auto;
        min-height: 450px;
        justify-content: flex-start;
    }

    .form_title {
        font-size: 22px;
        margin-bottom: 25px;
        line-height: 1.3;
        text-align: center;
    }

    .form__input {
        width: 100% !important;
        max-width: 100%;
        height: 50px;
        margin-bottom: 15px;
        border-radius: 12px;
        font-size: 16px;
    }

    .custom-select__trigger {
        height: 50px;
        line-height: 50px;
        border-radius: 12px;
        font-size: 16px;
    }

    .form-group-wrapper {
        width: 100% !important;
        max-width: 100%;
    }

    .checkbox-row {
        justify-content: space-around;
        margin-bottom: 15px;
        background: #ecf0f3;
        padding: 15px;
        border-radius: 15px;
        box-shadow: inset 2px 2px 5px #d1d9e6, inset -2px -2px 5px #f9f9f9;
        flex-wrap: wrap;
        gap: 10px;
    }

    .form__button {
        width: 100%;
        max-width: 280px;
        height: 55px;
        margin-bottom: 50px;
        margin-top: 20px;
        border-radius: 15px;
        font-size: 16px;
    }

    .form__button:active,
    .switch__button:active {
        transform: scale(0.96);
        transition: transform 0.1s ease;
    }

    /* Modal Optimization */
    .modal-content {
        width: 90% !important;
        margin: 10% auto !important;
        padding: 25px 20px !important;
        box-shadow: 10px 10px 15px #d1d9e6, -10px -10px 15px #f9f9f9 !important;
        border-radius: 20px !important;
    }

    .modal-content .title {
        font-size: 1.3rem !important;
        margin-bottom: 15px !important;
    }

    .modal-content .form__input {
        margin-bottom: 20px !important;
    }

    #qr-canvas canvas,
    #qr-canvas img {
        max-width: 100%;
        height: auto !important;
    }

    #lookup-result img {
        max-width: 100%;
        height: auto;
    }

    /* Utilities */
    .is-txr,
    .is-txl {
        transform: none !important;
        left: 0 !important;
    }

    .is-gx {
        animation: none !important;
    }

    .turnstile-container {
        width: 100%;
        overflow: hidden;
        display: flex;
        justify-content: center;
        margin: 10px 0;
    }

    .cf-turnstile {
        transform: scale(0.85);
        transform-origin: center top;
    }
}