:root {
    --bg: #12161a; /* светлее */
    --fg: #e0f0e0; /* светлее */
    --accent: #00ff99; /* ярче */
    --card-bg: #0e1410; /* чуть темнее для контраста */
    --hover-bg: #141e16;
    --border: 1px solid #006644;
    --font-mono: 'Courier New', monospace;
    --shadow: rgba(0, 255, 153, 0.1); /* светлее */
    --glow: 0 0 10px rgba(0, 255, 153, 0.4); /* ярче */
}

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

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-mono);
    line-height: 1.5;
    padding: 12px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: radial-gradient(ellipse at center, #1a2024 0%, #12161a 70%);
}

/* Улучшенный стиль */
header {
    text-align: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--accent);
    margin-bottom: 20px;
    background: rgba(0, 40, 20, 0.3);
    border-radius: 6px;
}
h1, h2 {
    font-size: 1.8rem;
    margin: 10px 0;
    color: var(--accent);
    text-shadow: 0 0 8px rgba(0, 255, 153, 0.6);
}
.subtitle {
    opacity: 0.7;
    font-size: 0.9rem;
}
.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 10px;
}
.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s ease;
}
.breadcrumb a:hover {
    text-decoration: underline;
    text-shadow: 0 0 5px var(--accent);
}

/* Сетка — с мягким градиентом */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    padding: 10px;
    background: rgba(0, 30, 15, 0.2);
    border-radius: 6px;
    border: 1px solid rgba(0, 85, 51, 0.3);
}

/* 🖼Карточки — с лёгкой тенью и свечением */
.card, .page {
    display: block;
    background: #0e1410; /* тёмная карточка */
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    text-decoration: none;
    color: var(--fg);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    aspect-ratio: 1 / 1;
    max-width: 140px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 0 8px rgba(0, 255, 153, 0.1);
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Эффект при наведении */
.card:hover, .page:hover {
    background: var(--hover-bg);
    color: var(--accent);
    transform: translateY(-6px) scale(1.04);
    box-shadow: var(--glow),
    0 8px 16px rgba(0, 0, 0, 0.2),
    inset 0 0 10px rgba(0, 255, 153, 0.2);
    border-color: #00ffaa;
    z-index: 10;
    text-shadow: 0 0 5px var(--accent);
}

/*Логотипы — на светлом фоне внутри карточки */
.card img {
    height: 32px;
    max-width: 100%;
    object-fit: contain;
    vertical-align: middle;
    filter: brightness(1.1); /* чуть ярче */
    transition: all 0.3s ease;
}

.card:hover img {
    filter: brightness(1.3) drop-shadow(0 0 4px var(--accent));
}

/* 📄 Название — чётко видно */
.card span {
    font-size: 0.85rem;
    text-align: center;
    display: block;
    word-wrap: break-word;
    line-height: 1.2;
    color: var(--fg);
    transition: all 0.3s ease;
}

.card:hover span {
    color: var(--accent);
    text-shadow: 0 0 5px var(--accent);
}


.page {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Панель навигации */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
}
.nav-bar button, .nav-bar .btn-list {
    padding: 6px 12px;
    background: var(--card-bg);
    color: var(--fg);
    border: 1px solid var(--accent);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: var(--font-mono);
    border-radius: 4px;
}
.nav-bar button:hover, .nav-bar .btn-list:hover {
    background: var(--accent);
    color: var(--bg);
    box-shadow: var(--glow);
}
.nav-bar button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.nav-bar input {
    width: 60px;
    padding: 6px;
    background: var(--card-bg);
    color: var(--fg);
    border: 1px solid var(--accent);
    text-align: center;
    font-family: var(--font-mono);
    border-radius: 4px;
}

/* 🖼️ Сетка превью страниц */
.thumbs-grid {
    background: var(--card-bg);
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 15px;
    box-shadow: 0 0 10px var(--shadow);
}

.thumbs-grid h3 {
    color: var(--accent);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 5px rgba(0, 255, 153, 0.4);
}

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

.thumbs-grid .thumb-item {
    position: relative;
    border: 1px solid var(--accent);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s ease;
    background: var(--hover-bg);
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.thumbs-grid .thumb-item:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 0 10px var(--shadow);
}

.thumbs-grid .thumb-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.thumbs-grid .thumb-item span {
    display: block;
    text-align: center;
    color: var(--accent);
    font-size: 0.9rem;
    padding: 4px;
    background: var(--card-bg);
    font-weight: bold;
}

.thumbs-grid .thumb-item.active {
    border-color: #ffcc00;
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.4);
}

.empty {
    text-align: center;
    padding: 40px 20px;
    opacity: 0.8;
}
code {
    background: #222;
    padding: 2px 6px;
    border-radius: 3px;
}
section {
    margin-bottom: 30px;
}
footer {
    text-align: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px dashed var(--accent);
    font-size: 0.85rem;
    opacity: 0.6;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--card-bg);
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s ease;
    font-family: var(--font-mono);
}
.btn:hover {
    background: var(--accent);
    color: var(--bg);
    box-shadow: var(--glow);
}
@media (max-width: 600px) {
    .grid { grid-template-columns: repeat(3, 1fr); }
    .nav-bar { flex-direction: column; }
    footer { flex-direction: column; }
}

