:root {
    --bg-main: #0c0b10;
    --bg-card: #15131e;
    --bg-modal: #1a1826;
    --bg-slot: #221f33;
    
    --accent-gold: #f3c262;
    --accent-cyan: #00f0ff;
    --accent-purple: #9d4edd;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    
    --border-glow: rgba(0, 240, 255, 0.25);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(157, 78, 221, 0.15), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 240, 255, 0.08), transparent 40%);
}

/* Шапка */
.header {
    background: rgba(21, 19, 30, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(157, 78, 221, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    color: var(--accent-gold);
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(243, 194, 98, 0.5);
}

.logo h1 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    letter-spacing: 2px;
}

.highlight {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

.controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    background: var(--bg-slot);
    border: 1px solid rgba(157, 78, 221, 0.4);
    border-radius: 6px;
    padding: 0.6rem 2.2rem 0.6rem 0.8rem;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: 0.3s ease;
    width: 200px;
}

.search-box input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px var(--border-glow);
    width: 240px;
}

.search-icon {
    position: absolute;
    right: 0.8rem;
    pointer-events: none;
    font-size: 0.85rem;
    opacity: 0.7;
}

.lang-btn {
    background: var(--bg-slot);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 0.55rem 1rem;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.3s;
}

.lang-btn:hover {
    background: rgba(243, 194, 98, 0.15);
    box-shadow: 0 0 12px rgba(243, 194, 98, 0.3);
}

.lang-text.inactive {
    opacity: 0.4;
}

/* Главный контент */
.main-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.categories {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.cat-btn {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.3s;
}

.cat-btn:hover {
    color: #fff;
    border-color: var(--accent-purple);
}

.cat-btn.active {
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.3), rgba(0, 240, 255, 0.15));
    border-color: var(--accent-cyan);
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

/* Сетка карточек */
.builds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.build-card {
    background: var(--bg-card);
    border: 1px solid rgba(157, 78, 221, 0.2);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.build-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: 0 8px 20px rgba(0, 240, 255, 0.2);
}

.card-img-wrapper {
    height: 180px;
    background: #000;
    position: relative;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
}

.build-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(12, 11, 16, 0.85);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    font-family: var(--font-heading);
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    text-transform: uppercase;
}

.card-content {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 7, 12, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--bg-modal);
    border: 1px solid var(--accent-purple);
    box-shadow: 0 0 30px rgba(157, 78, 221, 0.3);
    border-radius: 12px;
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: 0.2s;
}

.modal-close:hover {
    color: var(--accent-cyan);
}

.modal-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1.5rem;
}

.modal-icon-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    background: #000;
    border: 1px solid var(--accent-gold);
    overflow: hidden;
    flex-shrink: 0;
}

.modal-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info .badge {
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    font-size: 0.75rem;
}

.modal-info h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin: 0.2rem 0 0.5rem 0;
}

.modal-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Сетка слотов модов */
.special-slots, .arcanes-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.main-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.mod-slot {
    background: var(--bg-slot);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.8rem;
    min-height: 75px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    transition: 0.2s;
}

.mod-slot:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.slot-type {
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: 0.6rem;
    font-family: var(--font-heading);
    opacity: 0.5;
    letter-spacing: 0.5px;
}

.mod-slot.aura {
    border-color: rgba(243, 194, 98, 0.4);
    background: linear-gradient(135deg, rgba(243, 194, 98, 0.08), transparent);
}

.mod-slot.exilus {
    border-color: rgba(0, 240, 255, 0.3);
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), transparent);
}

.mod-slot.arcane {
    border-color: rgba(157, 78, 221, 0.4);
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.08), transparent);
}

.mod-content {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    text-align: center;
}

/* Адаптивность */
@media (max-width: 768px) {
    .main-slots {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-container {
        flex-direction: column;
        align-items: stretch;
    }

    .controls {
        justify-content: space-between;
    }

    .search-box input {
        width: 100%;
    }

    .search-box input:focus {
        width: 100%;
    }
}