:root {
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-secondary: #cccccc;
    --accent: #24aaec;
}

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

body {
    background-color: #0a0a0a;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: #ecedee;
    line-height: 1.5;
    padding: 2rem 1rem;
}

.nav {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.nav a:hover, .nav a.active {
    color: var(--accent);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Заголовок страницы */
.page-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #ffffff, #a0a0a0);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #8a8a8a;
    max-width: 600px;
    margin: 0 auto;
}

/* Навигация по категориям */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #1f1f1f;
    padding-bottom: 1rem;
}

.cat-btn {
    background: transparent;
    border: none;
    color: #b0b0b0;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cat-btn:hover {
    background: #1e1e1e;
    color: #ffffff;
}

.cat-btn.active {
    background: #2a2a2a;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.cat-btn i {
    margin-right: 10px;
}

/* Сетка карточек */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Карточка инструмента */
.tool-card {
    background: #121212;
    border-radius: 24px;
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #202020;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.5);
    border-color: #2e2e2e;
    background: #151515;
}

/* Название и иконка */
.tool-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.tool-title span:first-child {
    font-size: 1.8rem;
}

.tool-title h3 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.tool-description {
    color: #b4b4b4;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex: 1;
}

/* Блок тегов */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.2rem;
}

.tag {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 30px;
    background: #1e1e1e;
    color: #ddd;
    letter-spacing: -0.2px;
}

/* Цветовые вариации тегов */
.tag.free {
    background: #1e3a2f;
    color: #6fcf97;
}
.tag.freemium {
    background: #3a2e1e;
    color: #f2c94c;
}
.tag.paid {
    background: #3a1e2a;
    color: #ff8a7a;
}
.tag.no-reg {
    background: #1e2a3a;
    color: #7ab3ff;
}
.tag.reg {
    background: #2a1e3a;
    color: #c47aff;
}

.advice {color: #ff8a7a;}

/* Ссылка */
.tool-link {
    text-decoration: none;
    background: #1e1e1e;
    color: #e0e0e0;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-top: 0.25rem;
    border: 1px solid #2a2a2a;
}

.tool-link:hover {
    background: #2a2a2a;
    color: white;
    border-color: #3e3e3e;
}

.arrow {
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.tool-link:hover .arrow {
    transform: translateX(4px);
}

/* скрытие категорий */
.category-section {
    display: block;
}

.category-section.hidden {
    display: none;
}

/* футер / подпись */
.footer-note {
    text-align: center;
    margin-top: 3rem;
    font-size: 0.75rem;
    color: #4a4a4a;
    border-top: 1px solid #181818;
    padding-top: 2rem;
}

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }
    .container {
        margin-top: 70px;
    }
    .page-header h1 {
        font-size: 1.8rem;
    }
    .cat-btn {
        padding: 0.4rem 0.9rem;
        font-size: 0.85rem;
    }
    .tools-grid {
        gap: 1rem;
    }
}