/* === CSS ПЕРЕМЕННЫЕ === */
:root {
    /* Цвета из LenKino дизайна */
    --vns-pri: #1E2024;
    --vns-pri-rgb: 30,32,36;
    --vns-pri-inv: #FFF;
    --vns-sec: #5D636F;
    --vns-sec-inv: #F4F7F9;
    --vns-ter: #F84968;
    --vns-ter-inv: #FFE3E8;
    --vns-dis: rgba(93, 99, 111, .32);
    --vns-sep: #E3E8EE;
    --vns-dgr: #B8C3CB;
    --vns-lgr: #9AA0AC;
    --vns-err: #FF3541;
    --vns-scs: #3BBC8E;
    --vns-bg-pri: #FAF0FF;
    --vns-bg-pri-rgb: 250,240,255;
    --vns-bg-sec: #FAF0FF;
    --vns-bg-sec-rgb: 255,255,255;
    --vns-bg-mnu: #F4E0FE;
    --vns-bg-mnu-hov: #EBC5FE;
    --vns-bsh-sec-rgb: 84,93,110;
    --vns-btn-pri: #F84968;
    --vns-btn-pri-hov: #FC274D;
    --vns-btn-pri-act: #BF1A37;
    --vns-btn-sec: #F4F7F9;
    --vns-btn-sec-hov: #DCE3E9;
    --vns-btn-sec-act: #FFE3E8;
    --vns-btn-sec-foc: #BCC9D3;
    --vns-btn-dis: #F4F7F9;
    --vns-ico-f: #5D636F;
    --vns-ico-s: #1E2024;
    --vns-blr-siz: 1rem;
    --vns-blr-opa: .8;
    --vns-hdr-hgt: 4rem;
    --vns-grd-i: 1;
    --vns-gap-y: 1.5rem;
    --vns-gap-x: .5rem;
    --vns-pad-y: 1.5rem;
    --vns-pad-x: 1.25rem;
    --vns-fnt-bfs: 17px;
    --vns-fnt-fam: 'Roboto', sans-serif;
    
    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, #ff7043 0%, #ff5722 100%);
    --gradient-primary-hover: linear-gradient(135deg, #ff5722 0%, #e64a19 100%);
    --gradient-hero-light: linear-gradient(135deg, #ffa726 0%, #ff7043 100%);
    --gradient-hero-dark: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    
    /* Тени */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.1);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 10px 40px rgba(0,0,0,0.3);
    --shadow-primary: 0 4px 12px rgba(255, 112, 67, 0.3);
    --shadow-primary-lg: 0 6px 20px rgba(255, 112, 67, 0.4);
    --shadow-dark: 0 2px 10px rgba(0,0,0,0.5);
    --shadow-focus: 0 0 0 3px rgba(255, 112, 67, 0.1);
    
    /* Радиусы */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-round: 25px;
    --radius-circle: 50%;
    
    /* Переходы */
    --transition-fast: 0.2s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.4s ease;
    
    /* Размеры */
    --max-width: 1400px;
    --header-height: 130px;

    /* LenKino адаптивные переменные */
    --vns-ctnr-w: 100%;
    --vns-grd-i: 3;
    --vns-sld-fnt: 7.5rem;
    --vns-sld-pad: 0px;
    --vns-frm-hgt: 2.5rem;
    --vns-frm-gap: .5rem;
    --vns-fnt-hfs: 1.5rem;
    --vns-fnt-hlh: calc(var(--vns-fnt-hfs) + .25rem);
    --vns-btn-siz: 1.75rem;
    --vns-ico-siz: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--vns-fnt-fam);
    background-color: var(--vns-bg-pri);
    color: var(--vns-sec);
    font-size: var(--vns-fnt-bfs);
    font-weight: 400;
    line-height: 1.25rem;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

/* Общие стили для ссылок */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

a:active {
    color: var(--primary-active);
}

/* Header and Navigation */
.header {
    background-color: var(--bg-light);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-top {
    background-color: var(--bg-gray);
    padding: 10px 0;
    font-size: 14px;
    text-align: center;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 1px;
    font-family: 'Exo 2', sans-serif;
    text-transform: uppercase;
}

.logo:hover {
    color: var(--primary-hover);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 10px;
    align-items: center;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color var(--transition);
    padding: 10px 14px;
    display: block;
    white-space: nowrap;
}

.nav-menu > li > a:hover {
    color: var(--primary);
}

/* Search Button */
.search-btn {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 18px;
    cursor: pointer;
    padding: 10px 12px;
    transition: all var(--transition);
}

.search-btn:hover {
    color: var(--primary);
    transform: scale(1.1);
}

/* Desktop Search Form */
.desktop-search-form {
    position: relative;
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease;
}

.desktop-search-form.active {
    width: 300px;
    margin-right: 10px;
}

.desktop-search-input {
    width: 100%;
    padding: 10px 40px 10px 20px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    outline: none;
    font-family: 'Montserrat', Arial, sans-serif;
    transition: border-color 0.3s ease;
}

.desktop-search-input:focus {
    border-color: var(--primary);
}

.desktop-search-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.desktop-search-close:hover {
    color: #ff7043;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-circle);
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 112, 67, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.scroll-to-top:hover {
    background-color: var(--primary-hover);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 112, 67, 0.4);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: #263238;
    font-size: 18px;
    cursor: pointer;
    padding: 10px 12px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Auth Button */
.auth-btn {
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', Arial, sans-serif;
    white-space: nowrap;
}

.auth-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.auth-btn i {
    margin-right: 6px;
}

/* Dark Theme */
body.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

/* Ссылки в темной теме */
body.dark-theme a {
    color: #ff9966;
}

body.dark-theme a:hover {
    color: #ffaa77;
}

body.dark-theme a:active {
    color: #ff8855;
}

body.dark-theme .header {
    background-color: var(--bg-dark-card);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

body.dark-theme .header-top {
    background-color: #252525;
}

body.dark-theme .logo {
    color: #ff7043;
}

body.dark-theme .nav-menu > li > a,
body.dark-theme .mobile-menu-toggle,
body.dark-theme .search-btn,
body.dark-theme .theme-toggle {
    color: var(--text-light);
}

body.dark-theme .auth-btn {
    background-color: var(--primary);
}

body.dark-theme .auth-btn:hover {
    background-color: var(--primary-hover);
}

body.dark-theme .dropdown-menu {
    background-color: var(--bg-dark-card);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

body.dark-theme .dropdown-menu a {
    color: var(--text-light);
}

body.dark-theme .dropdown-menu a:hover {
    background-color: var(--bg-dark-hover);
}

body.dark-theme .hero {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

body.dark-theme .card {
    background-color: var(--bg-dark-card);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

body.dark-theme .card-title {
    color: var(--text-light);
}

body.dark-theme .card-text {
    color: #b0b0b0;
}

body.dark-theme .section-title {
    color: var(--text-light);
}

body.dark-theme .footer {
    background-color: var(--bg-dark);
}

body.dark-theme .desktop-search-input,
body.dark-theme .mobile-search-input {
    background-color: var(--bg-dark-hover);
    color: var(--text-light);
    border-color: #555;
}

body.dark-theme .mobile-search {
    background-color: var(--bg-dark-card);
}

body.dark-theme .nav-menu .theme-toggle {
    background-color: var(--bg-dark-hover);
    color: var(--text-light);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #263238;
    color: #fff;
    padding: 15px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
    z-index: 999;
    display: none;
    animation: slideUp 0.4s ease;
}

.cookie-banner.show {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-text i {
    font-size: 24px;
    color: #ff7043;
}

.cookie-link {
    color: #ff7043;
    text-decoration: none;
    margin-left: 5px;
    transition: color 0.3s ease;
}

.cookie-link:hover {
    color: #ff5722;
    text-decoration: underline;
}

.cookie-accept {
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', Arial, sans-serif;
    white-space: nowrap;
}

.cookie-accept:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

body.dark-theme .cookie-banner {
    background-color: var(--bg-dark);
    border-top: 1px solid #3d3d3d;
}

/* Latest Articles Grid */
.latest-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.latest-article-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.latest-article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.latest-article-image {
    width: 100%;
    height: 250px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.latest-article-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
    transition: opacity 0.3s ease;
}

.latest-article-card:hover .latest-article-image::after {
    opacity: 0.7;
}

.latest-article-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.latest-article-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #263238;
    line-height: 1.3;
}

.latest-article-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #999;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

.latest-article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.latest-article-meta i {
    font-size: 12px;
}

/* Dark theme для latest articles */
body.dark-theme .latest-article-card {
    background-color: var(--bg-dark-card);
}

body.dark-theme .latest-article-title {
    color: var(--text-light);
}

body.dark-theme .latest-article-meta {
    border-top-color: #3d3d3d;
    color: #999;
}

/* === LOGIN MODAL === */

/* Overlay */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Window */
.login-modal {
    background: #fff;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.login-modal-overlay.active .login-modal {
    transform: scale(1);
}

.login-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 5px;
    line-height: 1;
}

.login-modal-close:hover {
    color: #ff7043;
}

/* Header */
.login-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #263238;
    margin-bottom: 8px;
}

.login-modal-subtitle {
    color: #666;
    font-size: 14px;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
}

.login-input-group {
    margin-bottom: 20px;
}

.login-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #263238;
    margin-bottom: 8px;
}

.login-label i {
    color: #ff7043;
    margin-right: 6px;
}

.login-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Montserrat', Arial, sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.login-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 112, 67, 0.1);
}

.login-input::placeholder {
    color: #999;
}

/* Options */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.login-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.login-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.login-forgot {
    color: #ff7043;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-forgot:hover {
    color: #ff5722;
    text-decoration: underline;
}

/* Submit Button */
.login-submit {
    width: 100%;
    padding: 15px;
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', Arial, sans-serif;
    box-shadow: 0 4px 15px rgba(255, 112, 67, 0.3);
}

.login-submit:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 112, 67, 0.4);
}

.login-submit i {
    margin-right: 8px;
}

/* Divider */
.login-divider {
    position: relative;
    text-align: center;
    margin: 25px 0;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.login-divider span {
    position: relative;
    background: #fff;
    padding: 0 15px;
    color: #999;
    font-size: 14px;
}

/* Social Login */
.login-social {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.login-social-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', Arial, sans-serif;
    color: #fff;
}

.login-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.login-social-btn i {
    margin-right: 6px;
}

.login-social-vk {
    background-color: #4680C2;
}

.login-social-google {
    background-color: #DB4437;
}

/* Register Link */
.login-register {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.login-register-link {
    color: #ff7043;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-register-link:hover {
    color: #ff5722;
    text-decoration: underline;
}

.login-terms {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 12px;
    text-align: center;
    color: #999;
    line-height: 1.5;
}

.login-terms a {
    color: #ff7043;
    text-decoration: none;
}

.login-terms a:hover {
    text-decoration: underline;
}

/* Dark Theme */
body.dark-theme .login-modal {
    background-color: var(--bg-dark-card);
}

body.dark-theme .login-modal-title {
    color: var(--text-light);
}

body.dark-theme .login-modal-subtitle {
    color: #b0b0b0;
}

body.dark-theme .login-label {
    color: var(--text-light);
}

body.dark-theme .login-input {
    background-color: var(--bg-dark-hover);
    color: var(--text-light);
    border-color: #555;
}

body.dark-theme .login-checkbox {
    color: #b0b0b0;
}

body.dark-theme .login-divider::before {
    background: #555;
}

body.dark-theme .login-divider span {
    background: #2d2d2d;
}

body.dark-theme .login-register {
    color: #b0b0b0;
}

body.dark-theme .login-terms {
    border-top-color: #3d3d3d;
    color: #888;
}

body.dark-theme .login-terms a {
    color: #ff9966;
}

/* Адаптивность */
@media (max-width: 480px) {
    .login-modal {
        padding: 30px 20px;
    }

    .login-social {
        flex-direction: column;
    }

    .login-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* === PAGINATION / NAVIGATION === */

.navi {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 40px 0;
    padding: 20px 0;
}

/* Общие стили для всех элементов */
.navi > * {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #263238;
}

/* Ссылки на страницы */
.navi a,
.navi-page {
    cursor: pointer;
}

.navi a:hover,
.navi-page:hover {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

/* Текущая страница */
.navi-current,
.navi > span:not(.nav_ext):not(.navi-prev):not(.navi-next) {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 112, 67, 0.3);
}

/* Многоточие */
.nav_ext {
    border: none !important;
    background: none !important;
    color: #999 !important;
    cursor: default;
    min-width: auto !important;
}

/* Кнопки Назад/Далее */
.navi-prev,
.navi-next {
    padding: 0 16px !important;
    gap: 6px;
}

.navi-prev.disabled,
.navi-next.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.navi-prev:not(.disabled):hover,
.navi-next:not(.disabled):hover {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Dark Theme */
body.dark-theme .navi > * {
    background-color: var(--bg-dark-card);
    color: var(--text-light);
    border-color: #555;
}

body.dark-theme .navi a:hover,
body.dark-theme .navi-page:hover {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

body.dark-theme .navi-current,
body.dark-theme .navi > span:not(.nav_ext):not(.navi-prev):not(.navi-next) {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

body.dark-theme .nav_ext {
    background: none !important;
    border: none !important;
    color: #666 !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .navi {
        gap: 5px;
        padding: 15px 0;
    }

    .navi > * {
        min-width: 38px;
        height: 38px;
        font-size: 14px;
        padding: 0 10px;
    }

    .navi-prev,
    .navi-next {
        padding: 0 12px !important;
    }

    /* Скрываем некоторые страницы на мобильных для компактности */
    .navi a:nth-child(n+6):nth-child(-n+10) {
        display: none;
    }
}

@media (max-width: 480px) {
    .navi > * {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }

    /* Показываем только текущую, соседние и крайние страницы */
    .navi a:not(.navi-prev):not(.navi-next) {
        display: none;
    }

    .navi a:nth-child(2),
    .navi a:nth-child(3),
    .navi a:last-of-type:not(.navi-next) {
        display: inline-flex;
    }
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: ' ▾';
    font-size: 12px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 280px;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 12px 25px;
    color: #263238;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown-menu a i {
    margin-right: 10px;
    font-size: 13px;
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: #ff7043;
    border-left-color: #ff7043;
    padding-left: 30px;
}

.dropdown-menu a:hover i {
    opacity: 1;
}

/* Multi-column Dropdown for large menus */
.dropdown-menu.mega-menu {
    min-width: 600px;
    max-width: 800px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 20px;
}

.mega-menu .menu-column {
    padding: 0;
}

.mega-menu .column-title {
    font-weight: 600;
    color: #ff7043;
    padding: 10px 15px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #f5f5f5;
    margin-bottom: 10px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #263238;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Search */
.mobile-search {
    display: none;
    padding: 12px 15px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-search-form {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.mobile-search-input {
    flex: 1;
    padding: 10px 15px;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    outline: none;
    font-family: 'Montserrat', Arial, sans-serif;
    transition: border-color 0.3s ease;
}

.mobile-search-input:focus {
    border-color: var(--primary);
}

.mobile-search-btn {
    width: 38px;
    height: 38px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-circle);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 112, 67, 0.3);
}

.mobile-search-btn:hover {
    background: var(--gradient-primary-hover);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 112, 67, 0.4);
}

.mobile-search-btn:active {
    transform: scale(1);
}

/* Hero Section */
.hero {
    margin-top: 130px;
    padding: 80px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.95;
}

.hero-btn {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--primary);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 112, 67, 0.3);
}

.hero-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 112, 67, 0.4);
}

/* Content Section */
.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
}

/* Отступ сверху для контента на не-главных страницах */
body:not(.main-page) .content {
    padding-top: 100px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    color: #263238;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.card-icon-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-icon-bg i {
    font-size: 64px;
    color: #fff;
    opacity: 0.95;
    transition: transform 0.3s ease;
}

.card:hover .card-icon-bg i {
    transform: scale(1.1);
}

.card-content {
    padding: 25px;
}

.card-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #263238;
}

.card-text {
    color: #666;
    line-height: 1.7;
    font-size: 15px;
}

/* Footer */
.footer {
    background-color: #263238;
    color: #fff;
    padding: 40px;
    text-align: center;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ff7043;
}

.footer-copyright {
    margin-top: 20px;
    opacity: 0.8;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .nav-menu {
        gap: 5px;
    }
    
    .nav-menu > li > a {
        font-size: 13px;
        padding: 10px 12px;
    }
}

@media (max-width: 1200px) {
    .nav-menu {
        gap: 3px;
    }
    
    .nav-menu > li > a {
        font-size: 13px;
        padding: 10px 10px;
    }
}

@media (max-width: 968px) {
    .cookie-banner {
        padding: 12px 10px;
    }

    .cookie-content {
        gap: 15px;
    }

    .cookie-text {
        font-size: 13px;
        gap: 8px;
    }

    .cookie-text i {
        font-size: 20px;
    }

    .cookie-accept {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 15px 15px;
    }

    .cookie-banner {
        padding: 10px;
    }

    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 12px;
    }

    .cookie-text {
        flex-direction: column;
        text-align: center;
        font-size: 12px;
    }

    .cookie-accept {
        width: 100%;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 12px 15px;
        gap: 15px;
    }

    .logo {
        font-size: 20px;
    }

    .mobile-menu-toggle {
        font-size: 24px;
    }

    .cookie-banner {
        padding: 8px;
    }

    .cookie-text {
        font-size: 11px;
    }

    .cookie-text i {
        font-size: 18px;
    }
}

@media (max-width: 968px) {
    .nav-container {
        padding: 15px 20px;
        gap: 20px;
    }

    .logo {
        font-size: 22px;
    }

    .mobile-menu-toggle {
        display: block;
        flex-shrink: 0;
    }

    .search-btn {
        display: none;
    }

    .desktop-search-form {
        display: none;
    }

    .mobile-menu-overlay.active {
        display: block;
    }

    .mobile-search {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 90%;
        max-width: 350px;
        height: calc(100vh - 70px);
        background-color: #fff;
        flex-direction: column;
        padding: 0;
        gap: 0;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        overflow-y: auto;
        align-items: stretch;
        z-index: 999;
        pointer-events: none;
    }

    .nav-menu.active {
        left: 0;
        pointer-events: auto;
    }

    body.dark-theme .nav-menu {
        background-color: var(--bg-dark);
        box-shadow: 2px 0 10px rgba(0,0,0,0.5);
    }

    .nav-menu > li {
        border-bottom: 1px solid #f0f0f0;
    }

    body.dark-theme .nav-menu > li {
        border-bottom-color: #3d3d3d;
    }

    .nav-menu > li > a {
        padding: 15px 20px;
    }

    /* Мобильные кнопки темы и авторизации */
    .nav-menu .theme-toggle {
        width: calc(100% - 40px);
        margin: 10px 20px 15px;
        padding: 12px 20px;
        background-color: #f5f5f5;
        border-radius: 8px;
        font-size: 16px;
        text-align: center;
    }

    body.dark-theme .nav-menu .theme-toggle {
        background-color: var(--bg-dark-card);
    }

    .nav-menu .auth-btn {
        width: calc(100% - 40px);
        margin: 10px 20px 15px;
        padding: 12px 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background-color: #f9f9f9;
    }

    .dropdown.active .dropdown-menu {
        max-height: 1000px;
    }

    .dropdown-menu.mega-menu {
        min-width: auto;
        grid-template-columns: 1fr;
        padding: 10px 0;
    }

    .dropdown-toggle::after {
        float: right;
    }

    /* Адаптивная ширина меню для разных экранов */
    @media (max-width: 768px) {
        .nav-menu {
            width: 85%;
            max-width: 320px;
        }
    }

    @media (max-width: 480px) {
        .nav-menu {
            width: 88%;
            max-width: 290px;
        }
    }

    @media (max-width: 360px) {
        .nav-menu {
            width: 90%;
            max-width: 270px;
        }
    }

    .hero {
        margin-top: 100px;
        padding: 60px 20px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .content {
        padding: 40px 5px;
    }

    .section-title {
        font-size: 28px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .latest-articles-grid {
        grid-template-columns: 1fr;
    }

    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 20px;
    }
}

/* User Profile Dropdown */
.user-profile-dropdown {
    position: relative;
}

.user-logged {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-circle);
    object-fit: cover;
}

.user-logged i {
    font-size: 12px;
    margin-left: 5px;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-circle);
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 16px;
    font-weight: 700;
    color: #263238;
    margin-bottom: 5px;
}

.user-profile-link {
    font-size: 13px;
    color: #ff7043;
    text-decoration: none;
}

.user-profile-link:hover {
    text-decoration: underline;
}

.user-dropdown-list {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.user-dropdown-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #263238;
    text-decoration: none;
    transition: all 0.2s ease;
}

.user-dropdown-list li a:hover {
    background-color: #f5f5f5;
    color: #ff7043;
}

.user-dropdown-list li a i {
    width: 20px;
    text-align: center;
    color: #ff7043;
}

.badge {
    background-color: var(--primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 5px;
}

.user-dropdown-footer {
    padding: 15px 20px;
    border-top: 2px solid #f0f0f0;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background-color: #f44336;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background-color: #da190b;
}

/* Dark theme for user dropdown */
body.dark-theme .user-dropdown-menu {
    background-color: var(--bg-dark-card);
}

body.dark-theme .user-dropdown-header {
    border-bottom-color: #3d3d3d;
}

body.dark-theme .user-name {
    color: var(--text-light);
}

body.dark-theme .user-dropdown-list li a {
    color: var(--text-light);
}

body.dark-theme .user-dropdown-list li a:hover {
    background-color: var(--bg-dark-hover);
}

body.dark-theme .user-dropdown-footer {
    border-top-color: #3d3d3d;
}

/* Адаптивность для планшетов */
@media (max-width: 1024px) {
    .latest-articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Mobile adaptations for user dropdown */
@media (max-width: 968px) {
    .user-dropdown-menu {
        position: fixed;
        top: 130px;
        right: 0;
        left: auto;
        width: 100%;
        max-width: 320px;
        border-radius: 0;
    }
}

/* === РЕГИСТРАЦИЯ === */

/* Контейнер регистрации */
.registration-container {
    max-width: 600px;
    margin: 140px auto 60px;
    padding: 0 20px;
}

.registration-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    padding: 40px;
}

/* Заголовок */
.registration-header {
    text-align: center;
    margin-bottom: 30px;
}

.registration-title {
    font-size: 32px;
    font-weight: 700;
    color: #263238;
    margin-bottom: 10px;
}

.registration-subtitle {
    font-size: 16px;
    color: #666;
}

/* Вступительный текст */
.registration-intro {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    font-size: 14px;
    line-height: 1.6;
}

.registration-intro p {
    margin-bottom: 10px;
}

.registration-intro p:last-child {
    margin-bottom: 0;
}

.registration-intro a {
    color: #2196f3;
    font-weight: 600;
}

.validation-intro {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left-color: #ff9800;
}

/* Группы полей */
.reg-input-group {
    margin-bottom: 20px;
}

.reg-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #263238;
    margin-bottom: 8px;
}

.reg-label i {
    color: #ff7043;
    width: 16px;
}

.required {
    color: #f44336;
    margin-left: 4px;
}

/* Поля ввода */
.reg-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Montserrat', Arial, sans-serif;
    transition: all 0.3s ease;
}

.reg-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 112, 67, 0.1);
}

.reg-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Montserrat', Arial, sans-serif;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 120px;
}

.reg-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 112, 67, 0.1);
}

.reg-input-file {
    width: 100%;
    padding: 10px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reg-input-file:hover {
    border-color: var(--primary);
    background-color: #fff3e0;
}

/* Поле с кнопкой проверки */
.reg-input-with-button {
    display: flex;
    gap: 10px;
}

.reg-input-with-button .reg-input {
    flex: 1;
}

.reg-check-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Montserrat', Arial, sans-serif;
}

.reg-check-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.reg-hint {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

/* Защита от спама */
.reg-security-group {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.reg-security-question {
    margin-top: 15px;
}

.security-question-text {
    background: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 3px solid #ff9800;
}

.reg-security-captcha {
    margin-top: 15px;
}

.captcha-image {
    margin-bottom: 12px;
    text-align: center;
}

.captcha-image img {
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.reg-security-recaptcha {
    margin-top: 15px;
}

/* Чекбокс соглашения */
.reg-agreement {
    margin: 25px 0;
}

.reg-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    color: #666;
}

.reg-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.reg-checkbox span {
    flex: 1;
}

.reg-checkbox a {
    color: #ff7043;
    font-weight: 600;
}

.reg-checkbox a:hover {
    text-decoration: underline;
}

/* Кнопка отправки */
.reg-submit-group {
    margin-top: 30px;
}

.reg-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', Arial, sans-serif;
    box-shadow: 0 4px 15px rgba(255, 112, 67, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.reg-submit-btn:hover {
    background: var(--gradient-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 112, 67, 0.4);
}

.reg-submit-btn:active {
    transform: translateY(0);
}

/* Ссылка на вход */
.reg-login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.reg-login-link-text {
    color: #ff7043;
    font-weight: 600;
    text-decoration: none;
}

.reg-login-link-text:hover {
    text-decoration: underline;
}

/* Темная тема для регистрации */
body.dark-theme .registration-card {
    background: #2d2d2d;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

body.dark-theme .registration-title {
    color: var(--text-light);
}

body.dark-theme .registration-subtitle {
    color: #b0b0b0;
}

body.dark-theme .registration-intro {
    background: linear-gradient(135deg, #2d3748 0%, #1e293b 100%);
    border-left-color: #64b5f6;
}

body.dark-theme .validation-intro {
    background: linear-gradient(135deg, #3d3d3d 0%, #2d2d2d 100%);
    border-left-color: #ffb74d;
}

body.dark-theme .reg-label {
    color: var(--text-light);
}

body.dark-theme .reg-input,
body.dark-theme .reg-textarea {
    background: #3d3d3d;
    border-color: #555;
    color: var(--text-light);
}

body.dark-theme .reg-input:focus,
body.dark-theme .reg-textarea:focus {
    border-color: #ff9966;
    box-shadow: 0 0 0 3px rgba(255, 153, 102, 0.1);
}

body.dark-theme .reg-input-file {
    background: #3d3d3d;
    border-color: #555;
    color: var(--text-light);
}

body.dark-theme .reg-input-file:hover {
    border-color: #ff9966;
    background-color: #4a4a4a;
}

body.dark-theme .reg-security-group {
    background: #3d3d3d;
}

body.dark-theme .security-question-text {
    background: #2d2d2d;
    border-left-color: #ffb74d;
    color: var(--text-light);
}

body.dark-theme .reg-checkbox {
    color: #b0b0b0;
}

body.dark-theme .reg-checkbox a {
    color: #ff9966;
}

body.dark-theme .reg-login-link {
    color: #b0b0b0;
}

body.dark-theme .reg-login-link-text {
    color: #ff9966;
}

/* Адаптивность для регистрации */
@media (max-width: 768px) {
    .registration-container {
        margin-top: 120px;
    }
    
    .registration-card {
        padding: 30px 20px;
    }
    
    .registration-title {
        font-size: 26px;
    }
    
    .registration-subtitle {
        font-size: 14px;
    }
    
    .reg-input-with-button {
        flex-direction: column;
    }
    
    .reg-check-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .registration-card {
        padding: 25px 15px;
    }
    
    .registration-title {
        font-size: 22px;
    }
}

/* === СТРАНИЦА ПОИСКА === */

.search-page-container {
    max-width: 1200px;
    margin: 140px auto 60px;
    padding: 0 40px;
}

.search-page-header {
    text-align: center;
    margin-bottom: 40px;
}

.search-page-title {
    font-size: 36px;
    font-weight: 700;
    color: #263238;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.search-page-title i {
    color: #ff7043;
}

.search-page-subtitle {
    font-size: 16px;
    color: #666;
}

/* Переопределение стилей таблицы поиска DLE */
.searchtable {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.searchtable table {
    width: 100%;
    border-collapse: collapse;
}

.searchtable td.search {
    padding: 25px;
    vertical-align: top;
    border: none;
}

.searchtable fieldset {
    border: 2px solid #f0f0f0;
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 0 0 20px 0;
    background: #fafafa;
}

.searchtable legend {
    font-weight: 700;
    font-size: 15px;
    color: #ff7043;
    padding: 0 12px;
    background: #fff;
    border-radius: 20px;
    border: 2px solid #ff7043;
}

/* Поля ввода в форме поиска */
.searchtable input.textin,
.searchtable input[type="text"],
.searchtable select.textin,
.searchtable select {
    width: 100%;
    max-width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Montserrat', Arial, sans-serif;
    transition: all 0.3s ease;
    background: #fff;
}

.searchtable input.textin:focus,
.searchtable input[type="text"]:focus,
.searchtable select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 112, 67, 0.1);
}

.searchtable select[multiple] {
    min-height: 150px;
    padding: 8px;
}

/* Чекбоксы и радио */
.searchtable label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
    cursor: pointer;
    font-size: 14px;
    color: #263238;
}

.searchtable input[type="checkbox"],
.searchtable input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Кнопки поиска */
.searchtable input.bbcodes,
.searchtable input[type="button"] {
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Montserrat', Arial, sans-serif;
    transition: all 0.3s ease;
    width: auto;
    max-width: none;
}

.searchtable input[name="dosearch"] {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-primary);
}

.searchtable input[name="dosearch"]:hover {
    background: var(--gradient-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 112, 67, 0.4);
}

.searchtable input[name="doclear"] {
    background: #f5f5f5;
    color: #666;
}

.searchtable input[name="doclear"]:hover {
    background: #e0e0e0;
    color: #263238;
}

/* Результаты поиска */
.search-results-info {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
    border-radius: 8px;
    font-size: 15px;
}

/* Темная тема */
body.dark-theme .search-page-title {
    color: var(--text-light);
}

body.dark-theme .search-page-subtitle {
    color: #b0b0b0;
}

body.dark-theme .searchtable {
    background: #2d2d2d;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

body.dark-theme .searchtable fieldset {
    border-color: #3d3d3d;
    background: #3d3d3d;
}

body.dark-theme .searchtable legend {
    background: #2d2d2d;
    border-color: #ff9966;
    color: #ff9966;
}

body.dark-theme .searchtable input.textin,
body.dark-theme .searchtable input[type="text"],
body.dark-theme .searchtable select {
    background: #3d3d3d;
    border-color: #555;
    color: var(--text-light);
}

body.dark-theme .searchtable input:focus,
body.dark-theme .searchtable select:focus {
    border-color: #ff9966;
    box-shadow: 0 0 0 3px rgba(255, 153, 102, 0.1);
}

body.dark-theme .searchtable label {
    color: var(--text-light);
}

body.dark-theme .searchtable input[name="doclear"] {
    background: #3d3d3d;
    color: var(--text-light);
}

body.dark-theme .searchtable input[name="doclear"]:hover {
    background: #4a4a4a;
}

body.dark-theme .search-results-info {
    background: linear-gradient(135deg, #2d3748 0%, #1e293b 100%);
    border-left-color: #64b5f6;
    color: var(--text-light);
}

/* Адаптивность */
@media (max-width: 968px) {
    .search-page-container {
        margin-top: 120px;
        padding: 0 20px;
    }
    
    .search-page-title {
        font-size: 28px;
    }
    
    .searchtable td.search {
        display: block;
        width: 100%;
        padding: 15px;
    }
    
    .searchtable tr {
        display: block;
    }
    
    .searchtable input.bbcodes,
    .searchtable input[type="button"] {
        width: 100%;
        margin: 10px 0 !important;
    }
}

@media (max-width: 480px) {
    .search-page-title {
        font-size: 24px;
        flex-direction: column;
        gap: 10px;
    }
    
    .searchtable fieldset {
        padding: 15px;
    }
}

/* === ВСПЛЫВАЮЩИЙ ПРОФИЛЬ (profile_popup.tpl) === */

.profile-popup {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    min-width: 320px;
    max-width: 400px;
}

.profile-popup-header {
    position: relative;
    padding: 25px;
    background: var(--gradient-primary);
    text-align: center;
}

.profile-popup-avatar {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-circle);
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    object-fit: cover;
}

.profile-popup-status {
    margin-top: 12px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-online {
    background: #4caf50;
    color: #fff;
}

.status-offline {
    background: #fff;
    color: #666;
}

.profile-popup-body {
    padding: 25px;
}

.profile-popup-name {
    font-size: 22px;
    font-weight: 700;
    color: #263238;
    margin-bottom: 20px;
    text-align: center;
}

.profile-popup-info {
    margin-bottom: 20px;
}

.profile-popup-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.profile-popup-item:last-child {
    border-bottom: none;
}

.profile-popup-item i {
    color: #ff7043;
    width: 18px;
    text-align: center;
}

.info-label {
    color: #999;
    min-width: 120px;
}

.info-value {
    color: #263238;
    font-weight: 600;
}

.profile-popup-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-radius: 10px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #263238;
}

.stat-label {
    font-size: 12px;
    color: #666;
}

.profile-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* === СТРАНИЦА ПРОФИЛЯ (userinfo.tpl) === */

.user-profile-container {
    max-width: 900px;
    margin: 140px auto 60px;
    padding: 0 20px;
}

.user-profile-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.user-profile-header {
    background: var(--gradient-primary);
    padding: 40px 30px;
    display: flex;
    gap: 30px;
    align-items: center;
}

.user-profile-avatar-section {
    text-align: center;
}

.user-profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-circle);
    border: 5px solid #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    object-fit: cover;
}

.user-profile-status {
    margin-top: 15px;
}

.user-profile-info {
    flex: 1;
    color: #fff;
}

.user-profile-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.user-profile-fullname,
.user-profile-group {
    font-size: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.95;
}

.user-profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 30px;
    background: #fafafa;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.stat-box .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
}

.stat-details {
    flex: 1;
}

.stat-box .stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #263238;
    margin-bottom: 4px;
}

.stat-box .stat-label {
    font-size: 13px;
    color: #999;
}

.user-profile-details {
    padding: 30px;
}

.user-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.user-detail-item:last-child {
    border-bottom: none;
}

.user-detail-item i {
    color: #ff7043;
    width: 20px;
    margin-top: 2px;
}

.detail-label {
    color: #999;
    min-width: 150px;
    font-weight: 600;
}

.detail-value {
    color: #263238;
    flex: 1;
}

.user-detail-about {
    flex-direction: column;
    align-items: flex-start;
}

.user-detail-about .detail-value {
    margin-top: 8px;
    line-height: 1.6;
}

.user-profile-actions {
    padding: 20px 30px 30px;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.user-edit-toggle {
    padding: 0 30px 30px;
}

/* === ФОРМА РЕДАКТИРОВАНИЯ ПРОФИЛЯ === */

.profile-edit-container {
    max-width: 800px;
    margin: 30px auto;
}

.profile-edit-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 40px;
}

.profile-edit-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.profile-edit-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: #263238;
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-edit-header i {
    color: #ff7043;
}

.form-section {
    margin-bottom: 35px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #ff7043;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ffe0b2;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #263238;
    margin-bottom: 8px;
}

.form-label i {
    color: #ff7043;
    width: 18px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Montserrat', Arial, sans-serif;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 112, 67, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-input-file {
    width: 100%;
    padding: 10px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-input-file:hover {
    border-color: var(--primary);
    background-color: #fff3e0;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #999;
}

.form-hint a {
    color: #ff7043;
    font-weight: 600;
}

.form-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-warning {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    padding: 15px;
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.form-warning i {
    color: #ff9800;
    margin-top: 2px;
}

.form-submit-group {
    margin-top: 30px;
}

.form-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', Arial, sans-serif;
    box-shadow: 0 4px 15px rgba(255, 112, 67, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-submit-btn:hover {
    background: var(--gradient-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 112, 67, 0.4);
}

/* === ВОССТАНОВЛЕНИЕ ПАРОЛЯ (lostpassword.tpl) === */

.lostpass-container {
    max-width: 500px;
    margin: 140px auto 60px;
    padding: 0 20px;
}

.lostpass-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    padding: 40px;
}

.lostpass-header {
    text-align: center;
    margin-bottom: 35px;
}

.lostpass-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(255, 112, 67, 0.3);
}

.lostpass-icon i {
    font-size: 32px;
    color: #fff;
}

.lostpass-title {
    font-size: 28px;
    font-weight: 700;
    color: #263238;
    margin-bottom: 10px;
}

.lostpass-subtitle {
    font-size: 15px;
    color: #666;
    line-height: 1.5;
}

.lostpass-input-group {
    margin-bottom: 25px;
}

.lostpass-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #263238;
    margin-bottom: 8px;
}

.lostpass-label i {
    color: #ff7043;
    width: 18px;
}

.lostpass-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Montserrat', Arial, sans-serif;
    transition: all 0.3s ease;
}

.lostpass-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 112, 67, 0.1);
}

.lostpass-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

.lostpass-security-group {
    background: #f9f9f9;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 25px;
}

.lostpass-captcha {
    margin-top: 15px;
}

.lostpass-submit-group {
    margin-bottom: 20px;
}

.lostpass-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', Arial, sans-serif;
    box-shadow: 0 4px 15px rgba(255, 112, 67, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.lostpass-submit-btn:hover {
    background: var(--gradient-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 112, 67, 0.4);
}

.lostpass-back-link {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    font-size: 14px;
}

.lostpass-back-link a {
    color: #ff7043;
    font-weight: 600;
    text-decoration: none;
}

.lostpass-back-link a:hover {
    text-decoration: underline;
}

.lostpass-back-link .separator {
    margin: 0 15px;
    color: var(--text-light);
}

.lostpass-info {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    font-size: 14px;
}

.lostpass-info i {
    color: #2196f3;
    font-size: 20px;
    margin-top: 2px;
}

.lostpass-info ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.lostpass-info li {
    margin-bottom: 5px;
}

.lostpass-info a {
    color: #2196f3;
    font-weight: 600;
}

/* Темная тема для профилей */
body.dark-theme .profile-popup,
body.dark-theme .user-profile-card,
body.dark-theme .profile-edit-card,
body.dark-theme .lostpass-card {
    background: #2d2d2d;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

body.dark-theme .profile-popup-name,
body.dark-theme .user-profile-name,
body.dark-theme .lostpass-title {
    color: var(--text-light);
}

body.dark-theme .profile-popup-item,
body.dark-theme .user-detail-item {
    border-bottom-color: #3d3d3d;
}

body.dark-theme .info-value,
body.dark-theme .detail-value,
body.dark-theme .stat-value {
    color: var(--text-light);
}

body.dark-theme .stat-item,
body.dark-theme .stat-box {
    background: #3d3d3d;
}

body.dark-theme .user-profile-stats {
    background: #2d2d2d;
}

body.dark-theme .form-input,
body.dark-theme .form-textarea,
body.dark-theme .lostpass-input {
    background: #3d3d3d;
    border-color: #555;
    color: var(--text-light);
}

/* === LENKINO VIDEO DESIGN STYLES === */

/* Container */
.ctnr {
    --vns-ctnr-w: 100%;
    margin: 0 auto;
    max-width: var(--vns-ctnr-w);
    padding: var(--vns-pad-y) var(--vns-pad-x);
}

/* Grid system */
.grd {
    display: grid;
    grid-template-columns: repeat(var(--vns-grd-i), 1fr);
    gap: var(--vns-gap-y) var(--vns-gap-x);
}

/* Video grid specific */
.grd-vid {
    --vns-grd-i: 4;
}

.grd-vid .item {
    position: relative;
}

/* Item styles */
.item {
    border-radius: 1rem;
    overflow: hidden;
    background: var(--vns-bg-sec);
    transition: transform 0.3s ease;
}

.item:hover {
    transform: scale(1.03);
}

.item a {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Item image with video preview */
.itm-img {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 1rem;
    background: var(--vns-bg-sec);
}

.itm-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.itm-img video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.itm-img:hover img {
    opacity: 0;
}

.itm-img:hover video {
    opacity: 1;
}

/* Item duration */
.itm-dur {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Item title */
.itm-tit {
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--vns-pri);
    margin: 0;
}

/* Item options */
.itm-opt {
    display: flex;
    gap: 0.75rem;
    padding: 0 0.75rem 0.75rem;
    font-size: 0.75rem;
    color: var(--vns-lgr);
}

.itm-opt li {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.itm-opt-mdl {
    color: var(--vns-sec);
    border-radius: 0.25rem;
    padding: 0.125rem 0.25rem;
    margin: 0 -0.25rem;
    transition: background-color 0.2s ease;
}

.itm-opt-mdl:hover {
    background: var(--vns-ter-inv);
    color: var(--vns-ter);
}

/* Section styles */
.sxn {
    background: var(--vns-bg-sec);
    border-radius: 1.5rem;
    margin-top: 0.5rem;
    padding: var(--vns-pad-y) var(--vns-pad-x);
}

.sxn-tit {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: var(--vns-gap-y);
}

.sxn-tit h2 {
    font-size: var(--vns-fnt-hfs);
    font-weight: 400;
    line-height: var(--vns-fnt-hlh);
    margin: 0;
    color: var(--vns-pri);
}

/* Header styles */
.hdr {
    background: var(--vns-bg-sec);
    height: var(--vns-hdr-hgt);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 888;
}

.hdr .ctnr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: inherit;
    gap: 1rem 0;
    padding: 0 var(--vns-pad-x);
}

.logo {
    margin-right: auto;
    margin-left: 1.25rem;
}

.logo a {
    display: block;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--vns-ter);
    font-weight: 500;
}

/* Navigation menu */
.hdr-mnu {
    display: none;
    background: rgba(30,32,36,0.7);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    width: 100%;
}

.hdr-mnu ul {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-size: 1.5rem;
    line-height: 1;
    padding: 6rem var(--vns-pad-x) 2.5rem;
}

.hdr-mnu a {
    color: var(--vns-pri-inv);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hdr-mnu a:hover {
    color: var(--vns-sec);
}

/* Hamburger menu */
.ham {
    display: block;
    height: 1.25rem;
    position: relative;
    width: 1.25rem;
    z-index: 90;
    background: none;
    border: none;
    cursor: pointer;
}

.ham::after,
.ham::before {
    background: var(--vns-pri);
    border-radius: 0.125rem;
    content: "";
    display: block;
    height: 0.125rem;
    position: absolute;
    transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
    width: inherit;
}

.ham::before {
    transform: translateY(-0.25rem);
}

.ham::after {
    transform: translateY(0.25rem);
}

.open .ham::before {
    transform: rotate(45deg) translateY(0);
}

.open .ham::after {
    transform: rotate(-45deg) translateY(0);
}

/* Search form */
.sch-frm {
    background: var(--vns-btn-sec);
    color: var(--vns-pri);
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0 var(--vns-pad-x);
    border-radius: 1rem;
    gap: var(--vns-frm-gap);
}

.sch-frm input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    color: inherit;
}

.sch-frm button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

/* Buttons */
.btn {
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1rem;
    padding: 0 0.75rem;
    height: var(--vns-btn-siz);
}

.btn-p {
    background: var(--vns-ter);
    color: var(--vns-pri-inv);
}

.btn-p:hover {
    background: var(--vns-btn-pri-hov);
}

.btn-s {
    background: var(--vns-btn-sec);
    color: var(--vns-pri);
}

.btn-s:hover {
    background: var(--vns-btn-sec-hov);
}

/* Responsive design */
@media (min-width: 576px) {
    .grd-vid {
        --vns-grd-i: 2;
    }
}

@media (min-width: 768px) {
    .grd-vid {
        --vns-grd-i: 3;
    }

    .hdr-mnu {
        display: flex;
        align-items: center;
        background: transparent;
        position: relative;
        flex: 1;
        justify-content: center;
    }

    .hdr-mnu ul {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
        font-size: 0.75rem;
        padding: 0;
        width: 100%;
    }

    .hdr-mnu li {
        flex: 0 0 5.5rem;
    }

    .hdr-mnu a {
        align-items: center;
        color: var(--vns-pri);
    }

    .ham {
        display: none;
    }
}

@media (min-width: 992px) {
    :root {
        --vns-grd-i: 4;
        --vns-gap-y: 2rem;
        --vns-pad-y: 3rem;
        --vns-pad-x: 2.5rem;
        --vns-fnt-bfs: 17px;
    }

    .grd-vid {
        --vns-grd-i: 4;
    }
}

@media (min-width: 1200px) {
    :root {
        --vns-fnt-bfs: 17px;
    }

    .ctnr {
        --vns-ctnr-w: 80rem;
    }
}

/* Dark theme support */
.dark .ctnr,
.dark body {
    --vns-pri: #EFEFF1;
    --vns-pri-inv: #EFEFF1;
    --vns-sec: #9C9CAB;
    --vns-sec-inv: #272730;
    --vns-bg-pri: #131316;
    --vns-bg-pri-rgb: 19,19,22;
    --vns-bg-sec: #1B1B21;
    --vns-bg-sec-rgb: 27,27,33;
    --vns-ico-f: #9C9CAB;
    --vns-ico-s: #EFEFF1;
}

/* Video preview styles */
.video-preview-container {
    position: relative;
    overflow: hidden;
}

.video-preview-container img {
    transition: opacity 0.3s ease;
}

.video-preview-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.video-preview-container:hover img {
    opacity: 0;
}

.video-preview-container:hover video {
    opacity: 1;
}

body.dark-theme .form-input:focus,
body.dark-theme .form-textarea:focus,
body.dark-theme .lostpass-input:focus {
    border-color: #ff9966;
    box-shadow: 0 0 0 3px rgba(255, 153, 102, 0.1);
}

body.dark-theme .form-label,
body.dark-theme .lostpass-label {
    color: var(--text-light);
}

body.dark-theme .form-section {
    border-bottom-color: #3d3d3d;
}

body.dark-theme .form-section-title {
    color: #ff9966;
    border-bottom-color: #3d3d3d;
}

body.dark-theme .form-checkbox,
body.dark-theme .lostpass-subtitle {
    color: #b0b0b0;
}

body.dark-theme .lostpass-security-group {
    background: #3d3d3d;
}

body.dark-theme .lostpass-info {
    background: linear-gradient(135deg, #2d3748 0%, #1e293b 100%);
    border-left-color: #64b5f6;
    color: var(--text-light);
}

body.dark-theme .lostpass-info i {
    color: #64b5f6;
}

body.dark-theme .lostpass-info a {
    color: #64b5f6;
}

body.dark-theme .lostpass-back-link {
    border-top-color: #3d3d3d;
}

/* Адаптивность для профилей */
@media (max-width: 768px) {
    .user-profile-container {
        margin-top: 120px;
    }
    
    .user-profile-header {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    
    .user-profile-name {
        font-size: 26px;
    }
    
    .user-profile-stats {
        grid-template-columns: 1fr;
    }
    
    .profile-edit-card,
    .lostpass-card {
        padding: 30px 20px;
    }
    
    .lostpass-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .stat-box {
        padding: 15px;
    }
    
    .profile-edit-card,
    .lostpass-card {
        padding: 25px 15px;
    }
    
    .lostpass-icon {
        width: 60px;
        height: 60px;
    }
    
    .lostpass-icon i {
        font-size: 28px;
    }
}

