:root {
    --bg: #160f18;
    --bg-2: #1d1422;
    --card: #221829;
    --line: rgba(255,255,255,.08);
    --text: #f3eef7;
    --muted: #a899b4;
    --accent: #e85d9c;
    --accent-2: #ff8fb8;
    --gold: #f0c36a;
    --kp: #ff6a00;
    --imdb: #f5c518;
    --radius: 16px;
    --font: "Manrope", system-ui, sans-serif;
    --display: "Oswald", Impact, sans-serif;
    --shadow: 0 20px 60px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(900px 420px at 10% -10%, rgba(232,93,156,.18), transparent 55%),
        radial-gradient(700px 380px at 100% 0%, rgba(240,195,106,.08), transparent 50%),
        linear-gradient(180deg, #1a1220 0%, var(--bg) 35%, #100b12 100%);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }

.wrap { min-height: 100vh; display: flex; flex-direction: column; }
.content { flex: 1; width: min(1280px, calc(100% - 28px)); margin: 0 auto; padding: 22px 0 50px; }

/* Header */
.header {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: 18px;
    padding: 14px 22px;
    background: rgba(18, 12, 22, .9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}
.logo {
    font-family: var(--display);
    font-size: 1.85rem;
    letter-spacing: .04em;
    white-space: nowrap;
    text-transform: none;
}
.logo span { color: var(--accent); }

.nav { flex: 1; display: flex; justify-content: center; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; align-items: center; }
.nav__item { position: relative; }
.nav__link {
    display: inline-flex; align-items: center;
    padding: 10px 12px; border: 0; background: transparent; color: var(--muted);
    font-weight: 700; cursor: pointer; border-radius: 10px;
}
.nav__link:hover, .nav__item:hover > .nav__link { color: var(--text); background: rgba(255,255,255,.04); }

.mega {
    position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-30%);
    display: none; gap: 8px;
    min-width: 640px; padding: 16px;
    background: #1b1322; border: 1px solid var(--line); border-radius: 16px;
    box-shadow: var(--shadow);
}
.nav__item:hover .mega, .nav__item:focus-within .mega { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); }
.mega__col { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; align-content: start; }
.mega__col a {
    display: block; padding: 7px 10px; border-radius: 8px; color: var(--muted); font-size: .9rem; font-weight: 600;
}
.mega__col a:hover { background: rgba(232,93,156,.12); color: var(--text); }
.mega__head { padding: 8px 10px 4px; color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

.search {
    display: flex; align-items: center; gap: 8px;
    min-width: min(340px, 34vw);
    background: rgba(255,255,255,.04);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 6px 5px 16px;
}
.search input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text);
}
.search button {
    width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #b83474);
    color: #fff; cursor: pointer; font-size: 1.05rem;
}
.burger {
    display: none; width: 42px; height: 42px; border-radius: 12px;
    border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer;
}
.mobile-nav {
    display: none; flex-direction: column; gap: 4px; padding: 12px 16px 16px;
    background: #1b1322; border-bottom: 1px solid var(--line);
}
.mobile-nav a { padding: 12px; border-radius: 10px; color: var(--muted); font-weight: 700; }
.mobile-nav a:hover { background: rgba(255,255,255,.04); color: #fff; }
.mobile-nav__sub { padding-left: 22px !important; font-size: .9rem; font-weight: 600 !important; opacity: .85; }

/* Hero */
.hero {
    position: relative; overflow: hidden;
    border-radius: 24px; margin-bottom: 28px;
    min-height: 300px;
    display: grid; align-items: end;
    padding: 38px;
    background:
        linear-gradient(120deg, rgba(22,15,24,.2), rgba(22,15,24,.75)),
        radial-gradient(800px 300px at 80% 20%, rgba(232,93,156,.25), transparent 60%),
        linear-gradient(135deg, #2a1830, #160f18 55%, #24101f);
    background-size: cover;
    background-position: center top;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    animation: rise .55s ease both;
    transition: background-image .45s ease;
}
.hero h1 {
    margin: 0 0 10px;
    font-family: var(--display);
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: .95;
    letter-spacing: .03em;
    max-width: 14ch;
}
.hero p { margin: 0; max-width: 52ch; color: #d8c9e0; line-height: 1.6; font-size: 1.05rem; }

/* Sections */
.sect { margin-bottom: 34px; animation: rise .5s ease both; }
.sect__header {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-bottom: 16px; flex-wrap: wrap;
}
.sect__title {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--display); font-size: 1.7rem; letter-spacing: .04em;
}
.sect__title::after {
    content: "›"; color: var(--accent); font-size: 1.4rem; line-height: 1;
}
.sect__tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.sect__tabs button {
    border: 1px solid var(--line); background: transparent; color: var(--muted);
    padding: 9px 14px; border-radius: 999px; cursor: pointer; font-weight: 700;
}
.sect__tabs button.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #b83474);
    border-color: transparent;
}

.grid {
    list-style: none; margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid transparent;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover {
    transform: translateY(-5px);
    border-color: rgba(232,93,156,.35);
    box-shadow: var(--shadow);
}
.card__poster {
    position: relative; display: block; aspect-ratio: 2/3;
    background: linear-gradient(160deg, #2a2033, #151018);
}
.card__poster img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .35s ease;
}
.card:hover .card__poster img { transform: scale(1.06); }
.card__poster::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(10,6,12,.92) 100%);
}
.card__play {
    position: absolute; inset: 0; z-index: 2;
    display: grid; place-items: center;
    opacity: 0; transition: opacity .2s ease;
    color: #fff; font-size: 2rem; text-shadow: 0 8px 20px rgba(0,0,0,.6);
}
.card:hover .card__play { opacity: 1; }
.card__meta {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    padding: 12px;
}
.card__title {
    margin: 0 0 4px;
    font-size: .92rem; font-weight: 800; line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__year { color: var(--muted); font-size: .8rem; margin-bottom: 6px; }
.card__rates { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; font-weight: 800; }
.card__rates .kp { color: var(--kp); }
.card__rates .kp:not(:empty)::before { content: "KP "; opacity: .85; font-size: .68rem; }
.card__rates .imdb { color: var(--imdb); }
.card__rates .imdb:not(:empty)::before { content: "IMDB "; opacity: .85; font-size: .68rem; color: #c9a40f; }
.card__source {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(4px);
    pointer-events: none;
}
.card__source--main { background: #c45c26; }
.card__source--lordt2 { background: #1f6feb; }
.card__source--lordfilm5 { background: #8b5cf6; }
.card__source--hdrezka { background: #0d9488; }
.card__source--rutube { background: #e11d48; }
.search-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}
.search-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    color: var(--muted);
}
.search-source b { font-weight: 800; color: #fff; }
.search-source.is-ok b { color: #4ade80; }
.search-source.is-empty b { color: #fbbf24; }
.search-source.is-fail b { color: #f87171; }
.search-count {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}
.search-count b { color: var(--text); }
.search-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 22px 0 8px;
  padding: 8px 0 18px;
}
.search-more__btn {
  appearance: none;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #2a1a30, #1a1220);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 12px;
  cursor: pointer;
  min-width: 200px;
}
.search-more__btn:hover { filter: brightness(1.08); border-color: #c45c26; }
.search-more__btn:disabled {
  opacity: .55;
  cursor: wait;
}
.search-more__status {
  font-size: 13px;
  color: var(--muted);
}
.search-more__status.is-error { color: #ff7b9c; }
.card__placeholder {
    width: 100%; height: 100%; display: grid; place-items: center;
    color: #6d6075; letter-spacing: .08em; font-size: .75rem;
}

/* SEO text */
.seo {
    margin-top: 40px; padding: 28px;
    border-radius: 20px; border: 1px solid var(--line);
    background: rgba(255,255,255,.02);
}
.seo h1, .seo h2 {
    font-family: var(--display); letter-spacing: .03em; margin: 0 0 12px;
}
.seo h1 { font-size: 1.8rem; }
.seo h2 { font-size: 1.35rem; margin-top: 22px; }
.seo p, .seo li { color: var(--muted); line-height: 1.7; }
.seo ul { padding-left: 18px; }
.seo a { color: var(--accent-2); }

/* Watch / search */
.page-head { margin-bottom: 18px; }
.page-head h1 {
    margin: 0 0 8px; font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: .03em;
}
.page-head p { margin: 0; color: var(--muted); }
.alert {
    padding: 14px 16px; border-radius: 14px; margin-bottom: 16px;
    border: 1px solid rgba(255,120,140,.35); background: rgba(255,120,140,.08); color: #ffd0d8;
    white-space: pre-wrap;
}
.empty {
    padding: 42px 20px; text-align: center; color: var(--muted);
    border: 1px dashed var(--line); border-radius: var(--radius);
}
.skeleton-grid {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px;
}
.skeleton {
    aspect-ratio: 2/3; border-radius: 14px;
    background: linear-gradient(90deg, #221829 20%, #2c2134 50%, #221829 80%);
    background-size: 200% 100%; animation: shimmer 1.1s linear infinite;
}

.watch { display: grid; grid-template-columns: 260px 1fr; gap: 22px; }
.watch__poster { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.watch__poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.watch__meta { margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.watch__meta li {
    list-style: none; padding: 10px 12px; border-radius: 12px;
    background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: .9rem;
}
.watch__meta span { display: block; color: var(--muted); font-size: .72rem; margin-bottom: 2px; }

.watch-related {
    margin-top: 28px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}
.watch-related.is-loading .watch-related__skeleton { display: block; }
.watch-related:not(.is-loading) .watch-related__skeleton { display: none; }
.watch-related__block + .watch-related__block { margin-top: 22px; }
.watch-related__title {
    font-family: var(--display);
    font-size: 1.05rem;
    letter-spacing: .03em;
    margin: 0 0 12px;
}
.watch-related__row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
}
.watch-related__card {
    flex: 0 0 148px;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.02);
    overflow: hidden;
    transition: border-color .15s, transform .15s;
}
.watch-related__card:hover {
    border-color: #c45c26;
    transform: translateY(-2px);
}
.watch-related__thumb {
    position: relative;
    aspect-ratio: 2/3;
    background: #0a060c;
    overflow: hidden;
}
.watch-related__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.watch-related__placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #6d6075;
    font-size: .7rem;
    letter-spacing: .06em;
}
.watch-related__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .65rem;
    font-weight: 800;
    background: rgba(16,10,18,.82);
    border: 1px solid rgba(255,255,255,.12);
    color: #fff;
}
.watch-related__play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    color: #fff;
    opacity: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.55));
    transition: opacity .15s;
}
.watch-related__card:hover .watch-related__play { opacity: 1; }
.watch-related__info { padding: 10px 10px 12px; }
.watch-related__name {
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.watch-related__sub {
    margin-top: 4px;
    font-size: .72rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.watch-related__sk {
    flex: 0 0 148px;
    height: 220px;
    border-radius: 14px;
    background: linear-gradient(110deg, rgba(255,255,255,.04) 8%, rgba(255,255,255,.09) 18%, rgba(255,255,255,.04) 33%);
    background-size: 200% 100%;
    animation: watch-related-shimmer 1.2s linear infinite;
}
@keyframes watch-related-shimmer {
    to { background-position-x: -200%; }
}
.player {
    border-radius: 18px; overflow: hidden; border: 1px solid var(--line);
    background: #000; box-shadow: var(--shadow);
}
.player-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px; background: #17101c; border-bottom: 1px solid var(--line); }
.player-tabs button {
    border: 1px solid var(--line); background: transparent; color: var(--text);
    border-radius: 999px; padding: 9px 14px; cursor: pointer; font-weight: 700;
}
.player-tabs button.is-active { background: linear-gradient(135deg, var(--accent), #b83474); border-color: transparent; }
.player-hint {
  margin: 0; padding: 10px 14px; font-size: 13px; line-height: 1.45;
  color: #c9b8d4; background: #1a1220; border-bottom: 1px solid var(--line);
}
.gdi-player {
  position: relative; width: 100%; height: 100%; min-height: 360px;
  background: #000; display: flex; flex-direction: column;
}
.gdi-player__bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: #120c16; border-bottom: 1px solid var(--line); flex-shrink: 0;
  flex-wrap: wrap;
}
.gdi-player__source,
.gdi-player__select {
  background: #1e1524; color: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px; font: inherit; max-width: 100%;
}
.gdi-player__select { min-width: 7.5rem; }
@media (max-width: 640px) {
  .gdi-player__select { min-width: 0; flex: 1 1 30%; }
}
.gdi-player__status {
  font-size: 13px; color: #c9b8d4;
}
.gdi-player__status.is-error { color: #ff7b9c; }
.gdi-player__video {
  flex: 1; width: 100%; height: 100%; min-height: 320px; background: #000; object-fit: contain;
}
.gdi-player__fallback {
  padding: 14px; color: #c9b8d4; font-size: 14px; text-align: center;
}
.gdi-player__fallback-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: #c45c26;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.gdi-player__fallback-btn:hover { filter: brightness(1.08); }
.player-stage, .player-stage iframe, .player-stage video-player { width: 100%; min-height: 440px; border: 0; display: block; background: #000; }

.footer {
    margin-top: auto; padding: 28px 22px; text-align: center;
    border-top: 1px solid var(--line); color: var(--muted);
}
.footer__brand {
    font-family: var(--display); letter-spacing: .05em; color: var(--text);
    margin-bottom: 8px; font-size: 1.3rem;
}
.footer p { margin: 0 auto; max-width: 70ch; line-height: 1.6; font-size: .9rem; }

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 1100px) {
    .grid, .skeleton-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .nav { display: none; }
    .burger { display: inline-flex; align-items: center; justify-content: center; }
    .mobile-nav.is-open { display: flex; }
    .search { min-width: 0; flex: 1; }
}
@media (max-width: 720px) {
    .grid, .skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .watch { grid-template-columns: 1fr; }
    .player-stage, .player-stage iframe, .player-stage video-player { min-height: 230px; }
    .header { flex-wrap: wrap; }
    .logo { order: 1; }
    .burger { order: 2; margin-left: auto; }
    .search { order: 3; width: 100%; }
}

/* Admin */
.admin-body {
    min-height: 100vh;
    background:
        radial-gradient(900px 420px at 10% -10%, rgba(139,92,246,.18), transparent 60%),
        radial-gradient(700px 360px at 100% 0%, rgba(34,211,238,.08), transparent 55%),
        var(--bg);
}
.admin-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 48px;
    display: grid;
    gap: 18px;
}
.admin-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.admin-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.admin-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.03);
    display: grid;
    gap: 6px;
}
.admin-card strong {
    font-family: var(--display);
    font-size: 1.8rem;
    letter-spacing: .03em;
}
.admin-card span { color: var(--muted); font-size: .88rem; }
.admin-panel {
    padding: 22px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.025);
}
.admin-panel h2 {
    margin: 0 0 14px;
    font-family: var(--display);
    letter-spacing: .03em;
}
.charts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.form-row {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}
.form-row label { color: var(--muted); font-size: .9rem; }
.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #120c16;
    color: var(--text);
    padding: 12px 14px;
    font: inherit;
}
.form-row textarea {
    resize: vertical;
    min-height: 140px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .88rem;
    line-height: 1.5;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #b83474);
}
.btn--ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
}
.login-box {
    width: min(420px, calc(100% - 32px));
    margin: 12vh auto;
    padding: 28px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.03);
}

.admin-panel--perf {
    background:
        linear-gradient(180deg, rgba(139,92,246,.08), rgba(255,255,255,.02)),
        rgba(255,255,255,.02);
    border-color: rgba(139,92,246,.25);
}
.admin-panel--loadtest {
    background:
        linear-gradient(180deg, rgba(34,211,238,.08), rgba(255,255,255,.02)),
        rgba(255,255,255,.02);
    border-color: rgba(34,211,238,.28);
}
.loadtest-form { display: grid; gap: 4px; }
.loadtest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.loadtest-live {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(34,211,238,.22);
    background: rgba(34,211,238,.06);
}
.loadtest-log {
    margin: 10px 0 0;
    max-height: 180px;
    overflow: auto;
    padding: 12px;
    border-radius: 10px;
    background: rgba(0,0,0,.35);
    color: #c8f7ff;
    font-size: .8rem;
    line-height: 1.45;
    white-space: pre-wrap;
}
.perf-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.perf-head h2 { margin: 0; }
.perf-sub {
    margin: 8px 0 0;
    color: var(--muted);
    max-width: 62ch;
    line-height: 1.55;
}
.perf-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: .88rem;
    font-weight: 700;
}
.perf-status.is-on {
    color: #86efac;
    border-color: rgba(74,222,128,.35);
    background: rgba(74,222,128,.08);
}
.perf-status.is-off {
    color: #fda4af;
    border-color: rgba(255,120,140,.35);
    background: rgba(255,120,140,.08);
}
.perf-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 12px currentColor;
}
.perf-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.perf-metric {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(0,0,0,.18);
    display: grid;
    gap: 4px;
}
.perf-metric strong {
    font-family: var(--display);
    font-size: 1.45rem;
}
.perf-metric span { color: var(--muted); font-size: .82rem; }
.perf-form { display: grid; gap: 4px; }
.perf-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    cursor: pointer;
}
.perf-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.perf-toggle__ui {
    width: 48px;
    height: 28px;
    border-radius: 999px;
    background: #2a2030;
    border: 1px solid var(--line);
    position: relative;
    transition: background .2s ease;
    flex-shrink: 0;
}
.perf-toggle__ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease;
}
.perf-toggle input:checked + .perf-toggle__ui {
    background: linear-gradient(135deg, var(--accent), #b83474);
    border-color: transparent;
}
.perf-toggle input:checked + .perf-toggle__ui::after { transform: translateX(20px); }
.perf-toggle__label { color: var(--text); }
.perf-range-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}
.perf-range-wrap input[type=range] { flex: 1; }
.perf-range-wrap output {
    min-width: 42px;
    text-align: center;
    font-weight: 800;
    color: var(--accent-2);
}
.perf-hint {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.5;
}
.perf-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.perf-methods-toolbar {
    display: flex;
    gap: 8px;
    margin: 0 0 10px;
}
.perf-methods-toolbar .btn {
    padding: 6px 12px;
    font-size: .82rem;
}
.perf-method {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(0,0,0,.18);
    cursor: pointer;
    font-size: .84rem;
    font-weight: 700;
}
.perf-method input { accent-color: #8b5cf6; }
.perf-method:has(input:checked) {
    border-color: rgba(139,92,246,.45);
    background: rgba(139,92,246,.14);
    color: #e9d5ff;
}
.visits-table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.visits-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .86rem;
}
.visits-table th,
.visits-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.visits-table thead th {
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: rgba(0,0,0,.18);
}
.visits-table tbody tr:hover {
    background: rgba(255,255,255,.03);
}
.visits-table__ip {
    color: #b8f0ff;
    font-size: .82rem;
    white-space: nowrap;
}
.visits-table__time {
    white-space: nowrap;
    color: #ddd;
}
.visits-table__muted {
    color: var(--muted);
}
.visits-table__ua {
    color: var(--muted);
    max-width: 280px;
    word-break: break-word;
}
.visits-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.visits-pager__pages {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.visits-pager__link {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(0,0,0,.18);
    color: var(--text);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 700;
}
.visits-pager__link:hover {
    border-color: rgba(34,211,238,.45);
    color: #b8f0ff;
}
.visits-pager__link.is-active {
    border-color: rgba(139,92,246,.5);
    background: rgba(139,92,246,.18);
    color: #e9d5ff;
}
.visits-pager__dots {
    color: var(--muted);
    padding: 0 4px;
}
.btn.is-disabled {
    opacity: .4;
    pointer-events: none;
}
.perf-saved {
    margin: 8px 0 16px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(34,211,238,.22);
    background: rgba(34,211,238,.06);
}
.perf-saved__title {
    font-size: .84rem;
    color: var(--muted);
    margin-bottom: 8px;
}
.perf-saved__list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}
.perf-saved__list code {
    font-size: .84rem;
    color: #b8f0ff;
    word-break: break-all;
}
.perf-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

@media (max-width: 900px) {
    .admin-grid, .perf-metrics, .charts, .loadtest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .admin-grid, .perf-metrics, .charts, .loadtest-grid { grid-template-columns: 1fr; }
}
