:root {
    --night: #08051a;
    --deep-space: #120b2e;
    --panel: rgba(18, 11, 46, .9);
    --panel-light: rgba(31, 17, 67, .92);
    --cyan: #48f4ff;
    --pink: #ff4fb3;
    --violet: #a66bff;
    --gold: #ffd166;
    --text: #f8f4ff;
    --muted: #c5b8e8;
    --line: rgba(166, 107, 255, .5);
    --glow-cyan: 0 0 1rem rgba(72, 244, 255, .45);
    --glow-pink: 0 0 1rem rgba(255, 79, 179, .4);
}

html, body {
    min-height: 100%;
    margin: 0;
    background: var(--night);
    color: var(--text);
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

* { box-sizing: border-box; }
a { color: inherit; }
app { display: contents; }
.page, main { width: 100%; min-height: 100vh; }
.content { padding: 0; }
.site-loading {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    background: var(--night);
    opacity: 1;
    transition: opacity .35s ease;
}
.site-loading-hidden { opacity: 0; pointer-events: none; }
.site-loading-spinner {
    width: 3.25rem;
    height: 3.25rem;
    border: .25rem solid rgba(72, 244, 255, .2);
    border-top-color: var(--cyan);
    border-right-color: var(--pink);
    border-radius: 50%;
    box-shadow: var(--glow-cyan), var(--glow-pink);
    animation: site-loading-spin .8s linear infinite;
}
.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 4rem);
    border-top: 1px solid rgba(166, 107, 255, .45);
    background: #08051a;
    color: var(--muted);
    font-size: .8rem;
    letter-spacing: .04em;
    text-align: center;
}

.links-page {
    position: relative;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 4.5rem 1rem 3rem;
    overflow: hidden;
    background-color: var(--deep-space);
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}
.links-page::before, .site-background::before {
    position: absolute;
    inset: 0;
    content: '';
    pointer-events: none;
    background-image:
        linear-gradient(rgba(72, 244, 255, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 79, 179, .08) 1px, transparent 1px);
    background-size: 3rem 3rem;
    mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent);
}
.links-page::after, .site-background::after {
    position: absolute;
    inset: 0;
    content: '';
    pointer-events: none;
    background: radial-gradient(circle at 50% 0, rgba(166, 107, 255, .2), transparent 42%), linear-gradient(rgba(8, 5, 26, .2), rgba(8, 5, 26, .7));
}
.page-shade { position: fixed; inset: 0; z-index: 0; background: rgba(8, 5, 26, .5); }
.links-content {
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 30rem);
    text-align: center;
}
.profile-avatar {
    width: 7.5rem;
    height: 7.5rem;
    margin-bottom: 1.25rem;
    border: 3px solid var(--cyan);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--glow-cyan), 0 1rem 2rem rgba(0, 0, 0, .45);
}
h1 {
    margin: 0 0 .7rem;
    color: var(--text);
    font-family: 'Trebuchet MS', 'Segoe UI', sans-serif;
    font-size: clamp(2rem, 7vw, 3.2rem);
    line-height: 1.05;
    text-shadow: 0 0 .7rem rgba(166, 107, 255, .65);
}
.profile-bio { max-width: 30rem; margin: 0 0 2rem; color: var(--muted); line-height: 1.55; }
.links-list, .menu-list { display: flex; flex-direction: column; gap: .8rem; width: 100%; }
.link-item, .menu-item {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-height: 3.4rem;
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: .35rem;
    background: linear-gradient(105deg, rgba(255, 79, 179, .16), rgba(72, 244, 255, .1));
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    box-shadow: inset 0 0 1rem rgba(166, 107, 255, .08), var(--glow-pink);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.link-item span, .menu-item span:nth-child(2) { flex: 1; text-align: left; }
.link-item i, .menu-item i { width: 1.25rem; color: var(--cyan); text-align: center; text-shadow: var(--glow-cyan); }
.link-item:hover, .menu-item:hover { transform: translateY(-2px); border-color: var(--cyan); box-shadow: var(--glow-cyan), var(--glow-pink); }

.menu-page, .article-page, .status-page {
    position: relative;
    z-index: 1;
    width: min(100% - 2rem, 48rem);
    margin: 0 auto;
    padding: 3rem 0;
}
.site-background {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background-color: var(--deep-space);
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}
.menu-page { padding-left: 1rem; padding-right: 1rem; }
.article-page-wide { width: min(100% - 2rem, 72rem); }
.article-page-full {
    width: 100%;
    padding-left: clamp(1rem, 4vw, 4rem);
    padding-right: clamp(1rem, 4vw, 4rem);
}
.menu-page h1, .article-page h1 { margin: 2rem 0; color: var(--cyan); text-shadow: 0 0 .8rem rgba(72, 244, 255, .5); }
.article-page > h1 { text-align: center; }
.back-link, .action-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.7rem;
    padding: .55rem .9rem;
    border: 1px solid var(--pink);
    border-radius: .3rem;
    background: rgba(8, 5, 26, .92);
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    text-shadow: var(--glow-pink);
    box-shadow: var(--glow-pink);
}
.back-link:hover, .action-link:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: var(--glow-cyan); }
.page-back { margin-bottom: 1rem; }
.links-back { position: absolute; top: 1.25rem; left: 1.25rem; z-index: 2; }
.menu-item { background: var(--panel); border-color: var(--line); }
.menu-item i { color: var(--pink); text-shadow: var(--glow-pink); }

.article-menu {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    width: min(100%, 30rem);
    margin: 1.5rem 0;
    padding: .6rem;
    border: 1px solid var(--violet);
    border-radius: .35rem;
    background: var(--panel);
    box-shadow: var(--glow-pink);
}
.article-menu > a, .article-dropdown summary {
    padding: .55rem .8rem;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
    transition: transform .2s ease, color .2s ease, background .2s ease;
}
.article-menu > a:hover, .article-dropdown summary:hover {
    transform: translateX(.35rem);
    color: var(--cyan);
    background: rgba(72, 244, 255, .08);
    text-shadow: var(--glow-cyan);
}
.article-menu .article-back-item { border: 1px solid var(--pink); border-radius: .25rem; background: rgba(8, 5, 26, .92); color: var(--text); font-weight: 800; }
.article-dropdown { position: relative; }
.article-dropdown summary { list-style: none; }
.article-dropdown summary::-webkit-details-marker { display: none; }
.article-dropdown summary::after {
    display: inline-block;
    content: ' ▾';
    color: var(--pink);
    transition: transform .25s ease, color .25s ease;
}
.article-dropdown[open] summary::after { transform: rotate(180deg); color: var(--cyan); }
.article-dropdown-items {
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    padding: .4rem;
    margin-top: .25rem;
    border: 1px solid var(--violet);
    border-radius: .25rem;
    background: var(--night);
    opacity: 0;
    box-shadow: var(--glow-pink);
    transform: translateY(-.4rem);
    transition: max-height .3s ease, opacity .25s ease, transform .3s ease;
    visibility: hidden;
}
.article-dropdown[open] .article-dropdown-items {
    max-height: 24rem;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    animation: dropdown-open .3s ease both;
}
.article-dropdown-items a {
    padding: .55rem .7rem;
    color: var(--muted);
    text-decoration: none;
    transition: transform .2s ease, color .2s ease, background .2s ease;
}
.article-dropdown-items a:hover {
    transform: translateX(.3rem);
    color: var(--cyan);
    background: var(--panel-light);
}
.article-menu-horizontal { flex-direction: row; align-items: flex-start; width: 100%; flex-wrap: wrap; }
.article-menu-horizontal .article-dropdown { position: relative; }
.article-menu-horizontal .article-dropdown:not([open]) > .article-dropdown-items { display: none; }
.article-menu-horizontal .article-dropdown:hover > .article-dropdown-items,
.article-menu-horizontal .article-dropdown[open] > .article-dropdown-items {
    display: flex;
}
.article-menu-horizontal .article-dropdown:hover > .article-dropdown-items {
    animation: dropdown-open .3s ease both;
}
.article-menu-horizontal .article-dropdown:hover summary::after { transform: rotate(180deg); color: var(--cyan); }
.article-menu-horizontal .article-dropdown-items { position: absolute; top: 100%; left: 0; z-index: 2; min-width: 12rem; margin-top: 0; }
.article-content { color: var(--muted); font-size: 1.05rem; line-height: 1.75; }
.article-content h1, .article-content h2, .article-content h3 { color: var(--text); text-align: center; }
.article-content h2 { border-bottom: 1px solid var(--pink); padding-bottom: .35rem; }
.article-content a { color: var(--cyan); }
.article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    filter: drop-shadow(0 0 2px var(--cyan)) drop-shadow(0 0 7px var(--pink));
}
.status-page { text-align: center; }
.status-page h1 { color: var(--pink); }

#blazor-error-ui { display: none; }
@keyframes site-loading-spin { to { transform: rotate(360deg); } }
@keyframes dropdown-open {
    from { max-height: 0; opacity: 0; transform: translateY(-.4rem); }
    to { max-height: 24rem; opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
    .links-page, .site-background { background-attachment: scroll; }
    .links-page { padding: 4rem 1rem 2rem; }
    .menu-page, .article-page, .status-page { padding-top: 2rem; }
    .article-menu-horizontal { flex-direction: column; }
    .article-menu-horizontal .article-dropdown-items { position: static; min-width: 0; margin-top: .25rem; }
    .site-footer { flex-direction: column; align-items: center; }
}
