/* ============================================
   CSS Forge — Основные стили
   ============================================ */

/* Reset и базовые стили */

/* Подключаем переменные */
@import url('variables.css');


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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Контейнер */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   Навигация
   ============================================ */
.navbar {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================
   Navbar Brand & Logo
   ============================================ */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    transition: opacity 0.2s;
}

.navbar-brand:hover {
    opacity: 0.85;
}

.brand-logo {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.brand-logo:hover {
    transform: scale(1.05);
}

.brand-icon {
    font-size: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.brand-text {
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .brand-logo {
        height: 32px;
        max-width: 140px;
    }
}

/* Меню */
.navbar-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    color: #a0a0b0;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown меню */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 600px;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-height: 80vh;
    overflow-y: auto;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Секции в dropdown */
.dropdown-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dropdown-title {
    color: #4facfe;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: #ffffff;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.item-icon {
    font-size: 1.5rem;
    min-width: 40px;
    text-align: center;
}

.item-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.item-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.item-desc {
    font-size: 0.8rem;
    color: #a0a0b0;
}

.dropdown-placeholder {
    color: #666;
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

/* Мобильное меню (бургер) */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ============================================
   Основное содержимое
   ============================================ */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* ============================================
   Футер
   ============================================ */
.footer {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #4facfe;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: #a0a0b0;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-section a {
    color: #a0a0b0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #666;
}

/* ============================================
   Адаптивность
   ============================================ */
@media (max-width: 1024px) {
    .dropdown-menu {
        min-width: 500px;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Показываем бургер */
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Скрываем десктопное меню */
    .navbar-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .navbar-menu.mobile-active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    /* Dropdown на мобильных */
    .dropdown-menu {
        position: static;
        min-width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        grid-template-columns: 1fr;
        margin-top: 0.5rem;
    }
    
    .dropdown.active .dropdown-menu {
        display: grid;
    }
    
    /* Футер */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .brand-text {
        display: none;
    }
}

/* ============================================
   Breadcrumbs (хлебные крошки)
   ============================================ */
.breadcrumbs {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem 0;
    margin-bottom: 2rem;
}

.breadcrumbs-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.breadcrumbs-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumbs-link {
    color: #a0a0b0;
    text-decoration: none;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.breadcrumbs-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.breadcrumbs-icon {
    font-size: 1rem;
}

.breadcrumbs-separator {
    color: #666;
    font-size: 0.8rem;
}

.breadcrumbs-text {
    color: #a0a0b0;
}

.breadcrumbs-current {
    color: #4facfe;
    font-weight: 500;
}

/* Адаптивность */
@media (max-width: 768px) {
    .breadcrumbs {
        padding: 0.5rem 0;
    }
    
    .breadcrumbs-list {
        font-size: 0.8rem;
    }
    
    .breadcrumbs-icon {
        font-size: 0.9rem;
    }
}

/* Плавная прокрутка для якорных ссылок */
html {
    scroll-behavior: smooth;
}

/* ============================================
   Боковая панель быстрого доступа
   ============================================ */

/* Панель */
.sidebar {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 220px;
    max-height: calc(100vh - 120px);
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    z-index: 999;
}

/* Свёрнутая панель */
.sidebar.collapsed {
    transform: translateX(calc(100% + 20px));
}

/* Заголовок панели */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    background: rgba(26, 26, 46, 0.98);
    z-index: 1;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Навигация панели */
.sidebar-nav {
    padding: 0.5rem;
}

/* Секции */
.sidebar-section {
    margin-bottom: 1rem;
}

.sidebar-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4facfe;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0.75rem;
    margin: 0;
}

/* Sidebar subsections */
.sidebar-subsection {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.05);
}
.sidebar-subsection-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #a0a0b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0.75rem;
    margin-top: 0.5rem;
}

/* Ссылки */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: #a0a0b0;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
    margin-bottom: 0.25rem;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(3px);
}

.sidebar-link.active {
    background: rgba(79, 172, 254, 0.2);
    color: #4facfe;
    font-weight: 600;
}

.sidebar-icon {
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
}

.sidebar-text {
    font-size: 0.9rem;
}

/* Кнопка открытия панели */
.sidebar-open-btn {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(79, 172, 254, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(79, 172, 254, 0.4);
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
}

.sidebar-open-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(79, 172, 254, 0.6);
}

.sidebar-open-btn.visible {
    display: flex;
}

/* Скроллбар панели */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Адаптивность */
@media (max-width: 1200px) {
    .sidebar {
        width: 200px;
    }
}

@media (max-width: 768px) {
    /* На мобильных панель скрыта по умолчанию */
    .sidebar {
        top: 70px;
        right: 10px;
        width: calc(100% - 20px);
        max-width: 300px;
        transform: translateX(calc(100% + 20px));
    }
    
    .sidebar.mobile-visible {
        transform: translateX(0);
    }
    
    .sidebar.collapsed {
        transform: translateX(calc(100% + 20px));
    }
    
    .sidebar-open-btn {
        top: 70px;
        right: 10px;
    }
}

/* ============================================
   Блок описания инструмента
   ============================================ */
.tool-description-block {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.tool-description-block h2 {
    color: #4facfe;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.tool-description-block p {
    color: #a0a0b0;
    line-height: 1.8;
    font-size: 1.05rem;
}

/* ============================================
   Блок преимуществ
   ============================================ */
.features-block {
    max-width: 1400px;
    margin: 3rem auto;
    padding: 2rem;
}

.features-block h2 {
    text-align: center;
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-item h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: #a0a0b0;
    line-height: 1.6;
}

/* ============================================
   Блок "Как использовать"
   ============================================ */
.how-to-block {
    max-width: 1400px;
    margin: 3rem auto;
    padding: 2rem;
}

.how-to-block h2 {
    text-align: center;
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.step-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.step-content h3 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: #a0a0b0;
    line-height: 1.6;
}

/* ============================================
   Переключатель форматов CSS/Tailwind
   ============================================ */
.format-switcher {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.format-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #a0a0b0;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.format-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.format-btn.active {
    background: rgba(79, 172, 254, 0.2);
    border-color: #4facfe;
    color: #4facfe;
}

.format-hint {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(56, 189, 248, 0.1);
    border-left: 3px solid #38bdf8;
    border-radius: 6px;
    color: #7dd3fc;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Адаптивность */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin: 0 auto;
    }
}

/* ============================================
   Active States for Navigation
   ============================================ */

/* Navbar active links */
.nav-link.active {
    color: #43e97b !important;
    font-weight: 700;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #43e97b, #38f9d7);
    border-radius: 2px;
}

/* Dropdown items active */
.dropdown-item.active {
    background: rgba(67, 233, 123, 0.1) !important;
    border-left: 3px solid #43e97b;
}

.dropdown-item.active .item-name {
    color: #43e97b !important;
}

/* Sidebar active links */
.sidebar-link.active {
    background: rgba(67, 233, 123, 0.1) !important;
    border-left: 3px solid #43e97b;
    color: #43e97b !important;
}

.sidebar-link.active .sidebar-icon {
    transform: scale(1.1);
}

.sidebar-link.active .sidebar-text {
    font-weight: 700;
}

