/* ---- Base ---- */
:root {
    --bg: #0f1115;
    --bg-2: #161a22;
    --text: #e8ecf1;
    --muted: #a7b0ba;
    --primary: #4aa3ff;
    --primary-700: #1b4f8d;
    --danger: #e64646;
    --danger-700: #b53535;
    --card: rgba(255, 255, 255, 0.06);
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    --r: 14px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
            radial-gradient(1200px 600px at 20% -20%, rgba(74, 163, 255, 0.12), transparent 60%),
            radial-gradient(1100px 600px at 120% 120%, rgba(74, 163, 255, 0.1), transparent 60%),
            linear-gradient(135deg, var(--bg), var(--bg-2));
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Cantarell, 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: 10px;
}

/* ---- Home ---- */
.container.home {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px;
}

.hero-figure {
    margin: 0;
    filter: drop-shadow(var(--shadow));
}

.welcome-text {
    font-size: clamp(28px, 6vw, 48px);
    margin: 16px 0 8px;
    color: var(--primary);
}

.sub {
    color: var(--muted);
    margin: 0 0 12px;
}

.cta-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    border: 1px solid transparent;
}

.btn:active {
    transform: translateY(1px) scale(0.99);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-700);
    box-shadow: var(--shadow);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: transparent;
}

.btn-danger:hover {
    background: var(--danger-700);
}

/* ---- Footer ---- */
.site-footer {
    display: grid;
    place-items: center;
    padding: 24px;
    color: var(--muted);
}

.home-link {
    display: inline-block;
    padding: 10px 16px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 12px;
}

.home-link:hover {
    background: var(--primary-700);
}

/* ---- Gallery Page ---- */
.gallery-page {
    max-width: min(1120px, 94vw);
    margin: 20px auto 48px;
}

.page-header {
    text-align: center;
    margin-bottom: 8px;
}

.page-sub {
    color: var(--muted);
    margin-top: 6px;
}

.section-block {
    margin-top: 18px;
}

.nsfw-row h3 {
    color: #ff3737; /* a warning-red color */
}

.nsfw-row {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: clamp(12px, 2.2vw, 20px);
    margin-top: 10px;
}

.image-card {
    margin: 0;
    background: var(--card);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.image-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

@media (hover: hover) {
    .image-card:hover img {
        transform: scale(1.03);
    }
}

.credit {
    display: block;
    padding: 8px 10px;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    background: rgba(0, 0, 0, 0.25);
}

.credit:hover {
    text-decoration: underline;
}

/* ---- NSFW gate ---- */
.nsfw-gate {
    display: inline-flex;
    gap: 14px;
    align-items: center;
    background: rgba(230, 70, 70, 0.14);
    padding: 10px 12px;
    border-radius: 12px;
}

.nsfw-gate .remember {
    color: var(--muted);
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* ---- Lightbox ---- */
.lightbox {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.88);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.lightbox.show {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 92vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: var(--shadow);
    user-select: none;
    -webkit-user-drag: none;
}

.lb-close {
    position: absolute;
    top: 16px;
    right: 22px;
    font-size: 40px;
    color: white;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: 0;
    color: white;
    font-size: 20px;
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
}

.lb-arrow.left {
    left: 16px;
}

.lb-arrow.right {
    right: 16px;
}

@media (prefers-reduced-motion: reduce) {
    .image-card img {
        transition: none;
    }
}
