:root {
    --bg: #f7f4ee;
    --bg-2: #eeedf6;
    --card: rgba(255, 255, 255, 0.82);
    --card-solid: #ffffff;
    --text: #17172a;
    --muted: #6f6d80;
    --line: rgba(61, 54, 89, 0.12);
    --gold: #caa45a;
    --gold-soft: #fff4d9;
    --gold-dark: #8d6424;
    --indigo: #25234d;
    --amethyst: #7c68a8;
    --bronze: #a36f3d;
    --green: #2d8f63;
    --red: #b25b5b;
    --shadow: 0 24px 70px rgba(36, 31, 68, 0.13);
    --shadow-soft: 0 14px 34px rgba(36, 31, 68, 0.08);
    --radius: 18px;
    --radius-sm: 12px;
}

html[data-theme="dark"] {
    --bg: #07111f;
    --bg-2: #0b1d33;
    --card: rgba(9, 24, 43, 0.78);
    --card-solid: #0f233b;
    --text: #e8f3fb;
    --muted: #98a9ba;
    --line: rgba(93, 209, 255, 0.16);
    --gold: #16dcf2;
    --gold-soft: rgba(18, 223, 244, 0.12);
    --gold-dark: #35d9ff;
    --indigo: #e8f3fb;
    --amethyst: #4f8cff;
    --bronze: #0874ff;
    --green: #39d98a;
    --red: #ff7d8b;
    --shadow: 0 28px 80px rgba(0, 11, 24, 0.48);
    --shadow-soft: 0 18px 46px rgba(0, 11, 24, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 0%, rgba(202, 164, 90, 0.22), transparent 28%),
        radial-gradient(circle at 80% 10%, rgba(124, 104, 168, 0.18), transparent 30%),
        linear-gradient(180deg, #fffdf8 0, var(--bg) 42%, var(--bg-2) 100%);
    min-height: 100vh;
}

html[data-theme="dark"] body {
    color: var(--text);
    background:
        radial-gradient(circle at 18% -8%, rgba(18, 223, 244, 0.18), transparent 28%),
        radial-gradient(circle at 84% 6%, rgba(8, 116, 255, 0.18), transparent 34%),
        linear-gradient(180deg, #06101d 0, var(--bg) 46%, var(--bg-2) 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.34) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.32) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.52), transparent 75%);
}

html[data-theme="dark"] body::before {
    background:
        linear-gradient(rgba(88, 196, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(88, 196, 255, 0.06) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.78), transparent 80%);
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1200px, calc(100% - 36px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.52);
    backdrop-filter: blur(22px);
    box-shadow: none;
}

html[data-theme="dark"] .site-header {
    border-bottom-color: rgba(93, 209, 255, 0.12);
    background: rgba(5, 14, 27, 0.72);
    box-shadow: 0 16px 42px rgba(0, 9, 20, 0.26);
}

.header-inner,
.footer-inner,
.main-nav,
.hero-actions,
.section-head,
.profile-row,
.status-row {
    display: flex;
    align-items: center;
}

.header-inner {
    justify-content: space-between;
    min-height: 78px;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
    color: var(--indigo);
    font-weight: 900;
    font-size: 20px;
    /*text-transform: uppercase;*/
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 14px;
    color: #ffffff;
    background:
        radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.45), transparent 28%),
        linear-gradient(135deg, #d9bd74, #806020 48%, #3a3567);
    box-shadow: 0 14px 30px rgba(141, 100, 36, 0.28);
}

html[data-theme="dark"] .brand-mark {
    border-color: rgba(18, 223, 244, 0.38);
    background:
        radial-gradient(circle at 30% 22%, rgba(18, 223, 244, 0.55), transparent 30%),
        linear-gradient(135deg, #18e7ff, #0874ff 46%, #07101e);
    box-shadow: 0 0 28px rgba(18, 223, 244, 0.26), 0 14px 30px rgba(0, 10, 28, 0.42);
}

.main-nav {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
}

.main-nav a,
.nav-group > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.main-nav a:hover,
.main-nav a.active,
.nav-group > button:hover,
.nav-group > button.active,
.nav-group.open > button {
    color: var(--indigo);
    border-color: rgba(202, 164, 90, 0.26);
    background: rgba(255, 244, 217, 0.78);
    transform: translateY(-1px);
}

.nav-group {
    position: relative;
}

.nav-group > button::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: 10px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.42;
    box-shadow: 0 0 0 4px rgba(202, 164, 90, 0.08);
    transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.nav-group > button.active::after,
.nav-group > button:hover::after,
.nav-group.open > button::after {
    opacity: 0.9;
    transform: scale(0.72);
    box-shadow: 0 0 0 7px rgba(202, 164, 90, 0.16);
}

.nav-group::after {
    content: "";
    position: absolute;
    left: -10px;
    right: -10px;
    top: 100%;
    height: 18px;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    z-index: 30;
    display: grid;
    min-width: 168px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    backdrop-filter: blur(18px);
}

.nav-dropdown::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -7px;
    width: 14px;
    height: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.72);
    border-top: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.94);
    transform: translateX(-50%) rotate(45deg);
}

.nav-dropdown a {
    justify-content: flex-start;
    padding: 9px 11px;
    border-radius: 11px;
}

.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown,
.nav-group.hover-open .nav-dropdown,
.nav-group.open .nav-dropdown {
    display: grid;
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.main-nav .nav-cta {
    color: #ffffff;
    background: linear-gradient(135deg, var(--gold), var(--bronze));
    box-shadow: 0 12px 24px rgba(163, 111, 61, 0.18);
}

.main-nav .nav-cta:hover,
.main-nav .nav-cta.active {
    color: #ffffff;
    background: linear-gradient(135deg, #d7b66a, #865a2f);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(37, 35, 77, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(36, 31, 68, 0.08);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(202, 164, 90, 0.34);
    color: var(--indigo);
}

.theme-toggle-icon {
    position: relative;
    width: 28px;
    height: 16px;
    border-radius: 999px;
    background: rgba(37, 35, 77, 0.14);
}

.theme-toggle-icon::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d9b867, #a36f3d);
    box-shadow: 0 2px 8px rgba(36, 31, 68, 0.18);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.theme-toggle.dark .theme-toggle-icon {
    background: rgba(18, 223, 244, 0.16);
}

.theme-toggle.dark .theme-toggle-icon::after {
    transform: translateX(12px);
    background: linear-gradient(135deg, #16dcf2, #0874ff);
    box-shadow: 0 0 16px rgba(18, 223, 244, 0.46);
}

html[data-theme="dark"] .main-nav a:hover,
html[data-theme="dark"] .main-nav a.active,
html[data-theme="dark"] .nav-group > button:hover,
html[data-theme="dark"] .nav-group > button.active,
html[data-theme="dark"] .nav-group.open > button {
    border-color: rgba(18, 223, 244, 0.28);
    background: rgba(18, 223, 244, 0.1);
    color: var(--text);
}

html[data-theme="dark"] .nav-dropdown,
html[data-theme="dark"] .nav-dropdown::before {
    border-color: rgba(93, 209, 255, 0.16);
    background: rgba(8, 23, 42, 0.94);
}

html[data-theme="dark"] .main-nav .nav-cta,
html[data-theme="dark"] .main-nav .nav-cta:hover,
html[data-theme="dark"] .main-nav .nav-cta.active,
html[data-theme="dark"] .btn.primary {
    border-color: rgba(18, 223, 244, 0.44);
    background: linear-gradient(135deg, #16dcf2, #0874ff);
    color: #eaf8ff;
    box-shadow: 0 0 30px rgba(18, 223, 244, 0.22);
}

html[data-theme="dark"] .theme-toggle {
    border-color: rgba(93, 209, 255, 0.18);
    background: rgba(8, 23, 42, 0.72);
    color: var(--muted);
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--indigo);
    font-size: 22px;
}

html[data-theme="dark"] .nav-toggle {
    border-color: rgba(93, 209, 255, 0.16);
    background: rgba(8, 23, 42, 0.76);
    color: var(--text);
    box-shadow: 0 0 24px rgba(18, 223, 244, 0.12);
}

.hero {
    position: relative;
    overflow: hidden;
    margin-top: -78px;
    padding: 112px 0 42px;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 780px;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(255, 253, 248, 0.94) 0%, rgba(255, 253, 248, 0.72) 39%, rgba(255, 253, 248, 0.18) 74%),
        linear-gradient(180deg, rgba(247, 244, 238, 0) 72%, var(--bg) 100%),
        url("../img/premium-hero.png");
    background-size: cover;
    background-position: center top;
}

html[data-theme="dark"] .hero::before {
    background:
        linear-gradient(90deg, rgba(6, 16, 29, 0.98) 0%, rgba(6, 16, 29, 0.82) 38%, rgba(6, 16, 29, 0.34) 76%),
        linear-gradient(180deg, rgba(6, 16, 29, 0) 62%, var(--bg) 100%),
        url("../img/dark-hero.png");
    background-size: cover;
    background-position: center top;
}

html[data-theme="dark"] .hero::after {
    content: "";
    position: absolute;
    inset: 118px 0 auto;
    height: 520px;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent 0 52%, rgba(18, 223, 244, 0.18) 52.2%, transparent 52.6%),
        radial-gradient(circle at 72% 45%, rgba(18, 223, 244, 0.2), transparent 26%),
        linear-gradient(90deg, transparent 0 8%, rgba(93, 209, 255, 0.2) 8.1%, transparent 8.3% 91.7%, rgba(93, 209, 255, 0.16) 91.9%, transparent 92.1%),
        linear-gradient(0deg, transparent 0 10%, rgba(93, 209, 255, 0.14) 10.2%, transparent 10.5% 89.5%, rgba(93, 209, 255, 0.14) 89.8%, transparent 90%);
    opacity: 0.62;
    mask-image: linear-gradient(90deg, transparent, #000 18%, #000 86%, transparent);
}

.hero-grid {
    position: relative;
    display: block;
    min-height: 650px;
}

.hero-content {
    position: relative;
    max-width: 720px;
    min-height: 500px;
    padding: 64px 0 180px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.profile-hero::after,
.about-hero-inner::after {
    content: "";
    position: absolute;
    right: 30px;
    top: 28px;
    width: 140px;
    height: 140px;
    border: 1px solid rgba(202, 164, 90, 0.28);
    border-radius: 50%;
    background:
        linear-gradient(90deg, transparent 49%, rgba(124, 104, 168, 0.14) 50%, transparent 51%),
        linear-gradient(0deg, transparent 49%, rgba(124, 104, 168, 0.14) 50%, transparent 51%);
    opacity: 0.55;
    pointer-events: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: currentColor;
    opacity: 0.55;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    max-width: 850px;
    color: var(--indigo);
    font-size: 80px;
    line-height: 0.95;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 18px;
    color: var(--indigo);
    font-size: 36px;
    line-height: 1.06;
    letter-spacing: 0;
}

h3 {
    margin-bottom: 14px;
    color: var(--indigo);
    font-size: 21px;
}

.hero-content p,
.about-hero-inner p,
.profile-hero p {
    max-width: 700px;
    color: #57536b;
    font-size: 18px;
    line-height: 1.8;
}

html[data-theme="dark"] .hero-content p,
html[data-theme="dark"] .about-hero-inner p,
html[data-theme="dark"] .profile-hero p {
    color: #b8c9d9;
}

.hero-actions {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid rgba(37, 35, 77, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--indigo);
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(36, 31, 68, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

html[data-theme="dark"] .btn {
    border-color: rgba(93, 209, 255, 0.16);
    background: rgba(8, 23, 42, 0.68);
    color: var(--text);
    box-shadow: 0 12px 30px rgba(0, 10, 28, 0.24);
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(202, 164, 90, 0.36);
    box-shadow: 0 18px 36px rgba(36, 31, 68, 0.14);
}

.btn.primary {
    border-color: rgba(202, 164, 90, 0.56);
    background: linear-gradient(135deg, #d9b867, #a36f3d);
    color: #ffffff;
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.36);
}

.btn.full {
    width: 100%;
}

.status-card,
.card,
.auth-card,
.stat-card,
.stat-panel {
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.64));
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

html[data-theme="dark"] .status-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .stat-panel {
    border-color: rgba(93, 209, 255, 0.16);
    background:
        linear-gradient(145deg, rgba(13, 31, 54, 0.88), rgba(7, 17, 31, 0.7));
    box-shadow: var(--shadow-soft);
}

.status-card {
    position: relative;
    overflow: hidden;
    width: min(430px, 100%);
    margin: -210px auto 0;
    padding: 18px;
    border-radius: 26px;
}

.hero .status-card {
    position: absolute;
    left: 0;
    bottom: 76px;
    margin: 0;
}

.hero .status-card .rates-grid {
    display: none;
}

.hero .status-card .server-status-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.status-card::before,
.card::before,
.stat-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(202, 164, 90, 0.12), transparent 36%, rgba(124, 104, 168, 0.08));
    opacity: 0.8;
}

html[data-theme="dark"] .status-card::before,
html[data-theme="dark"] .card::before,
html[data-theme="dark"] .stat-panel::before {
    background: linear-gradient(135deg, rgba(18, 223, 244, 0.14), transparent 38%, rgba(8, 116, 255, 0.12));
}

.status-card::after {
    content: "";
    position: absolute;
    inset: -80px;
    pointer-events: none;
    background:
        conic-gradient(from 120deg, transparent 0 20%, rgba(255, 255, 255, 0.5) 30%, transparent 42% 100%);
    opacity: 0.48;
    animation: statusSweep 7s linear infinite;
}

html[data-theme="dark"] .status-card::after {
    background:
        conic-gradient(from 120deg, transparent 0 20%, rgba(18, 223, 244, 0.22) 30%, transparent 42% 100%);
    opacity: 0.68;
}

.status-card > *,
.card > *,
.stat-panel > * {
    position: relative;
    z-index: 1;
}

.status-row {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    padding-bottom: 11px;
    border-bottom: 1px solid rgba(37, 35, 77, 0.08);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.online-dot,
.offline-dot {
    display: inline-flex;
    align-items: center;
    font-weight: 900;
}

.online-dot {
    color: var(--green);
}

.offline-dot {
    color: var(--red);
}

.online-dot::before,
.offline-dot::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 5px rgba(45, 143, 99, 0.12);
    animation: onlinePulse 1.9s ease-in-out infinite;
}

.offline-dot::before {
    background: var(--red);
    box-shadow: 0 0 0 5px rgba(178, 91, 91, 0.12);
}

@keyframes onlinePulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.95;
    }

    50% {
        transform: scale(1.18);
        opacity: 0.68;
    }
}

@keyframes statusSweep {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .status-card::after,
    .online-dot::before,
    .offline-dot::before {
        animation: none;
    }
}

.online-count {
    display: grid;
    gap: 4px;
    padding: 20px;
    border: 1px solid rgba(202, 164, 90, 0.28);
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.86), transparent 38%),
        linear-gradient(135deg, rgba(255, 244, 217, 0.94), rgba(238, 237, 246, 0.72));
    text-align: center;
}

html[data-theme="dark"] .online-count {
    border-color: rgba(18, 223, 244, 0.26);
    background:
        radial-gradient(circle at 50% 0%, rgba(18, 223, 244, 0.16), transparent 42%),
        linear-gradient(135deg, rgba(12, 36, 64, 0.88), rgba(8, 22, 39, 0.74));
}

.hero .status-card .online-count {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 15px 16px;
    border-radius: 19px;
}

.hero .status-card .online-count div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    justify-content: center;
    gap: 9px;
}

.online-count span {
    color: var(--indigo);
    font-size: 58px;
    font-weight: 950;
    line-height: 1;
}

.hero .status-card .online-count span {
    font-size: 42px;
}

.hero .status-card .online-count small {
    max-width: 88px;
    padding-bottom: 5px;
    text-align: left;
    line-height: 1.15;
}

.online-count.small {
    min-width: 180px;
    padding: 18px;
}

.online-count.small span {
    font-size: 42px;
}

.online-count small,
.stat-card small {
    color: var(--muted);
    font-weight: 800;
}

.rates-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.server-status-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.server-status-list div,
.rates-grid div,
.stat-card,
.character-main-stats div,
.character-meta div,
.character-extra-stats div,
.mini-grid div,
.compact-list-row {
    border: 1px solid rgba(37, 35, 77, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.58);
}

html[data-theme="dark"] .server-status-list div,
html[data-theme="dark"] .rates-grid div,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .character-main-stats div,
html[data-theme="dark"] .character-meta div,
html[data-theme="dark"] .character-extra-stats div,
html[data-theme="dark"] .mini-grid div,
html[data-theme="dark"] .compact-list-row {
    border-color: rgba(93, 209, 255, 0.14);
    background: rgba(10, 27, 48, 0.66);
}

.server-status-list div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 14px;
}

.hero .status-card .server-status-list div {
    padding: 10px;
    border-radius: 15px;
}

.hero .status-card .server-status-list span,
.hero .status-card .server-status-list strong {
    font-size: 12px;
}

.server-status-list span,
.rates-grid small {
    color: var(--muted);
    font-weight: 850;
}

.server-status-list small {
    grid-column: 1 / -1;
    color: var(--gold-dark);
    font-weight: 900;
}

.hero .status-card .server-status-list small {
    font-size: 11px;
}

.rates-grid div,
.stat-card {
    padding: 16px;
}

.rates-grid small {
    display: block;
    margin-bottom: 7px;
}

.rates-grid strong,
.stat-card strong {
    color: var(--indigo);
    font-size: 23px;
    font-weight: 950;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    gap: 0;
    overflow: hidden;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

html[data-theme="dark"] .stats-strip {
    border-color: rgba(93, 209, 255, 0.14);
    background: rgba(8, 23, 42, 0.68);
}

.stat-card {
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

.stat-card:last-child {
    border-right: 0;
}

.stat-card::before {
    content: "✦";
    display: block;
    margin-bottom: 8px;
    color: rgba(202, 164, 90, 0.7);
    font-size: 22px;
}

.stats-dashboard {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.stat-panel {
    position: relative;
    display: grid;
    gap: 8px;
    min-height: 150px;
    padding: 24px;
}

.stat-panel small,
.stat-panel span {
    color: var(--muted);
    font-weight: 850;
}

.stat-panel strong {
    color: var(--indigo);
    font-size: 38px;
    line-height: 1;
}

.primary-panel {
    grid-row: span 2;
    min-height: 316px;
    align-content: center;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 245, 218, 0.54)),
        url("../img/premium-hero.png");
    background-size: cover;
    background-position: center;
}

.primary-panel strong {
    font-size: 74px;
}

.section {
    padding: 64px 0;
}

.compact-section {
    padding-bottom: 20px;
}

.about-page .section {
    padding: 15px 0 0;
}

.about-page .compact-section {
    padding-bottom: 0;
}

.about-page .about-hero {
    padding-bottom: 0;
}

.about-page .announcement-band {
    margin-top: 15px;
}

.section-head {
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.section-head h1,
.section-head h2 {
    margin-bottom: 0;
}

.section-subtitle {
    max-width: 620px;
    margin-top: 10px;
    color: var(--muted);
    font-weight: 750;
    line-height: 1.6;
}

.page-size-switch,
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.page-size-switch a,
.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    color: var(--muted);
    font-weight: 950;
    box-shadow: var(--shadow-soft);
}

.page-size-switch a.active,
.page-size-switch a:hover,
.pagination a.active,
.pagination a:hover {
    border-color: rgba(202, 164, 90, 0.36);
    background: var(--gold-soft);
    color: var(--gold-dark);
}

.pagination {
    justify-content: center;
    margin-top: 22px;
}

html[data-theme="dark"] .page-size-switch a,
html[data-theme="dark"] .pagination a {
    border-color: rgba(93, 209, 255, 0.16);
    background: rgba(8, 23, 42, 0.72);
}

html[data-theme="dark"] .page-size-switch a.active,
html[data-theme="dark"] .page-size-switch a:hover,
html[data-theme="dark"] .pagination a.active,
html[data-theme="dark"] .pagination a:hover {
    border-color: rgba(18, 223, 244, 0.36);
    background: rgba(18, 223, 244, 0.12);
    color: #35d9ff;
}

.link-arrow,
.text-link {
    color: var(--gold-dark);
    font-weight: 900;
}

.link-arrow:hover,
.text-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.muted {
    color: var(--muted);
    line-height: 1.75;
}

.cards-grid,
.news-grid,
.news-list,
.admin-news-form,
.admin-news-list,
.admin-news-item,
.settings-form,
.download-settings {
    display: grid;
    gap: 18px;
}

.announcement-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 18px;
    padding: 30px 34px;
    border: 1px solid rgba(202, 164, 90, 0.28);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 245, 218, 0.6)),
        url("../img/premium-hero.png");
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .announcement-band,
html[data-theme="dark"] .profile-hero,
html[data-theme="dark"] .about-hero-inner {
    border-color: rgba(93, 209, 255, 0.18);
    background:
        linear-gradient(135deg, rgba(8, 23, 42, 0.88), rgba(6, 16, 29, 0.66)),
        radial-gradient(circle at 82% 18%, rgba(18, 223, 244, 0.18), transparent 28%),
        url("../img/dark-hero.png");
    background-size: cover;
    background-position: center;
}

.announcement-band h2 {
    margin-bottom: 8px;
}

.announcement-band p {
    max-width: 780px;
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.75;
}

.world-preview {
    padding-top: 44px;
}

.world-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.world-card {
    display: grid;
    gap: 14px;
    align-content: start;
    min-height: 100%;
    padding: 22px;
}

.world-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(37, 35, 77, 0.08);
}

.world-card-head h3 {
    margin-bottom: 0;
    font-size: 19px;
    text-transform: uppercase;
}

.world-card-link {
    color: var(--amethyst);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    white-space: nowrap;
}

.world-card-link:hover {
    color: var(--gold-dark);
}

.compact-list,
.world-card-list {
    display: grid;
    gap: 0;
}

.compact-list-row,
.world-card-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 72px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(37, 35, 77, 0.07);
    color: var(--muted);
    font-weight: 850;
    transition: transform 0.18s ease, background 0.18s ease;
}

.compact-list-row:last-child,
.world-card-row:last-child {
    border-bottom: 0;
}

.compact-list-row:hover,
.world-card-row:hover {
    transform: translateY(-1px);
    background: rgba(255, 244, 217, 0.38);
}

html[data-theme="dark"] .world-card-row:hover,
html[data-theme="dark"] .compact-list-row:hover,
html[data-theme="dark"] .rating-table tbody tr:hover {
    background: rgba(18, 223, 244, 0.08);
}

.compact-list-row strong,
.world-card-row strong {
    display: block;
    color: var(--indigo);
    font-size: 15px;
    line-height: 1.25;
}

.world-card-row small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.35;
}

.world-card-row em {
    font-style: normal;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
}

.world-row-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(202, 164, 90, 0.24);
    border-radius: 14px;
    background: rgba(255, 244, 217, 0.62);
    color: var(--gold-dark);
    font-size: 15px;
    font-weight: 950;
}

html[data-theme="dark"] .world-row-icon,
html[data-theme="dark"] .news-world-row .world-row-icon {
    border-color: rgba(18, 223, 244, 0.22);
    background: rgba(18, 223, 244, 0.1);
    color: #35d9ff;
}

.news-world-row .world-row-icon {
    background: rgba(238, 237, 246, 0.74);
    color: var(--amethyst);
}

.world-card-row.epic-row {
    border-color: rgba(124, 104, 168, 0.22);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(238, 237, 246, 0.72));
    margin: 5px 0;
    padding: 10px;
    border: 1px solid rgba(124, 104, 168, 0.16);
    border-radius: 16px;
}

html[data-theme="dark"] .world-card-row.epic-row {
    border-color: rgba(8, 116, 255, 0.26);
    background:
        linear-gradient(135deg, rgba(12, 36, 64, 0.72), rgba(8, 22, 39, 0.78));
}

.world-card-row.epic-row .world-row-icon {
    border-color: rgba(124, 104, 168, 0.26);
    background: rgba(238, 237, 246, 0.92);
    color: var(--amethyst);
}

.news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.news-card time {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--gold-dark);
    font-size: 13px;
    font-weight: 950;
}

.news-card p,
.download-card p,
.rule-card li,
.guide-card li,
.about-feature p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.75;
}

.download-grid,
.rules-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.rules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.download-card {
    display: grid;
    gap: 18px;
    align-content: space-between;
    min-height: 260px;
}

.clean-list {
    margin: 0;
    padding-left: 20px;
}

.rankings-preview,
.rankings-page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
    position: relative;
    overflow: hidden;
    padding: 26px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(202, 164, 90, 0.26);
    box-shadow: var(--shadow);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.rating-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 560px;
}

.rating-table th,
.rating-table td {
    padding: 14px 13px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

.rating-table th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

.rating-table tbody tr {
    transition: background 0.16s ease;
}

.rating-table tbody tr:hover {
    background: rgba(255, 244, 217, 0.45);
}

html[data-theme="dark"] .rating-table th,
html[data-theme="dark"] .rating-table td {
    border-bottom-color: rgba(93, 209, 255, 0.12);
}

.rating-table .name {
    color: var(--indigo);
    font-weight: 950;
}

.accent,
.class-name,
.class-title {
    color: var(--gold-dark);
    font-weight: 950;
}

.class-title {
    display: block;
    font-size: 20px;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.empty {
    color: var(--muted);
    text-align: center;
}

.auth-page {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 162px);
    padding: 52px 0;
}

.auth-card {
    overflow: hidden;
    width: min(500px, 100%);
    padding: 38px;
}

.auth-card h1 {
    max-width: 100%;
    margin-bottom: 24px;
    font-size: 46px;
    line-height: 1.02;
    overflow-wrap: anywhere;
}

.form {
    display: grid;
    gap: 16px;
}

.form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 850;
}

.form input,
.form textarea {
    width: 100%;
    border: 1px solid rgba(37, 35, 77, 0.13);
    border-radius: 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.72);
    font: inherit;
}

html[data-theme="dark"] .form input,
html[data-theme="dark"] .form textarea {
    border-color: rgba(93, 209, 255, 0.16);
    color: var(--text);
    background: rgba(5, 16, 31, 0.72);
}

.form input {
    min-height: 48px;
    padding: 0 15px;
}

.form textarea {
    padding: 14px 15px;
    resize: vertical;
}

.form input:focus,
.form textarea:focus {
    outline: 4px solid rgba(202, 164, 90, 0.16);
    border-color: rgba(202, 164, 90, 0.6);
}

.compact-form {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: end;
}

.compact-form .btn {
    min-width: 170px;
}

.email-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.admin-search,
.admin-block {
    margin-bottom: 18px;
}

.admin-tabs {
    position: sticky;
    top: 88px;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.admin-tabs button {
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid rgba(37, 35, 77, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-weight: 900;
    cursor: pointer;
}

.admin-tabs button.active,
.admin-tabs button:hover {
    border-color: rgba(202, 164, 90, 0.4);
    background: var(--gold-soft);
    color: var(--gold-dark);
}

.admin-tab-panel {
    display: none;
}

.admin-tab-panel.active {
    display: block;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-btn {
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid rgba(178, 91, 91, 0.22);
    border-radius: 999px;
    color: #8a3737;
    background: rgba(255, 235, 235, 0.78);
    font-weight: 900;
    cursor: pointer;
}

.mini-btn.light {
    color: #206344;
    border-color: rgba(45, 143, 99, 0.22);
    background: rgba(235, 255, 246, 0.8);
}

.settings-form h3 {
    margin: 8px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.settings-grid.four-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-grid.five-cols {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.admin-news-item {
    padding: 16px;
    border: 1px solid rgba(37, 35, 77, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.58);
}

.admin-account-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.admin-account-card {
    display: grid;
    gap: 14px;
}

.check-line {
    display: inline-flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px !important;
    color: var(--muted);
}

.check-line input {
    width: 18px;
    min-height: 18px;
}

.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-weight: 850;
}

.alert.error {
    color: #8a3737;
    background: rgba(255, 235, 235, 0.9);
    border: 1px solid rgba(178, 91, 91, 0.24);
}

.alert.success {
    color: #206344;
    background: rgba(235, 255, 246, 0.9);
    border: 1px solid rgba(45, 143, 99, 0.24);
}

.profile-grid,
.characters-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.profile-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
}

.profile-card,
.character-card,
.castle-card {
    display: grid;
    gap: 16px;
}

.account-actions {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
    gap: 24px;
    align-items: start;
    margin-bottom: 18px;
}

.characters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.character-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.character-head h2 {
    margin-bottom: 0;
}

.character-main-stats,
.character-meta,
.character-extra-stats {
    display: grid;
    gap: 10px;
}

.character-main-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.character-main-stats div,
.character-meta div,
.character-extra-stats div,
.mini-grid div {
    padding: 13px;
}

.character-main-stats small,
.character-meta span,
.character-extra-stats span,
.mini-grid span,
.mini-grid small,
.profile-row span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.character-main-stats strong {
    color: var(--indigo);
    font-size: 27px;
    line-height: 1;
}

.character-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.character-extra-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.character-extra-stats:empty {
    display: none;
}

.character-meta strong,
.character-extra-stats strong {
    overflow-wrap: anywhere;
}

.unstuck-form {
    display: flex;
}

.unstuck-form .btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}

.details-panel {
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.details-panel summary {
    color: var(--gold-dark);
    cursor: pointer;
    font-weight: 950;
}

.details-panel h3 {
    margin: 18px 0 10px;
}

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

.mini-grid strong {
    display: block;
    margin: 5px 0;
    color: var(--text);
}

.skill-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 360px;
    overflow: auto;
    padding: 6px 2px 2px;
}

.skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    max-width: 100%;
    padding: 7px 10px;
    border: 1px solid rgba(202, 164, 90, 0.24);
    border-radius: 999px;
    background: rgba(255, 244, 217, 0.68);
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
}

html[data-theme="dark"] .skill-chip {
    border-color: rgba(18, 223, 244, 0.24);
    background: linear-gradient(135deg, rgba(9, 31, 56, 0.94), rgba(5, 18, 33, 0.9));
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(18, 223, 244, 0.04);
}

html[data-theme="dark"] .skill-chip b {
    color: #35d9ff;
}

.skill-chip i {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    font-style: normal;
}

.skill-chip b {
    color: var(--gold-dark);
    white-space: nowrap;
}

.public-skills-card {
    margin-top: 18px;
}

.vitals {
    display: grid;
    gap: 10px;
}

.vital {
    position: relative;
    overflow: hidden;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid rgba(37, 35, 77, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.58);
}

.vital div {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.vital span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 950;
}

.vital strong {
    color: var(--text);
}

.vital i {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    display: block;
    opacity: 0.16;
}

.vital.hp i {
    background: var(--red);
}

.vital.mp i {
    background: var(--amethyst);
}

.vital.cp i {
    background: var(--gold);
}

.cabinet {
    max-width: 1120px;
}

.cabinet .section-head {
    margin-bottom: 18px;
}

.cabinet .section-head h1 {
    margin-bottom: 0;
    font-size: 54px;
}

.cabinet-tabs {
    position: sticky;
    top: 88px;
    z-index: 9;
    display: inline-flex;
    gap: 6px;
    margin-bottom: 14px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

html[data-theme="dark"] .cabinet-tabs {
    border-color: rgba(93, 209, 255, 0.16);
    background: rgba(8, 23, 42, 0.78);
}

.cabinet-tabs button {
    min-height: 38px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 950;
    cursor: pointer;
}

.cabinet-tabs button.active,
.cabinet-tabs button:hover {
    border-color: rgba(202, 164, 90, 0.34);
    background: var(--gold-soft);
    color: var(--gold-dark);
}

html[data-theme="dark"] .cabinet-tabs button.active,
html[data-theme="dark"] .cabinet-tabs button:hover {
    border-color: rgba(18, 223, 244, 0.3);
    background: rgba(18, 223, 244, 0.1);
    color: var(--text);
}

.cabinet-tab-panel {
    display: none;
}

.cabinet-tab-panel.active {
    display: block;
}

.cabinet-overview {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.cabinet-security-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
    gap: 14px;
}

.cabinet-summary-card,
.cabinet-settings-card,
.cabinet-character-card {
    padding: 18px;
    border-radius: 16px;
}

.cabinet-summary-card {
    display: grid;
    align-content: start;
    gap: 14px;
}

.cabinet-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.cabinet-summary-head h2,
.cabinet-settings-title h2,
.cabinet-subhead h2 {
    margin-bottom: 0;
    font-size: 25px;
    line-height: 1.08;
}

.cabinet-counter {
    display: grid;
    min-width: 92px;
    padding: 10px 12px;
    border: 1px solid rgba(202, 164, 90, 0.22);
    border-radius: 14px;
    background: rgba(255, 244, 217, 0.62);
    text-align: center;
}

html[data-theme="dark"] .cabinet-counter {
    border-color: rgba(18, 223, 244, 0.2);
    background: rgba(18, 223, 244, 0.08);
}

.cabinet-counter strong {
    color: var(--indigo);
    font-size: 32px;
    line-height: 0.95;
}

.cabinet-counter span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.cabinet-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.cabinet-facts div,
.cabinet-character-card .character-main-stats div,
.cabinet-character-card .character-meta div {
    padding: 10px 11px;
    border-radius: 12px;
}

.cabinet-facts div {
    border: 1px solid rgba(37, 35, 77, 0.08);
    background: rgba(255, 255, 255, 0.48);
}

html[data-theme="dark"] .cabinet-facts div {
    border-color: rgba(93, 209, 255, 0.13);
    background: rgba(6, 20, 36, 0.58);
}

.cabinet-facts span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.cabinet-facts strong {
    overflow-wrap: anywhere;
}

.cabinet-settings-card {
    display: grid;
    gap: 14px;
}

.cabinet-settings-section {
    display: grid;
    gap: 10px;
}

.cabinet-settings-section + .cabinet-settings-section {
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.cabinet-settings-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}

.cabinet-settings-title .eyebrow,
.cabinet-character-card .eyebrow,
.cabinet-subhead .eyebrow {
    margin-bottom: 5px;
}

.cabinet .alert {
    margin-bottom: 0;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
}

.cabinet-password-form {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 10px;
}

.cabinet-email-form {
    gap: 10px;
}

.cabinet .form {
    gap: 10px;
}

.cabinet .form label {
    gap: 6px;
    font-size: 12px;
}

.cabinet .form input {
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
}

.cabinet .btn {
    min-height: 40px;
    padding: 0 16px;
    font-size: 13px;
}

.cabinet-subhead {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin: 18px 0 12px;
}

.character-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding: 6px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.56);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

html[data-theme="dark"] .character-tabs {
    border-color: rgba(93, 209, 255, 0.16);
    background: rgba(8, 23, 42, 0.66);
}

.character-tabs button {
    display: grid;
    gap: 2px;
    min-width: 132px;
    min-height: 48px;
    padding: 8px 12px;
    border: 1px solid rgba(37, 35, 77, 0.1);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--muted);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.character-tabs button.active,
.character-tabs button:hover {
    border-color: rgba(202, 164, 90, 0.36);
    background: var(--gold-soft);
    color: var(--gold-dark);
}

html[data-theme="dark"] .character-tabs button {
    border-color: rgba(93, 209, 255, 0.14);
    background: rgba(6, 20, 36, 0.72);
}

html[data-theme="dark"] .character-tabs button.active,
html[data-theme="dark"] .character-tabs button:hover {
    border-color: rgba(18, 223, 244, 0.3);
    background: rgba(18, 223, 244, 0.1);
    color: var(--text);
}

.character-tabs span {
    color: var(--indigo);
    font-size: 14px;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.character-tabs small {
    font-size: 11px;
    font-weight: 900;
}

.cabinet-characters-grid {
    grid-template-columns: 1fr;
    gap: 14px;
}

.cabinet-character-card {
    display: none;
    grid-template-columns: minmax(300px, 0.7fr) minmax(0, 1.3fr);
    gap: 14px;
    align-items: start;
}

.cabinet-character-card.active {
    display: grid;
}

.cabinet-character-summary {
    grid-column: 1;
    display: grid;
    align-content: start;
    gap: 12px;
}

.cabinet-character-card .character-head {
    align-items: center;
    gap: 12px;
}

.cabinet-character-card .character-head h2 {
    font-size: 27px;
    line-height: 1.04;
}

.cabinet-character-card .badge {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
}

.cabinet-character-card .character-main-stats {
    gap: 8px;
}

.cabinet-character-card .character-main-stats strong {
    font-size: 23px;
}

.cabinet-character-card .class-title {
    font-size: 15px;
}

.cabinet-character-meta {
    grid-template-columns: 1.1fr 0.9fr 1fr;
    gap: 8px;
}

.cabinet-character-card .unstuck-form {
    justify-content: flex-start;
}

.cabinet-character-card .vitals {
    gap: 7px;
}

.cabinet-character-card .vital {
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 11px;
}

.cabinet-character-details {
    grid-column: 2;
}

.cabinet-character-details > h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.cabinet-character-card .details-panel {
    margin-top: 12px;
    padding-left: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    border-left: 0;
}

.cabinet-character-card .details-panel summary {
    display: flex;
    align-items: center;
    min-height: 34px;
    color: var(--gold-dark);
}

.cabinet-character-card .details-panel h3 {
    margin: 13px 0 8px;
    font-size: 17px;
}

.cabinet-character-card .character-extra-stats,
.cabinet-character-card .mini-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.cabinet-character-card .character-extra-stats div,
.cabinet-character-card .mini-grid div {
    padding: 9px 10px;
    border-radius: 12px;
}

.cabinet-character-card .mini-grid span,
.cabinet-character-card .character-extra-stats span {
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.cabinet-character-card .mini-grid strong,
.cabinet-character-card .character-extra-stats strong {
    line-height: 1.18;
}

.cabinet-character-card .skill-cloud {
    max-height: 230px;
}

.cabinet-character-card .skill-chip {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
}

.cabinet-table-panel {
    margin-top: 2px;
    padding: 18px;
    border-radius: 16px;
}

.cabinet-table-panel summary {
    color: var(--indigo);
    cursor: pointer;
    font-size: 25px;
    font-weight: 950;
    line-height: 1.1;
}

.cabinet-table-panel .table-wrap {
    margin-top: 14px;
}

.profile-row {
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.profile-row strong {
    text-align: right;
}

.profile-hero,
.about-hero-inner {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 245, 218, 0.5)),
        url("../img/premium-hero.png");
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.profile-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    min-height: 280px;
    margin-bottom: 18px;
    padding: 46px;
}

.profile-hero h1 {
    margin-bottom: 10px;
}

.wide-profile-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.public-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clan-mark {
    display: grid;
    place-items: center;
    min-width: 112px;
    min-height: 112px;
    padding: 16px;
    border: 1px solid rgba(202, 164, 90, 0.28);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--gold-dark);
    font-size: 26px;
    font-weight: 950;
    box-shadow: var(--shadow-soft);
}

.clan-stats-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 18px;
}

.castle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.about-hero {
    padding: 42px 0 18px;
}

.about-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 28px;
    align-items: stretch;
    min-height: 460px;
    padding: 58px;
}

.about-rates {
    display: grid;
    align-content: center;
    gap: 18px;
}

.about-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.about-feature {
    position: relative;
    overflow: hidden;
}

.feature-number {
    display: inline-block;
    margin-bottom: 20px;
    color: rgba(202, 164, 90, 0.36);
    font-size: 48px;
    font-weight: 950;
    line-height: 1;
}

.danger {
    color: var(--red);
}

.success-text {
    color: var(--green);
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
}

.badge.on {
    color: #206344;
    background: rgba(235, 255, 246, 0.9);
}

html[data-theme="dark"] .badge.on {
    color: #bfffe1;
    background: rgba(57, 217, 138, 0.16);
}

.badge.off {
    color: #6b6272;
    background: rgba(240, 239, 247, 0.92);
}

html[data-theme="dark"] .badge.off {
    color: #c6d2df;
    background: rgba(152, 169, 186, 0.14);
}

.site-footer {
    margin-top: 34px;
    border-top: 1px solid rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(18px);
}

html[data-theme="dark"] .site-footer {
    border-top-color: rgba(93, 209, 255, 0.14);
    background: rgba(5, 14, 27, 0.72);
}

.footer-inner {
    justify-content: space-between;
    gap: 16px;
    min-height: 86px;
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 1060px) {
    .main-nav {
        gap: 4px;
    }

    .main-nav a,
    .nav-group > button {
        padding: 9px 10px;
        font-size: 12px;
    }
}

@media (max-width: 920px) {
    .hero-grid,
    .about-hero-inner,
    .download-grid,
    .rules-grid,
    .news-grid,
    .world-grid,
    .rankings-preview,
    .rankings-page,
    .characters-grid,
    .cabinet-overview,
    .cabinet-security-grid,
    .admin-account-cards,
    .public-details-grid,
    .about-feature-grid,
    .castle-grid,
    .profile-grid,
    .account-actions {
        grid-template-columns: 1fr;
    }

    .compact-form,
    .email-form,
    .cabinet-password-form {
        grid-template-columns: 1fr;
    }

    .cabinet {
        max-width: 1200px;
    }

    .cabinet .section-head h1 {
        font-size: 44px;
    }

    .cabinet-character-card .character-extra-stats,
    .cabinet-character-card .mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cabinet-tabs {
        top: 80px;
    }

    .cabinet-character-card {
        grid-template-columns: 1fr;
    }

    .cabinet-character-details,
    .cabinet-character-card .details-panel {
        grid-column: 1;
    }

    .cabinet-character-card .details-panel {
        padding-left: 0;
        border-top: 1px solid var(--line);
    }

    .stats-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stats-dashboard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .primary-panel {
        grid-row: auto;
        grid-column: 1 / -1;
        min-height: 220px;
    }

    .hero-content {
        min-height: auto;
        padding: 42px 0 180px;
    }

    .hero .status-card {
        left: 0;
        bottom: 74px;
        width: min(430px, calc(100% - 48px));
    }

    .about-hero-inner,
    .profile-hero {
        min-height: auto;
        padding: 38px;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1200px);
    }

    .header-inner {
        min-height: 70px;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .main-nav {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px;
        border: 1px solid rgba(255, 255, 255, 0.68);
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: var(--shadow);
    }

    html[data-theme="dark"] .main-nav {
        border-color: rgba(93, 209, 255, 0.16);
        background: rgba(4, 13, 25, 0.98);
        box-shadow: 0 28px 70px rgba(0, 10, 24, 0.58);
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        justify-content: center;
        min-height: 50px;
        text-align: center;
        font-size: 14px;
    }

    .main-nav .nav-cta {
        min-height: 54px;
        margin-top: 2px;
    }

    .theme-toggle {
        justify-content: center;
        min-height: 54px;
        width: 100%;
        margin-top: 2px;
        font-size: 14px;
    }

    .nav-group:hover .nav-dropdown,
    .nav-group:focus-within .nav-dropdown,
    .nav-group.hover-open .nav-dropdown {
        display: none;
    }

    .nav-group > button {
        width: 100%;
        min-height: 54px;
        border-color: rgba(202, 164, 90, 0.18);
        background: rgba(255, 244, 217, 0.42);
        font-size: 14px;
    }

    html[data-theme="dark"] .nav-group > button {
        border-color: rgba(18, 223, 244, 0.28);
        background: linear-gradient(135deg, rgba(8, 39, 61, 0.9), rgba(5, 18, 33, 0.94));
        color: var(--text);
        box-shadow: inset 0 0 0 1px rgba(18, 223, 244, 0.04);
    }

    .nav-group::after {
        display: none;
    }

    .nav-dropdown {
        position: static;
        display: none;
        min-width: 0;
        margin-top: 8px;
        gap: 8px;
        padding: 10px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.72);
        box-shadow: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    html[data-theme="dark"] .nav-dropdown {
        border-color: rgba(18, 223, 244, 0.2);
        background: rgba(5, 18, 33, 0.88);
    }

    .nav-dropdown a {
        min-height: 52px;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.54);
    }

    html[data-theme="dark"] .nav-dropdown a {
        border-color: rgba(93, 209, 255, 0.12);
        background: rgba(9, 29, 52, 0.92);
        color: var(--text);
    }

    .nav-dropdown::before {
        display: none;
    }

    .nav-group.open .nav-dropdown {
        display: grid;
        transform: none;
    }

    .hero {
        margin-top: -70px;
        padding-top: 96px;
    }

    .hero::before {
        height: 820px;
        background-position: 60% top;
    }

    .hero-content,
    .status-card,
    .card,
    .auth-card {
        padding: 24px;
    }

    .hero-content {
        padding: 34px 0 0;
    }

    .hero .status-card {
        left: 12px;
        right: 12px;
        bottom: 150px;
        width: auto;
        margin: 0;
        padding: 14px;
    }

    .hero .status-card .server-status-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero .status-card .online-count {
        padding: 12px 14px;
    }

    .hero .status-card .online-count span {
        font-size: 38px;
    }

    .hero .status-card .online-count small {
        max-width: 78px;
        font-size: 11px;
    }

    .stats-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section {
        padding: 44px 0;
    }

    .section-head,
    .announcement-band,
    .profile-hero,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    h1 {
        font-size: 42px;
    }

    .auth-card h1 {
        font-size: 40px;
    }

    h2 {
        font-size: 29px;
    }

    .table-wrap {
        overflow: visible;
    }

    .rating-table {
        display: block;
        min-width: 0;
    }

    .rating-table thead {
        display: none;
    }

    .rating-table tbody {
        display: grid;
        gap: 12px;
    }

    .rating-table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 12px;
        padding: 14px;
        border: 1px solid rgba(37, 35, 77, 0.1);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.62);
    }

    html[data-theme="dark"] .rating-table tr {
        border-color: rgba(93, 209, 255, 0.16);
        background: linear-gradient(145deg, rgba(10, 31, 55, 0.94), rgba(5, 17, 31, 0.9));
        box-shadow: 0 14px 34px rgba(0, 9, 22, 0.28);
    }

    .rating-table td {
        display: grid;
        gap: 3px;
        min-width: 0;
        padding: 0;
        border-bottom: 0;
        white-space: normal;
    }

    .rating-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 10px;
        font-weight: 950;
        text-transform: uppercase;
    }

    html[data-theme="dark"] .rating-table td::before {
        color: #8fb2c7;
    }

    .rating-table td.name {
        grid-column: 1 / -1;
        font-size: 18px;
    }

    .rating-table td.empty {
        display: block;
        grid-column: 1 / -1;
        text-align: center;
    }

    .rating-table td.empty::before {
        content: "";
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 18px, 1200px);
    }

    .brand span:last-child {
        max-width: 190px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero-actions,
    .unstuck-form {
        display: grid;
    }

    .hero-grid {
        min-height: 680px;
    }

    .hero .status-card {
        bottom: 125px;
    }

    .hero {
        padding-bottom: 20px;
    }

    .announcement-band {
        margin-top: 0;
    }

    .hero .status-card .online-count {
        gap: 8px;
        padding: 11px;
    }

    .hero .status-card .online-count div {
        gap: 7px;
    }

    .hero .status-card .online-count span {
        font-size: 34px;
    }

    .hero .status-card .online-count small {
        max-width: 70px;
        font-size: 10px;
    }

    .btn {
        width: 100%;
    }

    .stats-dashboard,
    .clan-stats-strip,
    .settings-grid,
    .settings-grid.four-cols,
    .settings-grid.five-cols,
    .cabinet-character-meta,
    .character-meta,
    .character-extra-stats,
    .mini-grid,
    .rates-grid {
        grid-template-columns: 1fr;
    }

    .stats-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        overflow: visible;
        margin-top: 10px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .stat-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-height: 58px;
        padding: 12px 13px;
        border: 1px solid rgba(37, 35, 77, 0.1);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.68);
        text-align: left;
    }

    html[data-theme="dark"] .stat-card {
        border-color: rgba(93, 209, 255, 0.16);
        background: linear-gradient(145deg, rgba(10, 31, 55, 0.94), rgba(5, 17, 31, 0.88));
    }

    .stat-card::before {
        display: none;
    }

    .stat-card small {
        margin-bottom: 0;
        font-size: 12px;
    }

    .stat-card strong {
        font-size: 22px;
        white-space: nowrap;
    }

    .rates-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        margin-top: 12px;
    }

    .rates-grid div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-height: 58px;
        padding: 12px;
        border-radius: 16px;
    }

    html[data-theme="dark"] .rates-grid div {
        border-color: rgba(93, 209, 255, 0.16);
        background: linear-gradient(145deg, rgba(10, 31, 55, 0.94), rgba(5, 17, 31, 0.88));
    }

    .rates-grid small {
        margin-bottom: 0;
        font-size: 12px;
    }

    .rates-grid strong {
        font-size: 21px;
        white-space: nowrap;
    }

    .hero-content,
    .about-hero-inner,
    .profile-hero {
        padding: 22px;
        border-radius: 20px;
    }

    .online-count span {
        font-size: 48px;
    }

    .section {
        padding: 34px 0;
    }

    .section-head {
        gap: 10px;
        margin-bottom: 18px;
    }

    .section-head h1 {
        font-size: 38px;
        line-height: 0.98;
        overflow-wrap: anywhere;
    }

    .cabinet .section-head h1 {
        font-size: 36px;
    }

    .cabinet-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        top: 72px;
        margin-bottom: 12px;
        border-radius: 18px;
    }

    .cabinet-tabs button {
        min-height: 42px;
        padding: 0 10px;
        font-size: 12px;
    }

    .cabinet-summary-card,
    .cabinet-settings-card,
    .cabinet-character-card,
    .cabinet-table-panel {
        padding: 14px;
        border-radius: 18px;
    }

    .cabinet-summary-head,
    .cabinet-settings-title,
    .cabinet-character-card .character-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .cabinet-counter {
        width: 100%;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: baseline;
        justify-content: start;
        gap: 8px;
        text-align: left;
    }

    .cabinet-character-card .character-main-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cabinet-character-card .character-extra-stats,
    .cabinet-character-card .mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .cabinet-character-card .character-extra-stats div,
    .cabinet-character-card .mini-grid div {
        min-height: 76px;
        padding: 9px;
    }

    .cabinet-character-card .mini-grid span,
    .cabinet-character-card .character-extra-stats span {
        font-size: 11px;
    }

    .cabinet-character-card .mini-grid strong,
    .cabinet-character-card .character-extra-stats strong {
        font-size: 15px;
    }

    .section-head h2 {
        font-size: 27px;
    }

    .card {
        padding: 18px;
        border-radius: 22px;
    }

    .castle-grid,
    .rankings-page,
    .rankings-preview {
        gap: 12px;
    }

    .castle-card {
        gap: 12px;
    }

    .castle-card .character-head {
        align-items: center;
        gap: 12px;
    }

    .castle-card .eyebrow {
        margin-bottom: 7px;
        font-size: 10px;
    }

    .castle-card h2 {
        font-size: 30px;
    }

    .castle-card .badge {
        min-height: 30px;
        padding: 0 10px;
        font-size: 11px;
    }

    .castle-card .character-main-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .castle-card .character-main-stats div {
        min-height: 58px;
        padding: 10px 11px;
        border-radius: 15px;
    }

    .castle-card .character-main-stats strong {
        font-size: 23px;
    }

    .castle-card .profile-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding-top: 10px;
    }

    .castle-card .profile-row strong {
        max-width: 58%;
        text-align: right;
        overflow-wrap: anywhere;
    }

    .boss-table-card .rating-table tr {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .boss-table-card .rating-table td.name {
        grid-column: 1 / -1;
    }

    .rankings-page .card h2 {
        margin-bottom: 14px;
        font-size: 28px;
    }

    .rankings-preview .card,
    .rankings-page .card {
        padding: 16px;
    }

    .rankings-preview .card h3,
    .rankings-page .card h2 {
        margin-bottom: 12px;
        font-size: 25px;
    }

    .rankings-preview .rating-table tbody,
    .rankings-page .rating-table tbody {
        gap: 8px;
    }

    .rankings-preview .rating-table tr,
    .rankings-page .rating-table tr {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        align-items: center;
        gap: 5px 10px;
        min-height: 74px;
        padding: 10px 12px;
        border-radius: 16px;
    }

    .rankings-preview .rating-table td,
    .rankings-page .rating-table td {
        display: flex;
        align-items: center;
        min-width: 0;
        font-size: 14px;
        line-height: 1.15;
    }

    .rankings-preview .rating-table td::before,
    .rankings-page .rating-table td::before {
        flex: 0 0 auto;
        margin-right: 5px;
        font-size: 9px;
    }

    .rankings-preview .rating-table td.name,
    .rankings-page .rating-table td.name {
        grid-column: 2 / -1;
        grid-row: 1;
        align-self: center;
        font-size: 17px;
    }

    html[data-theme="dark"] .rankings-preview .rating-table td.name,
    html[data-theme="dark"] .rankings-page .rating-table td.name,
    html[data-theme="dark"] .rating-table .name,
    html[data-theme="dark"] .class-name,
    html[data-theme="dark"] .class-title,
    html[data-theme="dark"] .accent {
        color: #35d9ff;
        text-shadow: 0 0 16px rgba(18, 223, 244, 0.14);
    }

    .rankings-preview .rating-table td.name::before,
    .rankings-page .rating-table td.name::before {
        content: "";
        display: none;
    }

    .rankings-preview .rating-table td:first-child,
    .rankings-page .rating-table td:first-child {
        grid-column: 1;
        grid-row: 1 / span 3;
        align-self: center;
        justify-content: center;
        justify-self: center;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: rgba(255, 244, 217, 0.78);
        color: var(--gold-dark);
        font-size: 16px;
        font-weight: 950;
    }

    html[data-theme="dark"] .rankings-preview .rating-table td:first-child,
    html[data-theme="dark"] .rankings-page .rating-table td:first-child {
        border: 1px solid rgba(18, 223, 244, 0.24);
        background: radial-gradient(circle at 35% 25%, rgba(18, 223, 244, 0.28), rgba(18, 223, 244, 0.1));
        color: #35d9ff;
    }

    .rankings-preview .rating-table td:first-child::before,
    .rankings-page .rating-table td:first-child::before {
        content: "";
        display: none;
    }

    .rankings-preview .rating-table td:nth-child(3),
    .rankings-page .rating-table td:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
        overflow: hidden;
        color: var(--gold-dark);
        font-weight: 950;
    }

    .rankings-preview .rating-table td:nth-child(4),
    .rankings-page .rating-table td:nth-child(4) {
        grid-column: 2;
        grid-row: 3;
        justify-self: start;
        color: var(--text);
    }

    .rankings-preview .rating-table td:nth-child(5),
    .rankings-page .rating-table td:nth-child(5) {
        grid-column: 3;
        grid-row: 2;
        justify-self: end;
    }

    .rankings-preview .rating-table td:nth-child(6),
    .rankings-page .rating-table td:nth-child(6) {
        grid-column: 3;
        grid-row: 3;
        justify-self: end;
    }

    .rankings-preview .rating-table td:nth-child(5),
    .rankings-preview .rating-table td:nth-child(6),
    .rankings-page .rating-table td:nth-child(5),
    .rankings-page .rating-table td:nth-child(6) {
        color: var(--muted);
        font-size: 12px;
        font-weight: 900;
    }

    .rankings-preview .rating-table td.accent,
    .rankings-page .rating-table td.accent {
        color: var(--gold-dark);
    }

    .about-hero {
        padding: 24px 0 8px;
    }

    .about-hero-inner {
        gap: 18px;
        min-height: 0;
        padding: 22px;
        background-position: 66% center;
    }

    .about-hero-inner h1 {
        font-size: 36px;
    }

    .about-hero-inner p {
        font-size: 15px;
        line-height: 1.65;
    }

    .about-rates {
        gap: 10px;
    }

    .about-rates .online-count {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 12px 14px;
        border: 1px solid rgba(37, 35, 77, 0.1);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.62);
    }

    html[data-theme="dark"] .about-rates .online-count {
        border-color: rgba(93, 209, 255, 0.16);
        background: linear-gradient(145deg, rgba(10, 31, 55, 0.94), rgba(5, 17, 31, 0.88));
    }

    .about-rates .online-count span {
        font-size: 38px;
    }

    .about-feature-grid {
        gap: 12px;
    }

    .about-feature {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 8px 14px;
        align-items: start;
    }

    .about-feature .feature-number {
        grid-row: span 2;
        margin-bottom: 0;
        font-size: 28px;
    }

    .about-feature h2 {
        margin-bottom: 0;
        font-size: 22px;
    }

    .about-feature p {
        font-size: 14px;
        line-height: 1.55;
    }

    .stats-dashboard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat-panel {
        min-height: 86px;
        padding: 14px;
        border-radius: 18px;
    }

    .stat-panel strong {
        font-size: 28px;
    }

    .stat-panel small,
    .stat-panel span {
        font-size: 12px;
    }

    .primary-panel {
        grid-column: 1 / -1;
        min-height: 150px;
        align-content: end;
        background-position: center;
    }

    .primary-panel strong {
        font-size: 58px;
    }

    .compact-list-row,
    .world-card-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
    }

    html[data-theme="dark"] .compact-list-row,
    html[data-theme="dark"] .world-card-row {
        border-color: rgba(93, 209, 255, 0.14);
        background: rgba(7, 22, 39, 0.42);
    }

    .compact-list-row em,
    .world-card-row em {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        align-self: center;
    }

    .auth-card h1 {
        font-size: 34px;
    }

    .profile-row {
        display: grid;
        gap: 6px;
    }

    .profile-row strong {
        text-align: left;
    }
}

@media (max-width: 760px) {
    html[data-theme="dark"] .main-nav {
        background:
            radial-gradient(circle at 22% 0%, rgba(18, 223, 244, 0.12), transparent 34%),
            linear-gradient(180deg, rgba(5, 16, 30, 0.99), rgba(4, 13, 25, 0.98));
    }

    html[data-theme="dark"] .main-nav a,
    html[data-theme="dark"] .nav-group > button,
    html[data-theme="dark"] .theme-toggle {
        color: #e8f3fb;
    }

    html[data-theme="dark"] .nav-group.open > button,
    html[data-theme="dark"] .nav-group > button.active {
        border-color: rgba(18, 223, 244, 0.42);
        background: linear-gradient(135deg, rgba(13, 74, 98, 0.9), rgba(5, 25, 42, 0.96));
        color: #f2fbff;
    }

    html[data-theme="dark"] .nav-dropdown a {
        border: 1px solid rgba(93, 209, 255, 0.12);
        color: #dbeaf5;
    }

    html[data-theme="dark"] .nav-dropdown a:hover,
    html[data-theme="dark"] .nav-dropdown a.active {
        border-color: rgba(18, 223, 244, 0.34);
        background: rgba(18, 223, 244, 0.12);
        color: #f2fbff;
    }

    html[data-theme="dark"] .rating-table tr,
    html[data-theme="dark"] .boss-table-card .rating-table tr {
        border-color: rgba(93, 209, 255, 0.18);
        background:
            radial-gradient(circle at 16% 0%, rgba(18, 223, 244, 0.08), transparent 32%),
            linear-gradient(145deg, rgba(10, 31, 55, 0.96), rgba(5, 17, 31, 0.92));
        color: #e8f3fb;
    }

    html[data-theme="dark"] .rating-table td {
        color: #e8f3fb;
    }

    html[data-theme="dark"] .rating-table td::before {
        color: #86a8bc;
        opacity: 1;
    }
}

@media (max-width: 520px) {
    html[data-theme="dark"] .card,
    html[data-theme="dark"] .profile-card,
    html[data-theme="dark"] .character-card,
    html[data-theme="dark"] .boss-table-card,
    html[data-theme="dark"] .public-skills-card {
        border-color: rgba(93, 209, 255, 0.16);
        background:
            radial-gradient(circle at 10% 0%, rgba(18, 223, 244, 0.09), transparent 34%),
            linear-gradient(145deg, rgba(10, 31, 55, 0.92), rgba(5, 17, 31, 0.9));
    }

    html[data-theme="dark"] .skill-chip {
        border-color: rgba(93, 209, 255, 0.22);
        background: linear-gradient(135deg, rgba(10, 37, 62, 0.96), rgba(8, 25, 45, 0.94));
        color: #e8f3fb;
    }

    html[data-theme="dark"] .skill-chip b,
    html[data-theme="dark"] .character-card h2,
    html[data-theme="dark"] .rating-table .name,
    html[data-theme="dark"] .rankings-preview .rating-table td.name,
    html[data-theme="dark"] .rankings-page .rating-table td.name,
    html[data-theme="dark"] .class-name,
    html[data-theme="dark"] .class-title,
    html[data-theme="dark"] .accent {
        color: #35d9ff;
    }

    html[data-theme="dark"] .character-main-stats div,
    html[data-theme="dark"] .character-meta div,
    html[data-theme="dark"] .character-extra-stats div,
    html[data-theme="dark"] .mini-grid div,
    html[data-theme="dark"] .vital {
        border-color: rgba(93, 209, 255, 0.14);
        background: rgba(6, 20, 36, 0.74);
        color: #e8f3fb;
    }

    html[data-theme="dark"] .character-main-stats small,
    html[data-theme="dark"] .character-meta span,
    html[data-theme="dark"] .character-extra-stats span,
    html[data-theme="dark"] .mini-grid span,
    html[data-theme="dark"] .mini-grid small,
    html[data-theme="dark"] .profile-row span,
    html[data-theme="dark"] .vital span {
        color: #8fb2c7;
    }

    html[data-theme="dark"] .rankings-preview .rating-table td:nth-child(5),
    html[data-theme="dark"] .rankings-preview .rating-table td:nth-child(6),
    html[data-theme="dark"] .rankings-page .rating-table td:nth-child(5),
    html[data-theme="dark"] .rankings-page .rating-table td:nth-child(6) {
        color: #c4d5e2;
    }
}
