html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(circle at top, rgba(203, 50, 41, 0.18), transparent 28%),
        linear-gradient(180deg, #110606 0%, #160808 48%, #120505 100%);
}

::selection {
    background: #f7efe7;
    color: #aa1f1a;
}

.night-card {
    opacity: 0;
    transform: translateY(8px);
    animation: fadeUp 0.45s ease forwards;
}

.night-card:nth-child(2) {
    animation-delay: 0.06s;
}

.night-card:nth-child(3) {
    animation-delay: 0.12s;
}

.night-card:nth-child(4) {
    animation-delay: 0.18s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-nav] {
    background: transparent;
}

[data-nav].is-scrolled {
    background: rgba(17, 6, 6, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(247, 239, 231, 0.08);
}

.post-card {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
    border-color: rgba(247, 239, 231, 0.18);
}

.post-card-media {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.visual-link-card {
    display: block;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.visual-link-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
    border-color: rgba(247, 239, 231, 0.18);
}

.cms-shell {
    background-image: linear-gradient(180deg, #120505 0%, #100404 100%);
}

.cms-panel {
    box-shadow: none;
}

.cms-input {
    width: 100%;
    border: 1px solid rgba(247, 239, 231, 0.1);
    border-radius: 1rem;
    background: rgba(17, 6, 6, 0.6);
    color: #f7efe7;
    padding: 0.95rem 1rem;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.cms-input:focus {
    border-color: rgba(203, 50, 41, 0.8);
    box-shadow: 0 0 0 3px rgba(203, 50, 41, 0.14);
    background: rgba(17, 6, 6, 0.82);
}

.cms-input::placeholder {
    color: rgba(247, 239, 231, 0.34);
}

.cms-textarea {
    min-height: 7rem;
    resize: vertical;
}

.cms-file-input {
    width: 100%;
    border: 1px dashed rgba(247, 239, 231, 0.18);
    border-radius: 1rem;
    background: rgba(17, 6, 6, 0.55);
    color: rgba(247, 239, 231, 0.72);
    padding: 0.95rem 1rem;
}

.cms-file-input::file-selector-button {
    border: 0;
    border-radius: 999px;
    background: #aa1f1a;
    color: #f7efe7;
    cursor: pointer;
    margin-right: 0.85rem;
    padding: 0.65rem 0.9rem;
}

.cms-media-preview {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(247, 239, 231, 0.08);
    border-radius: 1.35rem;
    aspect-ratio: 16 / 10;
    background:
        radial-gradient(circle at top left, rgba(203, 50, 41, 0.16), transparent 40%),
        linear-gradient(180deg, rgba(38, 12, 12, 0.6), rgba(17, 6, 6, 0.95));
}

.cms-media-empty {
    display: flex;
    height: 100%;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.7rem;
    padding: 1.4rem;
}

.cms-media-empty p {
    color: rgba(247, 239, 231, 0.72);
    font-size: 0.92rem;
    line-height: 1.5;
}

.cms-media-empty-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(234, 198, 187, 0.28);
    background: rgba(17, 6, 6, 0.45);
    padding: 0.35rem 0.8rem;
    color: #f7efe7;
    font-size: 0.7rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

#cmsStatus[data-state="ok"] {
    color: #f7efe7;
}

#cmsStatus[data-state="warn"] {
    color: #f1cd8f;
}

#cmsStatus[data-state="error"] {
    color: #f6a9a3;
}

#authMessage[data-state="idle"] {
    color: rgba(247, 239, 231, 0.6);
}

#authMessage[data-state="error"] {
    color: #f6a9a3;
}
