:root {
    --bg-main: #070707;
    --bg-soft: #101010;
    --bg-card: rgba(255, 255, 255, 0.055);
    --bg-card-hover: rgba(255, 255, 255, 0.09);

    --text-main: #f5f5f5;
    --text-muted: #b7b7b7;
    --text-soft: #8f8f8f;

    --border-soft: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.22);

    --accent: #ffffff;
    --accent-dark: #111111;

    --danger: #ff5c5c;
    --success: #5cff9d;
    --warning: #ffd36a;

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;

    --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.45);
    --shadow-card: 0 14px 35px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.09), transparent 28%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.04), transparent 24%),
        linear-gradient(180deg, #060606 0%, #0b0b0b 45%, #050505 100%);
    color: var(--text-main);
    min-height: 100vh;
}

a {
    color: inherit;
}

::selection {
    background: #ffffff;
    color: #000000;
}

/* Header / Hero */

.hero {
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 70px 20px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-soft);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent);
    opacity: 0.35;
}

.hero::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    filter: blur(90px);
    top: -220px;
    left: 50%;
    transform: translateX(-50%);
}

.hero > div {
    position: relative;
    z-index: 2;
    max-width: 850px;
}

.hero h1 {
    font-size: clamp(38px, 7vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    margin: 0 0 20px;
    font-weight: 900;
}

.hero p {
    color: var(--text-muted);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.5;
    margin: 0 auto;
    max-width: 620px;
}

/* Layout */

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 44px 22px;
}

.narrow {
    max-width: 720px;
}

h1,
h2,
h3 {
    letter-spacing: -0.035em;
}

h1 {
    font-size: clamp(34px, 5vw, 54px);
    margin: 0 0 22px;
}

h2 {
    font-size: clamp(28px, 4vw, 42px);
    margin: 0 0 24px;
}

h3 {
    font-size: 24px;
    margin: 0 0 12px;
}

p {
    line-height: 1.65;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 22px;
}

/* Cards */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 26px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.card:hover {
    transform: translateY(-3px);
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
}

.card h3 {
    font-size: 28px;
}

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

.big {
    font-size: 52px;
    font-weight: 900;
    margin: 8px 0 18px;
    letter-spacing: -0.06em;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ffffff;
    background: #ffffff;
    color: #050505;
    padding: 13px 20px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    margin-top: 12px;
    min-height: 46px;
    transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: transparent;
    color: #ffffff;
}

.btn.secondary {
    background: transparent;
    color: #ffffff;
    border-color: var(--border-strong);
}

.btn.secondary:hover {
    background: #ffffff;
    color: #050505;
}

/* Forms */

.form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form label {
    margin-top: 10px;
    color: var(--text-main);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.form input,
.form select,
.form textarea {
    width: 100%;
    padding: 15px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    background: rgba(0, 0, 0, 0.38);
    color: #ffffff;
    outline: none;
    font-size: 15px;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
    border-color: #ffffff;
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.form textarea {
    resize: vertical;
    min-height: 130px;
}

.form select option {
    background: #111111;
    color: #ffffff;
}

.checkbox {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--text-muted);
    font-weight: normal !important;
    line-height: 1.45;
}

.checkbox input {
    width: auto;
    margin-top: 4px;
}

/* Admin */

.adminbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
}

.adminbar a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
    opacity: 0.82;
}

.adminbar a:hover {
    opacity: 1;
}

.inlineform {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.smallform {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
}

/* Tables */

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.055);
    overflow: hidden;
}

th,
td {
    border-bottom: 1px solid var(--border-soft);
    padding: 15px 14px;
    text-align: left;
    vertical-align: top;
}

th {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

td {
    color: var(--text-muted);
}

td a {
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
}

/* Alerts */

.alert {
    background: rgba(255, 92, 92, 0.16);
    border: 1px solid rgba(255, 92, 92, 0.35);
    color: #ffd6d6;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
}

.back {
    display: inline-flex;
    margin-bottom: 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
}

.back:hover {
    color: #ffffff;
}

/* Small visual status helpers */

.card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h3::before {
    content: "";
    width: 9px;
    height: 9px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.75);
    flex: 0 0 auto;
}

/* Mobile */

@media (max-width: 760px) {
    .hero {
        min-height: 320px;
        padding: 55px 18px;
    }

    .container {
        padding: 32px 16px;
    }

    .card {
        padding: 22px;
        border-radius: 20px;
    }

    .adminbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .inlineform {
        flex-direction: column;
    }

    .inlineform .btn {
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    th,
    td {
        padding: 12px;
    }
}