/* ============================================================
   PasteBin — dark/red theme 2026
   mobile-first, адаптивность под телефоны
   ============================================================ */
:root {
    --bg: #0a0a0d;
    --bg-2: #101015;
    --panel: #15151c;
    --panel-2: #1a1a23;
    --border: #262631;
    --red: #e10600;
    --red-2: #ff2b2b;
    --red-glow: rgba(225, 6, 0, .35);
    --text: #e2e2e9;
    --muted: #8a8a96;
    --radius: 10px;
    --font: 15px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
    background:
        radial-gradient(1200px 400px at 50% -10%, rgba(225, 6, 0, .08), transparent 60%),
        var(--bg);
    color: var(--text);
    font: var(--font);
    margin: 0;
    min-height: 100vh;
}

a { color: var(--red-2); text-decoration: none; transition: color .15s; }
a:hover { color: #ff5555; }

h1 { font-size: 24px; font-weight: 700; border-bottom: 2px solid var(--red); padding-bottom: 8px; }
h2 { font-size: 17px; color: var(--red-2); margin-top: 26px; }

/* ---------- навигация ---------- */
nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(14, 14, 18, .85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 0 var(--red);
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 22px;
}
nav .spacer { flex: 1; }
nav a { color: var(--text); }
nav a:hover { color: var(--red-2); }

.logo {
    color: var(--red);
    font-weight: 800;
    font-size: 19px;
    letter-spacing: 2px;
    text-shadow: 0 0 18px var(--red-glow);
}

main { max-width: 1020px; margin: 26px auto; padding: 0 16px; }

/* ---------- таблицы ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); overflow: hidden; margin: 12px 0; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
td:first-child { white-space: normal; }
th { color: var(--red-2); background: var(--panel-2); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(225, 6, 0, .04); }

/* ---------- формы ---------- */
input, textarea, select {
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 11px 12px;
    border-radius: 8px;
    width: 100%;
    font: inherit;
    font-size: 16px; /* не даёт iOS зумить при фокусе */
    transition: border-color .15s, box-shadow .15s;
}
textarea { font-family: Consolas, "Courier New", monospace; resize: vertical; }
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-glow);
}
label { display: block; margin: 12px 0; color: var(--muted); font-size: 14px; }
label.check { display: flex; gap: 10px; align-items: center; color: var(--text); }
label.check input { width: auto; }

button, .btn {
    background: linear-gradient(180deg, var(--red-2), var(--red));
    color: #fff;
    border: 0;
    padding: 11px 20px;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    display: inline-block;
    transition: transform .1s, box-shadow .15s, filter .15s;
    box-shadow: 0 2px 12px var(--red-glow);
}
button:hover, .btn:hover { filter: brightness(1.15); box-shadow: 0 4px 18px var(--red-glow); }
button:active { transform: translateY(1px); }
button.danger { background: #3d0300; box-shadow: none; }
button.danger:hover { background: var(--red); }
button.link { background: none; color: var(--red-2); padding: 0; box-shadow: none; font-weight: 400; }
button.link:hover { text-decoration: underline; }

form.inline { display: inline; }
form.inline button { padding: 6px 12px; font-size: 13px; }
form.inline select { width: auto; padding: 6px; font-size: 14px; }

.inline-form { display: flex; gap: 10px; align-items: center; margin: 14px 0; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; flex: 1; min-width: 180px; }
.inline-form button { flex-shrink: 0; }

img.captcha {
    display: block;
    margin: 6px 0;
    border: 1px solid var(--border);
    border-radius: 8px;
}

/* ---------- пасты ---------- */
pre.paste {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--red);
    border-radius: var(--radius);
    padding: 16px;
    overflow: auto;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-word;
}
.paste-head h1 { margin-bottom: 4px; }

/* ---------- карточки и панели ---------- */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-top: 3px solid var(--red);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 440px;
    margin: 40px auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
}
.card.center { text-align: center; }
.card .code { font-size: 44px; color: var(--red); margin: 0; }

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin: 16px 0;
}

/* ---------- бейджи ---------- */
.badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    vertical-align: middle;
}
.badge-admin  { background: #5c0000; color: #ffb3b3; }
.badge-mod    { background: var(--red); color: #fff; }
.badge-vip    { background: linear-gradient(90deg, #b8860b, #ffd700); color: #1a1a1a; }
.badge-banned { background: #333; color: #999; }
.badge-vis    { background: var(--border); color: var(--muted); }

/* кастомные тайтлы */
.title-default { color: #c9c9ff; font-weight: 700; }
.title-red     { color: var(--red-2); font-weight: 700; }
.title-gold    { color: #ffd700; font-weight: 700; }
.title-green   { color: #2ee66b; font-weight: 700; }

/* ---------- алерты ---------- */
.alert { padding: 12px 16px; border-radius: 8px; margin: 12px 0; }
.alert.error { background: #3a0d0d; border: 1px solid var(--red); }
.alert.ok    { background: #0d3a17; border: 1px solid #1db954; }

.alert-banner {
    background: linear-gradient(90deg, rgba(225, 6, 0, .18), rgba(225, 6, 0, .05));
    border: 1px solid var(--red);
    border-left: 4px solid var(--red);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 14px 0;
}

/* ---------- новости ---------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin: 12px 0;
}
.news-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    transition: border-color .15s, transform .1s, box-shadow .15s;
}
.news-card:hover {
    border-color: var(--red);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--red-glow);
    text-decoration: none;
}
.news-title { color: var(--text); font-weight: 600; }
.news-body { white-space: pre-wrap; word-break: break-word; }

/* ---------- ключ восстановления / 2FA ---------- */
.recovery-key {
    font-family: Consolas, "Courier New", monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--red-2);
    background: var(--bg-2);
    border: 1px dashed var(--red);
    border-radius: 8px;
    padding: 14px;
    letter-spacing: 1px;
    word-break: break-all;
    text-align: center;
}

/* ---------- комментарии ---------- */
.comment {
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
}
.comment-meta { display: flex; gap: 10px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.comment-body { margin-top: 6px; white-space: pre-wrap; word-break: break-word; }

/* ---------- личные сообщения ---------- */
.dialog {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    max-height: 60vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}
.msg { max-width: 75%; padding: 9px 13px; border-radius: 12px; word-break: break-word; }
.msg small { display: block; font-size: 11px; opacity: .6; margin-top: 4px; }
.msg.mine {
    align-self: flex-end;
    background: linear-gradient(180deg, var(--red-2), var(--red));
    color: #fff;
    border-bottom-right-radius: 3px;
}
.msg.theirs {
    align-self: flex-start;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-bottom-left-radius: 3px;
}

/* ---------- аватарки ---------- */
.avatar { border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.avatar-sm { width: 28px; height: 28px; vertical-align: middle; }
.avatar-lg { width: 96px; height: 96px; border-color: var(--red); box-shadow: 0 0 20px var(--red-glow); }
.profile-head { display: flex; gap: 18px; align-items: center; margin-bottom: 8px; }
.profile-head h1 { border-bottom: 0; margin: 0; }

/* ---------- разное ---------- */
.muted { color: var(--muted); }
.small { font-size: 12px; word-break: break-all; }
.row { display: flex; gap: 12px; align-items: center; margin: 12px 0; flex-wrap: wrap; }
form.report { display: flex; gap: 8px; flex: 1; min-width: 240px; }
form.report input { flex: 1; }
.lang a { color: var(--muted); }
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.form-wide { max-width: 720px; }
.form-wide button { margin-top: 10px; }

/* ---------- мобильная адаптация ---------- */
@media (max-width: 720px) {
    nav { gap: 12px; padding: 10px 14px; font-size: 15px; }
    .logo { font-size: 17px; }
    main { padding: 0 12px; margin: 18px auto; }
    h1 { font-size: 20px; }

    /* формы на весь экран, крупные элементы */
    .card { margin: 20px auto; padding: 18px; max-width: 100%; }
    input, textarea, select, button { font-size: 16px; }
    button, .btn { padding: 13px 22px; }
    form.inline select { width: 100%; }
    form.inline { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
    .inline-form { flex-direction: column; align-items: stretch; }
    .inline-form input { width: 100%; }

    .msg { max-width: 88%; }
    .recovery-key { font-size: 16px; }

    th, td { padding: 9px 10px; font-size: 14px; }
}
