/* ============================================
   OVKBlog — Чёрно-красная тема (Black & Red)
   Версия 2.0 — Полный редизайн
   ============================================ */

/* Google Fonts: Cinzel (рунический стиль) + Inter (современный текст) */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #141414;
    --bg-input: #1c1c1c;
    --bg-hover: #1e1e1e;

    /* 🟣 Тёмно-фиолетовый — основной цвет */
    --purple-primary: #6b1d8a;
    --purple-secondary: #8b2ea8;
    --purple-light: #b44de0;
    --purple-dark: #4a0e6b;
    --purple-glow: rgba(107, 29, 138, 0.4);
    --purple-subtle: rgba(107, 29, 138, 0.1);
    --purple-neon: 0 0 10px rgba(107, 29, 138, 0.6), 0 0 20px rgba(107, 29, 138, 0.4), 0 0 40px rgba(107, 29, 138, 0.2);

    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --text-link: #b44de0;

    --border-color: #2a2a2a;
    --border-purple: rgba(107, 29, 138, 0.3);

    --shadow-purple: 0 0 20px rgba(107, 29, 138, 0.15);
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.5);

    --gradient-purple: linear-gradient(135deg, #6b1d8a 0%, #4a0e6b 100%);
    --gradient-dark: linear-gradient(180deg, #111 0%, #0a0a0a 100%);

    /* Glassmorphism */
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(107, 29, 138, 0.2);
    --glass-blur: blur(12px);

    --red-title: #6436ff;
}

/* ============================================
   GLOBAL RESETS & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Фоновый радиальный градиент */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(107, 29, 138, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(107, 29, 138, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(153, 0, 0, 0.02) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Рунический орнамент — плавающие символы на фоне */
body::after {
    content: 'ᚠ ᚢ ᚦ ᚨ ᚱ ᚲ ᚷ ᚹ ᚺ ᚾ ᛁ ᛃ ᛇ ᛈ ᛉ ᛊ ᛏ ᛒ ᛗ ᛚ ᛝ ᛟ ᛞ';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI Historic', 'Noto Sans Runic', sans-serif;
    font-size: clamp(80px, 15vw, 200px);
    color: var(--purple-primary);
    opacity: 0.015;
    text-align: center;
    line-height: 1.8;
    letter-spacing: 20px;
    pointer-events: none;
    z-index: -1;
    animation: floatRunes 40s linear infinite;
    word-break: break-all;
    white-space: normal;
}

@keyframes floatRunes {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.015; }
    25% { opacity: 0.025; }
    50% { transform: translateY(-30px) rotate(2deg); opacity: 0.02; }
    75% { opacity: 0.01; }
    100% { transform: translateY(0) rotate(0deg); opacity: 0.015; }
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

a:hover {
    color: var(--purple-light);
    text-shadow: 0 0 8px var(--purple-glow);
}

::selection {
    background-color: var(--purple-primary);
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--purple-dark), var(--purple-primary), var(--purple-dark));
    border-radius: 6px;
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--purple-primary), var(--purple-light), var(--purple-primary));
    box-shadow: 0 0 10px var(--purple-glow);
}

/* ============================================
   HEADER
   ============================================ */
header#header {
    background: linear-gradient(270deg, #0d0d0d, #1a0020, #0d000d, #1a0020, #0d0d0d);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
    border-bottom: 2px solid var(--purple-primary);
    box-shadow: 0 2px 30px rgba(107, 29, 138, 0.25), 0 0 60px rgba(107, 29, 138, 0.08);
    position: relative;
    min-height: 200px;
    padding: 20px 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

header#header::before {
    content: 'ᚠ ᚢ ᚦ ᚨ ᚱ ᚲ ᚷ ᚹ ᚺ ᚾ ᛁ ᛃ ᛇ ᛈ ᛉ ᛊ ᛏ ᛒ ᛗ ᛚ ᛝ ᛟ ᛞ ᛠ ᛡ';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI Historic', 'Noto Sans Runic', sans-serif;
    font-size: clamp(40px, 8vw, 120px);
    color: var(--purple-primary);
    opacity: 0.04;
    text-align: center;
    line-height: 1.6;
    letter-spacing: 15px;
    pointer-events: none;
    z-index: 0;
    animation: headerRunes 20s linear infinite;
    word-break: break-all;
    white-space: normal;
}

@keyframes headerRunes {
    0% { transform: translateX(0) translateY(0); opacity: 0.03; }
    25% { opacity: 0.06; }
    50% { transform: translateX(-20px) translateY(5px); opacity: 0.04; }
    75% { opacity: 0.055; }
    100% { transform: translateX(0) translateY(0); opacity: 0.03; }
}

/* Руны поверх контента */
header#header .logo,
header#header .slogon,
header#header .social {
    position: relative;
    z-index: 5;
}

/* Свечение снизу */
header#header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--purple-primary), transparent);
    animation: headerGlow 3s ease-in-out infinite alternate;
}

@keyframes headerGlow {
    0% { opacity: 0.5; filter: blur(2px); }
    100% { opacity: 1; filter: blur(4px); }
}

header#header .logo h3 {
    color: var(--text-primary);
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: var(--purple-neon);
    margin: 0;
    padding: 10px 0 5px;
    text-align: center;
    animation: titleGlow 4s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 10px rgba(204, 0, 0, 0.4), 0 0 20px rgba(204, 0, 0, 0.2); }
    100% { text-shadow: 0 0 15px rgba(255, 26, 26, 0.6), 0 0 30px rgba(204, 0, 0, 0.4), 0 0 50px rgba(204, 0, 0, 0.2); }
}

header#header .slogon h2 {
    color: var(--text-primary);
    height: 10vh;
    font-size: 2.75rem;
    font-weight: 400;
    margin: 7.5vh 0;
    text-align: center;
}

header#header .slogon {
    margin-bottom: 5vh;
}

header#header .slogon p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.5;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 15px;
    text-align: center;
}

/* ============================================
   NAVIGATION
   ============================================ */
nav.topnav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 20px 0 10px;
    margin-top: 10px;
    position: relative;
}

/* Линия на всю ширину экрана */
nav.topnav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

nav.topnav a {
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

nav.topnav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--purple-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav.topnav a:hover,
nav.topnav a.active {
    color: var(--purple-light);
    background: var(--purple-subtle);
}

nav.topnav a:hover::after,
nav.topnav a.active::after {
    width: 80%;
}

nav.topnav a.icon {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
}

nav.topnav a.icon::after {
    display: none;
}

/* ============================================
   SOCIAL ICONS (header)
   ============================================ */
header#header .social {
    position: relative;
    z-index: 10;
    padding: 15px 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

header#header .social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    background: rgba(107, 29, 138, 0.15);
    border: 1px solid rgba(107, 29, 138, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

header#header .social a i {
    color: var(--purple-secondary) !important;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

header#header .social a:hover {
    background: rgba(107, 29, 138, 0.3);
    border-color: var(--purple-primary);
    transform: scale(1.15);
    box-shadow: 0 0 20px var(--purple-glow);
}

header#header .social a:hover i.bi {
    color: var(--purple-light) !important;
    text-shadow: 0 0 12px var(--purple-glow);
    filter: drop-shadow(0 0 8px var(--purple-glow));
}

/* Фиолетовый слой поверх картинки */
header#header .social a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(107, 29, 138, 0.75);
    border-radius: 50%;
    pointer-events: none;
    transition: all 0.3s ease;
}

/* При наведении — слой светлеет, картинка ярче */
header#header .social a:hover::after {
    background: rgba(107, 29, 138, 0.25);
}

.bi-telegram::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background-image: url("../../img/telegram.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.bi-whatsapp::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background-image: url("../../img/whatsapp.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.bi-youtube::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background-image: url("../../img/youtube.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.bi-rss::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background-image: url("../../img/rss.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ============================================
   BANNER
   ============================================ */
.banner {
    width: 100%;
    height: 900px;
    background:
        linear-gradient(180deg, rgba(10,10,10,0.3) 0%, rgba(10,10,10,0.95) 100%),
        url('/client/images/09.jpeg') center/cover no-repeat;
    position: relative;
    border-bottom: 3px solid var(--purple-primary);
    background-attachment: fixed; /* Параллакс эффект */
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(107, 29, 138, 0.05) 50%, transparent 100%);
    animation: bannerPulse 6s ease-in-out infinite;
}

@keyframes bannerPulse {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-purple);
    box-shadow: var(--shadow-purple);
    animation: bannerLine 2s ease-in-out infinite alternate;
}

@keyframes bannerLine {
    0% { opacity: 0.7; box-shadow: 0 0 10px rgba(204, 0, 0, 0.3); }
    100% { opacity: 1; box-shadow: 0 0 25px rgba(204, 0, 0, 0.6); }
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 30px 20px;
}

main > div {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 25px;
    padding: 25px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

main > div:hover {
    border-color: var(--border-purple);
    box-shadow: var(--shadow-card), var(--shadow-purple);
}

main h1 {
    color: var(--red-title);
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 26, 26, 0.2);
}

main h2,
main h3,
main h4,
main h5 {
    color: var(--text-primary);
    font-weight: 600;
}

main h3 {
    color: var(--red-title);
    font-size: 22px;
    font-family: 'Cinzel', serif;
    border-left: 3px solid var(--purple-primary);
    padding-left: 12px;
    margin: 20px 0 15px;
}

main p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* ============================================
   FEATURE CARDS (homepage)
   ============================================ */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.feature-card {
    /* Glassmorphism */
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 30px 25px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.6s ease forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.3s; }
.feature-card:nth-child(3) { animation-delay: 0.5s; }

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Верхняя красная линия */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: var(--gradient-purple);
    transition: left 0.6s ease;
}

.feature-card:hover::before {
    left: 0;
}

/* Внутреннее свечение при hover */
.feature-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(107, 29, 138, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
    pointer-events: none;
}

.feature-card:hover::after {
    width: 300px;
    height: 300px;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--purple-primary);
    box-shadow: 0 12px 40px rgba(107, 29, 138, 0.25), var(--shadow-card);
}

.feature-card .icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--purple-primary) !important;
    filter: drop-shadow(0 0 8px var(--purple-glow));
    transition: all 0.3s ease;
}

.feature-card:hover .icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 15px var(--purple-glow));
}

.feature-card h3 {
    color: var(--text-primary);
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    margin-bottom: 12px;
    border-left: none;
    padding-left: 0;
    transition: color 0.3s ease;
}

.feature-card:hover h3 {
    color: var(--purple-light);
    text-shadow: 0 0 10px var(--purple-glow);
}

.feature-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* ============================================
   BLOG POST CARDS
   ============================================ */
.blog-post-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(25px);
}

/* Анимация появления карточек блога */
.blog-post-card.scroll-animate.scroll-visible {
    opacity: 1;
    transform: translateY(0);
}

.blog-post-card:hover {
    border-color: var(--purple-primary);
    box-shadow: 0 8px 30px rgba(204, 0, 0, 0.2);
    transform: translateY(-4px);
    background: rgba(25, 25, 25, 0.8);
}

.blog-post-card img {
    border-bottom: 2px solid var(--purple-dark);
    transition: all 0.4s ease;
}

.blog-post-card:hover img {
    filter: brightness(1.1) contrast(1.05);
    transform: scale(1.02);
}

/* Blog карточка - картинка */
.blog-card-img-wrap {
    max-height: 220px;
    overflow: hidden;
}

.blog-card-img-wrap img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.post-content {
    padding: 20px;
    overflow: hidden;
}

.post-title {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 8px;
    /* Обрезаем длинные заголовки */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-title a {
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.post-title a:hover {
    color: var(--purple-light);
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 10px 0;
    line-height: 1.6;
    /* Обрезаем текст */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.post-meta i {
    color: var(--purple-primary);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-accent {
    display: inline-block;
    padding: 10px 24px;
    background: var(--gradient-purple);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
    text-align: center;
    box-shadow: 0 2px 15px rgba(204, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    animation: buttonPulse 3s ease-in-out infinite;
}

/* Shimmer эффект на кнопках */
.btn-accent::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.btn-accent:hover::before {
    left: 100%;
}

@keyframes buttonPulse {
    0%, 100% { box-shadow: 0 2px 15px rgba(204, 0, 0, 0.35); }
    50% { box-shadow: 0 4px 25px rgba(204, 0, 0, 0.5); }
}

.btn-accent:hover {
    background: linear-gradient(135deg, #e60000 0%, #cc0000 100%);
    box-shadow: 0 6px 30px rgba(204, 0, 0, 0.6);
    transform: translateY(-3px) scale(1.03);
    color: #fff;
    text-shadow: none;
}

.btn-accent.btn-sm {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.btn-accent.btn-lg {
    padding: 14px 32px;
    font-size: 1.1rem;
}

/* Override Bootstrap buttons */
.btn-primary,
.btn-success,
.btn-danger {
    background: var(--gradient-purple) !important;
    border-color: var(--purple-primary) !important;
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(204, 0, 0, 0.3);
}

.btn-primary:hover,
.btn-success:hover,
.btn-danger:hover {
    background: linear-gradient(135deg, #e60000 0%, #cc0000 100%) !important;
    box-shadow: 0 4px 20px rgba(204, 0, 0, 0.5);
    border-color: var(--purple-secondary) !important;
}

.btn-outline-primary,
.btn-outline-light {
    border-color: var(--purple-primary) !important;
    color: var(--purple-light) !important;
}

.btn-outline-primary:hover,
.btn-outline-light:hover {
    background: var(--purple-primary) !important;
    color: #fff !important;
}

/* ============================================
   FORMS
   ============================================ */
.form-dark {
    max-width: 500px;
    margin: 30px auto;
    padding: 35px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow-card), 0 0 30px rgba(107, 29, 138, 0.08);
    position: relative;
    overflow: hidden;
    animation: formAppear 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes formAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.form-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-purple);
    animation: formLine 3s ease-in-out infinite alternate;
}

@keyframes formLine {
    0% { opacity: 0.7; }
    100% { opacity: 1; filter: blur(1px); }
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 6px;
}

.form-control {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: var(--bg-input);
    border-color: var(--purple-primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(107, 29, 138, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:disabled,
.form-control[readonly] {
    background: var(--bg-secondary);
    color: var(--text-muted);
    border-color: var(--border-color);
}

.form-text {
    color: var(--text-muted) !important;
    font-size: 0.82rem;
    margin-top: 4px;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   CARDS (generic)
   ============================================ */
.card-dark {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.card-dark .card-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    color: var(--purple-light);
    font-weight: 600;
    padding: 12px 18px;
    font-size: 1rem;
}

.card-dark .card-body {
    padding: 18px;
}

.card-dark .card-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 12px 18px;
    color: var(--text-secondary);
}

/* Override Bootstrap card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.card-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    color: var(--purple-light);
}

.card-body {
    color: var(--text-primary);
}

.card-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.bg-primary {
    background: var(--gradient-purple) !important;
}

/* ============================================
   BADGES & TAGS
   ============================================ */
.badge-dark {
    display: inline-block;
    padding: 5px 12px;
    background: var(--purple-subtle);
    color: var(--purple-light);
    border: 1px solid var(--border-purple);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Shimmer эффект при hover */
.badge-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.5s ease;
}

.badge-dark:hover::before {
    left: 100%;
}

.badge-dark:hover {
    background: rgba(204, 0, 0, 0.2);
    border-color: var(--purple-primary);
    color: var(--purple-light);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(107, 29, 138, 0.25);
    text-shadow: 0 0 8px var(--purple-glow);
}

/* Мета-информация (даты, просмотры) */
.post-meta span {
    color: var(--text-muted);
}

.post-meta i {
    color: var(--purple-primary);
}

/* Заголовки статей */
.article-title {
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    margin-bottom: 15px;
    line-height: 1.3;
    color: var(--purple-light);
    text-shadow: 0 0 15px var(--purple-glow);
    animation: fadeIn 1s ease;
}

/* ============================================
   TABLES
   ============================================ */
.table {
    color: var(--text-primary);
}

.table thead th {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--purple-primary);
    color: var(--purple-light);
    font-weight: 600;
}

.table td,
.table th {
    border-color: var(--border-color);
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background: var(--bg-tertiary);
}

.table-hover > tbody > tr:hover {
    background: var(--purple-subtle);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination .page-link {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: var(--purple-subtle);
    border-color: var(--purple-primary);
    color: var(--purple-light);
}

.pagination .page-item.active .page-link {
    background: var(--gradient-purple);
    border-color: var(--purple-primary);
    color: #fff;
}

/* ============================================
   ALERTS
   ============================================ */
.alert-success {
    background: rgba(35, 134, 54, 0.15) !important;
    border: 1px solid #238636 !important;
    color: #3fb950 !important;
}

.alert-danger {
    background: rgba(107, 29, 138, 0.15) !important;
    border: 1px solid var(--purple-primary) !important;
    color: var(--purple-light) !important;
}

.alert-info {
    background: rgba(107, 29, 138, 0.1) !important;
    border: 1px solid var(--border-purple) !important;
    color: var(--purple-light) !important;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: linear-gradient(180deg, var(--bg-primary) 0%, #0d0014 100%);
    border-top: 2px solid var(--purple-primary);
    margin-top: 40px;
    padding: 25px 0;
    box-shadow: 0 -2px 20px rgba(107, 29, 138, 0.1);
    text-align: center;
}

footer .bnav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

footer .bnav a {
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

footer .bnav a:hover {
    color: var(--purple-light);
    text-shadow: 0 0 8px var(--purple-glow);
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================
   LISTS
   ============================================ */
.list-group-item {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.list-group-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-purple);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--purple-dark);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--purple-primary);
}

/* ============================================
   FADE-IN ANIMATION
   ============================================ */
.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-анимации для всех основных элементов */
.scroll-animate {
    opacity: 0;
    transform: translateY(35px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate.scroll-visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate.scroll-left {
    transform: translateX(-40px);
}

.scroll-animate.scroll-left.scroll-visible {
    transform: translateX(0);
}

.scroll-animate.scroll-right {
    transform: translateX(40px);
}

.scroll-animate.scroll-right.scroll-visible {
    transform: translateX(0);
}

.scroll-animate.scale-in {
    transform: scale(0.9);
}

.scroll-animate.scale-in.scroll-visible {
    transform: scale(1);
}

/* Плавные переходы для всех карточек */
main > div,
.blog-post-card,
.comment-item {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   INPUT GROUP
   ============================================ */
.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* ============================================
   HORIZONTAL RULE
   ============================================ */
hr {
    border-color: var(--border-color);
    opacity: 0.5;
}

/* ============================================
   VIDEO / CHAT
   ============================================ */
.chat-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    min-height: 600px;
}

.chat-video {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

#video-container {
    padding: 20px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-purple);
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remote-videos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.remote-videos > div {
    position: relative;
    padding-top: 56.25%;
    background: #000;
    border: 2px solid var(--border-purple);
    border-radius: 8px;
    overflow: hidden;
}

.remote-videos > div video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    background: var(--bg-secondary);
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h4 {
    color: var(--purple-light);
    font-size: 1.1rem;
    margin: 0;
}

.btn-back {
    color: var(--text-secondary);
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-back:hover {
    color: var(--purple-light);
    border-color: var(--purple-primary);
    background: var(--purple-subtle);
}

.sidebar-controls {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-section {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h5 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.participants-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.participants-list li {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.participants-list li:hover {
    border-color: var(--border-purple);
    background: var(--purple-subtle);
}

.badge-you {
    display: inline-block;
    padding: 2px 8px;
    background: var(--gradient-purple);
    color: #fff;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 8px;
}

#chatMessages {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

#chatMessages > div {
    margin-bottom: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(42, 42, 42, 0.5);
    font-size: 0.9rem;
}

#chatMessages > div:last-child {
    border-bottom: none;
}

#chatMessages strong {
    color: var(--purple-light);
}

.chat-input-group {
    display: flex;
    gap: 8px;
}

.chat-input-group .form-control {
    flex: 1;
}

.chat-input-group .btn-accent {
    padding: 10px 14px;
    white-space: nowrap;
}

.sidebar-footer {
    padding: 15px;
    margin-top: auto;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.btn-leave {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #660000 0%, #4d0000 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-leave:hover {
    background: linear-gradient(135deg, #800000 0%, #660000 100%);
    box-shadow: 0 4px 15px rgba(102, 0, 0, 0.4);
}

.room-info {
    text-align: center;
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.room-info code {
    color: var(--purple-light);
    background: var(--purple-subtle);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--border-purple);
}

.btn-copy {
    display: inline-block;
    padding: 6px 14px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    color: var(--purple-light);
    border-color: var(--purple-primary);
    background: var(--purple-subtle);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ============================================
   ПРИЗЫВ К ДЕЙСТВИЮ (CTA)
   ============================================ */
.cta-banner {
    position: relative;
    background: linear-gradient(135deg, var(--purple-dark) 0%, #1a0020 50%, var(--bg-primary) 100%);
    border: 1px solid var(--border-purple);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    overflow: hidden;
    margin: 30px 0;
    animation: fadeIn 1s ease;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(107, 29, 138, 0.1) 0%, transparent 60%);
    animation: ctaPulse 6s ease-in-out infinite;
}

@keyframes ctaPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.6; }
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    color: var(--purple-light);
    margin-bottom: 15px;
    text-shadow: 0 0 20px var(--purple-glow);
}

.cta-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.7;
}

.cta-runes {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: 'Segoe UI Historic', 'Noto Sans Runic', sans-serif;
    font-size: 1.2rem;
    color: var(--purple-primary);
    opacity: 0.08;
    letter-spacing: 10px;
    pointer-events: none;
}

.btn-accent-lg {
    padding: 14px 32px;
    font-size: 1.1rem;
    margin: 8px;
    display: inline-block;
}

.btn-outline-ghost {
    background: transparent;
    border: 2px solid var(--purple-primary);
    color: var(--purple-light);
    box-shadow: none;
    animation: none;
}

.btn-outline-ghost:hover {
    background: rgba(107, 29, 138, 0.15);
    border-color: var(--purple-secondary);
    box-shadow: 0 0 20px rgba(107, 29, 138, 0.3);
}

/* ============================================
   ГАЛЕРЕЯ
   ============================================ */
.gallery-section {
    margin: 40px 0;
}

.gallery-title {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--purple-light);
    text-align: left;
    margin-bottom: 30px;
    text-shadow: 0 0 10px var(--purple-glow);
    border-left: 3px solid var(--purple-primary);
    padding-left: 12px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(107, 29, 138, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-overlay i {
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    transform: scale(0.5);
    transition: all 0.4s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    border-color: var(--purple-primary);
    box-shadow: 0 8px 30px rgba(107, 29, 138, 0.3);
}

.gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-page {
    max-width: 700px;
    margin: 0 auto;
}

.page-title {
    text-align: left !important;
    font-size: 1.8rem !important;
    margin-bottom: 25px !important;
    border-left: 4px solid var(--purple-primary);
    padding-left: 15px;
}

.alert-box {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Самописная капча */
.captcha-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.captcha-question {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff !important;
    text-align: center;
    padding: 14px;
    background: #000000;
    border: 2px solid var(--purple-primary);
    border-radius: 6px;
    letter-spacing: 4px;
}

.captcha-input {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 12px;
    letter-spacing: 3px;
}

.captcha-error {
    color: #ff6b6b;
    font-size: 0.85rem;
    text-align: center;
    display: none;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.contact-form .form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: var(--purple-primary);
    box-shadow: 0 0 0 3px rgba(107, 29, 138, 0.15);
    outline: none;
}

.contact-form textarea.form-control {
    resize: vertical;
    min-height: 140px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 30px 0;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-info .info-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.contact-info .info-item h5 {
    color: var(--purple-light);
    margin-bottom: 10px;
    font-size: 1rem;
}

.contact-info .info-item p {
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================
   ARTICLE PAGE
   ============================================ */
.article-page {
    max-width: 1440px;
    margin: 0 auto;
}

.article-title {
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    margin-bottom: 15px;
    line-height: 1.3;
    color: var(--purple-light);
    text-shadow: 0 0 15px var(--purple-glow);
    animation: fadeIn 1s ease;
}

.article-meta {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.meta-sep {
    color: var(--border-color);
}

.article-content {
    padding: 0 20px;
    line-height: 1.8;
    font-size: 1.05rem;
}

.article-content p {
    margin-bottom: 16px;
}

.article-content img {
    max-width: 800px;
    width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--purple-secondary);
    margin-top: 30px;
    margin-bottom: 15px;
}

.article-content a {
    color: var(--purple-light);
    border-bottom: 1px solid transparent;
}

.article-content a:hover {
    border-bottom-color: var(--purple-primary);
}

.article-content blockquote {
    border-left: 3px solid var(--purple-primary);
    background: var(--bg-tertiary);
    padding: 15px 20px;
    margin: 20px 0;
    color: var(--text-secondary);
    font-style: italic;
    border-radius: 0 6px 6px 0;
}

.article-content pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-content code {
    background: var(--bg-tertiary);
    color: var(--purple-light);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.article-description {
    border-left: 3px solid var(--purple-primary);
    background: var(--bg-tertiary);
    padding: 16px 20px;
    margin-bottom: 25px;
    color: var(--text-secondary);
    font-style: italic;
    border-radius: 0 6px 6px 0;
}

.article-tags {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: 30px;
    color: var(--text-muted);
}

.article-tags strong {
    color: var(--text-primary);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.article-category {
    margin-top: 12px;
    color: var(--text-muted);
}

.article-category strong {
    color: var(--text-primary);
}

.article-category a {
    color: var(--purple-light);
    margin-left: 6px;
}

.article-actions {
    margin-top: 30px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-outline-red {
    background: transparent;
    border: 1px solid var(--purple-primary);
    color: var(--purple-light);
    box-shadow: none;
}

.btn-outline-red:hover {
    background: var(--purple-subtle);
    border-color: var(--purple-secondary);
    box-shadow: 0 0 12px rgba(204, 0, 0, 0.2);
}

.btn-outline-edit {
    background: transparent;
    border: 1px solid #d29922;
    color: #d29922;
    box-shadow: none;
}

.btn-outline-edit:hover {
    background: rgba(210, 153, 34, 0.1);
    border-color: #e3b341;
}

.article-comments {
    margin-top: 40px;
    padding: 0 20px;
}

.blog-page-wrapper {
    margin-bottom: 20px;
}

.blog-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.blog-search {
    flex-shrink: 0;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.search-input-wrap:focus-within {
    border-color: var(--purple-primary);
    box-shadow: 0 0 0 3px rgba(107, 29, 138, 0.15);
}

.search-input-wrap input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 10px 16px;
    font-size: 0.95rem;
    width: 260px;
    outline: none;
}

.search-input-wrap input::placeholder {
    color: var(--text-muted);
}

.search-input-wrap button {
    background: var(--gradient-purple);
    border: none;
    color: #fff;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.search-input-wrap button:hover {
    background: linear-gradient(135deg, #8b2ea8 0%, #6b1d8a 100%);
    box-shadow: 0 0 10px var(--purple-glow);
}

.page-heading {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--purple-light);
    text-align: left;
    margin-bottom: 30px;
    text-shadow: 0 0 10px var(--purple-glow);
    border-left: 3px solid var(--purple-primary);
    padding-left: 12px;
}

/* ============================================
   BLOG POST CARDS — оригинальный стиль
   ============================================ */
.th-blog {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: var(--shadow-card);
}

.th-blog:hover {
    border-color: var(--border-purple);
    box-shadow: 0 8px 30px rgba(107, 29, 138, 0.2), var(--shadow-card);
    transform: translateY(-3px);
}

.blog-img {
    position: relative;
    overflow: hidden;
    height: 520px;
}

.blog-img a {
    display: block;
    width: 100%;
    height: 100%;
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.th-blog:hover .blog-img img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.blog-content {
    padding: 25px 30px 30px;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.blog-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.blog-meta i {
    color: var(--purple-primary);
    font-size: 1rem;
}

.blog-title {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 15px;
    font-weight: 700;
}

.blog-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-title a:hover {
    color: var(--purple-light);
    text-shadow: 0 0 8px var(--purple-glow);
}

.blog-content > p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.th-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--gradient-purple);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(107, 29, 138, 0.35);
}

.th-btn:hover {
    background: linear-gradient(135deg, #8b2ea8 0%, #6b1d8a 100%);
    box-shadow: 0 6px 25px rgba(107, 29, 138, 0.5);
    transform: translateY(-2px);
    color: #fff;
}

.th-blog:not(.has-post-thumbnail) .blog-content {
    padding: 30px;
}

/* Пагинация блога */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 35px;
    padding: 25px 0;
    flex-wrap: wrap;
}

.blog-pagination .pg-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 46px;
    padding: 0 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.blog-pagination .pg-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(180, 77, 224, 0.1), transparent);
    transition: left 0.5s ease;
}

.blog-pagination .pg-link:hover::before {
    left: 100%;
}

.blog-pagination .pg-link:hover {
    background: rgba(107, 29, 138, 0.2);
    border-color: var(--purple-primary);
    color: var(--purple-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(107, 29, 138, 0.3);
}

.blog-pagination .pg-link.active {
    background: var(--gradient-purple);
    border-color: var(--purple-secondary);
    color: #ffffff;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(107, 29, 138, 0.4), 0 0 10px rgba(180, 77, 224, 0.2);
    transform: scale(1.08);
}

/* Кнопки навигации шире */
.blog-pagination .pg-link.first,
.blog-pagination .pg-link.prev,
.blog-pagination .pg-link.next,
.blog-pagination .pg-link.last {
    min-width: auto;
    padding: 0 18px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ============================================
   БОКОВОЙ БЛОК — ПОСЛЕДНИЕ СТАТЬИ
   ============================================ */
.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
}

.widget-title {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: var(--red-title);
    margin-bottom: 10px;
    padding: 15px 20px;
    position: relative;
    text-shadow: 0 0 8px var(--purple-glow);
    display: flex;
    align-items: center;
}

.widget-shape {
    display: inline-block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--purple-dark), var(--purple-glow));
    margin-left: 10px;
    border-radius: 2px;
    vertical-align: middle;
    flex-shrink: 0;
}

.recent-post-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recent-post {
    display: flex;
    gap: 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.recent-post:hover {
    border-color: var(--purple-primary);
    box-shadow: 0 4px 15px rgba(107, 29, 138, 0.2);
    transform: translateY(-2px);
}

.recent-post .media-img {
    flex-shrink: 0;
    width: 110px;
    overflow: hidden;
}

.recent-post .media-img a {
    display: block;
    width: 100%;
    height: 100%;
}

.recent-post .media-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.recent-post:hover .media-img img {
    transform: scale(1.08);
}

.recent-post .media-body {
    flex: 1;
    padding: 8px 14px 8px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.recent-post .post-title {
    font-size: 0.9rem;
    line-height: 1.3;
    margin: 0 0 8px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post .post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.recent-post .post-title a:hover {
    color: var(--purple-light);
    text-shadow: 0 0 6px var(--purple-glow);
}

.recent-post .recent-post-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.recent-post .recent-post-meta a {
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.recent-post .recent-post-meta a:hover {
    color: var(--purple-light);
}

/* Теги в сайдбаре */
.widget-tags {
    margin-top: 20px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    background: linear-gradient(135deg, rgba(107, 29, 138, 0.08), rgba(107, 29, 138, 0.02));
    border: 1px solid rgba(107, 29, 138, 0.2);
    border-radius: 20px;
    color: var(--purple-light);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.tag-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(180, 77, 224, 0.1), transparent);
    transition: left 0.5s ease;
}

.tag-link:hover::before {
    left: 100%;
}

.tag-link:hover {
    background: linear-gradient(135deg, var(--purple-primary), var(--purple-dark));
    border-color: var(--purple-secondary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(107, 29, 138, 0.35);
}

/* ============================================
   ВИДЕО С КАНАЛА — превью в сайдбаре
   ============================================ */
.widget-channel {
    margin-top: 20px;
}

.channel-preview {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    background: linear-gradient(135deg, rgba(107, 29, 138, 0.08), rgba(0, 0, 0, 0.2));
    border-radius: 10px;
    border: 1px solid rgba(107, 29, 138, 0.15);
}

.channel-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #cc0000, #990000);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(204, 0, 0, 0.3);
}

.channel-avatar i {
    font-size: 1.4rem;
    color: #ffffff;
}

.channel-info {
    flex: 1;
    min-width: 0;
}

.channel-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
    line-height: 1.3;
}

.channel-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0 0 8px;
    line-height: 1.4;
}

.channel-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #cc0000, #990000);
    color: #fff;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.channel-link:hover {
    background: linear-gradient(135deg, #e60000, #cc0000);
    box-shadow: 0 2px 12px rgba(204, 0, 0, 0.4);
    transform: translateY(-1px);
    color: #fff;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .chat-layout {
        grid-template-columns: 1fr;
    }

    .chat-sidebar {
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    header#header .logo h3 {
        font-size: 1.4rem;
    }

    nav.topnav a:not(.icon) {
        display: none;
    }

    nav.topnav a.icon {
        display: inline-block;
    }

    nav.topnav.responsive a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px;
        border-bottom: 1px solid var(--border-color);
    }

    nav.topnav.responsive a.icon {
        position: absolute;
        right: 16px;
        top: 8px;
        display: inline-block;
        z-index: 10;
    }

    .banner {
        height: 120px;
    }

    main {
        padding: 15px 10px;
    }

    main > div {
        padding: 15px;
    }

    main h1 {
        font-size: 1.5rem;
    }

    .feature-cards {
        grid-template-columns: 1fr;
    }

    .form-dark {
        padding: 20px;
        margin: 15px;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 1.4rem !important;
    }

    .article-title {
        font-size: 1.6rem;
    }

    .article-actions {
        flex-direction: column;
    }

    .article-actions .btn-accent {
        width: 100%;
        text-align: center;
    }

    .cta-banner {
        padding: 40px 20px;
    }

    .cta-title {
        font-size: 1.6rem;
    }

    .cta-text {
        font-size: 1rem;
    }

    .btn-accent-lg {
        display: block;
        width: 100%;
        margin: 8px 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .blog-pagination .pg-link {
        min-width: 38px;
        height: 38px;
    }
    .sidebar-widget {
        margin-bottom: 20px;
    }

    .tag-link {
        padding: 5px 12px;
        font-size: 0.8rem;
    }

    .channel-videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .section-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .blog-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input-wrap input {
        width: 100%;
    }

    header#header .logo h3 {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }

    header#header .slogon h2 {
        font-size: 0.9rem;
    }

    header#header .slogon p {
        font-size: 0.8rem;
    }

    .banner {
        height: 90px;
    }

    main h1 {
        font-size: 1.3rem;
    }

    .feature-card {
        padding: 20px 15px;
    }
}

/* ============================================
   AUTH PAGES (Login, Registration, Logout)
   ============================================ */

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: var(--shadow-purple);
}

.auth-icon {
    font-size: 4rem;
    color: var(--purple-light);
    margin-bottom: 20px;
    text-shadow: 0 0 20px var(--purple-glow);
}

.auth-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--red-title);
    margin-bottom: 15px;
    text-shadow: 0 0 10px var(--purple-glow);
}

.auth-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.auth-actions .btn {
    width: 100%;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.auth-actions .btn i {
    margin-right: 8px;
}

.auth-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-purple);
}

.auth-footer .text-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.auth-footer .text-muted i {
    color: var(--purple-light);
    margin-right: 5px;
}

/* ============================================
   Типы контента (Blog / Telegram / YouTube)
   ============================================ */

/* Бейдж на странице списка */
.content-type-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.content-type-badge .badge-blog,
.content-type-badge .badge-youtube,
.content-type-badge .badge-telegram {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.content-type-badge .badge-blog {
    background: rgba(107, 29, 138, 0.9);
    color: #fff;
}

.content-type-badge .badge-youtube {
    background: rgba(200, 0, 0, 0.9);
    color: #fff;
}

.content-type-badge .badge-telegram {
    background: rgba(0, 136, 204, 0.9);
    color: #fff;
}

/* Бейдж на странице статьи */
.content-type-header {
    margin-bottom: 15px;
}

.content-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
}

.youtube-badge {
    background: linear-gradient(135deg, #cc0000, #ff0000);
    color: #fff;
}

.telegram-badge {
    background: linear-gradient(135deg, #0088cc, #00aaff);
    color: #fff;
}

.blog-badge {
    background: linear-gradient(135deg, var(--purple-primary), var(--purple-secondary));
    color: #fff;
}

/* YouTube видео контейнер */
.youtube-video-container {
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Telegram ссылка */
.telegram-source {
    margin: 25px 0;
    padding: 15px 20px;
    background: rgba(0, 136, 204, 0.1);
    border: 1px solid rgba(0, 136, 204, 0.3);
    border-radius: 12px;
}

.telegram-link {
    display: inline-flex;
    align-items: center;
    color: #00aaff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.telegram-link:hover {
    color: #0088cc;
    text-decoration: underline;
}

.telegram-link i {
    font-size: 1.2rem;
}

