
:root {
    /* Цветовая палитра (Deep Blue & Cyan - современный стиль беттинга) */
    --color-bg-body: #0b1e33;
    --color-bg-card: #112b45;
    --color-bg-header: rgba(17, 43, 69, 0.95);
    --color-primary: #00e5ff;
    --color-primary-dark: #00b8d4;
    --color-accent: #2979ff;
    --color-text-main: #ffffff;
    --color-text-muted: #b0bec5;
    --color-border: #2c4a6b;
    --color-success: #00c853;
    
    /* Размеры и отступы */
    --container-width: 1200px;
    --header-height: 4.5rem;
    --border-radius-sm: 0.5rem;
    --border-radius-md: 1rem;
    --border-radius-lg: 1.5rem;
    --gap-sm: 1rem;
    --gap-md: 2rem;
    
    /* Типографика */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 1rem;
    
    /* Тени */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 15px rgba(0, 229, 255, 0.3);
    
    /* Анимации */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Сброс стилей и базовые настройки */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

/* Сетка и Layout */
.wrapper {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--gap-sm);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#main {
    width: 100%;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    margin-bottom: var(--gap-md);
    border-bottom: 1px solid var(--color-border);
}

.logo {
    max-height: 3.5rem;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
    transition: transform var(--transition-smooth);
}

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

.m-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

/* Поиск */
.search-form {
    position: relative;
    width: 250px;
}

.search-form form {
    display: flex;
    align-items: center;
    background: var(--color-bg-card);
    border-radius: 2rem;
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.search-form form:focus-within {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.search-form__field {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--color-text-main);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    outline: none;
}

.search-form__field::placeholder {
    color: var(--color-text-muted);
}

.search-form__button {
    background: var(--color-primary);
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat center center;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat center center;
    mask-size: 1.2rem;
    -webkit-mask-size: 1.2rem;
    background-color: var(--color-text-main);
    transition: background-color var(--transition-fast);
}

.search-form__button:hover {
    background-color: var(--color-bg-body);
}

/* Навигация */
.sticky_menu {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg-header);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-md);
    padding: 0.5rem 1rem;
    box-shadow: var(--shadow-sm);
}

.main-menu__inner {
    display: flex;
    justify-content: flex-end;
}

.main-menu__list {
    display: flex;
    gap: 1.5rem;
    margin: 0;
}

.main-menu__list_m {
    display: none; /* Скрываем мобильное меню на десктопе */
}

.menu-item a {
    position: relative;
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
}

.menu-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transition: width var(--transition-smooth);
}

.menu-item a:hover {
    color: var(--color-primary);
}

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

/* Контентная сетка */
.content-wrapper {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: var(--gap-md);
    margin-bottom: var(--gap-md);
}

.content {
    background: var(--color-bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Статья */
.single__title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #fff, var(--color-text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.entry p {
    margin-bottom: 1.2rem;
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.entry h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--color-text-main);
    border-left: 4px solid var(--color-primary);
    padding-left: 1rem;
}

.entry h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 1rem;
    color: var(--color-primary);
}

.entry ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.entry ul li {
    position: relative;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
    padding-left: 1.5rem;
}

.entry ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

.entry a {
    color: var(--color-primary);
    font-weight: 600;
    border-bottom: 1px dashed var(--color-primary);
}

.entry a:hover {
    color: var(--color-accent);
    border-bottom-style: solid;
}

/* Изображения в контенте */
.entry img {
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    margin: 2rem auto;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.entry img:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* Кнопки-картинки (особый стиль) */
a:has(img) {
    border-bottom: none !important;
    display: inline-block;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
}

.section_widget {
    background: var(--color-bg-card);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 6rem;
}

.widget_text .title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    text-align: center;
    color: var(--color-primary);
    letter-spacing: 1px;
}

.promocode-style {
    display: block;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    border: 2px dashed var(--color-border);
    color: var(--color-primary);
    text-align: center;
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.promocode-style:hover {
    border-color: var(--color-primary);
    background: rgba(0, 229, 255, 0.1);
    transform: scale(1.02);
}

.promocode-style:active {
    transform: scale(0.98);
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 2rem 0;
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-align: center;
}

.footer-bottom .copy {
    opacity: 0.7;
    max-width: 800px;
    margin: 0 auto;
}

/* Адаптивность */
@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2; /* Сайдбар вниз на планшетах */
        display: grid;
        grid-template-columns: 1fr 1fr;
        position: static;
    }
    
    .section_widget {
        position: static;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .logo {
        margin-bottom: 0.5rem;
    }
    
    .m-nav {
        width: 100%;
        align-items: center;
    }
    
    .search-form {
        width: 100%;
    }
    
    .main-menu {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem; /* Скроллбар отступ */
    }
    
    .main-menu__inner {
        justify-content: center;
    }
    
    .main-menu__list {
        display: none; /* Скрываем десктоп список */
    }
    
    .main-menu__list_m {
        display: flex; /* Показываем мобильный */
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }
    
    .menu-item a {
        padding: 0.5rem 1rem;
        background: rgba(255,255,255,0.05);
        border-radius: var(--border-radius-sm);
        display: block;
        width: 100%;
        text-align: center;
    }

    .content {
        padding: 1rem;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .entry h1 {
        font-size: 1.8rem;
    }
}

/* Состояния фокуса для доступности */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}
