/* ========== MAIN STYLING ========== */

* {
    font-weight: 500;
    color: var(--text);
}

h1,
h2,
h3,
li,
a,
i,
button {
    color: var(--bright-text);
}

body {
    margin: 0;
}

html {
    background: var(--bg);
}

::-webkit-scrollbar {
    background: var(--bg-2);
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-3);
    border-radius: 2489px;
}

a.ulink {
    color: var(--accent);
    text-decoration: none;
    position: relative;
    transition: 0.2s;
    cursor: pointer;
}

a.ulink::after {
    content: "";
    position: absolute;
    transform: scaleX(0);
    width: 100%;
    left: 0;
    bottom: 0px;
    height: 2px;
    background: linear-gradient(to right, var(--accent), var(--accent-2));
    transform-origin: right;
    transition: transform 0.2s;
}

a.ulink:hover {
    text-shadow: 0 0 20px color-mix(in srgb, var(--accent) 30%, transparent 70%);
    filter: saturate(2);
}

a.ulink:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    width: 250px;
    background: var(--bg-2);
    border-right: 1px solid var(--border);
    height: 100vh;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.2));
}

li {
    display: flex;
    cursor: pointer;
    margin-bottom: 10px;
}

li a {
    display: block;
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.3s ease;
    width: 200px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    z-index: 1;
    overflow: hidden;
}

li a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, var(--accent), var(--accent-2));
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: -1;
}

li a.active::after {
    opacity: 1;
}

li a.active {
    box-shadow: 0 0 25px color-mix(in srgb, var(--accent) 30%, transparent 70%);
}

li a:hover {
    background-color: var(--bg-3);
    transform: translateY(-2px) translateX(-50%);
}

li a.active:hover {
    background-color: transparent;
}

li a i {
    font-size: 20px;
    margin-right: 5px;
}

li.divider {
    height: 1px;
    background: var(--border);
    width: 100%;
    pointer-events: none;
}

.bottom-nav {
    position: absolute;
    bottom: 0px;
    width: 250px;
}

.social-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 10px 20px;
    width: 90%;
    margin-left: -15px;
}

.socialbutton {
    width: 25%;
    margin-right: 2px;
    margin-left: 2px;
    padding: 10px 0;
    display: flex;
    text-align: center;
    margin-top: -20px;
    margin-bottom: -10px;
}

.socialbutton i {
    font-size: 20px;
    width: 100%;
    color: var(--bright-text);
    margin: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 20px;
}

.logo-container {
    height: 30px;
    width: 30px;
    position: relative;
}

.logo-mask {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(225deg, var(--accent) 30%, var(--accent-2) 90%);
    -webkit-mask-image: url("/assets/img/branding/logo-white.svg");
    mask-image: url("/assets/img/branding/logo-white.svg");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

#pagecontent {
    position: absolute;
    top: 0;
    left: 251px;
    width: calc(100% - 251px);
    height: 100vh;
    border: none;
    background: var(--bg-2);
    transition: 0.15s;
    opacity: 1;
}

#pagecontent.fading {
    opacity: 0;
}

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    color: var(--bright-text);
    text-align: center;
    background: var(--bg);
}

.error-page h1 {
    font-size: 7rem;
    margin: 0;
    font-weight: 700;
    margin-bottom: -20px;
}

.error-page p {
    font-size: 1rem;
    margin: 20px 0;
}

.back-home-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(145deg, var(--accent), var(--accent-2));
    color: var(--bright-text);
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.3s;
    cursor: pointer;
}

.back-home-button:hover {
    box-shadow: 0 0 25px color-mix(in srgb, var(--accent) 30%, transparent 70%);
    transform: translateY(-2px);
}

.dac {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.hac {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.vac {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.hcont {
    display: flex;
    flex-direction: row;
}

.vcont {
    display: flex;
    flex-direction: column;
}

.primary-btn {
    padding: 10px 20px;
    background: linear-gradient(145deg, var(--accent), var(--accent-2));
    color: var(--bright-text);
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-block;
    border: none;
    font-size: 15px;
}

.primary-btn i {
    font-size: 18px;
}

.primary-btn:hover {
    box-shadow: 0 0 25px color-mix(in srgb, var(--accent) 30%, transparent 70%);
    transform: translateY(-2px);
}

.secondary-btn {
    padding: 10px 20px;
    background: var(--bg-3);
    color: var(--text);
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-block;
    border: none;
    font-size: 15px;
    outline: 1px solid var(--border-2);
}

.secondary-btn i {
    font-size: 18px;
}

.secondary-btn:hover {
    background: var(--bg-2);
    transform: translateY(-2px);
}

.tag {
    border-radius: 10px;
    background: linear-gradient(145deg, var(--accent), var(--accent-2));
    padding: 5px 10px;
    font-size: 14px;
    pointer-events: none;
    color: var(--bright-text);
}

footer {
    opacity: 0.5;
    font-size: 13px;
    text-align: center;
    position: relative;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.icon-with-bg {
    background: linear-gradient(145deg, var(--accent), var(--accent-2));
    filter: drop-shadow(0 0 25px color-mix(in srgb, var(--accent) 30%, transparent 70%));
    padding: 0px;
    width: 45px;
    height: 45px;
    padding: 10px;
    text-align: center;
    align-items: center;
    border-radius: 22.5px;
    font-size: 35px;
    display: inline-block;
}

.modal {
    height: max-content;
    width: fit-content;
    border-radius: 25px;
    outline: 1px solid var(--border);
    background: var(--bg-2);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.35);
    position: fixed;
    left: 50%;
    top: 50%;
    transform-origin: center center;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    padding: 25px;
    color: white;
    z-index: 23498623487234;
    transition: 0.2s cubic-bezier(0.075, 0.82, 0.165, 1);
    pointer-events: all;
}

.modalhidden {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    transform-origin: center center;
    pointer-events: none;
}

.modal .danger-icon-container {
    background: rgba(255, 0, 0, 0.15);
    width: 35px;
    height: 35px;
    border-radius: 15px;
    padding: 15px;
    margin-right: 15px;
}

.modal .danger-icon-container i {
    color: rgba(255, 161, 161, 0.95);
}

.modal .hcont span {
    color: var(--bright-text);
    font-weight: 650;
    font-size: 27px;
    position: relative;
    top: 50%;
    transform: translateY(25%);
}

.modal h1 {
    margin-top: 0;
}

.modal button {
    background: var(--bg-3);
    outline: 1px solid var(--border);
    padding: 12px 15px;
    border-radius: 15px;
    font-size: 15px;
    border: none;
    width: 50%;
    cursor: pointer;
    transition: 0.2s;
}

.modal button:hover {
    scale: 1.02;
    transform: translateY(-3px);
}

.modal button#modalaction {
    background: rgba(255, 0, 0, 0.15);
    color: rgba(255, 161, 161, 0.95);
    outline: 1px solid rgba(255, 0, 0, 0.3);
}

.bluroverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    backdrop-filter: blur(4px) brightness(0.5);
    z-index: 0;
}

/* ========== HOME PAGE ========== */
body.home {
    background-size: 40px 40px;
    min-height: 100vh;
    background-position: -19px -19px;
    margin: 0;
    position: relative;

    & .big-image {
        display: block;
        height: 400px;
        width: 90%;
        max-width: 1200px;
        margin: 40px auto;
        background: linear-gradient(45deg, color-mix(in srgb, var(--accent) 50%, black 50%), var(--accent-2));
        border-radius: 25px;
        position: relative;
        overflow: hidden;
        outline: 1px solid var(--border);
        filter: drop-shadow(0 0 25px rgba(0, 0, 0, 0.5));

        & .big-image-content {
            box-sizing: border-box;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 30%, 70%, transparent);
            padding: 30px;
            width: 100%;
            color: var(--bright-text);
            position: absolute;
            bottom: 0;
            left: 0;
        }

        & .big-image-content h1 {
            margin: 0;
            margin-top: 15px;
            margin-bottom: -10px;
            font-size: 2.5rem;
            font-weight: 700;
        }
    }

    & .featured-container {
        width: 90%;
        max-width: 1200px;
        margin: 40px auto;
        padding: 20px;
    }

    & .featured-container h2 {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    & .grid {
        display: grid;
        gap: 20px;
    }

    & .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    & .card {
        background: var(--bg-2);
        border-radius: 25px;
        padding: 15px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s, box-shadow 0.3s;
        cursor: pointer;
        outline: 1px solid color-mix(in srgb, var(--border) 70%, transparent 30%);
        display: flex;
        flex-direction: column;
        height: 90%;
    }

    & .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }

    & .card img {
        width: 50%;
        height: auto;
        border-radius: 20px;
    }

    & .card h3 {
        margin-top: 15px;
        font-size: 1.2rem;
        margin-bottom: -10px;
    }

    & .home-help-container {
        width: 86%;
        max-width: 1160px;
        margin: 40px auto;
        padding: 20px;
        background: var(--bg-2);
        border-radius: 25px;
        outline: 1px solid var(--border);
    }

    & .home-help-container h2 {
        font-size: 1.75rem;
        font-weight: 650;
        margin-bottom: 20px;
    }

    & .home-help-container p {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* ========== GAMES AND APPS ========== */
body.games {
    background-size: 40px 40px;
    min-height: 100vh;
    background-position: -19px -19px;
    margin: 0;
    position: relative;

    & .featured-container {
        width: 94%;
        margin: 40px auto;
        padding: 20px;
    }

    & .featured-container h2 {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    & .grid {
        display: flex;
        flex-wrap: wrap;
    }

    & .card {
        background: var(--bg-2);
        border-radius: 25px;
        padding: 15px;
        width: 175px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s, box-shadow 0.3s;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        height: 175px;
        margin: 5px;
        outline: 1px solid color-mix(in srgb, var(--border) 70%, transparent 30%);
    }

    & .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }

    & .card img {
        width: 75px;
        height: auto;
        border-radius: 20px;
    }

    & .card h3 {
        margin-top: 15px;
        font-size: 1.2rem;
    }

    & input[type="text"] {
        width: 250px;
        transform: translateY( 30px);
        padding: 12.5px 10px;
        margin-right: 8%;
        border-radius: 15px;
        border: 1px solid var(--border);
        background: var(--bg-3);
        color: var(--text);
        font-size: 14px;
        outline: none;
        transition: 0.2s;
    }

    & input[type="text"]::placeholder {
        color: var(--border);
    }

    * input[type="text"]:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent 70%);
    }
}

/* ========== SETTINGS ========== */
body.settings {
    background-size: 40px 40px;
    min-height: 100vh;
    background-position: -19px -19px;
    margin: 0;
    position: relative;

    & .featured-container {
        width: 60%;
        max-width: 1200px;
        margin: 40px auto;
        padding: 20px;
    }

    & .grid {
        display: grid;
        gap: 10px 10px;
    }

    & .grid-4 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    & .card {
        background: var(--bg-2);
        border-radius: 25px;
        padding: 20px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        height: 275px;
        outline: 1px solid color-mix(in srgb, var(--border) 100%, transparent 0%);
    }

    & .card.full-width {
        grid-column: span 2;
        height: auto;
    }

    & .card h3 {
        margin-top: 10px;
        font-size: 1.5rem;
        margin-bottom: 15px;
        font-weight: 650;
    }

    & .card h3 i {
        color: var(--accent);
        font-size: 2rem;
        vertical-align: -2.5px;
    }

    & .card .theme-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 15px;
        overflow-y: auto;
        padding-right: 5px;
    }

    & .theme-item,
    .backend-item,
    .cloak-item {
        background: color-mix(in srgb, var(--bg-2) 70%, var(--bg-3) 30%);
        padding: 12px 20px;
        border-radius: 15px;
        cursor: pointer;
        font-weight: 500;
        display: flex;
        position: relative;
        justify-content: space-between;
        align-items: center;
        transition: background 0.2s ease;
        color: var(--text);
    }

    & .theme-item:hover:not(.active),
    .backend-item:hover:not(.active),
    .cloak-item:hover:not(.active) {
        background: var(--bg-3);
    }

    & .theme-item.active,
    .backend-item.active,
    .cloak-item.active {
        background: var(--accent);
        color: white;
    }

    & .cloak-item.active span {
        color: white;
    }

    & .theme-list::-webkit-scrollbar {
        width: 4px;
    }

    & .theme-list::-webkit-scrollbar-thumb {
        background: var(--bg-3);
        border-radius: 10px;
    }

    & .card input[type="text"] {
        width: 93.1%;
        padding: 12.5px 10px;
        border-radius: 15px;
        border: 1px solid var(--border);
        background: var(--bg-3);
        color: var(--text);
        font-size: 14px;
        outline: none;
        transition: 0.2s;
    }

    & .card input[type="text"]::placeholder {
        color: var(--border);
    }

    * .card input[type="text"]:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent 70%);
    }

    & #wisp-error-msg {
        color: var(--accent-2);
        margin-top: 10px;
        margin-bottom: -5px;
    }

    & .contribprofile {
        height: 75px;
        border-radius: 50%;
        cursor: pointer;
        transition: 0.2s;
        margin: 3px;
    }

    & .contribprofile:hover {
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
        scale: 1.02;
        transform: translateY(-3px);
    }

    & .cloak-item img {
        height: 24px;
        width: 24px;
        margin-left: -5px;
    }

    & .cloak-item span {
        position: absolute;
        left: 50px;
        color: var(--text);
    }
}