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

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background: #0d0d0d;
    color: #c0c0c0;
    font-family: 'BlurLight', monospace;
}

body {
    padding: env(safe-area-inset-top) 28px env(safe-area-inset-bottom);
    overflow-y: auto;
}

.page {
    max-width: 600px;
    margin: 0 auto;
    padding: 48px 0 64px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

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

.top { animation: fadeUp 0.4s ease both; }

.back {
    font-size: 12px;
    color: #c0c0c0;
    text-decoration: none;
    opacity: 0.3;
    letter-spacing: 2px;
    transition: opacity 0.2s;
}

.back:hover { opacity: 0.8; }

.header { animation: fadeUp 0.5s ease 0.05s both; }

.title {
    font-size: 13px;
    opacity: 0.35;
    letter-spacing: 3px;
}

.loading {
    font-size: 13px;
    opacity: 0.25;
    letter-spacing: 2px;
}

.empty {
    font-size: 14px;
    opacity: 0.3;
    letter-spacing: 1px;
}

.grid {
    columns: 2;
    column-gap: 10px;
    animation: fadeUp 0.5s ease 0.1s both;
}

@media (min-width: 480px) {
    .grid { columns: 3; }
}

.gif-item {
    break-inside: avoid;
    margin-bottom: 10px;
    cursor: pointer;
    animation: fadeUp 0.3s ease both;
}

.gif-item img {
    width: 100%;
    display: block;
    opacity: 0.75;
    transition: opacity 0.2s;
}

.gif-item:hover img { opacity: 1; }

/* lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(9,39,42,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 28px;
    cursor: pointer;
    animation: fadeUp 0.2s ease both;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
