/* ═══════════════════════════════════════════════════════════
   jnet.us — artifacts.css  (fullscreen media slideshow)
   ═══════════════════════════════════════════════════════════ */

:root {
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --dur:  430ms;
}

html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    background: #000;
    -webkit-tap-highlight-color: transparent;
}

/* ── Atmospheric vignette ── */
body::after {
    content: '';
    position: fixed; inset: 0;
    background: radial-gradient(ellipse at 50% 50%, transparent 52%, rgba(0,0,0,0.62) 100%);
    pointer-events: none; z-index: 10;
}

/* ── Edge gradients ── */
.fade-top {
    position: fixed; top: 0; left: 0; right: 0; height: 120px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.68) 0%, transparent 100%);
    pointer-events: none; z-index: 150;
}
.fade-bottom {
    position: fixed; bottom: 0; left: 0; right: 0; height: 110px;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
    pointer-events: none; z-index: 90;
}

/* ── NAV override (animation) ── */
.nav {
    position: fixed;
    z-index: 200;
    padding: 1.3rem 1.8rem;
    animation: navIn 0.55s var(--ease) 0.1s both;
}
@keyframes navIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── SLIDESHOW ── */
#slideshow {
    position: fixed; inset: 0;
    animation: ssIn 0.85s var(--ease) 0s both;
}
@keyframes ssIn { from { opacity:0; } to { opacity:1; } }

.slide {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 4.5rem 5.5rem 4.5rem;
    opacity: 0; transform: scale(0.972);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
    will-change: opacity, transform;
    pointer-events: none;
}
.slide.active         { opacity: 1; transform: scale(1); pointer-events: auto; }
.slide.exit-l         { opacity: 0; transform: translateX(-2.5%) scale(0.972); }
.slide.exit-r         { opacity: 0; transform: translateX( 2.5%) scale(0.972); }
.slide.from-r         { transform: translateX( 2.8%) scale(0.972); }
.slide.from-l         { transform: translateX(-2.8%) scale(0.972); }

.slide-media {
    display: flex; align-items: center; justify-content: center;
    max-width: 100%;
}
.slide-media img,
.slide-media video {
    max-width: 100%;
    max-height: calc(100vh - 9rem);
    width: auto; height: auto; object-fit: contain; display: block;
    user-select: none; -webkit-user-drag: none;
}
.slide.has-comments .slide-media img,
.slide.has-comments .slide-media video {
    max-height: calc(100vh - 9rem - 22vh);
}

/* ── Inline comment display ── */
.slide-cdisp {
    flex: 0 0 auto;
    width: 100%; max-width: 720px;
    max-height: 20vh;
    overflow-y: auto;
    padding-top: 1rem;
    display: flex; flex-direction: column; gap: 5px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.slide-cdisp:empty { display: none; }
.cdisp-item {
    border-left: 1px solid rgba(0,255,0,0.3);
    padding-left: 10px;
}
/* .cdisp-item text → .page-sub, timestamps → .text-meta (common.css) */
.hashtag {
    color: var(--green); font-weight: bold; text-shadow: 0 0 6px var(--green-glow);
}

/* ── Empty state ── */
.no-media {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
}
.no-media p {
    font-size: 0.78rem; letter-spacing: 0.22em; color: var(--dim);
    animation: breathe 3s infinite ease-in-out;
}
@keyframes breathe { 0%,100%{opacity:.3} 50%{opacity:.8} }

/* ── Arrow buttons ── */
.arrow {
    position: fixed; top: 0; bottom: 0; z-index: 100;
    display: flex; align-items: center;
    background: none; border: none; cursor: pointer; padding: 0 1.6rem;
    user-select: none; -webkit-tap-highlight-color: transparent;
}
#btn-prev { left: 0; }
#btn-next { right: 0; }
.arrow-ring {
    width: 2.7rem; height: 2.7rem; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.45);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.6); font-size: 1.05rem;
    backdrop-filter: blur(6px); line-height: 1;
    transition: border-color 0.22s, color 0.22s, transform 0.22s, box-shadow 0.22s;
}
.arrow:hover .arrow-ring {
    border-color: rgba(255,255,255,0.5); color: rgba(255,255,255,0.88);
    transform: scale(1.1); box-shadow: 0 0 14px rgba(255,255,255,0.07);
}
.arrow:active .arrow-ring { transform: scale(0.94); }

/* ── Counter ── */
#counter {
    position: fixed; bottom: 1.6rem; right: 1.8rem; z-index: 100;
    font-size: 0.59rem; letter-spacing: 0.2em; color: rgba(255,255,255,0.82);
}

/* ── Dots ── */
#dots {
    position: fixed; bottom: 1.5rem;
    left: 50%; transform: translateX(-50%);
    z-index: 100; display: flex; gap: 5px; align-items: center;
}
.dot {
    height: 4px; width: 4px; border-radius: 2px;
    background: rgba(255,255,255,0.62); cursor: pointer;
    transition: background 0.28s, width 0.28s, box-shadow 0.28s;
}
.dot.active { width: 16px; background: var(--green); box-shadow: 0 0 7px var(--green-glow); }

/* ── Caption ── */
#caption {
    position: fixed; bottom: 3.3rem;
    left: 50%; transform: translateX(-50%);
    z-index: 100; text-align: center; white-space: nowrap; pointer-events: none;
}
/* .cap-name → .page-sub, .cap-date → .text-meta (common.css) */
.cap-name { letter-spacing: 0.14em; }
.cap-date { margin-top: 0.2rem; }

/* ── Vote cluster ── */
.vote-cluster {
    position: fixed; bottom: 5.4rem; left: 1.5rem;
    z-index: 100; display: flex; flex-direction: column; gap: 6px;
}
.vote-btn {
    display: flex; align-items: center; gap: 7px;
    background: rgba(0,0,0,0.62);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 4px; padding: 5px 11px;
    color: rgba(255,255,255,0.75); cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.68rem; letter-spacing: 0.08em;
    backdrop-filter: blur(8px); line-height: 1;
    transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
    user-select: none; -webkit-tap-highlight-color: transparent;
}
.vote-btn:hover { color: rgba(255,255,255,0.95); border-color: rgba(255,255,255,0.6); }
.vote-btn.up.voted {
    color: var(--green); border-color: rgba(0,255,0,0.4);
    background: var(--green-dim); text-shadow: 0 0 6px var(--green-glow);
}
.vote-btn.down.voted {
    color: var(--red); border-color: rgba(255,80,96,0.4);
    background: var(--red-dim);
}
.vote-icon { font-size: 0.85rem; line-height: 1; }
.vote-count { min-width: 1.2ch; }

/* ── Action cluster (comment + share) ── */
.action-cluster {
    position: fixed; bottom: 5.4rem; right: 1.5rem;
    z-index: 100; display: flex; flex-direction: column; gap: 6px;
}
#comment-btn, #share-btn {
    display: flex; align-items: center; gap: 7px;
    background: rgba(0,0,0,0.62);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 4px; padding: 5px 11px;
    color: rgba(255,255,255,0.75); cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.68rem; letter-spacing: 0.08em;
    backdrop-filter: blur(8px); line-height: 1;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    user-select: none; -webkit-tap-highlight-color: transparent;
}
#comment-btn:hover, #share-btn:hover {
    color: rgba(255,255,255,0.95); border-color: rgba(255,255,255,0.6);
}
#comment-btn.has-comments {
    color: rgba(255,255,255,0.72); border-color: rgba(0,255,0,0.3);
    background: rgba(0,255,0,0.07);
}

/* ── Toast ── */
#toast {
    position: fixed; bottom: 50%; left: 50%;
    transform: translate(-50%, 50%);
    z-index: 1000;
    background: rgba(0,255,0,0.12);
    border: 1px solid rgba(0,255,0,0.35);
    color: var(--green);
    font-size: 0.65rem; letter-spacing: 0.22em;
    padding: 8px 18px; border-radius: 3px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
}
#toast.show { opacity: 1; }

/* ── Comment sheet ── */
#csheet {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 500;
    transform: translateY(100%);
    transition: transform 0.34s var(--ease);
    background: rgba(3,3,3,0.97);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(0,255,0,0.1);
    max-height: 56vh; display: flex; flex-direction: column;
}
#csheet.open { transform: translateY(0); }
.cs-handle {
    width: 36px; height: 3px; border-radius: 2px;
    background: rgba(255,255,255,0.1);
    margin: 10px auto 4px; flex-shrink: 0; cursor: pointer;
    transition: background 0.2s;
}
.cs-handle:hover { background: rgba(255,255,255,0.25); }
.cs-title {
    flex-shrink: 0; padding: 0 16px 8px;
    font-size: 0.58rem; letter-spacing: 0.25em; text-transform: uppercase;
    color: rgba(0,255,0,0.45);
}
.cs-list {
    flex: 1; overflow-y: auto; padding: 4px 16px 8px;
    display: flex; flex-direction: column; gap: 10px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.cs-empty {
    font-size: 0.63rem; color: rgba(255,255,255,0.5);
    letter-spacing: 0.12em; padding: 8px 0; font-style: italic;
}
.cs-comment {
    border-left: 1px solid rgba(0,255,0,0.35);
    padding-left: 10px;
}
/* .cs-body text → .page-sub, .cs-meta → .text-meta (common.css) */
.cs-body { line-height: 1.65; }
.cs-meta { margin-top: 3px; }
.cs-form {
    flex-shrink: 0; display: flex; gap: 8px; align-items: flex-end;
    padding: 10px 16px 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.cs-input {
    flex: 1; background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 3px;
    color: rgba(255,255,255,0.85);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.72rem; letter-spacing: 0.04em;
    padding: 8px 10px; outline: none; resize: none;
    min-height: 36px; max-height: 88px;
    transition: border-color 0.2s;
}
.cs-input::placeholder { color: rgba(255,255,255,0.2); font-style: italic; }
.cs-input:focus { border-color: rgba(0,255,0,0.25); }
.cs-send {
    background: rgba(0,255,0,0.12); color: var(--green);
    border: 1px solid rgba(0,255,0,0.28); border-radius: 3px;
    padding: 8px 14px; cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.6rem; font-weight: bold;
    letter-spacing: 0.22em; text-transform: uppercase;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.cs-send:hover { background: rgba(0,255,0,0.22); border-color: rgba(0,255,0,0.5); }

#csheet-backdrop {
    display: none; position: fixed; inset: 0; z-index: 490;
    background: transparent;
}
#csheet-backdrop.open { display: block; }

/* ── FOOTER (fixed overlay) ── */
.footer {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
    text-align: center; color: rgba(255,255,255,0.75);
    font-size: 0.52rem; letter-spacing: 0.2em; text-transform: uppercase;
    padding: 6px 0 8px;
    background: transparent;
    pointer-events: none;
    margin-top: 0; border-top: none;
}

/* ── MOBILE ── */
@media (max-width: 600px) {
    .arrow       { padding: 0 0.85rem; }
    .arrow-ring  { width: 2.1rem; height: 2.1rem; font-size: 0.9rem; }
    .nav         { padding: 1rem 1.1rem; }
    #caption     { bottom: 2.9rem; }
    .vote-cluster, #comment-btn { bottom: 4.8rem; }
    #share-btn { bottom: 7.8rem; }
    .slide       { padding: 4rem 3.5rem 4.5rem; }
    .slide.has-comments .slide-media img,
    .slide.has-comments .slide-media video { max-height: calc(100vh - 8.5rem - 22vh); }
}
