@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg: #0c1020;
    --bg-soft: #131a31;
    --surface: rgba(19, 27, 49, 0.78);
    --surface-strong: rgba(14, 21, 41, 0.92);
    --surface-gradient: linear-gradient(160deg, rgba(26, 39, 76, 0.78), rgba(19, 27, 49, 0.84) 56%, rgba(14, 21, 41, 0.9));
    --text: #e8eefc;
    --text-soft: #b9c4e6;
    --accent: #3dd6a0;
    --accent-strong: #26b483;
    --accent-warm: #ffcc75;
    --border: rgba(104, 132, 201, 0.32);
    --shadow: 0 20px 50px rgba(5, 10, 26, 0.48);
}

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

html,
body {
    margin: 0 !important;
    padding: 0 !important;
}

body {
    font-family: "Space Grotesk", "Segoe UI", sans-serif !important;
    color: var(--text) !important;
    background:
        radial-gradient(1100px 620px at 8% -12%, rgba(61, 214, 160, 0.28), transparent 61%),
        radial-gradient(980px 620px at 92% -14%, rgba(113, 140, 255, 0.3), transparent 59%),
        radial-gradient(860px 500px at 50% 118%, rgba(255, 204, 117, 0.13), transparent 70%),
        linear-gradient(180deg, #070d1b 0%, #0a1021 42%, #0c142a 100%) !important;
    min-height: 100vh;
    line-height: 1.65 !important;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1200;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(130, 160, 224, 0.24);
    background: linear-gradient(140deg, rgba(11, 17, 35, 0.82), rgba(9, 13, 27, 0.88));
}

.site-header__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.site-brand {
    font-family: "DM Serif Display", "Times New Roman", serif;
    font-size: 1.4rem;
    letter-spacing: 0.02em;
    color: #f4f7ff !important;
    text-decoration: none;
    white-space: nowrap;
}

.site-brand:hover {
    background: linear-gradient(120deg, #a8f3d8, #d9e8ff 55%, #ffe7b9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

.navbar {
    display: flex !important;
    flex-wrap: nowrap;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 6px;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    position: static !important;
    white-space: nowrap;
    overflow: visible !important;
}

.navbar > a,
.navbar .dropdown > a {
    color: var(--text-soft) !important;
    text-decoration: none !important;
    font-size: 0.93rem !important;
    font-weight: 600 !important;
    padding: 8px 10px !important;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: 0.2s ease;
    flex: 0 0 auto;
}

.navbar > a:hover,
.navbar .dropdown > a:hover {
    color: #f3f8ff !important;
    border-color: rgba(96, 132, 212, 0.42);
    background: rgba(29, 41, 74, 0.55);
}

.navbar > a.active,
.navbar .dropdown > a.active {
    color: #edfff9 !important;
    background: linear-gradient(130deg, rgba(61, 214, 160, 0.3), rgba(62, 128, 255, 0.24), rgba(255, 204, 117, 0.2));
    border-color: rgba(61, 214, 160, 0.55);
}

.dropdown {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 210px;
    z-index: 50;
    background: linear-gradient(160deg, rgba(22, 34, 66, 0.96), rgba(14, 21, 41, 0.96));
    border: 1px solid rgba(92, 124, 194, 0.45);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 6px;
    white-space: normal;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    border-radius: 9px;
    padding: 10px 12px !important;
    font-size: 0.95rem !important;
    color: var(--text-soft) !important;
    text-decoration: none !important;
}

.dropdown-content a:hover {
    background: rgba(54, 76, 132, 0.5) !important;
    color: #f6fbff !important;
}

.container {
    width: min(1080px, calc(100% - 36px)) !important;
    margin: 28px auto 56px !important;
    padding: 0 !important;
    display: block !important;
    height: auto !important;
}

h1 {
    margin: 0 0 20px !important;
    font-family: "DM Serif Display", "Times New Roman", serif !important;
    background: linear-gradient(120deg, #f7fbff, #d7e8ff 45%, #c4ffe9 72%, #ffe8be);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    font-size: clamp(2rem, 2.8vw, 2.9rem) !important;
    letter-spacing: 0.01em;
    text-wrap: balance;
}

h2 {
    margin-top: 0.3em;
    color: #dce7ff !important;
    font-size: clamp(1.2rem, 1.9vw, 1.65rem) !important;
}

p,
li {
    color: var(--text-soft);
}

.section,
.content-block {
    width: 100% !important;
    max-width: none !important;
    background: var(--surface-gradient) !important;
    border: 1px solid var(--border) !important;
    border-radius: 20px !important;
    box-shadow: var(--shadow) !important;
    padding: clamp(18px, 2.2vw, 30px) !important;
    margin: 0 0 18px !important;
    transform: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
    position: relative;
    overflow: hidden;
}

.section::before,
.content-block::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, rgba(61, 214, 160, 0.9), rgba(94, 169, 255, 0.8), rgba(255, 204, 117, 0.75));
    pointer-events: none;
}

.section:hover,
.content-block:hover {
    transform: translateY(-3px) !important;
    border-color: rgba(61, 214, 160, 0.42) !important;
    box-shadow: 0 24px 44px rgba(8, 15, 34, 0.46) !important;
}

.section a,
.content-block a,
.container a {
    color: #ffd692 !important;
    font-weight: 600 !important;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
}

.section a:hover,
.content-block a:hover,
.container a:hover {
    color: #ffe2a9 !important;
}

img {
    max-width: 100%;
    border-radius: 12px;
}

iframe {
    width: 100% !important;
    border: 1px solid rgba(92, 124, 194, 0.35) !important;
    border-radius: 14px;
    background: #0e152a;
}

.sl-avatar-inline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin: 12px 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.sl-avatar-inline__image {
    width: 160px;
    height: auto;
    border-radius: 12px;
    border: 2px solid rgba(96, 132, 212, 0.4);
    object-fit: cover;
    flex: 0 0 auto;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sl-avatar-inline--online .sl-avatar-inline__image {
    border: 6px solid #2dff9f;
    box-shadow:
        0 0 0 2px rgba(15, 34, 25, 0.9),
        0 0 18px rgba(45, 255, 159, 0.95),
        0 0 36px rgba(45, 255, 159, 0.7);
}

.sl-avatar-inline--offline .sl-avatar-inline__image {
    border: 2px solid #ff5f67;
    box-shadow:
        0 0 0 1px rgba(42, 14, 16, 0.9),
        0 0 10px rgba(255, 95, 103, 0.35);
}

.sl-avatar-inline--unknown .sl-avatar-inline__image,
.sl-avatar-inline--stale .sl-avatar-inline__image {
    border: 2px solid rgba(96, 132, 212, 0.45);
    box-shadow: none;
}

.sl-avatar-inline__name {
    margin: 0;
    font-size: 1.05rem;
    color: #f4f8ff !important;
}

.sl-avatar-inline__link {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-soft) !important;
    word-break: break-word;
}

.sl-avatar-status {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
}

.sl-avatar-status--online {
    color: #7cf8bc !important;
}

.sl-avatar-status--offline {
    color: #ffb4bc !important;
}

.sl-avatar-status--unknown,
.sl-avatar-status--stale {
    color: #c6d3f1 !important;
}

body.avatar-status-loading {
    pointer-events: none;
}

body.avatar-status-loading .container {
    visibility: hidden;
}

body.avatar-status-loading::before {
    content: "Loading avatar status...";
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dce7ff;
    font-size: 1.1rem;
    background: linear-gradient(180deg, #070d1b 0%, #0a1021 42%, #0c142a 100%);
    opacity: 1;
    pointer-events: none;
    z-index: 9999;
}

*[style*='color: black'],
*[style*='color: #000000'] {
    color: var(--text-soft) !important;
}

@media (max-width: 960px) {
    .site-header__inner {
        flex-direction: row;
        align-items: center;
    }

    .site-brand {
        text-align: left;
        flex: 0 0 auto;
        font-size: 1.2rem;
    }

    .navbar {
        justify-content: flex-start !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        scrollbar-width: thin;
        padding-bottom: 2px !important;
    }

    .navbar::-webkit-scrollbar {
        height: 6px;
    }

    .navbar::-webkit-scrollbar-thumb {
        background: rgba(99, 132, 204, 0.45);
        border-radius: 99px;
    }

    .sl-avatar-inline {
        align-items: center;
        text-align: center;
    }

    .sl-avatar-inline__image {
        width: min(220px, 100%);
    }
}

@media (max-width: 640px) {
    .container {
        width: calc(100% - 20px) !important;
        margin-top: 18px !important;
    }

    .navbar > a,
    .navbar .dropdown > a {
        font-size: 0.92rem !important;
        padding: 8px 11px !important;
    }

    .dropdown-content {
        position: static;
        margin-top: 4px;
    }
}
