:root {
    --bg: #0b0f18;
    --bg-elevated: rgba(17, 20, 32, 0.84);
    --panel: rgba(14, 18, 29, 0.96);
    --line: rgba(255, 183, 138, 0.17);
    --text: #f2f4fa;
    --muted: #b1b7c7;
    --accent: #ff9d6c;
    --accent-alt: #b790ff;
    --accent-strong: #ffd2b8;
    --success: #6bd6a8;
    --danger: #ff8a8a;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 157, 108, 0.14), transparent 34%),
        radial-gradient(circle at 78% 12%, rgba(183, 144, 255, 0.12), transparent 26%),
        linear-gradient(180deg, #10121b 0%, #090b12 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px),
        radial-gradient(circle at 70% 18%, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px),
        radial-gradient(circle at 40% 78%, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px);
    opacity: 0.45;
}

body::after {
    content: "";
    position: fixed;
    inset: auto 0 0 auto;
    width: min(38vw, 420px);
    height: min(38vw, 420px);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 157, 108, 0.1), rgba(183, 144, 255, 0.04) 48%, transparent 70%);
    filter: blur(18px);
    pointer-events: none;
    z-index: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
video {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
}

.page-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 4rem;
    position: relative;
    z-index: 1;
}

.page-shell-narrow {
    width: min(820px, calc(100% - 2rem));
}

.page-shell-wide {
    width: min(1320px, calc(100% - 2rem));
}

.site-header,
.admin-header,
.hero-card,
.auth-card,
.post-card,
.post-detail,
.editor-main,
.editor-sidebar,
.admin-card,
.empty-state {
    background: var(--bg-elevated);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.site-header,
.admin-header {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.site-nav {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.site-nav a,
.button-link,
button,
.muted-link {
    border-radius: 999px;
    padding: 0.8rem 1.15rem;
    border: 1px solid var(--line);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.button-link:hover,
button:hover,
.muted-link:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 157, 108, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

button,
.button-link {
    background: linear-gradient(135deg, rgba(255, 157, 108, 0.2), rgba(183, 144, 255, 0.12));
    color: var(--text);
    cursor: pointer;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 0.65rem;
}

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

h1 {
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.lead,
.post-content,
.card-body p,
.empty-state p,
.auth-card p,
.help-text {
    color: var(--muted);
    line-height: 1.7;
}

.hero-card {
    border-radius: 28px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    display: grid;
    gap: 1rem;
    background:
        linear-gradient(160deg, rgba(255, 157, 108, 0.08), transparent 34%),
        linear-gradient(340deg, rgba(183, 144, 255, 0.08), transparent 42%),
        var(--bg-elevated);
}

.hero-meta,
.filters,
.card-meta,
.detail-meta,
.admin-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-meta span,
.card-meta span,
.detail-meta span,
.status-pill,
.chip {
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    color: var(--accent-strong);
    font-size: 0.92rem;
}

.filters {
    margin: 0 0 1.75rem;
}

.chip.is-active {
    background: linear-gradient(135deg, rgba(255, 157, 108, 0.16), rgba(183, 144, 255, 0.12));
}

.post-grid,
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.post-card,
.admin-card,
.empty-state,
.post-detail,
.auth-card,
.editor-main,
.editor-sidebar,
.site-header,
.admin-header {
    border-radius: 24px;
    padding: 1.35rem;
}

.media-link img,
.detail-image {
    border-radius: 18px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    margin-bottom: 1rem;
}

.card-body h3 {
    font-size: 1.35rem;
}

.back-link,
.muted-link,
.admin-actions a,
.link-button {
    color: var(--accent);
}

.site-footer {
    margin-top: 1.75rem;
    padding: 1.1rem 1.35rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(17, 20, 32, 0.72);
    backdrop-filter: blur(14px);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    color: var(--muted);
}

.site-footer p {
    margin-bottom: 0;
}

.footer-nav,
.detail-topbar {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    align-items: center;
}

.compact-footer {
    margin-top: 1.25rem;
}

.compact-header {
    align-items: center;
}

.legal-card {
    display: grid;
    gap: 1.25rem;
}

.legal-section {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.legal-section:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.muted-block {
    border-radius: 18px;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, rgba(255, 157, 108, 0.08), rgba(183, 144, 255, 0.08));
}

.post-detail,
.auth-card {
    max-width: 100%;
}

.detail-video {
    border-radius: 18px;
    margin: 1rem 0;
}

.post-content {
    font-size: 1.06rem;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(520px, 100%);
}

.editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 1.25rem;
}

label {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

label span {
    font-size: 0.94rem;
    color: var(--accent-strong);
}

input,
select,
textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
}

textarea {
    resize: vertical;
}

.checkbox-row {
    grid-template-columns: auto 1fr;
    align-items: center;
}

.checkbox-row input {
    width: auto;
}

.preview-image {
    border-radius: 18px;
    margin: 0.5rem 0 1rem;
}

.flash {
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
}

.flash-success {
    background: rgba(107, 214, 168, 0.1);
    color: #c9ffe8;
}

.flash-error {
    background: rgba(255, 138, 138, 0.12);
    color: #ffdada;
}

.status-pill.is-live {
    color: #c8ffdf;
}

.status-pill.is-draft {
    color: #ffe0ae;
}

.admin-actions {
    align-items: center;
}

.link-button {
    background: none;
    border: 0;
    padding: 0;
}

.placeholder-layout {
    display: grid;
    grid-template-columns: 1fr minmax(200px, 280px);
    gap: 1.25rem;
    align-items: center;
}

.placeholder-logo-link {
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.placeholder-logo-link:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 157, 108, 0.45);
    background: rgba(255, 255, 255, 0.06);
}

.placeholder-logo {
    width: 100%;
    height: auto;
}

@media (max-width: 860px) {
    .site-header,
    .admin-header,
    .editor-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .site-footer {
        display: grid;
    }

    h1 {
        line-height: 1;
    }

    .page-shell {
        width: min(100% - 1rem, 100%);
    }

    .placeholder-layout {
        grid-template-columns: 1fr;
    }
}
