/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Светлая тема */
    --bg-primary: #f8fafc;
    --bg-secondary: #f3f3f3;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --accent-secondary: #8b5cf6;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --header-bg: rgba(255,255,255,0.95);
    --footer-bg: #0f172a;
    --footer-text: #e2e8f0;
    --gradient-start: #3b82f6;
    --gradient-end: #8b5cf6;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --accent-color: #60a5fa;
    --accent-hover: #3b82f6;
    --accent-secondary: #a78bfa;
    --border-color: #475569;
    --card-shadow: 0 4px 25px rgba(0,0,0,0.3);
    --header-bg: rgba(15,23,42,0.95);
    --footer-bg: #020617;
    --footer-text: #e2e8f0;
    --gradient-start: #6366f1;
    --gradient-end: #8b5cf6;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Хедер */
.main-header {
    background-color: var(--header-bg);
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-content {
    display: flex;
    align-items: center;
}

.logo .logo-text {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-main {
    font-size: 28px;
    font-weight: 800;
    color: #60a5fa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo-launch {
    font-size: 28px;
    font-weight: 800;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Переключатель темы */
.theme-switcher-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.theme-toggle-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
}

.theme-toggle-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.light-icon {
    display: none;
}

[data-theme="dark"] .dark-icon {
    display: none;
}

[data-theme="dark"] .light-icon {
    display: inline;
}

/* Меню */
.main-nav {
    margin-left: 25px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s;
}

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

.nav-menu a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s;
}

.nav-menu a:hover:after {
    width: 100%;
}

/* Фильтры */
.filters-section {
    margin: 30px 0;
    padding: 0;
    background: transparent;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.filter-btn {
    padding: 12px 24px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: 30px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
}

.filter-btn .count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.filter-btn.active .count {
    background: rgba(255,255,255,0.3);
}

/* Сетка сборок (3 колонки) */
.builds-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 30px 0;
}

/* Карточка сборки */
/* Карточка сборки - обновленный дизайн */
.build-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    position: relative;
}

.build-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-color: var(--accent-color);
}

.build-thumb {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #334155);
}

.build-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.build-card:hover .build-image {
    transform: scale(1.05);
}

.default-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
}

.default-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.default-text {
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.build-badge {
    position: absolute;
    top: 15px;
    right: 15px;
}

.badge-size {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.build-card-content {
    padding: 24px;
}

.build-card-title {
    font-size: 18px;
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 600;
}

.build-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.build-card-title a:hover {
    color: var(--accent-color);
}

.build-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.build-actions {
    display: flex;
    gap: 12px;
}

.download-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.download-btn {
    flex: 1;
    min-width: 140px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-height: 50px;
}

.download-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s;
    z-index: -1;
}

.download-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.download-btn:hover:before {
    left: 100%;
}

.direct-download,
.yandex-download {
    padding: 15px 30px;
    font-size: 16px;
    min-width: 200px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-decoration: none;
}

.direct-download {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: 2px solid #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.yandex-download {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border: 2px solid #f97316;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

/* Эффект при наведении */
.direct-download:before,
.yandex-download:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.direct-download:hover,
.yandex-download:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.direct-download:hover:before,
.yandex-download:hover:before {
    left: 100%;
}

.direct-download:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border-color: #2563eb;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.yandex-download:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    border-color: #ea580c;
    box-shadow: 0 8px 25px rgba(234, 88, 12, 0.4);
}

.direct-download:active,
.yandex-download:active {
    transform: translateY(-1px) scale(0.98);
}

.download-btn:active {
    transform: translateY(-1px) scale(0.98);
    transition: transform 0.1s;
}

.btn-icon {
    font-size: 18px;
    line-height: 1;
}

.btn-text {
    font-size: 14px;
    letter-spacing: 0.5px;
}

.build-card .download-buttons {
    margin: 15px 0;
    gap: 10px;
}

.build-card .download-btn {
    padding: 12px 15px;
    min-height: 45px;
    font-size: 14px;
}

.build-card .btn-text {
    font-size: 13px;
}

.build-card .btn-icon {
    font-size: 16px;
}

/* Стили для страницы поста (кнопки больше) */
.single-build .download-buttons {
    margin: 30px 0;
    gap: 20px;
    justify-content: center;
}

.single-build .download-btn {
    padding: 18px 30px;
    min-width: 200px;
    min-height: 60px;
    font-size: 16px;
}

.single-build .btn-text {
    font-size: 16px;
    font-weight: 600;
}

.single-build .btn-icon {
    font-size: 20px;
}

/* Футер */
.main-footer {
    background: linear-gradient(135deg, var(--footer-bg) 0%, #1e1b4b 100%);
    color: var(--footer-text);
    padding: 50px 0 30px;
    margin-top: 80px;
    border-top: 3px solid var(--accent-color);
}

.footer-popular h3 {
    color: var(--accent-color);
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-popular h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
}

.popular-builds-list {
    list-style: none;
}

.popular-builds-list li {
    margin-bottom: 12px;
    position: relative;
}

.popular-builds-list li:before {
    content: '🎮';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

.popular-builds-list a {
    color: #cbd5e1;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 10px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
}

.popular-builds-list a:hover {
    color: var(--accent-color);
    padding-left: 30px;
}

.popular-build-title {
    flex: 1;
    font-size: 14px;
}

.popular-build-views {
    background: rgba(255,255,255,0.1);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    min-width: 40px;
    text-align: center;
}

.no-popular {
    color: #94a3b8;
    font-style: italic;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-categories h3,
.footer-links h3,
.footer-info h3 {
    color: var(--accent-color);
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-categories h3:after,
.footer-links h3:after,
.footer-info h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
}

.categories-list {
    list-style: none;
}

.categories-list li {
    margin-bottom: 12px;
}

.categories-list a {
    color: #cbd5e1;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
}

.categories-list a:hover {
    color: var(--accent-color);
    padding-left: 10px;
}

.categories-list .count {
    background: var(--accent-secondary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    min-width: 30px;
    text-align: center;
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-menu a:hover {
    color: var(--accent-color);
}

.footer-info p {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-copyright {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #64748b;
    font-size: 14px;
}

/* Страница одной сборки */

.single-build {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 30px;
    margin: 30px 0;
}

.build-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
}

.build-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.build-meta {
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.build-thumbnail {
    margin-bottom: 25px;
}

.build-thumbnail img {
    width: 100%;
    border-radius: 8px;
}

.build-features {
    list-style: none;
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.build-features li {
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color);
}

.build-features li:last-child {
    border-bottom: none;
}

.download-section {
    border-radius: 8px;
    text-align: center;
}

.download-title {
    margin-bottom: 20px;
    color: var(--accent-color);
}

.download-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.direct-download,
.yandex-download {
    padding: 12px 25px;
    font-size: 16px;
    min-width: 200px;
}

.build-accordion {
    margin: 30px 0;
}

.accordion-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 20px;
    background: var(--bg-tertiary);
    border: none;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.accordion-header:hover {
    background: var(--accent-color);
    color: white;
}

.accordion-icon {
    font-size: 20px;
    transition: transform 0.3s;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 20px;
    text-align: left;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
    padding: 20px;
}

.accordion-content ul {
    list-style: none;
}

.accordion-content ul,
.accordion-content ol {
    margin-left: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.accordion-content li {
    margin-bottom: 8px;
}

.accordion-content strong {
    color: var(--accent-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle .bar {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: 0.3s;
}

.mobile-menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

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

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

/* Мобильное меню контейнер */
.mobile-menu-container {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    box-shadow: -5px 0 30px rgba(0,0,0,0.3);
    padding: 80px 20px 20px;
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-container.active {
    right: 0;
}

.mobile-nav-menu {
    list-style: none;
}

.mobile-nav-menu li {
    margin-bottom: 10px;
}

.mobile-nav-menu a {
    display: block;
    padding: 15px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 18px;
    border-radius: 8px;
    transition: all 0.3s;
}

.mobile-nav-menu a:hover {
    background: var(--accent-color);
    color: white;
}


/* Адаптивность */
@media (max-width: 992px) {
    .builds-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle span {
        display: block;
        height: 3px;
        background: var(--text-primary);
        margin: 5px 0;
        transition: 0.3s;
    }

    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }

    .mobile-menu-container.active ~ .mobile-menu-overlay {
        display: block;
    }
    
    .mobile-menu-container.active {
        display: block;
    }
    
    .mobile-nav-menu {
        list-style: none;
        background: var(--bg-secondary);
        padding: 20px;
        margin-top: 10px;
        border-radius: 8px;
    }
    
    .mobile-nav-menu li {
        margin: 10px 0;
    }
    
    .mobile-nav-menu a {
        color: var(--text-primary);
        text-decoration: none;
        font-size: 16px;
        display: block;
        padding: 10px;
    }
    
    .builds-grid {
        grid-template-columns: 1fr;
    }
    
    .download-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .download-btn {
        min-width: 100%;
    }
    
    .single-build .download-buttons {
        flex-direction: column;
    }
    
    .single-build .download-btn {
        min-width: 100%;
        padding: 16px 20px;
    }
    
    .direct-download,
    .yandex-download {
        min-width: 100%;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .build-card .download-btn {
        padding: 10px 12px;
        min-height: 40px;
    }
    
    .build-card .btn-text {
        font-size: 12px;
    }
}
