:root{
    --cp-bg-0: #0e0016;
    --cp-bg-1: #120021;
    --cp-purple-dark: #2b0356;
    --cp-purple-deep: #4f096b;
    --cp-electric-purple: #5c099d;
    --cp-neon-violet: #6c0cd1;
    --cp-bright-purple: #a312e1;
    --cp-neon-magenta: #e313ee;
    --cp-glow: #e55df0;
    --cp-soft-glow: #f0a0f5;
    --cp-text: #f9d9fb;
    --cp-blue-accent: #5158e9;
}

html{
    color: var(--cp-text);
    font-family: 'Roboto', sans-serif;
    height: 100%;
    width: 100%;
    max-width: 100vw;
    background:
        radial-gradient(120% 120% at 50% 0%, rgba(163, 18, 225, 0.15), transparent 50%),
        linear-gradient(180deg, var(--cp-bg-1), var(--cp-bg-0));
}

.Top{
    width: 99%;
    height: 80px;
    background:
        radial-gradient(120% 180% at 12% 50%, rgba(229, 93, 240, 0.22), transparent 46%),
        radial-gradient(90% 140% at 88% 50%, rgba(81, 88, 233, 0.2), transparent 55%),
        linear-gradient(120deg, rgba(79, 9, 107, 0.92), rgba(18, 0, 33, 0.95));
    border-color: rgba(229, 93, 240, 0.6);
    border-width: 1px;
    border-style: solid;
    padding: 0;
    margin: 12px auto 0;
    border-radius: 26px;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    box-shadow:
        0 14px 35px rgba(8, 0, 18, 0.85),
        0 0 30px rgba(227, 19, 238, 0.35),
        inset 0 0 24px rgba(108, 12, 209, 0.22);
    position: relative;
    overflow: visible;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.Top:hover{
    transform: translateY(-2px);
    box-shadow:
        0 18px 40px rgba(8, 0, 18, 0.9),
        0 0 34px rgba(227, 19, 238, 0.42),
        inset 0 0 26px rgba(108, 12, 209, 0.25);
}

.Top::before{
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(229, 93, 240, 0.35), transparent);
    box-shadow: 0 0 6px rgba(229, 93, 240, 0.2);
}

.Top::after{
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(249, 217, 251, 0.03), transparent 34%),
        radial-gradient(circle at 72% 50%, rgba(229, 93, 240, 0.15), transparent 42%);
    pointer-events: none;
}

.Logo{
    user-select: none;
    position: absolute;
    left: 0;
    top: 0;
    transform: none;
    height: 100%;
    width: 80px;
    overflow: hidden;
    border-radius: 26px 0 0 26px;
}

.Logo::before{
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(to right, rgba(14, 0, 22, 0.5), transparent 34%, transparent 78%, rgba(14, 0, 22, 0.34)),
        linear-gradient(to bottom, rgba(14, 0, 22, 0.24), transparent 28%, transparent 72%, rgba(14, 0, 22, 0.24));
    filter: blur(1.5px);
    pointer-events: none;
    z-index: 2;
}

.Logo::after{
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        to right,
        transparent 24%,
        rgba(18, 0, 33, 0.18) 52%,
        rgba(18, 0, 33, 0.48) 72%,
        rgba(18, 0, 33, 0.78) 88%,
        rgba(18, 0, 33, 0.92) 100%
    );
    filter: blur(2px);
    pointer-events: none;
    z-index: 3;
}

.Logo img{
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-left: 0;
    opacity: 1;
    mix-blend-mode: normal;
    transform: scale(1.28);
    transform-origin: center;
    -webkit-mask-image: radial-gradient(circle at center, #000 54%, rgba(0, 0, 0, 0.92) 72%, rgba(0, 0, 0, 0.58) 86%, transparent 100%);
    mask-image: radial-gradient(circle at center, #000 54%, rgba(0, 0, 0, 0.92) 72%, rgba(0, 0, 0, 0.58) 86%, transparent 100%);
    filter:
        drop-shadow(0 0 8px rgba(229, 93, 240, 0.65))
        drop-shadow(0 0 20px rgba(81, 88, 233, 0.35));
    transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    position: relative;
    z-index: 1;
}

.Logo:hover img{
    opacity: 1;
    transform: scale(1.34);
    filter:
        drop-shadow(0 0 8px rgba(229, 93, 240, 0.9))
        drop-shadow(0 0 18px rgba(163, 18, 225, 0.7));
}

.Home,
.User,
.Usersbutton,
.QuizAdminMenu,
.Logoutbutton{
    user-select: none;
    cursor: pointer;
    text-decoration: none;
    color: var(--cp-text);
    text-shadow: 0 0 8px rgba(227, 19, 238, 0.85);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    transition: text-shadow 0.2s ease, color 0.2s ease;
}

.Home{
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.User{
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
}

.Home:hover,
.User:hover,
.Usersbutton:hover,
.QuizAdminMenu:hover,
.Logoutbutton:hover{
    color: #fff;
    text-shadow: 0 0 12px var(--cp-soft-glow), 0 0 24px var(--cp-neon-magenta);
}

.Usersbutton{
    position: absolute;
    right: 190px;
    top: 50%;
    transform: translateY(-50%);
}

.QuizAdminMenu{
    position: absolute;
    right: 285px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
}

.QuizAdminMenu summary{
    list-style: none;
    cursor: pointer;
    white-space: nowrap;
}

.QuizAdminMenu summary::-webkit-details-marker{
    display: none;
}

.QuizAdminMenu button,
.QuizAdminMenu a{
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 220px;
    min-height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(240, 160, 245, 0.52);
    background: linear-gradient(120deg, rgba(79, 9, 107, 0.96), rgba(18, 0, 33, 0.98));
    color: var(--cp-text);
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 0 16px rgba(229, 93, 240, 0.24);
}

.QuizAdminMenu a{
    top: calc(100% + 58px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.Logoutbutton{
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
}

.UserLogin{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    user-select: none;
    font-size: 1.34rem;
    line-height: 1;
    letter-spacing: 0.06em;
    font-weight: 700;
    text-align: center;
    max-width: min(38vw, 460px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f9d9fb;
    text-shadow:
        0 0 8px rgba(229, 93, 240, 0.8),
        0 0 18px rgba(163, 18, 225, 0.6),
        0 0 28px rgba(81, 88, 233, 0.35);
}

.flashes{
    position: fixed;
    top: 96px;
    right: max(2vw, 14px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(420px, 92vw);
    pointer-events: none;
}

.flash-toast{
    position: relative;
    padding: 12px 42px 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(240, 160, 245, 0.56);
    background:
        radial-gradient(130% 170% at 20% 20%, rgba(227, 19, 238, 0.22), transparent 55%),
        linear-gradient(135deg, rgba(79, 9, 107, 0.92), rgba(18, 0, 33, 0.96));
    color: #f9d9fb;
    box-shadow:
        0 16px 32px rgba(8, 0, 18, 0.75),
        0 0 20px rgba(229, 93, 240, 0.3),
        inset 0 0 12px rgba(81, 88, 233, 0.16);
    pointer-events: auto;
}

.flash-toast.success{
    border-color: rgba(120, 255, 198, 0.58);
    box-shadow:
        0 16px 32px rgba(8, 0, 18, 0.75),
        0 0 20px rgba(120, 255, 198, 0.22),
        inset 0 0 12px rgba(120, 255, 198, 0.16);
}

.flash-toast.error,
.flash-toast.danger{
    border-color: rgba(255, 125, 146, 0.6);
    box-shadow:
        0 16px 32px rgba(8, 0, 18, 0.75),
        0 0 20px rgba(255, 125, 146, 0.24),
        inset 0 0 12px rgba(255, 125, 146, 0.16);
}

.flash-message{
    margin: 0;
    font-size: 0.96rem;
    line-height: 1.35;
    text-shadow: 0 0 8px rgba(229, 93, 240, 0.45);
}

.flash-close{
    position: absolute;
    top: 50%;
    right: 9px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(240, 160, 245, 0.52);
    background: linear-gradient(120deg, rgba(108, 12, 209, 0.32), rgba(227, 19, 238, 0.18));
    color: #f9d9fb;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(229, 93, 240, 0.26);
}

@media (max-width: 760px){
    .Top{
        height: 120px;
        width: 96%;
        margin-top: 9px;
        border-radius: 22px;
    }

    .Logo{
        width: 120px;
        border-radius: 22px 0 0 22px;
    }

    .Logo::before{
        inset: 0;
    }

    .Logo img{
        width: 100%;
        height: 100%;
    }

    .UserLogin{
        left: 58%;
        top: 32%;
        transform: translate(-50%, -50%);
        font-size: 1.08rem;
        max-width: 44vw;
    }

    .flashes{
        top: 132px;
        right: 8px;
        width: min(96vw, 420px);
    }

    .User,
    .Usersbutton,
    .QuizAdminMenu,
    .Logoutbutton{
        right: 14px;
        transform: translateY(-50%);
        font-size: 0.9rem;
    }

    .User,
    .Logoutbutton{
        top: 72%;
    }

    .Usersbutton{
        top: 50%;
    }

    .QuizAdminMenu{
        top: 50%;
        right: 88px;
    }

    .QuizAdminMenu button,
    .QuizAdminMenu a{
        top: calc(100% + 10px);
        right: -44px;
        min-width: 190px;
    }

    .QuizAdminMenu a{
        top: calc(100% + 56px);
    }

    .Home{
        right: 14px;
        top: 26%;
        font-size: 0.85rem;
    }
}
