/* 
 * MiranderLab AI-Interview Premium Stylesheet
 * Centralized styles for high-end dark/light mode UI.
 */

:root {
    --bg-light: #f4f6fa; /* Мягкий светло-серый с оттенком синего для лучшего контраста */
    --bg-dark: #09090b; /* Vercel zinc-950 dark */
    
    --border-light: rgba(148, 163, 184, 0.12); /* Тонкая рамка slate-450 с низкой непрозрачностью */
    --border-dark: rgba(255, 255, 255, 0.05);
    
    --glass-bg-light: rgba(255, 255, 255, 0.72) !important; /* плотное и чистое стекло для светлой темы */
    --glass-bg-dark: rgba(10, 10, 12, 0.65) !important;
}

/* Background glowing layout */
.glow-bg {
    background-color: var(--bg-light) !important;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(147, 51, 234, 0.03) 0%, transparent 45%) !important;
    transition: background-color 0.5s ease;
}

.dark .glow-bg {
    background-color: var(--bg-dark) !important;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 85% 85%, rgba(147, 51, 234, 0.08) 0%, transparent 50%) !important;
}

/* Premium Glassmorphic panels */
.glass-panel {
    background: var(--glass-bg-light) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.03), inset 0 1px 1px rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .glass-panel {
    background: var(--glass-bg-dark) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid var(--border-dark) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0px rgba(255, 255, 255, 0.03) !important;
}

/* Custom modern scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.25) !important;
    border-radius: 9999px;
    transition: background 0.2s ease;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.45) !important;
}

/* Active level selection card state */
.level-card-selected {
    border-color: rgba(59, 130, 246, 0.6) !important;
    background: rgba(59, 130, 246, 0.03) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.08) !important;
}
.dark .level-card-selected {
    border-color: rgba(59, 130, 246, 0.6) !important;
    background: rgba(59, 130, 246, 0.04) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.12) !important;
}

/* Buttons glow effects */
.btn-premium {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-premium::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.btn-premium:hover::after {
    opacity: 1;
}

/* Custom transitions and animations */
.transition-all-300 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pulse-glowing {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
    animation: glowPulse 2s infinite ease-in-out;
}
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(59, 130, 246, 0.1);
        border-color: rgba(59, 130, 246, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
        border-color: rgba(59, 130, 246, 0.45);
    }
}

/* ─── Professional Chat Bubbles ─────────────────────────────────────────────
 * Design philosophy: color does NOT indicate role — form, alignment
 * and subtle shade contrast do (like Claude, ChatGPT).
 * No loud blue. The interface stays neutral & professional.
 * ─────────────────────────────────────────────────────────────────────────── */

/* User bubble: soft, professional blue (not too bright) */
.chat-bubble-user {
    background: #3b82f6; /* приятный мягкий синий */
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.15), 0 1px 2px rgba(0, 0, 0, 0.08);
}
.dark .chat-bubble-user {
    background: #2563eb; /* более глубокий, но спокойный синий для темной темы */
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* AI bubble: clean warm-white card with hairline border */
.chat-bubble-ai {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.dark .chat-bubble-ai {
    background: rgba(30, 36, 51, 0.55);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Send button: matches user bubble */
.chat-send-btn {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.2);
}
.chat-send-btn:hover {
    background: #2563eb;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}
.dark .chat-send-btn {
    background: #2563eb;
    color: #ffffff;
}
.dark .chat-send-btn:hover {
    background: #1d4ed8;
}
.chat-send-btn:disabled {
    background: #94a3b8 !important;
    color: #f1f5f9 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}
.dark .chat-send-btn:disabled {
    background: #334155 !important;
    color: #64748b !important;
}

/* Expandable textareas */
.expandable-textarea {
    min-height: 76px;
    height: 76px;
    transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1), min-height 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.expandable-textarea:focus,
.expandable-textarea:not(:placeholder-shown) {
    min-height: 180px;
    height: 180px;
}

/* PDF upload zone styles */
.upload-zone-active {
    border-color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.08) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.12) !important;
}

.upload-zone-success {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.08) !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.12) !important;
}

.upload-zone-error {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.08) !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.12) !important;
}

/* Match analysis container styles */
.match-card {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    margin-top: 16px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.dark .match-card {
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(10, 10, 12, 0.4);
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    margin: 2px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    transition: transform 0.2s ease;
}
.skill-tag:hover {
    transform: scale(1.05);
}

.skill-tag-match {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.skill-tag-missing {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Score Circle Indicator */
.score-circle-svg {
    transform: rotate(-90deg);
}

.score-circle-bg {
    fill: none;
    stroke: rgba(148, 163, 184, 0.12);
    stroke-width: 4;
}

.dark .score-circle-bg {
    stroke: rgba(255, 255, 255, 0.05);
}

.score-circle-val {
    fill: none;
    stroke: url(#scoreGradient);
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fade-in animation for chat bubbles */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-message-in {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ─── Premium Voice Mode Styles ───────────────────────────────────────────── */

.wave-bar {
    display: inline-block;
    width: 4px;
    height: 20px;
    border-radius: 9999px;
    transform: scaleY(0.25);
    transform-origin: center;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

@keyframes wavePulse {
    0%, 100% {
        transform: scaleY(0.25);
    }
    50% {
        transform: scaleY(1);
    }
}

.voice-wave-active .wave-bar {
    animation: wavePulse 1.2s infinite ease-in-out;
}
.voice-wave-active .wave-bar:nth-child(1) { animation-delay: 0.1s; }
.voice-wave-active .wave-bar:nth-child(2) { animation-delay: 0.4s; }
.voice-wave-active .wave-bar:nth-child(3) { animation-delay: 0.2s; }
.voice-wave-active .wave-bar:nth-child(4) { animation-delay: 0.5s; }
.voice-wave-active .wave-bar:nth-child(5) { animation-delay: 0.3s; }

.voice-pulse-red {
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.25);
    animation: redGlowPulse 1.5s infinite ease-in-out;
}
@keyframes redGlowPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
        border-color: rgba(239, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.45);
        border-color: rgba(239, 68, 68, 0.7);
    }
}

.voice-pulse-indigo {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
    animation: indigoGlowPulse 1.5s infinite ease-in-out;
}
@keyframes indigoGlowPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(99, 102, 241, 0.15);
        border-color: rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.45);
        border-color: rgba(99, 102, 241, 0.7);
    }
}

/* Avatar ripple animations for Voice Call Overlay */
@keyframes avatarPing {
    0% {
        transform: scale(0.85);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}
.voice-avatar-ping {
    animation: avatarPing 2s infinite cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Landing Page Component Styles ────────────────────────────────────────── */

/* Sticky Glass Navbar */
.landing-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}
.dark .landing-nav {
    background: rgba(9, 9, 11, 0.82);
    border-bottom: 1px solid var(--border-dark);
}

/* Hero Badge */
.landing-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #2563eb;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}
.dark .landing-hero-badge {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: #60a5fa;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

/* Hero Title Gradient */
.text-gradient-primary {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #db2777 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.dark .text-gradient-primary {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Stat Cards */
.landing-stat-card {
    border-radius: 20px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.landing-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.1);
}
.dark .landing-stat-card {
    background: rgba(18, 18, 24, 0.6);
    border: 1px solid var(--border-dark);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.dark .landing-stat-card:hover {
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.18);
}

/* Bento Grid Cards */
.bento-card {
    position: relative;
    border-radius: 24px;
    padding: 32px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.bento-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.1);
}
.dark .bento-card {
    background: rgba(15, 17, 26, 0.6);
    border: 1px solid var(--border-dark);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.dark .bento-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

/* Live Preview Widget Mock */
.preview-widget-container {
    border-radius: 24px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.12), 0 0 40px rgba(59, 130, 246, 0.15);
    overflow: hidden;
    position: relative;
}
.dark .preview-widget-container {
    background: linear-gradient(145deg, #0f121d, #090b10);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 0 0 50px rgba(59, 130, 246, 0.12);
}

/* Profession Selector Tabs */
.profession-tab-btn {
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    cursor: pointer;
}
.profession-tab-btn:hover {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.06);
}
.dark .profession-tab-btn {
    color: #94a3b8;
}
.dark .profession-tab-btn:hover {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.1);
}
.profession-tab-btn.active {
    color: #2563eb;
    background: #ffffff;
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}
.dark .profession-tab-btn.active {
    color: #ffffff;
    background: #1e293b;
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 20px;
    overflow: hidden;
}
.comparison-table th,
.comparison-table td {
    padding: 18px 24px;
    text-align: left;
}
.comparison-table thead th {
    background: rgba(59, 130, 246, 0.06);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.dark .comparison-table thead th {
    background: rgba(59, 130, 246, 0.12);
}
.comparison-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s ease;
}
.dark .comparison-table tbody tr {
    border-bottom: 1px solid var(--border-dark);
}
.comparison-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.03);
}

/* FAQ Accordion Details */
.faq-accordion-item {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    overflow: hidden;
}
.dark .faq-accordion-item {
    background: rgba(18, 18, 24, 0.6);
    border: 1px solid var(--border-dark);
}
.faq-accordion-item[open] {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.08);
}
.dark .faq-accordion-item[open] {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Radiant CTA Banner */
.cta-banner {
    position: relative;
    border-radius: 32px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #6366f1 100%);
    padding: 64px 32px;
    color: #ffffff;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.3);
}
.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

/* Language Dropdown Menu */
.lang-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    width: 160px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 6px;
    z-index: 100;
}
.dark .lang-dropdown-menu {
    background: rgba(18, 18, 24, 0.95);
    border: 1px solid var(--border-dark);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.lang-dropdown-container:hover .lang-dropdown-menu,
.lang-dropdown-container:focus-within .lang-dropdown-menu {
    display: block;
}

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    transition: background 0.2s ease;
}
.dark .lang-dropdown-item {
    color: #cbd5e1;
}
.lang-dropdown-item:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
}
.dark .lang-dropdown-item:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}
.lang-dropdown-item.active {
    font-weight: 700;
    color: #2563eb;
    background: rgba(59, 130, 246, 0.1);
}
.dark .lang-dropdown-item.active {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.2);
}

/* ─── Blog Component Styles ─────────────────────────────────────────── */

.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #4f46e5;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}
.dark .blog-hero-badge {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.4);
    color: #818cf8;
}

.blog-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.blog-card:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 20px 45px rgba(99, 102, 241, 0.12);
}
.dark .blog-card {
    background: rgba(15, 17, 26, 0.65);
    border: 1px solid var(--border-dark);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.dark .blog-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 20px 45px rgba(99, 102, 241, 0.22);
}

.blog-card-img-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #e2e8f0;
}
.dark .blog-card-img-wrap {
    background: #1e293b;
}
.blog-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.blog-card:hover .blog-card-img-wrap img {
    transform: scale(1.06);
}

.blog-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-light);
    transition: all 0.25s ease;
    text-decoration: none;
}
.blog-category-pill:hover {
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}
.dark .blog-category-pill {
    color: #94a3b8;
    background: rgba(18, 18, 24, 0.6);
    border: 1px solid var(--border-dark);
}
.dark .blog-category-pill:hover {
    color: #818cf8;
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
}
.blog-category-pill.active {
    color: #ffffff;
    background: #4f46e5;
    border-color: #4f46e5;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}
.dark .blog-category-pill.active {
    color: #ffffff;
    background: #6366f1;
    border-color: #6366f1;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.4);
}

/* Article Detail Typography */
.blog-article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #334155;
}
.dark .blog-article-body {
    color: #cbd5e1;
}
.blog-article-body h2 {
    font-size: 1.65rem;
    font-weight: 800;
    margin-top: 2.2rem;
    margin-bottom: 1rem;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.dark .blog-article-body h2 {
    color: #f8fafc;
}
.blog-article-body h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 1.8rem;
    margin-bottom: 0.75rem;
    color: #1e293b;
}
.dark .blog-article-body h3 {
    color: #f1f5f9;
}
.blog-article-body p {
    margin-bottom: 1.25rem;
}
.blog-article-body ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}
.blog-article-body ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}
.blog-article-body li {
    margin-bottom: 0.5rem;
}
.blog-article-body blockquote {
    border-left: 4px solid #6366f1;
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #475569;
    background: rgba(99, 102, 241, 0.04);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-radius: 0 12px 12px 0;
}
.dark .blog-article-body blockquote {
    color: #94a3b8;
    background: rgba(99, 102, 241, 0.08);
}
.blog-article-body strong {
    color: #0f172a;
    font-weight: 700;
}
.dark .blog-article-body strong {
    color: #f8fafc;
}

/* Article Table of Contents (TOC) */
.blog-toc-box {
    border-radius: 20px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(12px);
    margin-bottom: 24px;
}
.dark .blog-toc-box {
    background: rgba(18, 18, 24, 0.65);
    border: 1px solid var(--border-dark);
}

/* In-article Project Conversion Card (CTA) */
.blog-cta-card {
    position: relative;
    border-radius: 24px;
    padding: 32px;
    background: linear-gradient(135deg, #312e81 0%, #4338ca 50%, #6366f1 100%);
    color: #ffffff;
    box-shadow: 0 15px 35px rgba(67, 56, 202, 0.25);
    margin: 40px 0;
    overflow: hidden;
}
.blog-cta-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

/* Compact Top Recommended Service CTA Banner */
.blog-top-cta-card {
    position: relative;
    border-radius: 20px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #312e81 0%, #4338ca 50%, #6366f1 100%);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(67, 56, 202, 0.2);
    margin-bottom: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.dark .blog-top-cta-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}
.blog-top-cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* Mobile Messenger Layout Utilities */
@media (max-width: 1023px) {
    .mobile-chat-container {
        height: calc(100vh - 200px);
        height: calc(100dvh - 200px);
        max-height: calc(100vh - 200px);
        max-height: calc(100dvh - 200px);
        min-height: 380px;
        overflow: hidden;
    }
}

/* Terms Checkbox & Error Highlight */
.terms-box-error {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.08) !important;
    animation: termsShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes termsShake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* ─── EasyMDE Rich Text Editor Custom Theme Integration ─────────────────────── */
.EasyMDEContainer {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.EasyMDEContainer .editor-toolbar {
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 1rem 1rem 0 0;
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    opacity: 1;
}

.EasyMDEContainer .editor-toolbar button {
    border-radius: 8px !important;
    border: 1px solid transparent;
    color: #475569 !important;
    transition: all 0.2s ease;
    margin: 0 1px;
}

.EasyMDEContainer .editor-toolbar button:hover,
.EasyMDEContainer .editor-toolbar button.active {
    background: rgba(99, 102, 241, 0.12) !important;
    border-color: rgba(99, 102, 241, 0.25) !important;
    color: #4f46e5 !important;
}

.EasyMDEContainer .CodeMirror {
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-top: none;
    border-radius: 0 0 1rem 1rem;
    background: #ffffff;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.75;
    padding: 14px 16px;
}

.EasyMDEContainer .editor-statusbar {
    padding: 6px 14px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
}

/* Dark Mode EasyMDE Styling */
.dark .EasyMDEContainer .editor-toolbar {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.75);
}

.dark .EasyMDEContainer .editor-toolbar button {
    color: #94a3b8 !important;
}

.dark .EasyMDEContainer .editor-toolbar button:hover,
.dark .EasyMDEContainer .editor-toolbar button.active {
    background: rgba(99, 102, 241, 0.25) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    color: #a5b4fc !important;
}

.dark .EasyMDEContainer .editor-toolbar i.separator {
    border-left-color: rgba(255, 255, 255, 0.1);
}

.dark .EasyMDEContainer .CodeMirror {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(9, 9, 11, 0.65);
    color: #e2e8f0;
}

.dark .EasyMDEContainer .CodeMirror-cursor {
    border-left-color: #818cf8;
}

.dark .EasyMDEContainer .editor-preview-side,
.dark .EasyMDEContainer .editor-preview {
    background: #09090b;
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.08);
}

/* ─── AI Remaster Button & Modal Styles ─────────────────────────────────────── */
.ai-remaster-trigger-btn {
    background-size: 200% 200%;
    animation: aiGradientShift 4s ease infinite;
}

@keyframes aiGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ─── Admin Blog Form — Улучшенная читаемость и выравнивание ─────────────── */

/* Полупрозрачные карточки → чистый белый в светлой теме для лучшей читаемости */
.admin-blog-form .form-card {
    background: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03) !important;
}
.dark .admin-blog-form .form-card {
    background: rgba(15, 17, 26, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}

/* Выравнивание колонок по высоте — правая колонка растягивается до высоты левой */
.admin-blog-form .form-grid {
    align-items: stretch;
}
.admin-blog-form .form-right-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.admin-blog-form .form-right-col > .form-card {
    flex: 0 0 auto;
}

/* Светлый фон для input/textarea внутри формы — лучший контраст */
.admin-blog-form input[type="text"],
.admin-blog-form input[type="number"],
.admin-blog-form select,
.admin-blog-form textarea {
    background: #f8fafc !important;
    border-color: rgba(203, 213, 225, 0.8) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.admin-blog-form input[type="text"]:focus,
.admin-blog-form input[type="number"]:focus,
.admin-blog-form select:focus,
.admin-blog-form textarea:focus {
    background: #ffffff !important;
    border-color: rgba(99, 102, 241, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}
.dark .admin-blog-form input[type="text"],
.dark .admin-blog-form input[type="number"],
.dark .admin-blog-form select,
.dark .admin-blog-form textarea {
    background: rgba(9, 9, 11, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
.dark .admin-blog-form input[type="text"]:focus,
.dark .admin-blog-form input[type="number"]:focus,
.dark .admin-blog-form select:focus,
.dark .admin-blog-form textarea:focus {
    background: rgba(9, 9, 11, 0.9) !important;
    border-color: rgba(99, 102, 241, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

/* EasyMDE внутри admin формы — белый фон с чётким бордером */
.admin-blog-form .EasyMDEContainer .editor-toolbar {
    background: #f1f5f9 !important;
    border-color: rgba(203, 213, 225, 0.9) !important;
}
.admin-blog-form .EasyMDEContainer .CodeMirror {
    background: #ffffff !important;
    border-color: rgba(203, 213, 225, 0.9) !important;
}
.dark .admin-blog-form .EasyMDEContainer .editor-toolbar {
    background: rgba(9, 9, 11, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
}
.dark .admin-blog-form .EasyMDEContainer .CodeMirror {
    background: rgba(9, 9, 11, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
}

/* ─── Blog Article Show Page — Читаемость и выравнивание ───────────────────── */

/* Белая карточка для основного текста статьи */
.article-content-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.7);
    border-radius: 24px;
    padding: 40px 48px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 1px 4px rgba(15, 23, 42, 0.04);
}
.dark .article-content-card {
    background: rgba(13, 15, 24, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* TOC Box — белый фон (переопределяем базовый) */
.blog-toc-box {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}
.dark .blog-toc-box {
    background: rgba(13, 15, 24, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

/* TOC — шрифт 14px и улучшенный вид ссылок */
#toc-list {
    font-size: 14px !important;
    line-height: 1.6;
}
#toc-list li a {
    display: block;
    padding: 5px 10px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    transition: color 0.2s ease, background 0.15s ease;
    font-weight: 600;
    font-size: 14px;
}
#toc-list li a:hover {
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.07);
}
#toc-list li a.toc-active {
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.1);
    font-weight: 700;
}
.dark #toc-list li a {
    color: #94a3b8;
}
.dark #toc-list li a:hover,
.dark #toc-list li a.toc-active {
    color: #818cf8;
    background: rgba(99, 102, 241, 0.15);
}
#toc-list li a.pl-3 {
    padding-left: 22px !important;
    font-size: 13px !important;
    font-weight: 500;
    opacity: 0.85;
}

/* Article body — улучшенный размер шрифта для чтения */
.blog-article-body {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: #2d3748;
}
.dark .blog-article-body {
    color: #cbd5e1;
}
.blog-article-body h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-top: 2.5rem;
    margin-bottom: 1.1rem;
    color: #0f172a;
    letter-spacing: -0.02em;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(99, 102, 241, 0.15);
}
.dark .blog-article-body h2 {
    color: #f1f5f9;
    border-bottom-color: rgba(99, 102, 241, 0.25);
}
.blog-article-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: #1e293b;
}
.dark .blog-article-body h3 {
    color: #e2e8f0;
}
.blog-article-body p {
    margin-bottom: 1.4rem;
}
.blog-article-body code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.875em;
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5;
    padding: 2px 6px;
    border-radius: 5px;
    border: 1px solid rgba(99, 102, 241, 0.15);
}
.dark .blog-article-body code {
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.3);
}
.blog-article-body pre {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px 24px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.blog-article-body pre code {
    background: none;
    color: #e2e8f0;
    padding: 0;
    border: none;
    font-size: 0.875rem;
    line-height: 1.65;
}

