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

body {
    margin: 0;
    padding: 1rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #111;
    color: #eee;
}

.page-header {
    margin-bottom: 1rem;
}

.page-header h1 {
    margin: 0 0 0.25rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.tile {
    background: #222;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
}

.tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.thumb img {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: contain;
    background: #000;
}

.thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 160px;
    background: #000;
    color: #fff;
    font-size: 3rem;
}

.meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

.views {
    opacity: 0.8;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.overlay.hidden {
    display: none;
}

.modal {
    max-width: 90vw;
    max-height: 90vh;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal video {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    background: #000;
}
