:root {
    --primary: #2c5aa0;
    --primary-dark: #1e3d72;
    --secondary: #6c757d;
    --light: #f8f9fa;
    --lighter: #ffffff;
    --dark: #343a40;
    --border: #3e3e3e;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.12);


    --bg: #111418;
    --bg-2: #181c21;
    --card: #1e2329;
    --muted: #8b93a1;
    --text: #e7e9ed;
    --accent: #4aa3a3;
    --accent-2: #6fbaba;
    --radius: 14px;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    --maxw: 1100px;
    --gap: 20px;
    --ff: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 70%);
    color: var(--dark);
    min-height: 100vh;
}

a {
    text-decoration: none;
    font-weight: 600;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    border-radius: 12px;
}

.sidebar {
    margin: 2rem 0;
}

.wrapper{
    max-width: 1200px;
    width: 100%;
    margin: 20px auto;
}

.header {
    
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    background: rgba(255,255,255,0.03);
    color: white;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.07);
    text-align: center;
    position: relative;
    padding: 15px 20px;
}

.header-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 15px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link i {
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

.logo {
    width: 70px;
    height: auto;
}

.contacts {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    border-radius: 14px;
    background: var(--card);
    padding: 20px;
    margin-bottom: 16px;

    border: 1px solid rgba(255,255,255,0.07);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 13px;
    padding: 6px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}



.contact-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.contact-telegram:before {
    content: '';
    display: inline-block;
    vertical-align: middle;
    background: url('../img/tg.png') center no-repeat;
    background-size: contain;
    width: 18px;
    height: 18px;
    min-width: 18px;
}

.contact-matrix:before {
    content: '';
    display: inline-block;
    vertical-align: middle;
    background: url('../img/chat.svg') center no-repeat;
    background-size: contain;
    width: 18px;
    height: 18px;
    min-width: 18px;
}

.contact-tox:before {
    content: '';
    display: inline-block;
    vertical-align: middle;
    background: url('../img/chat.svg') center no-repeat;
    background-size: contain;
    width: 18px;
    height: 18px;
    min-width: 18px;
}

.contact-email:before {
    content: '';
    display: inline-block;
    vertical-align: middle;
    background: url('../img/email.png') center no-repeat;
    background-size: contain;
    width: 18px;
    height: 18px;
    min-width: 18px;
}

.banner {
    margin: 16px 0;
    justify-content: center;
    display: flex;
    max-width: 1200px;
    padding: 0 20px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .banner {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
}

.banner img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Стили для префиксов сайтов */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.site-title {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0;
    flex: 1;
}

.site-prefix {
    flex-shrink: 0;
    background: #5f0606;
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 3px #840000;
    white-space: nowrap;
}

.sites-count {
    background: var(--secondary);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.site-description {
    color: var(--dark);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .site-prefix {
        align-self: flex-start;
    }
}

.categories-list {
    margin: 2rem 0;
}

.category-item {
    margin-bottom: 2rem;
    background: var(--card);
    border-radius: 14px;
    overflow: hidden;
    padding: 20px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.07);
}

.category-header {
    color: var(--text);
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}


.category-icon {
    font-size: 0.7rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.category-title {
    font-size: 15px;
    font-weight: 600;
    flex: 1;
}

.category-toggle {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.category-toggle.rotated {
    transform: rotate(180deg);
}

.sites-list {
    color: var(--muted);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sites-list.expanded {
    max-height: 2000px;
}

.site-item {
    padding: 10px 20px 5px 20px;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
}

.site-item:last-child {
    border-bottom: none;
}

.site-item::before {
    content: "—";
    position: absolute;
    left: 1rem;
    color: #fff;
    font-weight: bold;
    top: 7px;
}

.site-title {
    font-size: 14px;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 1px;
    margin-left: 1.5rem;
}

.site-description {
    color: var(--muted);
    line-height: 1.5;
    margin-left: 1.5rem;
    font-size: 13px;
}

.no-category-sites {
    background: var(--light);
    padding: 2rem;
    border-radius: 10px;
    border: 2px dashed var(--border);
    text-align: center;
    margin: 2rem 0;
}

.no-category-title {
    color: var(--secondary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.sidebar-banners {
    position: sticky;
    top: 2rem;
    margin-top: 2rem;
}

.sidebar-banners .banner{
    padding: 0;
    margin: 0 0 20px 0;
}

.admin-login {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 20px;
}

.admin-login-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.admin-login-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.footer-block {
    background: #111418;
    color: var(--muted);
    border-radius: 14px;
    padding: 20px 20px;
    margin-top: 4rem;
    border: 1px solid rgba(255,255,255,0.07);
    font-size: 12px;
}

@media(max-width: 1199px) {}


@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
    }
    .sidebar-banners{
        margin-top: 0;
    }
    .categories-list{
        margin-top: 0;
    }
    .sidebar {
        order: -1;
    }

    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .contacts {
        text-align: center;
    }

    .contact-item {
        padding: 0;
        background: transparent;
    }
}

@media (max-width: 768px) {

    .site-item {
        padding: 1rem;
    }
}

@media(max-width: 767px) {
    .admin-login {
        top: 20px;
        transform: none;
    }

    .contacts {
        gap: 5px 10px;
        padding: 15px 15px;
    }
    .contact-item{
        font-size: 12px;
    }
    .contact-email:before{
        min-width: 16px;
        height: 16px;
        width: 16px;
    }
    .category-item{
        padding: 15px 5px;
    }
    .content-with-sidebar{
        gap: 0px!important;
    }
    .header{
        position: fixed;
        left: 0;
        width: 100%;
        top: 15px;
        z-index: 99;
    }
    .header-container{
        background: #191d21;
        gap: 15px;
        padding: 15px 12px 12px 12px;
    }
    .wrapper{
        padding-top: 102px;
    }
    .site-item::before{
        top: 14px;
    }
    .nav-link{
        font-size: 13px;
    }
    .logo{
        width: 65px;
    }
    .category-title{
        font-size: 14px;
    }

}

.block-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.description {
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
}
