:root {
    --neon-pink: #ff2a6d;
    --neon-blue: #05d9e8;
    --dark-bg: #0d0221;
    --text-color: #d1f7ff;
}



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

body {
    background: var(--dark-bg);
    color: var(--text-color);
    font-family: 'Courier New', monospace;
    padding: 20px;
}

/* Основные стили курсора */
body {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><rect x="0" y="0" width="16" height="16" fill="none"/><path d="M1,1 L15,15 M15,1 L1,15" stroke="%2305d9e8" stroke-width="1.5"/></svg>'), 
              auto;
}

/* Стиль курсора при наведении на кликабельные элементы */
a, button, .download-btn {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="none" stroke="%23ff2a6d" stroke-width="2"/><circle cx="12" cy="12" r="3" fill="%23ff2a6d"/></svg>'), 
              pointer;
}

/* Анимация для курсора при загрузке */
body.loading {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12,1 L12,4 M12,20 L12,23 M4,12 L1,12 M23,12 L20,12" stroke="%23d300c5" stroke-width="2" stroke-linecap="round"/><animateTransform attributeName="transform" type="rotate" from="0 12 12" to="360 12 12" dur="1s" repeatCount="indefinite"/></svg>'), 
              wait;
}

.download-btn:hover {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="none" stroke="%23fff000" stroke-width="2"/><circle cx="12" cy="12" r="3" fill="%23fff000"/></svg>'), 
              pointer;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(0, 0, 0, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1000;
}

header {
    border-bottom: 1px solid var(--neon-blue);
    padding-bottom: 15px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

h1 {
    color: var(--neon-pink);
    font-size: 2.5rem;
    text-shadow: 0 0 10px var(--neon-pink);
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.subtitle {
    color: var(--neon-blue);
    font-size: 1rem;
    text-shadow: var(--glow);
    margin-bottom: 20px;
}

.terminal {
    background-color: var(--darker-bg);
    border: 1px solid var(--neon-blue);
    box-shadow: var(--glow);
    padding: 15px;
    margin-bottom: 30px;
    font-family: monospace;
    position: relative;
    overflow: hidden;
}

.terminal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue), var(--neon-purple));
}

.terminal-text {
    color: var(--neon-blue);
    line-height: 1.5;
}

.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
    grid-auto-flow: dense;
    /* Автоматическая высота строки с минимальным значением */
    grid-auto-rows: minmax(200px, auto);
}

.grid-item {
    position: relative;
    overflow: hidden;
    border: 2px solid var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
    /* Базовое соотношение для обычных изображений */
    /* aspect-ratio: 4/3; */
}

/* Широкие изображения */
.grid-item.wide {
    grid-column: span 2;
    /* aspect-ratio: 16/9; */
}

/* Высокие изображения */
.grid-item.tall {
    grid-row: span 2;
    /* aspect-ratio: 3/4; */
}

.grid-img {
    width: 100%;
    height: 100%;
    /* Компромиссный вариант - cover с центрированием по верху */
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Для вертикальных фото делаем центрирование по центру */
.grid-item.tall .grid-img {
    object-position: center;
}

.grid-item-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top; /* важно! чтобы голова оставалась */
    background-repeat: no-repeat;
}



.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(5, 217, 232, 0.6);
    border-color: var(--neon-pink);
}



.grid-item:hover img {
    transform: scale(1.03);
}

.overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 15px;
    transition: bottom 0.3s ease;
}

.grid-item:hover .overlay {
    bottom: 0;
}


/* Классы для разных пропорций */
.grid-item.wide {
  grid-column: span 2;
}

.grid-item.tall {
  grid-row: span 2;
}

.grid-item.big {
  grid-column: span 2;
  grid-row: span 2;
}


/* Кнопка скачивания */
.download-btn {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--neon-pink);
    color: black;
    border: none;
    padding: 8px 15px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 2;
    text-decoration: none;
    white-space: nowrap;
}

/* .download-btn:hover {
    background-color: var(--neon-pink);
    box-shadow: 0 0 15px rgba(255, 42, 109, 0.7);
} */

.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--darker-bg);
    border-top: 1px solid var(--neon-blue);
    padding: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    box-shadow: 0 -5px 15px rgba(5, 217, 232, 0.2);
}

.status-item {
    color: var(--neon-blue);
    text-shadow: var(--glow);
}

.glitch {
    animation: glitch 1s linear infinite;
}

@keyframes glitch {
    0% { text-shadow: 2px 0 var(--neon-pink), -2px 0 var(--neon-blue); }
    25% { text-shadow: -2px 0 var(--neon-pink), 2px 0 var(--neon-blue); }
    50% { text-shadow: 2px 0 var(--neon-purple), -2px 0 var(--neon-pink); }
    75% { text-shadow: -2px 0 var(--neon-purple), 2px 0 var(--neon-pink); }
    100% { text-shadow: 2px 0 var(--neon-pink), -2px 0 var(--neon-blue); }
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    h1 {
        font-size: 1.8rem;
    }
}

/* Стили для кнопки скачивания */
/* .download-btn {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--neon-pink);
    color: var(--dark-bg);
    border: none;
    padding: 8px 15px;
    font-family: 'Courier New', monospace;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 2;
} */

.grid-item:hover .download-btn {
    bottom: 20px;
    opacity: 1;
}

/* Затемнение фона при наведении */
.grid-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-item:hover::after {
    opacity: 1;
}

/* Индикатор загрузки */
/* Улучшенные стили для плавной загрузки */
.grid-container {
    overflow-anchor: none; /* Отключаем автоматический скролл браузера */
}

.loader {
    grid-column: 1 / -1;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid var(--neon-blue);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}