:root {
    --bg-color: #0b0f19;
    --card-bg: #16213e;
    --accent: #e94560;
    --text-main: #e0e0e0;
    --text-muted: #9ba1a6;
    --border: #1f305e;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: #0f172a;
    border-bottom: 1px solid var(--border);
    padding: 40px 0;
    text-align: center;
}

.header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5rem;
    color: #fff;
}

.subtitle {
    color: var(--text-muted);
    margin: 0;
    font-size: 1.1rem;
}

.main {
    padding: 40px 0;
}

/* Фильтры */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    background: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Сетка галереи */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.gallery-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gallery-item.hidden {
    display: none;
}

.gallery-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.img-wrapper {
    width: 100%;
    height: 200px;
    background: #000;
    overflow: hidden;
    cursor: pointer;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .img-wrapper img {
    transform: scale(1.05);
}

.item-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tag {
    align-self: flex-start;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #0f3460;
    color: #fff;
}

.tag.boot { background: #2563eb; }
.tag.memory { background: #7c3aed; }
.tag.drivers { background: #d97706; }
.tag.userspace { background: #059669; }

.item-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #fff;
}

.date {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Лайтбокс */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(11, 15, 25, 0.95);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 6px;
    border: 1px solid var(--border);
}

#lightbox-caption {
    color: #fff;
    margin-top: 15px;
    text-align: center;
    font-size: 1.1rem;
}

.close-btn {
    position: absolute;
    top: 25px; right: 35px;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
}

.footer {
    text-align: center;
    padding: 30px 0;
    background: #0f172a;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}
