:root {
    --bg: #090b0d;
    --panel: #0e1114;
    --panel-2: #12161a;
    --panel-3: #171c21;
    --line: rgba(255,255,255,.075);
    --line-strong: rgba(255,255,255,.12);
    --text: #eef1f3;
    --muted: #858e97;
    --muted-2: #5f6871;
    --accent: #9df0ae;
    --accent-soft: rgba(157,240,174,.09);
    --warning: #e8c47d;
    --danger: #e87979;
    --blue: #8baef7;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
}

button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 248px;
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    padding: 22px 14px;
    border-right: 1px solid var(--line);
    background: #0a0c0f;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px 10px 25px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #e9f4eb;
    color: #101512;
    font-weight: 800;
    font-size: 16px;
}

.brand strong {
    display: block;
    font-size: 12px;
    letter-spacing: .04em;
}

.brand small {
    display: block;
    color: var(--muted-2);
    margin-top: 2px;
    font-size: 9px;
}

.main-nav { display: flex; flex-direction: column; gap: 3px; }

.nav-group { margin-top: 16px; }

.nav-title {
    padding: 0 11px 7px;
    color: #515a63;
    text-transform: uppercase;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .12em;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 0;
    background: transparent;
    border-radius: 7px;
    padding: 9px 11px;
    color: #858e97;
    text-align: left;
    cursor: pointer;
    transition: .18s ease;
}

.nav-item:hover {
    color: #e8ecee;
    background: rgba(255,255,255,.035);
}

.nav-item.active {
    color: #eaf5ec;
    background: var(--accent-soft);
}

.nav-item.active .icon { color: var(--accent); }

.icon {
    width: 17px;
    text-align: center;
    color: #66717a;
    font-size: 13px;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 14px 8px 0;
}

.discord-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 10px 11px;
    border: 1px solid var(--line);
    background: transparent;
    border-radius: 7px;
    color: #9da6ae;
    cursor: pointer;
}

.discord-btn:hover { background: rgba(255,255,255,.035); }

.version {
    margin-top: 12px;
    padding: 0 3px;
    color: #454d55;
    font-size: 7px;
    letter-spacing: .1em;
}

.main {
    width: calc(100% - 248px);
    margin-left: 248px;
}

.topbar {
    height: 68px;
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 38px;
    border-bottom: 1px solid var(--line);
    background: rgba(9,11,13,.84);
    backdrop-filter: blur(18px);
}

.breadcrumbs {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--muted-2);
    font-size: 10px;
}

.breadcrumbs b { color: #40474d; }
.breadcrumbs strong { color: #aeb5bb; font-weight: 600; }

.account-trigger {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 4px 0 4px 8px;
}

.avatar {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #9df0ae, #718a79);
    color: #0c120e;
    font-size: 11px;
    font-weight: 800;
}

.avatar.large {
    width: 42px;
    height: 42px;
}

.account-name { text-align: left; }
.account-name strong, .account-name small { display: block; }
.account-name strong { font-size: 10px; }
.account-name small { color: var(--muted-2); font-size: 8px; margin-top: 2px; }
.chevron { color: #606a73; margin-left: 3px; }

.content {
    max-width: 1220px;
    margin: 0 auto;
    padding: 52px 42px 100px;
}

.eyebrow {
    color: var(--accent);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.page-title {
    margin: 10px 0 0;
    font-size: clamp(32px, 4vw, 51px);
    line-height: 1;
    letter-spacing: -.06em;
}

.page-lead {
    max-width: 620px;
    margin: 16px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.hero {
    min-height: 450px;
    display: grid;
    grid-template-columns: 1.35fr .65fr;
    gap: 18px;
    align-items: stretch;
}

.hero-main {
    position: relative;
    overflow: hidden;
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background:
        radial-gradient(circle at 80% 10%, rgba(157,240,174,.1), transparent 32%),
        linear-gradient(145deg, #12171a, #0d1013 62%);
}

.hero-main::after {
    content: "";
    position: absolute;
    width: 430px;
    height: 430px;
    right: -210px;
    bottom: -230px;
    border: 1px solid rgba(157,240,174,.12);
    border-radius: 50%;
    box-shadow:
        0 0 0 60px rgba(157,240,174,.018),
        0 0 0 120px rgba(157,240,174,.012);
}

/* --- Крутящийся блок травы --- */
.grass-scene {
    position: absolute;
    top: 34px;
    right: 44px;
    width: 100px;
    height: 100px;
    perspective: 650px;
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 18px 26px rgba(0,0,0,.5));
}

.grass-cube {
    position: relative;
    width: 100px;
    height: 100px;
    transform-style: preserve-3d;
    animation: grassSpin 10s linear infinite;
}

.grass-cube .face {
    position: absolute;
    inset: 0;
    width: 100px;
    height: 100px;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
}

.grass-cube .face.side { background-image: url("assets/grass_block_side.png"); }
.grass-cube .face.top    { background-image: url("assets/grass_top_final.png"); }
.grass-cube .face.bottom { background-image: url("assets/dirt_derived.png"); }

.grass-cube .top    { transform: rotateX(90deg)  translateZ(50px); }
.grass-cube .bottom { transform: rotateX(-90deg) translateZ(50px); }
.grass-cube .front  { transform: rotateY(0deg)   translateZ(50px); }
.grass-cube .back   { transform: rotateY(180deg) translateZ(50px); }
.grass-cube .right  { transform: rotateY(90deg)  translateZ(50px); }
.grass-cube .left   { transform: rotateY(-90deg) translateZ(50px); }

@keyframes grassSpin {
    from { transform: rotateX(-18deg) rotateY(0deg); }
    to   { transform: rotateX(-18deg) rotateY(360deg); }
}

@media (max-width: 1000px) {
    .grass-scene { display: none; }
}

.hero-main h1 {
    max-width: 690px;
    margin: 22px 0 0;
    font-size: clamp(45px, 6vw, 77px);
    line-height: .94;
    letter-spacing: -.075em;
}

.hero-main h1 em {
    display: block;
    color: var(--accent);
    font-style: normal;
}

.hero-main p {
    max-width: 580px;
    margin: 24px 0 0;
    color: #929ba3;
    line-height: 1.75;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}

.btn {
    min-height: 39px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #111519;
    color: #cbd2d7;
    cursor: pointer;
    text-decoration: none;
    transition: .18s ease;
}

.btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }

.btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #0d160f;
    font-weight: 750;
}

.stats-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--panel);
}

.stat-label {
    color: var(--muted-2);
    text-transform: uppercase;
    font-size: 8px;
    letter-spacing: .13em;
}

.online {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-size: 8px;
    font-weight: 800;
}

.online::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(157,240,174,.8);
}

.big-number {
    margin-top: 15px;
    font-size: 58px;
    font-weight: 800;
    letter-spacing: -.07em;
}

.stat-caption { color: var(--muted); font-size: 10px; }

.mini-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
}

.mini-stat {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.mini-stat strong { display: block; font-size: 15px; }
.mini-stat span { color: var(--muted-2); font-size: 8px; }

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin: 65px 0 17px;
}

.section-head h2 {
    margin: 7px 0 0;
    font-size: 25px;
    letter-spacing: -.045em;
}

.muted { color: var(--muted); }

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--panel);
    transition: .18s ease;
}

.card:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.card h3 { margin: 9px 0 0; font-size: 16px; }
.card p { margin: 9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }

.card-icon {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--accent-soft);
    color: var(--accent);
}

.card-link {
    border: 0px;
    background-color: transparent;
    display: inline-block;
    margin-top: 17px;
    color: var(--accent);
    font-size: 9px;
    font-weight: 700;
}

.notice {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
    padding: 13px 15px;
    border: 1px solid rgba(157,240,174,.12);
    border-radius: 7px;
    background: rgba(157,240,174,.035);
    color: #9da7ae;
    font-size: 10px;
}

.notice strong { color: #d8e3db; }

.timeline { display: grid; gap: 10px; margin-top: 25px; }
.timeline-item {
    display: grid;
    grid-template-columns: 105px 1fr;
    gap: 18px;
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--panel);
}
.timeline-date { color: var(--muted-2); font-size: 9px; }
.timeline-item h3 { margin: 0; font-size: 15px; }
.timeline-item p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }

.split {
    display: grid;
    grid-template-columns: 225px 1fr;
    gap: 14px;
    margin-top: 30px;
}

.subnav, .article {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
}

.subnav { padding: 8px; align-self: start; }

.subnav button {
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    text-align: left;
    cursor: pointer;
}

.subnav button.active, .subnav button:hover {
    background: rgba(255,255,255,.04);
    color: var(--text);
}

.article { padding: 30px; }
.article h2 { margin: 0; font-size: 27px; letter-spacing: -.04em; }
.article h3 { margin: 29px 0 7px; font-size: 14px; }
.article p, .article li { color: var(--muted); font-size: 11px; line-height: 1.85; }
.article ul { padding-left: 20px; }

.wiki-layout {
    display: grid;
    grid-template-columns: 205px minmax(0,1fr) 160px;
    gap: 12px;
    margin-top: 30px;
}

.wiki-nav, .wiki-article, .toc {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
}

.wiki-nav { padding: 13px 8px; }
.wiki-nav-title { padding: 0 8px 10px; color: #58626a; font-size: 8px; text-transform: uppercase; letter-spacing: .12em; }
.wiki-nav button {
    width: 100%;
    padding: 8px;
    border: 0;
    background: transparent;
    border-radius: 5px;
    color: var(--muted);
    text-align: left;
    cursor: pointer;
}
.wiki-nav button.active, .wiki-nav button:hover { color: var(--text); background: rgba(255,255,255,.04); }

.wiki-article { padding: 34px; }
.wiki-article .wiki-kicker { color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.wiki-article h2 { margin: 10px 0 0; font-size: 32px; letter-spacing: -.05em; }
.wiki-article .lead { color: #a0a9b0; font-size: 12px; line-height: 1.8; }
.wiki-article hr { border: 0; border-top: 1px solid var(--line); margin: 27px 0; }
.wiki-article h3 { margin: 22px 0 7px; font-size: 15px; }
.wiki-article p { color: var(--muted); font-size: 11px; line-height: 1.85; }
.toc { padding: 16px; align-self: start; }
.toc strong { display: block; font-size: 8px; color: #69737c; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
.toc a { display: block; color: var(--muted); font-size: 9px; padding: 5px 0; }
.toc a:hover { color: var(--text); }

.mode-switch {
    display: flex;
    gap: 7px;
    margin-top: 27px;
    overflow-x: auto;
}
.mode-switch button {
    white-space: nowrap;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    color: var(--muted);
    cursor: pointer;
}
.mode-switch button.active { background: var(--accent-soft); color: var(--accent); border-color: rgba(157,240,174,.16); }

.donate-empty {
    margin-top: 20px;
    min-height: 310px;
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px dashed rgba(255,255,255,.12);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(255,255,255,.02), transparent);
}
.donate-empty strong { display: block; font-size: 18px; }
.donate-empty p { color: var(--muted); font-size: 10px; max-width: 350px; line-height: 1.7; }

.map-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 12px;
    margin-top: 25px;
}
.map-card {
    min-height: 250px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 23px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background:
        linear-gradient(180deg, transparent 20%, rgba(0,0,0,.8)),
        radial-gradient(circle at 55% 30%, rgba(157,240,174,.12), transparent 35%),
        repeating-linear-gradient(45deg, #11171a 0 2px, #0d1215 2px 5px);
}
.map-card::before {
    content: "";
    position: absolute;
    inset: 15%;
    border: 1px solid rgba(157,240,174,.1);
    transform: rotate(8deg);
    box-shadow: 0 0 0 35px rgba(157,240,174,.018), 0 0 0 70px rgba(157,240,174,.012);
}
.map-card h3, .map-card p, .map-card a { position: relative; z-index: 1; }
.map-card h3 { margin: 0; font-size: 22px; }
.map-card p { margin: 5px 0 0; color: #8b959d; font-size: 9px; }
.map-card a { margin-top: 12px; color: var(--accent); font-size: 9px; font-weight: 700; }

.profile-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--panel);
}
.profile-avatar {
    width: 70px; height: 70px;
    display: grid; place-items: center;
    border-radius: 11px;
    background: linear-gradient(145deg,#a9efb7,#62796a);
    color: #0d1510;
    font-size: 25px; font-weight: 800;
}
.profile-head h2 { margin: 0; font-size: 24px; letter-spacing: -.05em; }
.profile-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.profile-meta { text-align: right; color: var(--muted-2); font-size: 8px; }
.profile-meta strong { display: block; color: #a8b0b6; font-size: 10px; }

.tabs {
    display: flex;
    gap: 4px;
    margin: 14px 0;
    border-bottom: 1px solid var(--line);
}
.tabs button {
    padding: 10px 13px;
    border: 0;
    border-bottom: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 9px;
}
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 10px;
    margin-top: 14px;
}
.stat-box { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.stat-box strong { display:block; font-size: 22px; letter-spacing: -.05em; }
.stat-box span { color: var(--muted-2); font-size: 8px; }

.activity {
    margin-top: 14px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}
.activity h3 { margin: 0; font-size: 13px; }
.bar-row { margin-top: 18px; }
.bar-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; }
.bar { height: 6px; margin-top: 6px; background: #1b2126; border-radius: 20px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

.warning-box {
    padding: 18px;
    border: 1px solid rgba(232,121,121,.14);
    border-radius: 9px;
    background: rgba(232,121,121,.035);
}
.warning-box strong { color: #e99a9a; }
.warning-box p { color: var(--muted); font-size: 10px; line-height: 1.7; }

.account-popover {
    width: 260px;
    position: fixed;
    top: 58px;
    right: 25px;
    z-index: 50;
    display: none;
    padding: 8px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #111519;
    box-shadow: 0 25px 70px rgba(0,0,0,.45);
}
.account-popover.open { display: block; }
.popover-head { display:flex; align-items:center; gap:10px; padding: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.popover-head strong, .popover-head span { display:block; }
.popover-head strong { font-size: 11px; }
.popover-head span { color: var(--muted); font-size: 8px; margin-top: 3px; }
.account-popover button {
    width:100%; display:flex; justify-content:space-between;
    border:0; border-radius:6px; background:transparent;
    padding:10px; color:#aab2b8; cursor:pointer; text-align:left; font-size:9px;
}
.account-popover button:hover { background: rgba(255,255,255,.04); color:white; }
.popover-footer { padding: 9px 10px 4px; color:#4e575f; font-size:7px; }

@media (max-width: 1000px) {
    .sidebar { width: 210px; }
    .main { width: calc(100% - 210px); margin-left: 210px; }
    .hero { grid-template-columns: 1fr; }
    .wiki-layout { grid-template-columns: 190px 1fr; }
    .toc { display:none; }
}

@media (max-width: 760px) {
    .sidebar {
        width: 64px;
        padding: 15px 8px;
    }
    .brand { justify-content:center; padding: 5px 0 20px; }
    .brand > div:last-child, .nav-item span:last-child, .nav-title, .discord-btn, .version { display:none; }
    .nav-item { justify-content:center; padding: 11px 5px; }
    .icon { width:auto; font-size:15px; }
    .main { width: calc(100% - 64px); margin-left:64px; }
    .topbar { padding:0 16px; }
    .account-name, .chevron { display:none; }
    .content { padding: 32px 17px 70px; }
    .hero-main { padding: 30px 24px; }
    .hero-main h1 { font-size: 48px; }
    .card-grid, .map-grid, .stat-grid { grid-template-columns: 1fr; }
    .split { grid-template-columns:1fr; }
    .wiki-layout { grid-template-columns:1fr; }
    .wiki-nav { display:flex; overflow-x:auto; }
    .wiki-nav-title { display:none; }
    .wiki-nav button { white-space:nowrap; width:auto; }
    .profile-head { grid-template-columns:auto 1fr; }
    .profile-meta { grid-column: 2; text-align:left; }
}

@media (max-width: 480px) {
    .hero-main h1 { font-size: 40px; }
    .page-title { font-size: 34px; }
    .timeline-item { grid-template-columns:1fr; gap:5px; }
}