*{
    box-sizing: border-box;
}

/* ===== Ч/Б палитра через переменные ===== */
:root{
    --bg: #0b0b0b;         /* фон */
    --bg2: #111111;        /* поверхности (карточки/плитки) */
    --text: #f2f2f2;       /* основной текст */
    --muted: #bdbdbd;      /* приглушенный */
    --border: #2a2a2a;     /* обводки */
    --hover: #ffffff;      /* hover */
    --tooltip: #1a1a1a;    /* тултипы */
}

/* чтобы фон НЕ обрывался на страницах с маленьким контентом */
html{
    background: var(--bg);
}
html, body{
    /* базовый стиль */
    background: var(--bg);
    color: var(--text);
    font-family: "Fira Mono", monospace;
    font-size: 16px;
    line-height: 1.25em;
    margin: 0 auto;
    margin-bottom: 120px;
    max-width: 1100px;
    padding:10px;

    /* чтобы фон тянулся на весь экран */
    min-height: 100vh;

    /* фон с "пятнами" (теперь ч/б) */
    background:
        radial-gradient(900px 500px at 15% 10%, rgba(255,255,255,0.08), rgba(0,0,0,0) 60%),
        radial-gradient(700px 420px at 85% 18%, rgba(255,255,255,0.06), rgba(0,0,0,0) 55%),
        radial-gradient(800px 520px at 50% 55%, rgba(255,255,255,0.05), rgba(0,0,0,0) 62%),
        radial-gradient(900px 600px at 50% 95%, rgba(255,255,255,0.04), rgba(0,0,0,0) 60%),
        linear-gradient(180deg, #0b0b0b 0%, #050505 100%);

    /* ВАЖНО: ставим ПОСЛЕ background, иначе shorthand сбросит */
    background-attachment: fixed;
}

a{
    text-decoration: none;
    color: var(--text);
}

a:hover{
    color: var(--muted);
}

h2,h3{
    font-size: 16px;
    line-height: 1.25em;
    text-transform: uppercase;
    font-weight: normal;
    padding: 0px;
    margin: 0px;
}

p{
    margin: 20px 0px;
    padding: 0px;
}

img,video{
    width: 100%;
    height: auto;
    padding: 0px;
    border-radius: 4px;
}

header{
    position: relative;
    margin: 140px 0px 60px;
    text-transform: uppercase;
}

blockquote{
    margin-left: -20px;
    padding-left: 20px;
    border-left: 1px solid var(--text);
}

nav{
    margin-top: 20px;
}

header nav svg {
    fill: var(--text);
    width: 14px;
}

hr{
    color: var(--text);
}

.feed{
    max-width: 600px;
    margin: 0 auto;
}

.circle{
    position: absolute;
    right: 0;
    width: 57px;
    height: 57px;
    line-height: 50px;
    text-align: center;
    border-radius: 50%;
    border: 2px solid var(--text);
}

.events{
    max-width: 100%;
}

.event{
    position: relative;
    display: flex;
    float: left;
    width: 20px;
    height: 20px;
    background-color: var(--bg2);
    border-radius: 2px;
    margin: 2px;
}

.event:hover::after{
    content: attr(data-title);
    position: absolute;
    left: 80%;
    bottom: 80%;
    z-index: 1;
    background: var(--tooltip);
    font-size: 11px;
    color: var(--text);
    padding: 5px 7px;
    border-radius: 2px;
}

.cell{
    position: relative;
    height: 55px;
    width: 55px;
    background-color: var(--bg2);
    border-radius: 2px;
    margin: 10px;
}

.cell:hover::after{
    content: attr(data-title);
    position: absolute;
    left: 100%;
    bottom: 100%;
    z-index: 1;
    background: var(--tooltip);
    color: var(--text);
    font-size: 11px;
    padding: 7px 10px;
    border-radius: 5px;
}

.gallery{
    display: flex;
    flex-wrap: wrap;
}

.gallery a{
    width: 45%;
    margin-right: 10px;
    margin-bottom: 5px;
}

.gallery img{
    margin: 0;
}

.card{
    border-style: solid;
    border-color: var(--border);
    border-radius: 10px;
    border-width: 1px;
    padding: 10px;
    margin-bottom: 30px;
}

textarea {
    width: 100%;
    box-sizing: border-box;

    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin: 10px auto;

    background: #0a0a0a;
    color: var(--text);
    font-size: 16px;
    line-height: 1.2;

    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    resize: vertical;
}

input{
    box-sizing: border-box;

    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin: 10px auto;

    background: #0a0a0a;
    color: var(--text);
    font-size: 16px;
    line-height: 1.2;

    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

input[type="checkbox"]{
    width: 15px;
    height: 15px;
    accent-color: var(--text);
    background-color: var(--bg2);
    cursor: pointer;
}

input[type="file"]{
    accent-color: var(--text);
    background-color: var(--bg2);
    cursor: pointer;
}


/* ==== КНОПКИ (прозрачные с обводкой, без движения) ==== */
button[type="submit"]{
    background: transparent;
    color: var(--text);

    border: 1px solid var(--muted);
    border-radius: 10px;

    padding: 12px 16px;
    cursor: pointer;
    margin: 5px auto;
    text-transform: uppercase;
}

button[type="submit"]:hover{
    border-color: var(--hover);
    color: var(--hover);
}

/* общий hover для input/textarea (и кнопка отдельно выше) */
input:hover,textarea:hover{
    border-color: var(--hover);
}

td{
    padding: 0 10px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 999px;
    object-fit: cover;
    vertical-align: middle;
}

.avatar-big {
    width: 120px;
    height: 120px;
    border-radius: 999px;
    object-fit: cover;
    display: block;
    margin: 12px 0;
}

/* (опционально) если у вас где-то используется muted */
.muted{
    opacity: 0.75;
}
/* Clean, editorial login and registration */
.auth-body {
  max-width: 1280px;
  padding: 20px clamp(18px, 5vw, 72px) 70px;
}
.auth-body header { margin: 34px 0 30px; }
.auth-body header h2, .auth-body header nav { letter-spacing: .08em; }
.auth-body header h2 { font-size: 12px; opacity: .65; }
.auth-body header h3 { font-size: 19px; }
.auth-body header nav { display: flex; flex-wrap: wrap; gap: 15px; font-size: 11px; }
.auth-body header nav a { text-decoration: none !important; opacity: .7; }
.auth-page {
  width: min(100%, 980px);
  margin: clamp(35px, 8vh, 90px) auto 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: clamp(36px, 8vw, 110px);
  align-items: center;
}
.auth-intro { max-width: 440px; }
.auth-kicker, .auth-card-heading { font-size: 10px; letter-spacing: .18em; color: #9a9a9a; }
.auth-intro h1 {
  margin: 22px 0 18px;
  font: 500 clamp(38px, 6vw, 68px)/1.02 system-ui, sans-serif;
  letter-spacing: -.055em;
  text-transform: none;
}
.auth-intro p { max-width: 340px; color: #aaa; line-height: 1.65; font: 15px/1.65 system-ui, sans-serif; }
.auth-card {
  padding: clamp(23px, 4vw, 34px);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  box-shadow: 0 24px 90px rgba(0,0,0,.35);
}
.auth-card-heading { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.12); }
.auth-form { display: grid; gap: 10px; margin-top: 22px; }
.auth-form label { margin-top: 7px; font: 12px system-ui, sans-serif; color: #ddd; }
.auth-form input {
  width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid #343434;
  border-radius: 10px; background: #111; color: #f5f5f5; font: 14px system-ui, sans-serif;
}
.auth-form input:focus { outline: 2px solid rgba(255,255,255,.55); outline-offset: 2px; }
.auth-submit {
  display: flex; justify-content: space-between; align-items: center; margin-top: 12px;
  min-height: 50px; padding: 0 16px; border: 0; border-radius: 10px;
  background: #f3f1ec; color: #111; cursor: pointer; font: 600 14px system-ui, sans-serif;
  transition: transform .18s ease, background .18s ease;
}
.auth-submit:hover { transform: translateY(-1px); background: #fff; }
.auth-hint, .auth-footnote { font: 11px/1.55 system-ui, sans-serif; color: #999; }
.auth-hint { margin: -3px 0 2px; }
.auth-error, .auth-success { padding: 12px 14px; margin: 16px 0; border-radius: 10px; font: 13px/1.45 system-ui, sans-serif; }
.auth-error { border: 1px solid rgba(255,130,130,.28); background: rgba(130,28,28,.18); color: #ffc2c2; }
.auth-success { border: 1px solid rgba(130,255,180,.25); color: #b5f5c8; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 15px; color: #777; font-size: 9px; letter-spacing: .16em; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: #333; }
.telegram-button-wrap { min-height: 42px; display: flex; justify-content: center; }
.auth-switch { margin: 22px 0 0; text-align: center; color: #aaa; font: 13px system-ui, sans-serif; }
.auth-switch a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.auth-footnote { margin: 14px 0 0; text-align: center; }
.profile-telegram { margin-top: 20px; }
.profile-telegram p { font: 13px/1.6 system-ui, sans-serif; color: #bbb; }
@media (max-width: 760px) {
  .auth-page { grid-template-columns: 1fr; gap: 25px; margin-top: 34px; }
  .auth-intro h1 { max-width: 440px; font-size: clamp(38px, 12vw, 56px); }
  .auth-intro p { margin-bottom: 0; }
}

/* Monochrome compact auth buttons */
.auth-page { width: min(100%, 430px); margin: clamp(32px, 8vh, 76px) auto 30px; display: block; }
.auth-card-heading { justify-content: flex-start; }
.auth-form { gap: 10px; }
.auth-form input { margin: 0; }
.auth-form input::placeholder { color: #858585; opacity: 1; }
.auth-form button.auth-submit[type="submit"] {
  width: 100%; min-height: 48px; margin: 12px 0 0; padding: 0 16px; justify-content: center;
  border: 1px solid #dedede; border-radius: 10px; background: #dedede; color: #111;
  text-transform: none; transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.auth-form button.auth-submit[type="submit"]:hover { background: #c7c7c7; border-color: #c7c7c7; color: #111; transform: translateY(-1px); }
.auth-form button.auth-submit[type="submit"]:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* VPN member and admin screens */
.vpn-page { width: min(100%, 860px); margin: 46px auto 90px; }
.vpn-hero { margin: 0 0 28px; text-transform: none; }
.vpn-eyebrow, .vpn-label { display: block; color: #929292; font: 10px/1.4 system-ui, sans-serif; letter-spacing: .17em; }
.vpn-hero h1 { margin: 9px 0 8px; font: 600 clamp(36px, 7vw, 54px)/1 system-ui, sans-serif; letter-spacing: -.045em; text-transform: none; }
.vpn-hero p { max-width: 600px; color: #aaa; font: 14px/1.6 system-ui, sans-serif; }
.vpn-panel { padding: clamp(20px, 4vw, 32px); border: 1px solid #303030; border-radius: 18px; background: linear-gradient(145deg, #151515, #0d0d0d); box-shadow: 0 20px 70px rgba(0,0,0,.22); }
.vpn-panel-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 21px; border-bottom: 1px solid #292929; }
.vpn-panel-top h2 { margin-top: 8px; color: #f4f4f4; font: 500 22px/1.2 system-ui, sans-serif; text-transform: none; }
.vpn-status-mark { width: 11px; height: 11px; flex: 0 0 auto; border-radius: 99px; background: #777; box-shadow: 0 0 0 5px rgba(255,255,255,.05); }
.vpn-status-mark.state-active { background: #a9e3b2; box-shadow: 0 0 0 5px rgba(169,227,178,.1); }
.vpn-status-mark.state-invited, .vpn-status-mark.state-pending { background: #e4d59e; box-shadow: 0 0 0 5px rgba(228,213,158,.1); }
.vpn-details { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; padding: 22px 0; }
.vpn-details div { display: grid; gap: 7px; min-width: 0; }
.vpn-details span { color: #888; font: 11px system-ui, sans-serif; }
.vpn-details strong { overflow-wrap: anywhere; color: #eee; font: 14px system-ui, sans-serif; }
.vpn-panel-copy { max-width: 620px; margin: 19px 0; color: #aaa; font: 14px/1.65 system-ui, sans-serif; }
.vpn-form { display: grid; gap: 9px; max-width: 570px; }
.vpn-form label { margin-top: 10px; color: #ddd; font: 12px system-ui, sans-serif; }
.vpn-form input, .vpn-form select { width: 100%; min-height: 47px; margin: 0; padding: 0 13px; border: 1px solid #363636; border-radius: 9px; background: #111; color: #f3f3f3; font: 14px system-ui, sans-serif; }
.vpn-form input:focus, .vpn-form select:focus { outline: 2px solid #aaa; outline-offset: 2px; }
.vpn-country-badge, .vpn-count { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #444; border-radius: 50%; color: #ddd; font: 12px system-ui, sans-serif; letter-spacing: .08em; }
.vpn-submit { min-height: 48px; margin: 13px 0 0; padding: 0 17px; border: 1px solid #dedede; border-radius: 9px; background: #dedede; color: #111; font: 600 13px system-ui, sans-serif; cursor: pointer; transition: background .16s ease; }
.vpn-submit:hover { border-color: #c7c7c7; background: #c7c7c7; color: #111; }
.vpn-muted { margin: 4px 0; color: #888; font: 11px/1.55 system-ui, sans-serif; }
.vpn-message { margin: 0 0 16px; padding: 13px 15px; border: 1px solid #383838; border-radius: 10px; background: #151515; color: #ddd; font: 13px/1.5 system-ui, sans-serif; }
.vpn-message-warning { border-color: #5b5031; color: #e8d9a8; }
.vpn-callout { margin-top: 22px; padding: 17px; border-left: 2px solid #bcbcbc; border-radius: 0 9px 9px 0; background: #141414; }
.vpn-callout strong { color: #eee; font: 600 14px system-ui, sans-serif; }
.vpn-callout p { margin: 7px 0 0; color: #aaa; font: 13px/1.6 system-ui, sans-serif; }
.vpn-guide { padding-top: 22px; }
.vpn-guide h3 { margin: 0 0 14px; color: #eee; font: 500 16px system-ui, sans-serif; text-transform: none; }
.vpn-guide ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.vpn-guide li { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid #292929; }
.vpn-guide li > span { color: #858585; font: 11px system-ui, sans-serif; }
.vpn-guide li strong { color: #e8e8e8; font: 600 13px system-ui, sans-serif; }
.vpn-guide li p { margin: 5px 0 0; color: #999; font: 12px/1.6 system-ui, sans-serif; }
.vpn-guide a { color: #eee; text-decoration: underline; text-underline-offset: 3px; }
.vpn-footer { margin: 14px 2px; color: #666; font: 10px system-ui, sans-serif; letter-spacing: .05em; }
.vpn-admin-note { display: grid; gap: 6px; margin-bottom: 16px; padding: 15px 17px; border: 1px solid #333; border-radius: 10px; background: #121212; color: #aaa; font: 12px/1.5 system-ui, sans-serif; }
.vpn-admin-note strong { color: #eee; font-size: 13px; }
.vpn-admin-table-panel { margin-top: 18px; }
.vpn-table-scroll { overflow-x: auto; }
.vpn-table { width: 100%; margin-top: 12px; border-collapse: collapse; text-align: left; font: 12px/1.5 system-ui, sans-serif; }
.vpn-table th { padding: 11px 10px; border-bottom: 1px solid #393939; color: #888; font-size: 10px; font-weight: 500; letter-spacing: .08em; white-space: nowrap; }
.vpn-table td { padding: 13px 10px; border-bottom: 1px solid #242424; color: #ddd; vertical-align: middle; }
.vpn-table-status { display: inline-block; padding: 5px 8px; border: 1px solid #3b3b3b; border-radius: 99px; color: #ccc; white-space: nowrap; }
.vpn-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 160px; }
.vpn-actions form { margin: 0; }
.vpn-action { padding: 7px 9px; border: 1px solid #666; border-radius: 7px; background: #e0e0e0; color: #111; font: 11px system-ui, sans-serif; cursor: pointer; }
.vpn-action:hover { background: #c8c8c8; color: #111; }
.vpn-action.is-muted { border-color: #454545; background: transparent; color: #bbb; }
.vpn-action.is-muted:hover { border-color: #777; background: #222; color: #fff; }
.vpn-action:disabled { opacity: .45; cursor: not-allowed; }
.vpn-empty { padding: 24px 10px !important; color: #888 !important; text-align: center; }
@media (max-width: 620px) {
  .vpn-page { margin-top: 28px; }
  .vpn-details { grid-template-columns: 1fr; }
  .vpn-table { min-width: 660px; }
  .vpn-submit { width: 100%; }
}
/* Keep custom VPN buttons stable against the global button hover rule */
.vpn-page button.vpn-submit[type="submit"] { color: #111; }
.vpn-page button.vpn-submit[type="submit"]:hover { background: #c7c7c7; border-color: #c7c7c7; color: #111; }
.vpn-page .vpn-actions button.vpn-action[type="submit"]:hover { background: #c8c8c8; border-color: #c8c8c8; color: #111; }
.vpn-page .vpn-actions button.vpn-action.is-muted[type="submit"]:hover { background: #222; border-color: #777; color: #fff; }

/* Member VPN page matches the site's header width */
.vpn-page { width: min(100%, 600px); margin: 34px auto 70px; }
.vpn-admin-page { width: min(100%, 860px); }
.vpn-steps-panel { margin-bottom: 16px; }
.vpn-steps-heading { margin-bottom: 12px; }
.vpn-steps-heading h2 { margin: 7px 0 0; color: #f4f4f4; font: 500 20px/1.25 system-ui, sans-serif; text-transform: none; }
.vpn-new-connection { justify-content: flex-start; padding-bottom: 15px; }
.vpn-steps { margin: 0; padding: 0; list-style: none; }
.vpn-steps li { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 11px; padding: 13px 0; border-top: 1px solid #292929; }
.vpn-step-number { padding-top: 1px; color: #858585; font: 10px system-ui, sans-serif; }
.vpn-steps li strong { color: #eee; font: 600 13px system-ui, sans-serif; }
.vpn-steps li p { margin: 5px 0 0; color: #999; font: 12px/1.55 system-ui, sans-serif; }
.vpn-downloads { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.vpn-downloads a { padding: 6px 9px; border: 1px solid #414141; border-radius: 7px; color: #ddd; font: 11px system-ui, sans-serif; text-decoration: none; }
.vpn-downloads a:hover { border-color: #aaa; background: #1b1b1b; color: #fff; }

/* VPN setup details and account profile cards */
.vpn-steps-heading { margin-bottom: 18px; }
.vpn-steps-heading h2 { display: none; }
.vpn-steps li p + p { margin-top: 8px; }
.vpn-page button.vpn-submit[type="submit"] { color: #111; background: #e1e1e1; border-color: #e1e1e1; box-shadow: none; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.vpn-page button.vpn-submit[type="submit"]:hover { color: #111; background: #fff; border-color: #fff; transform: translateY(-1px); }
.vpn-page button.vpn-submit[type="submit"]:focus-visible { color: #111; outline: 2px solid #fff; outline-offset: 3px; }
.profile-page { max-width: 600px; }
.profile-account { margin-top: 24px; }
.profile-identity { display: flex; align-items: center; gap: 16px; padding: 22px 0; }
.profile-avatar { display: grid; place-items: center; flex: 0 0 72px; width: 72px; height: 72px; border: 1px solid #3b3b3b; border-radius: 50%; object-fit: cover; }
.profile-avatar-placeholder { background: #202020; color: #eee; font: 500 26px/1 system-ui, sans-serif; }
.profile-identity-copy { display: grid; gap: 5px; min-width: 0; }
.profile-identity-copy strong { overflow-wrap: anywhere; color: #f2f2f2; font: 600 18px/1.3 system-ui, sans-serif; }
.profile-identity-copy span, .profile-account-detail span { color: #929292; font: 10px system-ui, sans-serif; letter-spacing: .12em; }
.profile-account-detail { display: grid; gap: 7px; padding: 15px 0; border-top: 1px solid #292929; }
.profile-account-detail strong { overflow-wrap: anywhere; color: #ddd; font: 13px/1.5 system-ui, sans-serif; }
.profile-avatar-form { display: grid; gap: 10px; padding-top: 17px; border-top: 1px solid #292929; }
.profile-avatar-form label { color: #ddd; font: 12px system-ui, sans-serif; }
.profile-avatar-form input[type="file"] { width: 100%; color: #aaa; font: 12px system-ui, sans-serif; }
.profile-avatar-form button[type="submit"] { margin: 2px 0 0; color: #111; background: #e1e1e1; border-color: #e1e1e1; }
.profile-avatar-form button[type="submit"]:hover { color: #111; background: #fff; border-color: #fff; }