* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*Основной фон страницы*/
body {
    background: 
        linear-gradient(
            to bottom,
            rgb(20, 40, 50) 0%,
            rgb(30, 50, 70) 5%,
            rgb(15, 20, 25) 45%,
            rgb(15, 20, 25) 100%
        );
    background-attachment: fixed;
    background-size: 100% 100vh;
    background-repeat: no-repeat;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: rgb(200, 210, 225);
    min-height: 100vh;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

/*Верхняя панель*/
.topbar {
    background-color: rgb(20, 25, 30);
    height: 60px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(45, 50, 55);
    position: fixed; /* Изменено с relative на fixed */
    top: 0; /* Прикрепляем к верху */
    left: 0;
    right: 0;
    z-index: 1000; /* Увеличиваем z-index чтобы панель была поверх всего */
    width: 100%;
}

/* Внутренний контейнер*/
.topbar_inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 20px;
    position: relative;
}

/*Бренд слева*/
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    flex-shrink: 0;
}

.brand_logo {
    height: 32px;
    width: auto;
}

.brand_name {
    font-size: 1.4rem;
    font-weight: 700;
    color: rgb(200, 210, 225);
    letter-spacing: 0.2px;
}

/*Кнопки по центру*/
.nav {
    display: flex;
    gap: 0;
    position: absolute;
    left: 50%;
    top: 50%; 
    transform: translate(-50%, -50%);
    background-color: transparent;
}

/*Стиль кнопок*/
.nav a {
    color: rgb(140, 150, 165);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin: 0 2px;
}

/*Активная кнопка*/
.nav a[data-page].active {
    color: rgb(200, 210, 225);
    background-color: rgb(20, 45, 50);
}

/*Кнопка при наведении*/
.nav a:hover {
    color: rgb(35, 210, 235);
    background-color: rgba(20, 45, 50, 0.5);
}

/*Социальные иконки справа*/
.social {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%;
    flex-shrink: 0;
}

.social-icon {
    width: 24px;
    height: 24px;
    opacity: 0.8;
    transition: all 0.2s ease;
    filter: brightness(0.9);
}

.social-icon:hover {
    opacity: 1;
    filter: brightness(1.2);
    transform: translateY(-1px);
}

/*Основной контейнер контента*/
main#content {
    flex: 1;
    padding: 30px 20px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    margin-top: 60px;
}

/*Страницы*/
.page {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/*Индикатор загрузки*/
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: rgb(140, 150, 165);
    font-size: 1.1rem;
}

/*Страница ошибки*/
.error-page {
    text-align: center;
    padding: 60px 20px;
}

.error-page h2 {
    color: rgb(220, 90, 90);
    margin-bottom: 20px;
}

.error-page button {
    background: rgb(20, 45, 50);
    color: rgb(200, 210, 225);
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.2s;
}

.error-page button:hover {
    background: rgb(25, 55, 60);
}

/*Футер*/
footer {
    background-color: rgb(15, 20, 25);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0;
    margin-top: auto;
}

.footer-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-text {
    color: rgb(140, 150, 165);
    font-size: 0.9rem;
    text-align: center;
    letter-spacing: 0.3px;
}

/*--==Стили для Home страницы==--*/

.page-home {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero {
    max-width: 820px;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 20px;
}

.hero-accent {
    color: #35c6f4;
    text-shadow: 0 0 30px rgba(53, 198, 244, 0.35);
}

.hero-subtitle {
    font-size: 1.05rem;
    color: rgb(160, 175, 190);
    line-height: 1.6;
    margin-bottom: 36px;
}

.hero-button {
    background: linear-gradient(
        135deg,
        #00c2ff,
        #3a7bff
    );
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 10px;
    border: none;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    gap: 10px;

    box-shadow:
        0 10px 30px rgba(0, 160, 255, 0.25),
        inset 0 0 0 1px rgba(255, 255, 255, 0.15);

    transition: all 0.25s ease;
}

.hero-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 16px 40px rgba(0, 160, 255, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.hero-button:active {
    transform: translateY(0);
}

.hero-button .arrow {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.hero-button:hover .arrow {
    transform: translateX(4px);
}

/*--==Стили для Tools страницы==--*/

/* Заголовок страницы */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: rgb(200, 210, 225);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 1.1rem;
    color: rgb(140, 150, 165);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Фильтры категорий */
.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.category-filter {
    background: rgba(30, 40, 50, 0.6);
    border: 1px solid rgba(45, 55, 65, 0.8);
    color: rgb(160, 170, 185);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-filter:hover {
    background: rgba(35, 45, 55, 0.8);
    color: rgb(200, 210, 225);
    border-color: rgba(55, 65, 75, 0.9);
}

.category-filter.active {
    background: rgb(20, 45, 50);
    color: rgb(200, 210, 225);
    border-color: rgb(35, 210, 235, 0.3);
}

/* Сетка генераторов */
.generators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    padding: 0 20px;
    margin-bottom: 50px;
}

/* Карточка генератора */
.generator-card {
    background: rgba(25, 35, 45, 0.6);
    border: 1px solid rgba(40, 50, 60, 0.8);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.generator-card:hover {
    transform: translateY(-5px);
    border-color: rgba(35, 210, 235, 0.4);
    background: rgba(30, 40, 50, 0.8);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.generator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgb(35, 210, 235), rgb(65, 150, 235));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.generator-card:hover::before {
    opacity: 1;
}

/* Иконка генератора */
.generator-icon {
    width: 48px;
    height: 48px;
    background: rgba(20, 45, 50, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: rgb(35, 210, 235);
}

.generator-icon svg {
    width: 24px;
    height: 24px;
}

/* Контент карточки */
.generator-content {
    flex: 1;
    margin-bottom: 20px;
}

.generator-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.generator-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: rgb(200, 210, 225);
    margin: 0;
}

/* Бейджи статусов */
.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.available {
    background: rgba(46, 204, 113, 0.15);
    color: rgb(46, 204, 113);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.status-badge.soon {
    background: rgba(241, 196, 15, 0.15);
    color: rgb(241, 196, 15);
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.status-badge.beta {
    background: rgba(52, 152, 219, 0.15);
    color: rgb(52, 152, 219);
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* Описание генератора */
.generator-description {
    color: rgb(140, 150, 165);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Теги генератора */
.generator-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: rgba(30, 40, 50, 0.8);
    color: rgb(160, 170, 185);
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 10px;
    border: 1px solid rgba(45, 55, 65, 0.8);
}

/* Кнопка открытия */
.generator-button {
    background: rgb(20, 45, 50);
    color: rgb(200, 210, 225);
    border: 1px solid rgba(35, 210, 235, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: auto;
}

.generator-button:hover:not(:disabled) {
    background: rgb(25, 55, 60);
    border-color: rgba(35, 210, 235, 0.6);
    transform: translateY(-1px);
}

.generator-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    display: none;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: rgb(200, 210, 225);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.empty-state p {
    color: rgb(140, 150, 165);
    font-size: 1rem;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.generator-card {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.generator-card:nth-child(1) { animation-delay: 0.1s; }
.generator-card:nth-child(2) { animation-delay: 0.2s; }
.generator-card:nth-child(3) { animation-delay: 0.3s; }
.generator-card:nth-child(4) { animation-delay: 0.4s; }
.generator-card:nth-child(5) { animation-delay: 0.5s; }
.generator-card:nth-child(6) { animation-delay: 0.6s; }

/* Адаптивность */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .generators-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .category-filters {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        margin-bottom: 30px;
        padding: 0 15px 10px;
    }
    
    .category-filter {
        flex-shrink: 0;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .generators-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}