html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: clip;
}

body.site-body {
    font-family: 'Manrope', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(11, 110, 79, 0.22), transparent 30%),
        radial-gradient(circle at top right, rgba(236, 151, 31, 0.2), transparent 24%),
        linear-gradient(180deg, #07111f 0%, #0d1726 45%, #101b2c 100%);
    color: #eff4fb;
    position: relative;
    overflow-x: hidden;
}

.hero-glow {
    position: fixed;
    inset: auto;
    width: 22rem;
    height: 22rem;
    border-radius: 999px;
    filter: blur(50px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

.hero-glow-one {
    top: 3rem;
    left: -5rem;
    background: #137dc0;
}

.hero-glow-two {
    top: 16rem;
    right: -5rem;
    background: #fde80e;
}

main.container {
    position: relative;
    z-index: 1;
}

.site-header {
    display: flex;
    justify-content: center;
    align-items: center;
}

.site-header-bar {
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
}

.site-header-slot {
    width: 56px;
    display: flex;
    align-items: center;
}

.site-header-slot-end {
    width: auto;
    min-width: 56px;
    justify-content: flex-end;
}

.site-logo-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.site-logo {
    width: min(220px, 42vw);
    height: auto;
    display: block;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.28));
}

.hero-panel,
.stat-card,
.magazine-card,
.empty-state,
.viewer-header,
.flipbook-shell,
.side-menu {
    background: rgba(8, 15, 26, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(16px);
}

.hero-panel,
.empty-state,
.viewer-header {
    border-radius: 2rem;
    padding: 2rem;
}

.stat-card,
.magazine-card {
    border-radius: 1.5rem;
}

.eyebrow,
.issue-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.eyebrow {
    background: rgba(12, 166, 120, 0.16);
    color: #b3e0fb;
}

.issue-pill {
    background: rgba(255, 146, 43, 0.16);
    color: #ffd5aa;
}

.text-secondary {
    color: #b6c2d1 !important;
}

.btn-brand {
    background: linear-gradient(135deg, #137dc0, #0c6094);
    border: none;
    color: #fff;
    box-shadow: 0 16px 32px #137ec03f;
}

.btn-brand:hover,
.btn-brand:focus {
    background: linear-gradient(135deg, #0c6094, #0c6094);
    color: #fff;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
}

.stat-value {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1;
    margin: 0.5rem 0 0.75rem;
}

.stat-label {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #91a0b4;
}

.stat-copy {
    color: #b6c2d1;
}

.magazine-card {
    overflow: hidden;
    height: 100%;
}

.magazine-cover-link {
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.magazine-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.magazine-card:hover .magazine-cover {
    transform: scale(1.05);
}

.magazine-card-body {
    padding: 1.5rem;
}

.back-link {
    color: #cfe2ff;
    text-decoration: none;
}

.back-link:hover {
    color: #fff;
}

.cover-preview {
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cover-preview img {
    width: 100%;
    display: block;
}

.sidebar-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #91a0b4;
    margin-bottom: 1rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sidebar-link {
    display: block;
    padding: 1rem;
    border-radius: 1rem;
    text-decoration: none;
    color: #eff4fb;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
    color: #fff;
}

.sidebar-link.active {
    background: rgba(12, 166, 120, 0.14);
    border-color: rgba(126, 240, 200, 0.32);
}

.sidebar-link-title,
.sidebar-link-meta {
    display: block;
}

.sidebar-link-title {
    font-weight: 700;
}

.sidebar-link-meta {
    margin-top: 0.35rem;
    color: #b6c2d1;
    font-size: 0.92rem;
}

.side-menu {
    --bs-offcanvas-width: min(380px, 88vw);
    color: #eff4fb;
    background:
        radial-gradient(circle at top left, rgba(11, 110, 79, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(7, 17, 31, 0.98) 0%, rgba(13, 23, 38, 0.98) 100%);
}

.side-menu .offcanvas-header,
.side-menu .offcanvas-body {
    padding: 1.5rem;
}

.side-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.side-menu-toggle-header {
    width: 48px;
    height: 48px;
    min-width: 48px;
    padding: 0;
    border-radius: 999px;
}

.header-link-button {
    white-space: nowrap;
    border-radius: 999px;
}

.hamburger-icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.28rem;
    width: 1.1rem;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.flipbook-shell {
    overflow: hidden;
}

.flipbook-shell:fullscreen {
    min-height: 100vh;
    padding: 1rem;
    background: #07111f;
}

.viewer-status {
    text-align: center;
    color: #c7d2df;
    padding: 4rem 1rem;
}

.flipbook-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    width: 100%;
}

.flipbook {
    margin: 0 auto;
    max-width: 100%;
}

.page {
    background: transparent;
    overflow: hidden;
}

.page canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    image-rendering: -webkit-optimize-contrast;
}

.site-footer {
    text-align: center;
    color: #b6c2d1;
    padding: 0 1rem 0.5rem;
    font-size: smaller;
}

.site-footer a {
    color: #fff;
    text-decoration: none;
}

.site-footer a:hover {
    color: #7ef0c8;
}

.viewer-controls-panel {
    background: rgba(8, 15, 26, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 1rem;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(16px);
}

.viewer-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.viewer-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.viewer-action-button .material-icons {
    font-size: 1.2rem;
    line-height: 1;
}

@media (max-width: 991.98px) {
    .hero-panel,
    .empty-state,
    .viewer-header {
        padding: 1.5rem;
        border-radius: 1.5rem;
    }

    .site-logo {
        width: min(180px, 42vw);
    }

    .site-header-bar {
        padding: 0.7rem 0.85rem;
    }

    .header-link-button {
        padding-inline: 0.7rem;
        font-size: 0.85rem;
    }
}
