:root {
    --bg: #050505;
    --bg-soft: #120707;
    --panel: rgba(10, 10, 10, 0.92);
    --line: rgba(255, 42, 42, 0.35);
    --line-strong: rgba(255, 42, 42, 0.85);
    --text: #f5eaea;
    --muted: #c3a4a4;
    --accent: #ff2a2a;
    --accent-dark: #871010;
    --success: #ff6666;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top, rgba(255, 42, 42, 0.18), transparent 30%),
        linear-gradient(145deg, #030303 0%, #110404 45%, #030303 100%);
    color: var(--text);
}

a {
    color: #ff7b7b;
    text-decoration: none;
}

a:hover {
    color: #ffffff;
}

.page-shell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 16px;
    overflow: hidden;
}

.background-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 42, 42, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 42, 42, 0.09) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
    pointer-events: none;
}

.panel {
    position: relative;
    width: min(100%, 440px);
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(22, 6, 6, 0.94), rgba(6, 6, 6, 0.94));
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 42, 42, 0.7), transparent, rgba(255, 42, 42, 0.3));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.panel-wide {
    width: min(100%, 620px);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 42, 42, 0.08);
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffb0b0;
}

h1 {
    margin: 18px 0 10px;
    font-size: clamp(32px, 5vw, 44px);
    line-height: 1;
}

.lead {
    margin: 0 0 24px;
    color: var(--muted);
    line-height: 1.6;
}

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 42, 42, 0.12);
    color: var(--text);
}

.alert.error {
    border-color: rgba(255, 110, 110, 0.5);
    background: rgba(255, 42, 42, 0.18);
}

.alert.success {
    border-color: rgba(255, 42, 42, 0.5);
    background: rgba(255, 42, 42, 0.14);
}

.form-card {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    font-size: 14px;
    color: #ffbcbc;
}

.field input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 42, 42, 0.25);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.45);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field input:focus {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 4px rgba(255, 42, 42, 0.12);
    transform: translateY(-1px);
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 14px 18px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff6f6;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(135, 16, 16, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 16px 28px rgba(135, 16, 16, 0.45);
}

.button.secondary {
    background: transparent;
    border: 1px solid rgba(255, 42, 42, 0.35);
    box-shadow: none;
}

.actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.actions form {
    margin: 0;
}

.stats-card {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid rgba(255, 42, 42, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
}

.stat-line {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 42, 42, 0.12);
}

.stat-line:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.stat-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
    font-size: 14px;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .panel {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .actions {
        grid-template-columns: 1fr;
    }

    .stat-line {
        flex-direction: column;
        gap: 6px;
    }
}