/* ============================================================
   files/css.css — общие стили для всех проектов
   ============================================================ */

/* ===== СБРОС СТИЛЕЙ ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    color: #e2e8f0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

/* ===== КОНТЕЙНЕР ===== */
.container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

/* ===== ЗАГОЛОВКИ ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: #f1f5f9;
}

h1 { font-size: 2.5rem; letter-spacing: -0.03em; }
h2 { font-size: 2rem; letter-spacing: -0.02em; }
h3 { font-size: 1.5rem; letter-spacing: -0.01em; }
h4 { font-size: 1.25rem; }

/* ===== ССЫЛКИ ===== */
a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #93c5fd;
}

/* ===== КНОПКИ ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: white;
    box-shadow: 0 4px 14px -4px rgba(96, 165, 250, 0.5);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -6px rgba(96, 165, 250, 0.6);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
}

.btn-outline:hover {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.5);
    color: #f1f5f9;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== КАРТОЧКИ ===== */
.card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

/* ===== СООБЩЕНИЯ ===== */
.message {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    border-left: 4px solid #60a5fa;
    background: rgba(96, 165, 250, 0.1);
    color: #bfdbfe;
}

.message.success {
    border-left-color: #4ade80;
    background: rgba(34, 197, 94, 0.1);
    color: #bbf7d0;
}

.message.error {
    border-left-color: #f87171;
    background: rgba(220, 38, 38, 0.1);
    color: #fecaca;
}

.message.warning {
    border-left-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    color: #fde68a;
}

/* ===== СТАТУСЫ ===== */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-coming {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.status-beta {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* ============================================================
   ===== ГЛАВНАЯ СТРАНИЦА ПРОЕКТОВ =====
   ============================================================ */

/* ===== ЗАГОЛОВОК ===== */
.header {
    text-align: center;
    margin-bottom: 50px;
}

.header .logo {
    font-size: 4rem;
    margin-bottom: 12px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.header p {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 500px;
    margin: 0 auto;
}

/* ===== СЕТКА ПРОЕКТОВ ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* ===== КАРТОЧКА ПРОЕКТА ===== */
.project-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 24px;
    padding: 32px 28px;
    text-decoration: none;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #60a5fa, #a78bfa, #f472b6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 
        0 20px 40px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(96, 165, 250, 0.2),
        0 0 60px -20px rgba(96, 165, 250, 0.5);
}

.project-card:hover::before {
    opacity: 1;
}

/* ===== ВЕРХ КАРТОЧКИ ===== */
.project-card .card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.project-card .icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(167, 139, 250, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    border: 1px solid rgba(96, 165, 250, 0.2);
    transition: transform 0.3s ease;
}

.project-card:hover .icon-wrapper {
    transform: scale(1.08) rotate(-5deg);
}

.project-card .status {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
    white-space: nowrap;
}

.project-card .status.coming {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.3);
}

/* ===== ТЕЛО КАРТОЧКИ ===== */
.project-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.02em;
}

.project-card .desc {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* ===== ТЕГИ ===== */
.project-card .tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.project-card .tag {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(96, 165, 250, 0.1);
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.2);
    font-weight: 500;
}

/* ===== СТРЕЛКА ===== */
.project-card .arrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    font-size: 0.85rem;
    color: #60a5fa;
    font-weight: 600;
}

.project-card .arrow .arrow-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.project-card:hover .arrow .arrow-icon {
    transform: translateX(6px);
}

/* ===== ПУСТОЕ СОСТОЯНИЕ ===== */
.empty {
    text-align: center;
    padding: 80px 20px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 24px;
    border: 2px dashed rgba(148, 163, 184, 0.2);
    grid-column: 1 / -1;
}

.empty .icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty h3 {
    color: #94a3b8;
    margin-bottom: 8px;
}

.empty p {
    color: #64748b;
    font-size: 0.9rem;
}

/* ===== СТАТИСТИКА ===== */
.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    padding: 24px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-item .value {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-item .label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ===== ФУТЕР ===== */
.footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    color: #64748b;
    font-size: 0.85rem;
}

.footer .heart {
    color: #f472b6;
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* ===== УТИЛИТЫ ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-column { display: flex; flex-direction: column; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(10px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-spin {
    animation: spin 0.8s linear infinite;
}

.animate-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ===== СКРОЛЛБАР ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ===== ВЫДЕЛЕНИЕ ТЕКСТА ===== */
::selection {
    background: rgba(96, 165, 250, 0.3);
    color: #f1f5f9;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.3rem; }
    
    .container {
        padding: 0 16px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header .logo {
        font-size: 3rem;
    }
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .project-card {
        padding: 24px 20px;
        border-radius: 20px;
    }
    
    .project-card h3 {
        font-size: 1.2rem;
    }
    
    .stats {
        gap: 24px;
        padding: 20px;
    }
    
    .stat-item .value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.1rem; }
    
    .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}
/* ============================================================
   ===== БОКОВОЕ МЕНЮ ПО КАТЕГОРИЯМ =====
   ============================================================ */

/* ===== ОБЩИЙ LAYOUT ===== */
.layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

body {
    display: block !important;
    padding: 0 !important;
}

/* ===== БОКОВАЯ ПАНЕЛЬ ===== */
.sidebar {
    width: 280px;
    min-width: 280px;
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

/* ===== ШАПКА САЙДБАРА ===== */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    margin-bottom: 24px;
}

.sidebar-logo {
    font-size: 2rem;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(167, 139, 250, 0.15));
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 14px;
    animation: float 3s ease-in-out infinite;
}

.sidebar-title h2 {
    font-size: 1.1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}

.sidebar-title span {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ===== НАВИГАЦИЯ ===== */
.sidebar-nav {
    flex: 1;
}

.sidebar-section-title {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-left: 12px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-link:hover {
    background: rgba(96, 165, 250, 0.08);
    color: #e2e8f0;
    transform: translateX(4px);
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(167, 139, 250, 0.15));
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: linear-gradient(180deg, #60a5fa, #a78bfa);
    border-radius: 3px;
}

.sidebar-icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-count {
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}

.sidebar-link.active .sidebar-count {
    background: rgba(96, 165, 250, 0.3);
    color: #bfdbfe;
}

/* ===== ФУТЕР САЙДБАРА ===== */
.sidebar-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.sidebar-note {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-dot.green {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

.sidebar-copyright {
    font-size: 0.7rem;
    color: #475569;
    text-align: center;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.main-content {
    flex: 1;
    padding: 30px 40px;
    min-width: 0;
    overflow-x: hidden;
}

.main-content .container {
    max-width: 100%;
    padding: 0;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 900px) {
    .layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
        border-right: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    }
    
    .sidebar-header {
        padding-bottom: 16px;
        margin-bottom: 16px;
    }
    
    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .sidebar-link {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .sidebar-link.active::before {
        display: none;
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .main-content {
        padding: 24px 20px;
    }
}

@media (max-width: 600px) {
    .sidebar {
        padding: 16px;
    }
    
    .sidebar-logo {
        width: 44px;
        height: 44px;
        font-size: 1.6rem;
    }
    
    .sidebar-title h2 {
        font-size: 1rem;
    }
    
    .sidebar-menu {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .sidebar-menu::-webkit-scrollbar {
        height: 4px;
    }
    
    .sidebar-menu::-webkit-scrollbar-thumb {
        background: #334155;
        border-radius: 4px;
    }
    
    .sidebar-link {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .main-content {
        padding: 20px 16px;
    }
}