body {
    margin: 0;
    height: 100vh; 
    display: flex;
    justify-content: center; 
    align-items: center;     
    background: #f5f5f5;
}

.formx {
    width: 50%;               /* take up half the page */
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid rgb(190, 15, 15);
    background-color: rgba(110, 0, 0, 0);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    color: white;
}

.formx .header {
    font-size: 4rem;
    font-weight: 700;
    margin: 0;
    color: rgb(190, 15, 15);
    text-shadow: 2px 2px 10px rgb(145, 10, 10);
    text-align: center;
}

.formx .label {
    font-size: 1.25rem;
    margin: 0;
    font-family: "Bitter", serif;
    font-weight: 400;
    color: rgb(218, 218, 218);
}

.option {
    display: flex;
    align-items: center;         /* vertical alignment */
    justify-content: space-between; /* label left, switch right */
    margin: 15px 0;
    gap: 5%;                     /* spacing between them */
}

.option .label {
    flex: 1;                     /* take remaining width */
    word-wrap: break-word;       /* allow long text to wrap */
}

.option .label p {
    margin: 0;
}

.switch-wrapper .tgl {
   display: none;
}

.switch-wrapper,
.switch-wrapper *,
.switch-wrapper *:after,
.switch-wrapper *:before {
   box-sizing: border-box;
}

.switch-wrapper .tgl::selection,
.switch-wrapper .tgl:after::selection,
.switch-wrapper .tgl:before::selection,
.switch-wrapper .tgl *::selection,
.switch-wrapper .tgl *:after::selection,
.switch-wrapper .tgl *:before::selection,
.switch-wrapper .tgl + .tgl-btn::selection {
   background: none;
}

.switch-wrapper .tgl + .tgl-btn {
   outline: 0;
   display: block;
   width: 64px;
   height: 32px;
   position: relative;
   cursor: pointer;
   user-select: none;
}

.switch-wrapper .tgl + .tgl-btn:after,
.switch-wrapper .tgl + .tgl-btn:before {
   position: relative;
   display: block;
   content: "";
   width: 50%;
   height: 100%;
}

.switch-wrapper .tgl + .tgl-btn:after {
   left: 0;
}

.switch-wrapper .tgl + .tgl-btn:before {
   display: none;
}

.switch-wrapper .tgl:checked + .tgl-btn:after {
   left: 50%;
}

.switch-wrapper .tgl-ios + .tgl-btn {
   background: #000;
   border-radius: 32px;
   padding: 2px;
   transition: all 0.4s ease;
   border: 1px solid rgb(190, 15, 15);
}

.switch-wrapper .tgl-ios + .tgl-btn:after {
   border-radius: 32px;
   background: #1a1a1a;
   transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), padding 0.3s ease, margin 0.3s ease;
   box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 0 rgba(0, 0, 0, 0.08);
}

.switch-wrapper .tgl-ios + .tgl-btn:hover:after {
   will-change: padding;
}

.switch-wrapper .tgl-ios + .tgl-btn:active {
   box-shadow: inset 0 0 0 32px #e8eae9;
}

.switch-wrapper .tgl-ios + .tgl-btn:active:after {
   padding-right: 12.8px;
}

.switch-wrapper .tgl-ios:checked + .tgl-btn {
   background: #bb0000;
}

.switch-wrapper .tgl-ios:checked + .tgl-btn:active {
   box-shadow: none;
}

.switch-wrapper .tgl-ios:checked + .tgl-btn:active:after {
   margin-left: -12.8px;
}

.option button {
    background-color: #000;
    border: 1px solid rgb(190, 15, 15);
    border-radius: 32px;
    padding: 8px;
    color: rgb(218, 218, 218);
}

/* Mobile Version */
@media (max-width: 768px) {
    body {
        height: auto;
        padding: 10px;
        background: #080808;
    }

    .formx {
        width: 90%;           /* smaller width for mobile */
        padding: 15px;
        border-radius: 12px;
    }

    .formx .header {
        font-size: 2.5rem;    /* smaller header text */
    }

    .option {
        flex-direction: column;   /* stack label and switch vertically */
        align-items: flex-start;
        gap: 10px;
    }

    .option .label {
        font-size: 1rem;
        word-wrap: break-word;
    }

    .switch-wrapper .tgl + .tgl-btn {
        width: 50px;           /* smaller switch width */
        height: 28px;          /* smaller switch height */
    }

    .switch-wrapper .tgl-ios + .tgl-btn:after {
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 3px 0 rgba(0, 0, 0, 0.08);
    }

    .switch-wrapper .tgl-ios + .tgl-btn:active:after {
        padding-right: 10px;
    }

    .switch-wrapper .tgl-ios:checked + .tgl-btn:active:after {
        margin-left: -10px;
    }
}
