@font-face {
    font-family: 'BlurLight';
    src: url(/fonts/blurlight.ttf);
    font-display: swap;
}

/* spotify mood background */
#mood-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.page, .screen {
    position: relative;
    z-index: 1;
}

/* page entrance animation */
@keyframes pageIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

body {
    animation: pageIn 0.35s ease both;
}

/* page exit */
body.leaving {
    animation: pageOut 0.28s ease both;
}

@keyframes pageOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* custom cursor — desktop only */
@media (hover: hover) {
    * { cursor: none !important; }

    .cur-dot {
        position: fixed;
        top: 0; left: 0;
        width: 5px; height: 5px;
        background: rgba(200, 200, 200, 0.9);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
    }

    .cur-ring {
        position: fixed;
        top: 0; left: 0;
        width: 26px; height: 26px;
        border: 1px solid rgba(200, 200, 200, 0.3);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9998;
        transform: translate(-50%, -50%);
        transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
    }

    .cur-ring.hover {
        width: 40px; height: 40px;
        border-color: rgba(200, 200, 200, 0.15);
    }

    .cur-trail {
        position: fixed;
        width: 3px;
        height: 3px;
        background: rgba(200, 200, 200, 0.45);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9997;
        transform: translate(-50%, -50%);
        animation: trailFade 0.5s ease forwards;
    }

    @keyframes trailFade {
        from { opacity: 0.45; transform: translate(-50%, -50%) scale(1); }
        to   { opacity: 0;    transform: translate(-50%, -50%) scale(0); }
    }
}

/* ── Mobile notice ───────────────────────────────────────── */
.mobile-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background: rgba(13,13,13,0.97);
    border-top: 1px solid rgba(200,200,200,0.08);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'BlurLight', monospace;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.mobile-notice.visible {
    opacity: 1;
    transform: translateY(0);
}

.mobile-notice.hiding {
    opacity: 0;
    transform: translateY(100%);
}

.mobile-notice-text {
    font-size: 12px;
    letter-spacing: 2px;
    color: #c0c0c0;
    opacity: 0.6;
}

.mobile-notice-close {
    background: transparent;
    border: none;
    color: #c0c0c0;
    font-size: 18px;
    opacity: 0.35;
    cursor: pointer;
    padding: 0 0 0 16px;
    line-height: 1;
    font-family: 'BlurLight', monospace;
    transition: opacity 0.2s;
}

.mobile-notice-close:hover { opacity: 0.8; }

/* ── VHS Spotify widget ──────────────────────────────────── */
#vhs-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 300;
    background: #0d0d0d;
    border: 1px solid rgba(200,200,200,0.08);
    width: 200px;
    font-family: 'BlurLight', monospace;
    color: #c0c0c0;
    animation: vhsIn 0.4s ease both;
}

@keyframes vhsIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

#vhs-widget.hidden { display: none !important; }

.vhs-header {
    background: rgba(200,200,200,0.04);
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-bottom: 1px solid rgba(200,200,200,0.06);
}

.vhs-rec-dot {
    width: 5px; height: 5px;
    background: #aa1a1a;
    border-radius: 50%;
    animation: vhs-pulse 1s ease-in-out infinite;
}

@keyframes vhs-pulse {
    0%, 100% { opacity: 0.3; }
    50%       { opacity: 1; }
}

.vhs-rec {
    font-size: 8px;
    letter-spacing: 2px;
    color: #aa1a1a;
    opacity: 0.9;
}

.vhs-tape {
    font-size: 8px;
    letter-spacing: 2px;
    opacity: 0.18;
    margin-left: auto;
}

.vhs-body {
    display: flex;
    gap: 9px;
    align-items: center;
    padding: 10px;
    text-decoration: none;
    color: inherit;
}

.vhs-art {
    width: 38px; height: 38px;
    object-fit: cover;
    flex-shrink: 0;
    opacity: 0.85;
    background: rgba(200,200,200,0.05);
}

.vhs-info { flex: 1; overflow: hidden; }

.vhs-track {
    font-size: 11px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vhs-artist {
    font-size: 9px;
    opacity: 0.35;
    letter-spacing: 1px;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vhs-bar {
    height: 1px;
    background: rgba(200,200,200,0.06);
    margin: 0 10px;
    overflow: hidden;
}

.vhs-bar-fill {
    height: 100%;
    background: rgba(200,200,200,0.2);
    width: 0%;
    transition: width 30s linear;
}

.vhs-footer {
    padding: 5px 10px 8px;
    display: flex;
    align-items: center;
}

.vhs-time {
    font-size: 9px;
    opacity: 0.18;
    letter-spacing: 1px;
}

.vhs-reels {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

.vhs-reel {
    width: 11px; height: 11px;
    border: 1px solid rgba(200,200,200,0.22);
    border-radius: 50%;
    animation: vhs-spin 2s linear infinite;
}

.vhs-reel:last-child {
    animation-direction: reverse;
    animation-duration: 1.7s;
}

@keyframes vhs-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Glitch screen (#8) ──────────────────────────────────── */
.glitch-screen {
    position: fixed;
    inset: 0;
    z-index: 9990;
    pointer-events: none;
    animation: glitch-full 0.45s steps(1) forwards;
}

@keyframes glitch-full {
    0%   { background: transparent; transform: none; filter: none; }
    10%  { background: repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 4px);
           transform: translate(3px, 0); filter: hue-rotate(80deg) brightness(1.05); }
    20%  { background: transparent; transform: translate(-3px, 1px); filter: none; }
    35%  { background: repeating-linear-gradient(0deg, rgba(255,255,255,0.06) 0px, rgba(255,255,255,0.06) 2px, transparent 2px, transparent 7px);
           transform: translate(0, -2px) skewX(-1deg); filter: hue-rotate(-60deg); }
    50%  { background: transparent; transform: translate(4px, 0); filter: invert(0.04); }
    65%  { background: repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 3px);
           transform: translate(-2px, 1px); filter: none; }
    80%  { background: transparent; transform: translate(1px, -1px); filter: brightness(1.03); }
    95%  { background: transparent; transform: none; filter: none; }
    100% { background: transparent; transform: none; filter: none; opacity: 0; }
}

/* ── Sticker (#9) ────────────────────────────────────────── */
.site-sticker {
    position: fixed;
    top: 80px;
    left: 22px;
    background: #f2ead8;
    color: #1a1a1a;
    padding: 10px 14px 12px;
    font-family: sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.4;
    transform: rotate(-2.5deg);
    z-index: 300;
    cursor: pointer;
    box-shadow: 2px 4px 12px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    max-width: 130px;
}

.site-sticker::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px; height: 12px;
    background: rgba(200,200,150,0.5);
    border-radius: 1px;
}

.site-sticker:hover {
    transform: rotate(-1deg) scale(1.03);
    box-shadow: 3px 6px 18px rgba(0,0,0,0.6);
}

.site-sticker.peeling {
    animation: sticker-peel 0.35s ease forwards;
}

@keyframes sticker-peel {
    to { transform: rotate(15deg) translate(20px, -40px); opacity: 0; }
}

/* ── It's late (#10) ─────────────────────────────────────── */
.its-late {
    position: fixed;
    left: 20px;
    bottom: 100px;
    font-family: 'BlurLight', monospace;
    font-size: 11px;
    letter-spacing: 3px;
    color: #c0c0c0;
    opacity: 0;
    pointer-events: none;
    z-index: 200;
    transition: opacity 1.5s ease;
    white-space: nowrap;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.its-late.visible { opacity: 0.3; }

/* ── Daily gif (home, always visible) ────────────────────── */
.daily-gif {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) translateX(16px);
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.4s ease, transform 1.4s ease;
}

.daily-gif.visible {
    opacity: 0.7;
    transform: translateY(-50%) translateX(0);
}

.daily-gif img {
    width: 140px;
    height: auto;
    display: block;
    object-fit: contain;
    filter: grayscale(0.1);
}
