:root {
    color-scheme: dark;
    --bg: #10131d;
    --panel: rgba(255, 255, 255, 0.08);
    --panel-strong: rgba(255, 255, 255, 0.14);
    --text: #f7f3ea;
    --muted: #b8b1a4;
    --line: rgba(255, 255, 255, 0.14);
    --gold: #ffd36a;
    --red: #ff6b6b;
    --green: #6de0a8;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 109, 109, 0.28), transparent 34rem),
        radial-gradient(circle at 78% 12%, rgba(255, 211, 106, 0.24), transparent 30rem),
        linear-gradient(145deg, #10131d 0%, #18151f 48%, #0d1119 100%);
}

a {
    color: inherit;
}

.shell,
.admin-shell,
.login-panel {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.shell {
    padding: 72px 0 36px;
}

.hero,
.admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 12px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.subtitle {
    max-width: 650px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

.admin-link,
.admin-actions a,
.ghost,
.save-button,
.login-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
    cursor: pointer;
}

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

.card {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 142px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05));
    text-decoration: none;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.card::after {
    content: "";
    position: absolute;
    inset: auto -18% -45% 25%;
    height: 90px;
    background: rgba(255, 211, 106, 0.16);
    filter: blur(32px);
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 211, 106, 0.5);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.07));
}

.logo,
.editor-logo {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 22px;
    overflow: hidden;
    color: #241907;
    background: linear-gradient(135deg, #fff3c0, #ffb34e);
    font-size: 30px;
    font-weight: 900;
}

.logo img,
.editor-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 9px;
    min-width: 0;
    margin-left: 18px;
}

.card-content strong {
    font-size: 21px;
    line-height: 1.3;
}

.card-content small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.arrow {
    position: absolute;
    right: 22px;
    top: 18px;
    color: var(--gold);
    font-size: 22px;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 34px;
    color: var(--muted);
    font-size: 14px;
}

.admin-body {
    padding: 42px 0;
}

.login-panel,
.admin-shell {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: rgba(10, 13, 21, 0.72);
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
}

.login-panel {
    max-width: 520px;
}

.login-panel h1,
.admin-header h1 {
    font-size: clamp(34px, 5vw, 54px);
}

.login-form,
.editor,
.new-grid {
    display: grid;
    gap: 18px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

input[type="text"],
input[type="url"],
input[type="password"] {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

input[type="file"] {
    width: 100%;
    color: var(--muted);
}

.alert {
    margin: 18px 0;
    padding: 13px 15px;
    border-radius: 16px;
}

.alert.error {
    color: #ffe5e5;
    background: rgba(255, 107, 107, 0.16);
    border: 1px solid rgba(255, 107, 107, 0.28);
}

.alert.success {
    color: #e4fff1;
    background: rgba(109, 224, 168, 0.14);
    border: 1px solid rgba(109, 224, 168, 0.28);
}

.back-link {
    display: inline-block;
    margin-top: 18px;
    color: var(--muted);
    text-decoration: none;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-actions form {
    margin: 0;
}

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

.editor-list {
    display: grid;
    gap: 16px;
}

.editor-card {
    display: grid;
    grid-template-columns: 74px minmax(160px, 1fr) minmax(220px, 1.2fr) minmax(160px, 0.8fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
}

.editor-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    font-size: 24px;
}

.row-options {
    display: grid;
    gap: 8px;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.danger {
    color: var(--red);
}

.new-site {
    padding: 20px;
    border: 1px dashed rgba(255, 211, 106, 0.36);
    border-radius: 24px;
    background: rgba(255, 211, 106, 0.07);
}

.new-site h2 {
    margin-bottom: 16px;
}

.new-grid {
    grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.2fr) minmax(160px, 0.8fr);
}

.save-button {
    justify-self: start;
    border-color: rgba(255, 211, 106, 0.48);
    color: #211607;
    background: linear-gradient(135deg, #fff2b1, #ffbd59);
    font-weight: 800;
}

@media (max-width: 860px) {
    .hero,
    .admin-header,
    .footer {
        display: grid;
    }

    .editor-card,
    .new-grid {
        grid-template-columns: 1fr;
    }

    .admin-actions {
        align-items: stretch;
        flex-direction: column;
    }
}
