:root {

    --bg-page: #e9eff6;
    --bg-page-gradient: radial-gradient(ellipse at top, #f7faff 0%, #e6edf5 60%, #dfe7f2 100%);
    --surface: #ffffff;
    --surface-elevated: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    --surface-subtle: #f1f5f9;
    --header-bg: rgba(255, 255, 255, 0.88);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --border-color: rgba(15, 23, 42, 0.09);
    --border-strong: rgba(15, 23, 42, 0.16);
    --table-border: rgba(15, 23, 42, 0.07);
    --table-sub-border: rgba(15, 23, 42, 0.05);
    --table-head-bg: #f4f7fb;
    --table-hover: rgba(37, 99, 235, 0.045);

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow-card: 0 2px 4px rgba(15, 23, 42, 0.04),
                   0 10px 24px -6px rgba(15, 23, 42, 0.09),
                   inset 0 1px 0 rgba(255, 255, 255, 1);
    --shadow-card-hover: 0 6px 14px rgba(15, 23, 42, 0.08),
                         0 18px 34px -8px rgba(15, 23, 42, 0.14),
                         inset 0 1px 0 rgba(255, 255, 255, 1);
    --shadow-header: 0 4px 20px -4px rgba(15, 23, 42, 0.08);
    --shadow-modal: 0 24px 60px -12px rgba(15, 23, 42, 0.28);

    --brand: #2563eb;
    --brand-hover: #1d4ed8;
    --brand-soft: rgba(37, 99, 235, 0.1);
    --brand-border: rgba(37, 99, 235, 0.26);

    --accent-1: #eb7d00;
    --accent-1-bg: rgba(235, 125, 0, 0.12);
    --accent-2: #228b22;
    --accent-2-bg: rgba(34, 139, 34, 0.12);
    --accent-3: #ff1100;
    --accent-3-bg: rgba(255, 17, 0, 0.11);

    --support-color: #ffcd68;
    --support-shadow: 1px 1px 2px rgb(105 92 4);
    --support-bg: rgba(255, 205, 104, 0.18);
    --support-badge-text: #a16207;

    --leader-color: #1d4ed8;
    --eventer-color: #2563eb;
    --curator-color: #9370DB;
    --curator-bg: rgba(147, 112, 219, 0.13);
    --curator-border: rgba(147, 112, 219, 0.34);

    --online-color: #15803d;
    --online-bg: rgba(22, 163, 74, 0.11);
    --online-dot: #16a34a;
    --offline-color: #64748b;
    --offline-bg: rgba(100, 116, 139, 0.12);
    --offline-dot: #94a3b8;

    --move-color: #228b22;
    --move-bg: rgba(34, 139, 34, 0.12);
    --del-color: #777777;
    --del-bg: rgba(119, 119, 119, 0.13);

    --danger-color: #dc2626;
    --danger-bg: rgba(220, 38, 38, 0.08);
    --danger-border: rgba(220, 38, 38, 0.24);

    --server-legacy-bg: rgba(235, 125, 0, 0.11);
    --server-legacy-text: #b45309;
    --server-legacy-border: rgba(235, 125, 0, 0.25);

    --server-home-bg: rgba(37, 99, 235, 0.1);
    --server-home-text: #1d4ed8;
    --server-home-border: rgba(37, 99, 235, 0.24);

    --badge-bg: #e2e8f0;
    --badge-text: #334155;
    --role-tag-bg: #eef2f7;
    --role-tag-border: rgba(15, 23, 42, 0.14);
    --modal-backdrop: rgba(15, 23, 42, 0.5);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {

    --bg-page: #111318;
    --bg-page-gradient: radial-gradient(ellipse at top, #1d2230 0%, #13161d 55%, #0e1015 100%);
    --surface: #1b1e27;
    --surface-elevated: linear-gradient(180deg, #242834 0%, #1a1d26 100%);
    --surface-subtle: #252a38;
    --header-bg: rgba(20, 23, 31, 0.88);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --table-border: rgba(255, 255, 255, 0.06);
    --table-sub-border: rgba(255, 255, 255, 0.04);
    --table-head-bg: rgba(255, 255, 255, 0.035);
    --table-hover: rgba(255, 255, 255, 0.045);

    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.4),
                   0 16px 32px -8px rgba(0, 0, 0, 0.52),
                   inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --shadow-card-hover: 0 8px 22px rgba(0, 0, 0, 0.5),
                         0 24px 44px -10px rgba(0, 0, 0, 0.65),
                         inset 0 1px 0 rgba(255, 255, 255, 0.13);
    --shadow-header: 0 8px 28px rgba(0, 0, 0, 0.45);
    --shadow-modal: 0 28px 70px -12px rgba(0, 0, 0, 0.75);

    --brand: #3b82f6;
    --brand-hover: #60a5fa;
    --brand-soft: rgba(59, 130, 246, 0.16);
    --brand-border: rgba(59, 130, 246, 0.36);

    --accent-1: #eb7d00;
    --accent-1-bg: rgba(235, 125, 0, 0.15);
    --accent-2: #228b22;
    --accent-2-bg: rgba(34, 139, 34, 0.18);
    --accent-3: #ff1100;
    --accent-3-bg: rgba(255, 17, 0, 0.15);

    --support-color: #ffcd68;
    --support-shadow: 1px 1px 2px rgb(105 92 4);
    --support-bg: rgba(255, 205, 104, 0.14);
    --support-badge-text: #ffcd68;

    --leader-color: #60a5fa;
    --eventer-color: #60a5fa;
    --curator-color: #9370DB;
    --curator-bg: rgba(147, 112, 219, 0.16);
    --curator-border: rgba(147, 112, 219, 0.38);

    --online-color: #4ade80;
    --online-bg: rgba(74, 222, 128, 0.13);
    --online-dot: #22c55e;
    --offline-color: #94a3b8;
    --offline-bg: rgba(148, 163, 184, 0.12);
    --offline-dot: #64748b;

    --move-color: #228b22;
    --move-bg: rgba(34, 139, 34, 0.18);
    --del-color: #777777;
    --del-bg: rgba(119, 119, 119, 0.16);

    --danger-color: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.12);
    --danger-border: rgba(248, 113, 113, 0.28);

    --server-legacy-bg: rgba(235, 125, 0, 0.16);
    --server-legacy-text: #fbbf24;
    --server-legacy-border: rgba(235, 125, 0, 0.32);

    --server-home-bg: rgba(59, 130, 246, 0.16);
    --server-home-text: #60a5fa;
    --server-home-border: rgba(59, 130, 246, 0.32);

    --badge-bg: rgba(255, 255, 255, 0.08);
    --badge-text: #cbd5e1;
    --role-tag-bg: rgba(255, 255, 255, 0.1);
    --role-tag-border: rgba(255, 255, 255, 0.16);
    --modal-backdrop: rgba(0, 0, 0, 0.72);
}

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

html {
    min-height: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    background-color: var(--bg-page);
    background-image: var(--bg-page-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.25s ease, color 0.25s ease;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

h1, h2, h3, h4 {
    margin-top: 0;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.015em;
}

.page-title {
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 28px;
    color: var(--text-primary);
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 20px;
    margin: 0 0 18px;
    color: var(--text-primary);
}

.bold {
    font-weight: 700;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-header);
}

.header-inner {
    max-width: 1560px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-header nav {
    flex: 1;
    min-width: 0;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 6px;
}

.tab a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: var(--transition);
}

.tab a:hover {
    color: var(--text-primary);
    background: var(--surface-subtle);
    border-color: var(--border-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.tab.active a {
    color: var(--brand);
    background: var(--brand-soft);
    border-color: var(--brand-border);
    box-shadow: var(--shadow-sm);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}

.theme-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
}

.mobile-header-bar {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
}

.mobile-brand-name {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    white-space: nowrap;
}

.mobile-brand-sep {
    color: var(--text-muted);
    font-weight: 500;
}

.mobile-brand-page {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.menu-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.menu-toggle:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-card);
}

.menu-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.22s ease, opacity 0.18s ease;
    transform-origin: center;
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.mobile-nav-backdrop.is-open {
    display: block;
}

.admin-page-container,
.support-page-container,
.leaders-container,
.log-page-container {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 30px 24px 52px;
}

.eventer-page-container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 30px 24px 52px;
}

.all-servers-section {
    margin-bottom: 36px;
}

.admin-cards,
.support-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.admin-card,
.support-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.admin-card:hover,
.support-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-card-hover);
}

.admin-info,
.support-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.admin-name {
    font-size: 15.5px;
    font-weight: 700;
    word-break: break-word;
}

.admin-level {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.support-card {
    border-left: 4px solid var(--support-color);
}

.support-name {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--support-color);
    text-shadow: var(--support-shadow);
    word-break: break-word;
}

.admin-card.admin-level-1 { border-left: 4px solid var(--accent-1); }
.admin-card.admin-level-2 { border-left: 4px solid var(--accent-2); }
.admin-card.admin-level-3 { border-left: 4px solid var(--accent-3); }

.admin-level-1 .admin-name { color: var(--accent-1); }
.admin-level-2 .admin-name { color: var(--accent-2); }
.admin-level-3 .admin-name { color: var(--accent-3); }

.admin-lvl-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}

.admin-role-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--role-tag-bg);
    border: 1px solid var(--role-tag-border);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.3;
    text-align: center;
    vertical-align: middle;
}

.admin-role-tag.admin-level-1,
.admin-level-1 .admin-role-tag { color: var(--accent-1); }

.admin-role-tag.admin-level-2,
.admin-level-2 .admin-role-tag { color: var(--accent-2); }

.admin-role-tag.admin-level-3,
.admin-level-3 .admin-role-tag { color: var(--accent-3); }

.lvl-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.lvl-pill.admin-level-1 { background: var(--accent-1-bg); color: var(--accent-1); }
.lvl-pill.admin-level-2 { background: var(--accent-2-bg); color: var(--accent-2); }
.lvl-pill.admin-level-3 { background: var(--accent-3-bg); color: var(--accent-3); }

.server-tables-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 24px;
    align-items: start;
}

.table-wrapper,
.server-section {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 20px 22px;
    transition: var(--transition);
    min-width: 0;
}

.table-wrapper:hover,
.server-section:hover {
    border-color: var(--border-strong);
}

.table-wrapper h2,
.table-wrapper h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 19px;
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--table-border);
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll::-webkit-scrollbar,
.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-scroll::-webkit-scrollbar-thumb,
.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 999px;
}

.admin-count,
.support-count,
.eventer-count,
.server-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--badge-bg);
    color: var(--badge-text);
    font-size: 12.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.admin-table,
.support-table,
.eventer-table,
.leaders-table,
.log-table,
.free-factions-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14.5px;
}

.admin-table th,
.support-table th,
.eventer-table th,
.leaders-table th,
.log-table th,
.free-factions-table th {
    background: var(--table-head-bg);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.045em;
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.admin-table th:first-child,
.support-table th:first-child,
.eventer-table th:first-child,
.leaders-table th:first-child,
.log-table th:first-child,
.free-factions-table th:first-child {
    border-top-left-radius: var(--radius-sm);
}

.admin-table th:last-child,
.support-table th:last-child,
.eventer-table th:last-child,
.leaders-table th:last-child,
.log-table th:last-child,
.free-factions-table th:last-child {
    border-top-right-radius: var(--radius-sm);
}

.admin-table td,
.support-table td,
.eventer-table td,
.leaders-table td,
.log-table td,
.free-factions-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--table-border);
    vertical-align: middle;
    transition: background-color 0.15s ease;
}

.admin-table tbody tr:last-child td,
.support-table tbody tr:last-child td,
.eventer-table tbody tr:last-child td,
.leaders-table tbody tr:last-child td,
.log-table tbody tr:last-child td,
.free-factions-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover td,
.support-table tbody tr:hover td,
.eventer-table tbody tr:hover td,
.leaders-table tbody tr:hover td,
.log-table tbody tr:hover td,
.free-factions-table tbody tr:hover td {
    background-color: var(--table-hover);
}

.admin-table td.admin-level-1 { border-left: 3.5px solid var(--accent-1); }
.admin-table td.admin-level-2 { border-left: 3.5px solid var(--accent-2); }
.admin-table td.admin-level-3 { border-left: 3.5px solid var(--accent-3); }

.admin-table th:last-child,
.admin-table td:last-child {
    text-align: right;
    width: 1%;
    white-space: nowrap;
}

.support-table th,
.support-table td {
    text-align: center;
}

.curator-section {
    margin-bottom: 24px;
}

.curator-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--curator-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.curator-card:hover {
    border-color: var(--border-strong);
    border-left-color: var(--curator-color);
    box-shadow: var(--shadow-card-hover);
}

.curator-identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 210px;
}

.curator-name {
    font-size: 19px;
    font-weight: 800;
    color: var(--curator-color);
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.curator-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--curator-bg);
    border: 1px solid var(--curator-border);
    color: var(--curator-color);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.curator-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, auto));
    gap: 14px 28px;
    align-items: center;
}

.curator-meta-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.curator-meta-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    white-space: nowrap;
}

.curator-meta-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    min-height: 28px;
    display: inline-flex;
    align-items: center;
}

.eventer-table {
    min-width: 680px;
}

.eventer-name {
    color: var(--eventer-color);
    font-weight: 700;
    white-space: nowrap;
}

.server-select-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 92px;
    height: 28px;
    padding: 0 10px 0 11px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.server-select-btn:hover,
.server-select-btn[aria-expanded="true"] {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.server-select-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--brand-border);
}

.server-select-chevron {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    opacity: 0.85;
    transition: transform 0.18s ease;
}

.server-select-btn[aria-expanded="true"] .server-select-chevron {
    transform: rotate(180deg);
}

.server-dropdown-menu {
    position: fixed;
    z-index: 2500;
    min-width: 148px;
    padding: 5px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-modal);
    display: none;
    flex-direction: column;
    gap: 3px;
}

.server-dropdown-menu.is-open {
    display: flex;
    animation: dropdownPop 0.14s ease-out;
}

@keyframes dropdownPop {
    from { opacity: 0; transform: translateY(-4px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.server-dropdown-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.14s ease, border-color 0.14s ease;
}

.server-dropdown-option:hover {
    background: var(--surface-subtle);
}

.server-dropdown-option.is-selected {
    background: var(--brand-soft);
    border-color: var(--brand-border);
}

.server-dropdown-option-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.server-option-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.server-option-dot.is-online {
    background: var(--online-dot);
    box-shadow: 0 0 0 3px var(--online-bg);
}

.server-option-dot.is-offline {
    background: var(--offline-dot);
}

.server-option-label-legacy {
    color: var(--server-legacy-text);
}

.server-option-label-home {
    color: var(--server-home-text);
}

.server-option-check {
    width: 14px;
    height: 14px;
    color: var(--brand);
    flex-shrink: 0;
    opacity: 0;
}

.server-dropdown-option.is-selected .server-option-check {
    opacity: 1;
}

.server-section {
    margin-bottom: 28px;
}

.server-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--table-border);
}

.server-title {
    margin: 0;
    font-size: 21px;
    font-weight: 800;
    color: var(--text-primary);
}

.free-factions-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--brand-border);
    background: var(--brand-soft);
    color: var(--brand);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.free-factions-btn:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.leaders-table {
    min-width: 720px;
}

.leaders-table td.leader-name-cell,
.leader-name-cell {
    font-weight: 700;
    color: var(--leader-color);
    white-space: nowrap;
}

.leaders-table td.leader-faction-cell,
.leader-faction-cell {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

table td.date-num,
.date-num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--text-secondary);
}

.activity-num {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
}

.online-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.online-status.online {
    background: var(--online-bg);
    color: var(--online-color);
}

.online-status.offline {
    background: var(--offline-bg);
    color: var(--offline-color);
}

.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.online-status.online .online-dot {
    background: var(--online-dot);
    box-shadow: 0 0 0 3px var(--online-bg);
}

.online-status.offline .online-dot {
    background: var(--offline-dot);
}

.no-leaders {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-weight: 600;
    box-shadow: var(--shadow-card);
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--modal-backdrop);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 16px;
    align-items: center;
    justify-content: center;
}

.modal.is-open {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    overflow: hidden;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--table-head-bg);
}

.modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.close-modal {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--text-primary);
    background: var(--surface-subtle);
    border-color: var(--border-color);
}

.modal-body {
    padding: 16px 20px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.free-factions-table th:last-child,
.free-factions-table td:last-child {
    text-align: right;
    width: 80px;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}

.log-table {
    min-width: 760px;
    font-size: 14px;
}

.log-action-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.log-action-add     { background: var(--accent-2-bg); color: var(--accent-2); }
.log-action-up      { background: var(--brand-soft);  color: var(--brand); }
.log-action-down    { background: var(--accent-1-bg); color: var(--accent-1); }
.log-action-move    { background: var(--move-bg);     color: var(--move-color); }
.log-action-del     { background: var(--danger-bg);   color: var(--danger-color); }
.log-action-support { background: var(--support-bg);  color: var(--support-badge-text); }
.log-action-neutral { background: var(--badge-bg);    color: var(--badge-text); }

.log-table td.log-nick,
.log-nick {
    font-weight: 700;
    white-space: nowrap;
}
.log-table td.log-nick-lvl1,
.log-nick-lvl1 {
    color: var(--accent-1);
    font-weight: 700;
}
.log-table td.log-nick-lvl2,
.log-nick-lvl2 {
    color: var(--accent-2);
    font-weight: 700;
}
.log-table td.log-nick-lvl3,
.log-nick-lvl3 {
    color: var(--accent-3);
    font-weight: 700;
}
.log-table td.log-nick-support,
.log-nick-support {
    color: var(--support-color);
    text-shadow: var(--support-shadow);
    font-weight: 700;
}
.log-table td.log-nick-move,
.log-nick-move {
    color: var(--move-color);
    font-weight: 700;
}
.log-table td.log-nick-del,
.log-nick-del {
    color: var(--del-color);
    font-weight: 700;
}

.server-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--surface-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.server-tag-legacy {
    background: var(--server-legacy-bg);
    color: var(--server-legacy-text);
    border-color: var(--server-legacy-border);
}

.server-tag-home {
    background: var(--server-home-bg);
    color: var(--server-home-text);
    border-color: var(--server-home-border);
}

.log-date {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.log-date-ago {
    color: var(--text-muted);
    font-size: 13px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 22px 0;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.page-link:hover {
    border-color: var(--brand-border);
    color: var(--brand);
    background: var(--surface-subtle);
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}

.page-link.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.error-message {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin: 20px 0;
    text-align: center;
    font-weight: 600;
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 14px;
        gap: 0;
    }

    .mobile-header-bar {
        display: flex;
    }

    .theme-toggle--desktop {
        display: none;
    }

    .theme-toggle--mobile,
    .menu-toggle {
        width: 36px;
        height: 36px;
    }

    .site-nav {
        display: none;
        width: 100%;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--border-color);
    }

    .site-nav.is-open {
        display: block;
        animation: mobileMenuDrop 0.18s ease-out;
    }

    @keyframes mobileMenuDrop {
        from { opacity: 0; transform: translateY(-6px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .tabs {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .tab {
        width: 100%;
    }

    .tab a {
        display: flex;
        width: 100%;
        padding: 11px 14px;
        font-size: 14.5px;
        border-radius: 10px;
    }

    .tab a:hover {
        transform: none;
    }

    .admin-page-container,
    .support-page-container,
    .leaders-container,
    .eventer-page-container,
    .log-page-container {
        padding: 18px 12px 36px;
    }

    .page-title {
        font-size: 21px;
        margin-bottom: 18px;
    }

    .section-title {
        font-size: 18px;
    }

    .server-tables-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .table-wrapper,
    .server-section {
        padding: 14px;
        border-radius: var(--radius-md);
    }

    .server-header {
        gap: 8px;
    }

    .server-title {
        font-size: 19px;
    }

    .free-factions-btn {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }

    .admin-cards,
    .support-cards {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .admin-card,
    .support-card {
        padding: 13px 14px;
    }

    .curator-card {
        padding: 16px;
        gap: 16px;
        border-radius: var(--radius-md);
    }

    .curator-meta-grid {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 16px;
        padding-top: 12px;
        border-top: 1px solid var(--table-border);
    }

    .admin-table th, .admin-table td,
    .support-table th, .support-table td,
    .eventer-table th, .eventer-table td,
    .leaders-table th, .leaders-table td,
    .log-table th, .log-table td {
        padding: 10px;
        font-size: 13.5px;
    }
}

@media (max-width: 480px) {
    .admin-cards,
    .support-cards {
        grid-template-columns: 1fr;
    }

    .page-link {
        min-width: 32px;
        height: 32px;
        padding: 0 9px;
        font-size: 13px;
    }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-body {
        padding: 12px 16px 16px;
    }
}

:where(.nick-link) {
    color: inherit;
    font: inherit;
    text-shadow: inherit;
}

.nick-link {
    text-decoration: none;
    display: inline-block;
    border-radius: 4px;
    transition: opacity 0.16s ease, text-decoration-color 0.16s ease;
}

.nick-link:hover,
.nick-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
    opacity: 0.88;
    outline: none;
}

.nick-link:focus-visible {
    box-shadow: 0 0 0 2px var(--brand-border);
}

.forum-status-container {
    width: 100%;
    max-width: 560px;
    margin: 56px auto;
    padding: 0 20px;
}

.forum-status-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 36px 28px 32px;
    text-align: center;
}

.forum-status-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forum-status-icon svg {
    width: 28px;
    height: 28px;
}

.forum-status-icon.is-warn {
    background: var(--accent-1-bg);
    color: var(--accent-1);
    border: 1px solid rgba(235, 125, 0, 0.25);
}

.forum-status-icon.is-error {
    background: var(--danger-bg);
    color: var(--danger-color);
    border: 1px solid var(--danger-border);
}

.forum-status-title {
    font-size: 21px;
    font-weight: 800;
    margin: 0 0 10px;
    color: var(--text-primary);
}

.forum-status-text {
    margin: 0 0 24px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.forum-status-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.forum-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.forum-btn-primary {
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.32);
}

.forum-btn-primary:hover {
    background: var(--brand-hover);
    transform: translateY(-1px);
}

.forum-btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.forum-btn-secondary:hover {
    background: var(--surface-subtle);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .forum-status-container {
        margin: 28px auto;
        padding: 0 14px;
    }

    .forum-status-card {
        padding: 26px 18px 24px;
    }

    .forum-btn {
        width: 100%;
    }
}

.site-footer {
    margin-top: auto;
    width: 100%;
    background: var(--header-bg);
    border-top: 1px solid var(--border-color);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.footer-inner {
    max-width: 1560px;
    margin: 0 auto;
    padding: 7px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 20px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
}

.footer-copy,
.footer-credit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.footer-heart {
    display: inline-block;
    font-style: normal;
    line-height: 1;
}

.footer-link {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover,
.footer-link:focus-visible {
    color: var(--brand-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
    outline: none;
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 16px 14px;
        gap: 6px;
        font-size: 13px;
    }

    .footer-copy,
    .footer-credit {
        justify-content: center;
    }
}

.ip-page-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 30px 24px 52px;
}

.ip-hero-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 28px 28px 26px;
    margin-bottom: 18px;
    text-align: center;
    transition: var(--transition);
}

.ip-hero-card:hover {
    border-color: var(--border-strong);
}

.ip-hero-top {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.ip-hero-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.ip-hero-badges {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ip-proto-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--brand-soft);
    border: 1px solid var(--brand-border);
    color: var(--brand);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.ip-proto-badge--warn {
    background: var(--accent-1-bg);
    border-color: rgba(235, 125, 0, 0.28);
    color: var(--accent-1);
}

.ip-address-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    word-break: break-all;
    line-height: 1.25;
    margin-bottom: 22px;
}

.ip-hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.ip-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.ip-btn-primary {
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.32);
}

.ip-btn-primary:hover {
    background: var(--brand-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.42);
}

.ip-btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.ip-btn-secondary:hover {
    background: var(--surface-subtle);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.ip-btn.is-copied {
    background: var(--online-bg);
    border-color: rgba(22, 163, 74, 0.32);
    color: var(--online-color);
    box-shadow: none;
}

.ip-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 10px 12px;
    margin-bottom: 22px;
}

.ip-search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.ip-search-icon {
    position: absolute;
    left: 12px;
    width: 17px;
    height: 17px;
    color: var(--text-muted);
    pointer-events: none;
}

.ip-search-input {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 38px;
    border-radius: 9px;
    border: 1px solid var(--border-color);
    background: var(--surface-subtle);
    color: var(--text-primary);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    transition: var(--transition);
}

.ip-search-input::placeholder {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-muted);
}

.ip-search-input:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.ip-search-buttons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

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

.ip-info-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 18px 20px;
    transition: var(--transition);
}

.ip-info-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-card-hover);
}

.ip-info-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--brand-soft);
    color: var(--brand);
}

.ip-info-icon svg {
    width: 20px;
    height: 20px;
}

.ip-info-icon--isp {
    background: var(--brand-soft);
    color: var(--brand);
}

.ip-info-icon--country {
    background: var(--accent-2-bg);
    color: var(--accent-2);
}

.ip-info-icon--region {
    background: var(--curator-bg);
    color: var(--curator-color);
}

.ip-info-icon--city {
    background: var(--accent-1-bg);
    color: var(--accent-1);
}

.ip-info-icon--tz {
    background: var(--support-bg);
    color: var(--support-badge-text);
}

.ip-info-icon--coords {
    background: var(--online-bg);
    color: var(--online-color);
}

.ip-info-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.ip-info-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.ip-info-value {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-word;
    line-height: 1.35;
}

.ip-coords-num {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14.5px;
    font-variant-numeric: tabular-nums;
}

.ip-flag {
    font-size: 18px;
    line-height: 1;
}

.ip-inline-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--badge-bg);
    color: var(--badge-text);
    font-size: 11.5px;
    font-weight: 700;
}

.ip-info-sub {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.ip-info-sub-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ip-map-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
    transition: var(--transition);
}

.ip-map-link:hover {
    color: var(--brand-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ip-empty-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 24px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14.5px;
    font-weight: 500;
}

.ip-db-meta {
    margin-top: 20px;
    text-align: center;
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 500;
}

@media (max-width: 768px) {
    .ip-page-container {
        padding: 18px 12px 36px;
    }

    .ip-hero-card {
        padding: 22px 16px 20px;
        border-radius: var(--radius-md);
    }

    .ip-address-value {
        font-size: 24px;
        margin-bottom: 18px;
    }

    .ip-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .ip-search-buttons {
        width: 100%;
    }

    .ip-search-buttons .ip-btn {
        flex: 1;
    }

    .ip-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ip-info-card {
        padding: 15px 16px;
    }
}

@media (max-width: 480px) {
    .ip-address-value {
        font-size: 20px;
    }

    .ip-hero-actions .ip-btn {
        width: 100%;
    }
}
.ip-proto-badge--danger {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: var(--danger-color);
}

.ip-anon-card {
    margin-top: 20px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 22px 24px;
    transition: var(--transition);
}

.ip-anon-card:hover {
    border-color: var(--border-strong);
}

.ip-anon-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--table-border);
}

.ip-anon-head-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.ip-anon-icon {
    background: var(--brand-soft);
    color: var(--brand);
}

.ip-anon-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
}

.ip-anon-subtitle {
    margin: 3px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.ip-anon-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}

.ip-anon-badge.is-clean {
    background: var(--online-bg);
    border-color: rgba(22, 163, 74, 0.25);
    color: var(--online-color);
}

.ip-anon-badge.is-warn {
    background: var(--accent-1-bg);
    border-color: rgba(235, 125, 0, 0.28);
    color: var(--accent-1);
}

.ip-anon-badge.is-bad {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: var(--danger-color);
}

.ip-anon-list {
    display: flex;
    flex-direction: column;
}

.ip-anon-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--table-border);
    font-size: 14px;
}

.ip-anon-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.ip-anon-name {
    color: var(--text-secondary);
    font-weight: 600;
    flex-shrink: 0;
}

.ip-anon-val {
    font-weight: 700;
    text-align: right;
    word-break: break-word;
}

.ip-anon-val.is-ok {
    color: var(--online-color);
}

.ip-anon-val.is-warn {
    color: var(--accent-1);
}

.ip-anon-val.is-bad {
    color: var(--danger-color);
}

.ip-anon-val.is-muted {
    color: var(--text-muted);
    font-weight: 500;
}

@media (max-width: 768px) {
    .ip-anon-card {
        padding: 18px 16px;
        border-radius: var(--radius-md);
    }

    .ip-anon-badge {
        white-space: normal;
    }

    .ip-anon-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .ip-anon-val {
        text-align: left;
    }
}
.ip-btn-danger {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: var(--danger-color);
    box-shadow: var(--shadow-sm);
}

.ip-btn-danger:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: #ffffff;
    transform: translateY(-1px);
}

.ip-speed-card {
    margin-top: 20px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 22px 24px;
    transition: var(--transition);
}

.ip-speed-card:hover {
    border-color: var(--border-strong);
}

.ip-speed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 16px;
}

.ip-speed-icon {
    background: var(--online-bg);
    color: var(--online-color);
}

.ip-speed-progress {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--surface-subtle);
    overflow: hidden;
    margin-bottom: 18px;
    opacity: 0.45;
    transition: opacity 0.2s ease;
}

.ip-speed-progress.is-running {
    opacity: 1;
}

.ip-speed-progress-bar {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand) 0%, var(--online-dot) 100%);
    transition: width 0.16s linear;
}

.ip-speed-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.ip-speed-metric {
    background: var(--surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: var(--transition);
}

.ip-speed-metric.is-active {
    border-color: var(--brand-border);
    background: var(--brand-soft);
    box-shadow: var(--shadow-sm);
}

.ip-speed-metric-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.ip-speed-metric-value {
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.ip-speed-unit {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
}

.ip-speed-error {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger-color);
    font-size: 13.5px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .ip-speed-card {
        padding: 18px 16px;
        border-radius: var(--radius-md);
    }

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

    .ip-speed-metric {
        padding: 12px 14px;
    }

    .ip-speed-metric-value {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .ip-speed-header .ip-btn {
        width: 100%;
    }
}
