/**
 * main.css — основные стили игры, рамки, тема.
 * Для кнопок и меню: см. css/buttons.css (создать при необходимости).
 */
@font-face {
    font-family: 'Univia Pro Thin';
    src: url('UniviaPro-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
}

:root {
    --frame-line-opacity: 0.2;
}

/* === Рамка для основной иллюстрации (фото/видео) === */
.illustration-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    box-sizing: border-box;
    background: var(--bg);
}

/* Квадратики 2×2px */
.illustration-frame .sq {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--frame-color);
}

.illustration-frame .corner-group { position: absolute; z-index: 0; }

/* TL */
.illustration-frame .corner-group.tl { top: 0; left: 0; }
.illustration-frame .corner-group.tl .sq:nth-child(1) { top: 0; left: 0; }
.illustration-frame .corner-group.tl .sq:nth-child(2) { top: 0; left: 2px; }
.illustration-frame .corner-group.tl .sq:nth-child(3) { top: 0; left: 4px; }
.illustration-frame .corner-group.tl .sq:nth-child(4) { top: 0; left: 6px; }
.illustration-frame .corner-group.tl .sq:nth-child(5) { top: 2px; left: 0; }
.illustration-frame .corner-group.tl .sq:nth-child(6) { top: 4px; left: 0; }
.illustration-frame .corner-group.tl .sq:nth-child(7) { top: 6px; left: 0; }

/* TR */
.illustration-frame .corner-group.tr { top: 0; right: 0; }
.illustration-frame .corner-group.tr .sq:nth-child(1) { top: 0; right: 0; }
.illustration-frame .corner-group.tr .sq:nth-child(2) { top: 0; right: 2px; }
.illustration-frame .corner-group.tr .sq:nth-child(3) { top: 0; right: 4px; }
.illustration-frame .corner-group.tr .sq:nth-child(4) { top: 0; right: 6px; }
.illustration-frame .corner-group.tr .sq:nth-child(5) { top: 2px; right: 0; }
.illustration-frame .corner-group.tr .sq:nth-child(6) { top: 4px; right: 0; }
.illustration-frame .corner-group.tr .sq:nth-child(7) { top: 6px; right: 0; }

/* BL */
.illustration-frame .corner-group.bl { bottom: 0; left: 0; }
.illustration-frame .corner-group.bl .sq:nth-child(1) { bottom: 0; left: 0; }
.illustration-frame .corner-group.bl .sq:nth-child(2) { bottom: 0; left: 2px; }
.illustration-frame .corner-group.bl .sq:nth-child(3) { bottom: 0; left: 4px; }
.illustration-frame .corner-group.bl .sq:nth-child(4) { bottom: 0; left: 6px; }
.illustration-frame .corner-group.bl .sq:nth-child(5) { bottom: 2px; left: 0; }
.illustration-frame .corner-group.bl .sq:nth-child(6) { bottom: 4px; left: 0; }
.illustration-frame .corner-group.bl .sq:nth-child(7) { bottom: 6px; left: 0; }

/* BR */
.illustration-frame .corner-group.br { bottom: 0; right: 0; }
.illustration-frame .corner-group.br .sq:nth-child(1) { bottom: 0; right: 0; }
.illustration-frame .corner-group.br .sq:nth-child(2) { bottom: 0; right: 2px; }
.illustration-frame .corner-group.br .sq:nth-child(3) { bottom: 0; right: 4px; }
.illustration-frame .corner-group.br .sq:nth-child(4) { bottom: 0; right: 6px; }
.illustration-frame .corner-group.br .sq:nth-child(5) { bottom: 2px; right: 0; }
.illustration-frame .corner-group.br .sq:nth-child(6) { bottom: 4px; right: 0; }
.illustration-frame .corner-group.br .sq:nth-child(7) { bottom: 6px; right: 0; }

/* Линии рамки */
.illustration-frame .frame-line {
    position: absolute;
    z-index: 0;
    background: rgba(var(--frame-rgb), var(--frame-line-opacity));
}

.illustration-frame .frame-line.h-top { top: 0; left: 8px; right: 8px; height: 1px; }
.illustration-frame .frame-line.h-bottom { bottom: 0; left: 8px; right: 8px; height: 1px; }
.illustration-frame .frame-line.v-left { left: 0; top: 8px; bottom: 8px; width: 1px; }
.illustration-frame .frame-line.v-right { right: 0; top: 8px; bottom: 8px; width: 1px; }

/* Контент (фото/видео) — отступ 10px от рамки, явный размер */
.illustration-frame .illustration {
    position: absolute;
    z-index: 1;
    top: 10px;
    left: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    overflow: hidden;
    background: #141224;
    box-shadow: none;
}

.illustration-frame .illustration img,
.illustration-frame .illustration video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Текст узла — Univia Pro Thin */
.text {
    font-family: 'Univia Pro Thin', 'Merriweather', Georgia, sans-serif;
}
