/* Main Profile UI Containers */
.ui-section .profile-header {
    --p-header-outline: 2px solid rgba(255,255,255,0.75);
    --pfp-size: calc(7.5vw + 7.5vh);
    --pfp-con-size: calc(var(--pfp-size) - (var(--pfp-size) / 5));
    --max-size-p-header: 400px;
    --skeli-loader-bg: rgba(50, 50, 50, 1);
    --skeli-loader-bar-hide: rgba(75, 75, 75, 0);
    --skeli-loader-bar-show: rgba(75, 75, 75, 0.5);
    width: 100%;
    height: fit-content;
    position: relative;
    margin: 0;
    padding: 0;
}
.ui-section .profile-body {
    width: 100%;
    height: fit-content;
    min-height: 80vh;
    position: relative;
    margin: 0;
    padding: 5vh 0;
}

.ui-section.profile:has(.profile-container .form-container)),
.profile-container:has(.form-container) {
    overflow: clip;
    padding: 0;
    margin: 0;
}



/* Sub Profile UI Containers & Content */
.ui-section .profile-header .banner {
    margin: 0;
    padding: 0;
    width: 100%;
    height: fit-content;
    aspect-ratio: 3 / 1;
    max-height: var(--max-size-p-header);
    position: relative;
    z-index: 2;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow:
        15px 15px 35px -10px var(--alt-clr-three) inset,
        -15px -15px 35px -10px var(--alt-clr-four) inset;
    background-color: var(--skeli-loader-bg);
}
.ui-section .profile-header .banner::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(
        110deg, 
        var(--skeli-loader-bar-hide) 0%, 
        var(--skeli-loader-bar-hide) 40%, 
        var(--skeli-loader-bar-show) 50%, 
        var(--skeli-loader-bar-hide) 60%, 
        var(--skeli-loader-bar-hide) 100%
    );
    animation: gradient-animation_2 1.2s linear infinite;
}
.profile-header .banner .pfp {
    width: var(--pfp-con-size);
    height: var(--pfp-con-size);
    max-width: var(--max-size-p-header);
    max-height: var(--max-size-p-header);
    border-radius: 100%;
    overflow: clip;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 5vw;
    bottom: calc((var(--pfp-con-size) / 2) * -1);
    outline: var(--p-header-outline);
    margin: 0;
    padding: 0;
    z-index: 4;
    background-color: var(--skeli-loader-bg);
}
.profile-header .banner .pfp::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(
        110deg, 
        var(--skeli-loader-bar-hide) 0%, 
        var(--skeli-loader-bar-hide) 40%, 
        var(--skeli-loader-bar-show) 50%, 
        var(--skeli-loader-bar-hide) 60%, 
        var(--skeli-loader-bar-hide) 100%
    );
    animation: gradient-animation_2 0.85s linear infinite;
}
@keyframes gradient-animation_2 {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.profile-header .profile-txt {
    --left-padding: calc((var(--pfp-con-size)));
    width: calc(100% - var(--left-padding));
    margin: 0;
    padding: 0;
    padding-left: var(--left-padding);
    height: fit-content;
    min-height: var(--pfp-con-size);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
    background: rgb(20, 20, 75,0.25);
    backdrop-filter: 
        blur(2px)
        brightness(0.5);
    z-index: 1;
    box-shadow:
        0px -15px 35px -10px rgba(255, 0, 200,0.25) inset,
        0px -5px 35px -10px rgba(0, 255, 255,0.25) inset,
        0px 5px 25px 5px rgba(0,0,0,0.75);
}
.profile-txt .username {
    font-size: 150%;
}
.profile-txt .bio {
    font-size: 75%;
}
.pfp img {
    width: var(--pfp-size);
    height: var(--pfp-size);
    margin: 0;
    padding: 0;
    z-index: 5;
    opacity: 1;
}
.pfp img.default-img {
    filter: hue-rotate(135deg);
}
.banner img.img-banner {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: clip;
    aspect-ratio: 3 / 1;
    z-index: 3;
    opacity: 0.95;
}
.banner img.default-img.img-banner {
    filter: hue-rotate(80deg);
}

.profile-body .profile-card-con {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 8px;
    width: calc(100% - (var(--main-margin-add) * 2));
    margin: 5vh var(--main-margin-add);
}
.profile-card-con .profile-card {
    padding: 10px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    background: var(--card-bg);
    box-shadow:
        15px 15px 35px -10px var(--alt-clr-two) inset,
        -15px -15px 35px -10px var(--alt-clr-one) inset;
    backdrop-filter: blur(2px);
    min-height: 30vh;
}
.profile-card-con .profile-card.alt {
    background: var(--card-bg-alt);
    box-shadow:
        15px 15px 35px -10px var(--alt-clr-three) inset,
        -15px -15px 35px -10px var(--alt-clr-four) inset;
}
.profile-card .card-helper {
    font-size: 75%;
    opacity: 0.65;
    margin: 0;
    padding: 0;
    text-align: center;
}
.profile-card .card-helper.hidden,
.profile-card .card-helper.small.hidden {
    display: none;
}
.profile-card .card-main {
    font-size: calc(1vw + 3vh);
    margin: 0;
    padding: 10px;
    font-weight: 600;
    text-align: center;
}
.profile-card .card-helper.small {
    font-size: 65%;
    opacity: 0.55;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items:center;
}
.profile-card .card-helper.small span {
    opacity: 0.45;
}
.profile-card .edit-user-btn {
    width: fit-content;
    height: fit-content;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.1);
    box-shadow:
        15px 15px 35px -10px rgb(20, 255, 239,0.25) inset,
        -15px -15px 35px -10px rgb(20, 165, 255,0.25) inset;
    border: 0;
    color: inherit;
    font: inherit;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
}
.edit-user-btn:hover {
    background: rgba(255,255,255,0.15);
    box-shadow:
        15px 15px 35px -10px rgb(20, 255, 239,0.35) inset,
        -15px -15px 35px -10px rgb(20, 165, 255,0.35) inset;
}
.edit-user-btn:focus-visible,
.username-edit-dialog button:focus-visible,
.username-edit-input:focus-visible {
    outline: 2px solid rgba(64, 220, 255, 0.95);
    outline-offset: 3px;
}

.username-edit-dialog {
    width: min(92vw, 420px);
    max-width: calc(100vw - 32px);
    margin: auto;
    padding: 0;
    color: #f5f8ff;
    background: rgba(19, 24, 38, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.45),
        15px 15px 35px -18px rgba(20, 255, 239, 0.28) inset,
        -15px -15px 35px -18px rgba(20, 165, 255, 0.28) inset;
}
.username-edit-dialog::backdrop {
    background: rgba(4, 7, 14, 0.72);
    backdrop-filter: blur(7px);
}
.username-edit-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: clamp(20px, 5vw, 30px);
}
.username-edit-form h2 {
    margin: 0;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
}
.username-edit-description {
    margin: -6px 0 4px;
    color: rgba(245, 248, 255, 0.7);
    line-height: 1.45;
}
.username-edit-label {
    font-size: 0.9rem;
    font-weight: 600;
}
.username-edit-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    color: #f5f8ff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font: inherit;
}
.username-edit-input:focus {
    border-color: rgba(64, 220, 255, 0.8);
}
.username-edit-error {
    margin: -6px 0 0;
    color: #ff9aab;
    font-size: 0.9rem;
}
.username-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}
.username-edit-actions button {
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.username-edit-cancel {
    color: #f5f8ff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.username-edit-save {
    color: #07131d;
    background: linear-gradient(135deg, #46e0cf, #55b8ff);
    border: 1px solid transparent;
}
.username-edit-actions button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.form-error {
    max-width: 300px;
    margin: 0;
    color: #ff9aab;
    font-size: 0.9rem;
    text-align: center;
}

.admin-dashboard {
    width: calc(100% - (var(--main-margin-add) * 2));
    margin: 6vh var(--main-margin-add);
    color: #f5f8ff;
}
.admin-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 18px;
    background: rgba(15,20,34,0.72);
    box-shadow:
        15px 15px 35px -18px rgba(20,255,239,0.25) inset,
        -15px -15px 35px -18px rgba(165,20,255,0.22) inset;
}
.admin-dashboard-header h1 {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
}
.admin-dashboard-header p { margin: 8px 0 0; color: rgba(245,248,255,0.72); }
.admin-dashboard-header .admin-eyebrow {
    margin: 0 0 8px;
    color: #58d9dc;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}
.admin-logout-button {
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid rgba(255,255,255,0.24);
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    color: #f5f8ff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.admin-logout-button:disabled { opacity: 0.55; cursor: wait; }
.admin-message { min-height: 1.4em; color: #ff9aab; }
.admin-workspace {
    margin-top: 20px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    background: rgba(15,20,34,0.58);
}
.admin-workspace h2 { margin-top: 0; }
.admin-workspace p { color: rgba(245,248,255,0.72); }



@media only screen and (max-width: 768px) {
    .profile-body .profile-card-con {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
    }
    .profile-card-con .profile-card {
        width: 80%;
        height: fit-content;
        min-height: 30vh;
    }
    .admin-dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }
}