/* ==========================================================================
   SciForTots Main Landing CSS
   Style: Playful, Magical, Modern Glassmorphism & High-converting UX
   ========================================================================== */

/* --- CSS Variables & Design System --- */
:root {
    --font-heading: 'Comfortaa', 'Fredoka', cursive, sans-serif;
    --font-body: 'Quicksand', 'Fredoka', system-ui, sans-serif;

    /* Color Palette */
    --primary: #7c3aed;
    --primary-light: #8b5cf6;
    --primary-dark: #6d28d9;
    --primary-glow: rgba(124, 58, 237, 0.25);
    
    --accent-gold: #f59e0b;
    --accent-coral: #ff5e7e;
    --accent-mint: #10b981;
    --accent-sky: #0ea5e9;

    --text-dark: #1e1b4b;
    --text-muted: #4c4f69;
    --text-light: #ffffff;

    --bg-page: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.8);
    --card-shadow: 0 16px 36px -8px rgba(99, 102, 241, 0.12), 0 4px 12px rgba(0, 0, 0, 0.03);
    --card-shadow-hover: 0 24px 48px -12px rgba(124, 58, 237, 0.22), 0 8px 24px rgba(0, 0, 0, 0.06);

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-pill: 9999px;

    --transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Global Resets & Base Styles --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: radial-gradient(circle at 10% 20%, #f0e7ff 0%, #e0f2fe 40%, #fdf4ff 80%);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Visually Hidden (SEO Utility) --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Header & Navigation --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.site-logo-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(45, 91, 227, 0.25);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    flex-shrink: 0;
}

.brand-logo:hover .site-logo-img {
    transform: scale(1.1) rotate(4deg);
    box-shadow: 0 6px 18px rgba(45, 91, 227, 0.4);
}

.logo-badge {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-sky) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 8px 16px var(--primary-glow);
    animation: pulse-subtle 3s infinite ease-in-out;
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.logo-text span {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.8vw, 12px);
    list-style: none;
    flex-wrap: nowrap;
}

.nav-link {
    font-weight: 600;
    font-size: 0.86rem;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 8px;
    right: 8px;
    width: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
    margin: 0 auto;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(124, 58, 237, 0.05);
}

.nav-link:hover::after {
    width: calc(100% - 16px);
}

.nav-link.active {
    color: var(--primary);
    font-weight: 700;
    background: rgba(124, 58, 237, 0.08);
}

.nav-link.active::after {
    width: calc(100% - 16px);
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* --- Language Switcher Dropdown --- */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    white-space: nowrap;
    flex-shrink: 0;
}

.lang-dropdown-btn:hover,
.lang-dropdown.open .lang-dropdown-btn {
    background: #ffffff;
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.lang-icon {
    font-size: 1rem;
}

.lang-current-code {
    letter-spacing: 0.5px;
}

.lang-arrow {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

.lang-dropdown.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 170px;
    max-height: 250px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    list-style: none;
    padding: 6px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-dropdown.open .lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Scrollbar styling for long list of languages */
.lang-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.lang-dropdown-menu::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.lang-dropdown-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.lang-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.lang-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.lang-dropdown-item:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.lang-dropdown-item.active {
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
    font-weight: 700;
}

.lang-flag {
    font-size: 1.1rem;
}

/* --- Mobile Nav Toggle --- */
.mobile-toggle {
    display: none;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    font-size: 20px;
    align-items: center;
    justify-content: center;
}

/* --- Hero Section --- */
.hero-section {
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.08);
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 32px;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 36px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #f97316 100%);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    border-radius: var(--radius-pill);
    box-shadow: 0 12px 28px -6px rgba(249, 115, 22, 0.45);
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 18px 36px -6px rgba(249, 115, 22, 0.55);
}

/* --- Temporary 7-Day Free Trial Promo Banner --- */
.promo-trial-banner {
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.96) 0%, rgba(254, 243, 199, 0.94) 50%, rgba(243, 232, 255, 0.96) 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.55);
    border-radius: 16px;
    padding: 12px 18px;
    color: #1e1b4b;
    font-weight: 700;
    font-size: 0.96rem;
    line-height: 1.45;
    box-shadow: 0 6px 20px -4px rgba(245, 158, 11, 0.2), 0 2px 6px rgba(124, 58, 237, 0.08);
    cursor: pointer;
    transition: var(--transition);
}

.promo-trial-banner:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.85);
    box-shadow: 0 10px 26px -4px rgba(245, 158, 11, 0.3), 0 4px 12px rgba(124, 58, 237, 0.14);
}

.promo-trial-banner:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.hero-promo-trial {
    display: block;
    max-width: 540px;
    margin-top: -16px;
    margin-bottom: 26px;
}

.stories-promo-trial {
    display: block;
    max-width: 680px;
    margin: 16px auto 0;
    text-align: center;
}

@media (max-width: 992px) {
    .hero-promo-trial {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.badge-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img-wrapper {
    position: relative;
    width: 100%;
    max-width: 520px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow-hover);
    border: 6px solid #ffffff;
    background: #ffffff;
}

.hero-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.hero-visual:hover img {
    transform: scale(1.02);
}

/* Floating animation items */
.float-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid #ffffff;
    animation: float 4s ease-in-out infinite;
}

.float-card-1 {
    top: -20px;
    left: -20px;
    color: var(--primary);
}

.float-card-2 {
    bottom: -15px;
    right: -15px;
    color: var(--accent-mint);
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes pulse-subtle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* --- Section Shared Headers --- */
.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 50px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 1.3;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- About Section --- */
.about-section {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.feature-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 2px solid var(--glass-border);
    padding: 32px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(124, 58, 237, 0.4);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #f3e8ff 0%, #e0e7ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.15);
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.feature-desc {
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* --- Free Stories Presentation Section --- */
.stories-section {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.4);
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.story-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary-light);
}

.story-thumb {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f1f5f9;
}

.story-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.story-card:hover .story-thumb img {
    transform: scale(1.06);
}

.story-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.story-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.story-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.35;
}

.story-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.btn-story {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    box-shadow: 0 6px 16px var(--primary-glow);
}

.btn-story:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    box-shadow: 0 10px 22px var(--primary-glow);
}

/* --- Pricing Section --- */
.pricing-section {
    padding: 80px 0;
}

.auto-renew-toggle {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 8px 18px;
    border-radius: var(--radius-pill, 30px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: var(--transition, all 0.2s ease);
}

.auto-renew-toggle:hover {
    background: #ffffff;
    border-color: rgba(124, 58, 237, 0.25);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.08);
}

.auto-renew-toggle input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--primary, #7c3aed);
}

.auto-renew-toggle label {
    color: #1e293b;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    justify-content: center;
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 36px 20px;
    box-shadow: var(--card-shadow);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.pricing-card:hover,
.pricing-card:focus-within,
.pricing-card.has-tooltip-open,
.pricing-card:has(.price-tooltip-wrap:hover),
.pricing-card:has(.price-tooltip-wrap.active) {
    z-index: 60 !important;
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
}

.pricing-card.popular {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.18);
}

.popular-badge {
    position: absolute;
    top: -16px;
    right: 20px;
    background: linear-gradient(135deg, var(--accent-coral) 0%, #e11d48 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

.plan-header {
    margin-bottom: 20px;
}

.plan-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.plan-price-box {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.plan-price {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 1.8vw + 0.8rem, 2.2rem);
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.plan-period {
    font-size: clamp(0.85rem, 0.8vw + 0.5rem, 1rem);
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}

/* Pricing Info Tooltip */
.price-tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    align-self: center;
    margin-left: 6px;
    z-index: 70;
}

.price-tooltip-trigger {
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
    border: 1px solid rgba(124, 58, 237, 0.25);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    outline: none;
    flex-shrink: 0;
}

.price-tooltip-trigger svg {
    display: block;
    width: 12px;
    height: 12px;
    pointer-events: none;
}

.price-tooltip-trigger:hover,
.price-tooltip-trigger:focus-visible,
.price-tooltip-wrap.active .price-tooltip-trigger {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
}

.price-tooltip-bubble {
    position: absolute;
    bottom: calc(100% + 10px);
    right: -10px;
    left: auto;
    width: 270px;
    max-width: min(280px, calc(100vw - 32px));
    background: #1e293b;
    color: #f8fafc;
    font-size: 0.8rem;
    line-height: 1.45;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 14px 30px -4px rgba(15, 23, 42, 0.55), 0 6px 14px -2px rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.18);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 100;
    white-space: normal;
    text-align: left;
    word-break: normal;
    overflow-wrap: break-word;
}

.price-tooltip-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    right: var(--arrow-right, 14px);
    left: auto;
    border-width: 6px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

.price-tooltip-wrap:hover .price-tooltip-bubble,
.price-tooltip-trigger:focus-visible + .price-tooltip-bubble,
.price-tooltip-wrap.active .price-tooltip-bubble {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.plan-features {
    list-style: none;
    margin-bottom: 36px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    color: var(--text-dark);
    font-weight: 600;
}

.plan-features li::before {
    content: '✓';
    width: 26px;
    height: 26px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.btn-pricing {
    width: 100%;
    padding: 16px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: var(--radius-pill);
    transition: var(--transition);
    text-align: center;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 8px 20px var(--primary-glow);
}

.btn-filled {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    box-shadow: 0 10px 24px var(--primary-glow);
}

.btn-filled:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px var(--primary-glow);
}

/* --- Modal Window --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.modal-overlay.active,
.modal-overlay.modal-open {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    padding: 40px 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: scale(0.9);
    transition: var(--transition);
    text-align: center;
    margin: auto;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal-overlay.active .modal-card,
.modal-overlay.modal-open .modal-card {
    transform: scale(1);
}

@media (max-width: 640px) {
    .modal-overlay {
        padding: 12px;
    }
    .modal-card {
        padding: 26px 18px;
        border-radius: var(--radius-md);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: #e2e8f0;
    color: var(--text-dark);
}

.modal-icon {
    font-size: 54px;
    margin-bottom: 16px;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-dark);
}

.modal-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 28px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-input {
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--radius-pill);
    border: 2px solid #e2e8f0;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.modal-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Password Input with Toggle Visibility Button */
.password-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.password-input-wrapper .modal-input {
    width: 100%;
    padding-right: 48px;
}

.btn-toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: color 0.2s ease, background-color 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    z-index: 2;
}

.btn-toggle-password:hover {
    color: var(--primary, #6366f1);
    background-color: rgba(99, 102, 241, 0.08);
}

.btn-toggle-password:focus-visible {
    outline: 2px solid var(--primary, #6366f1);
    outline-offset: 2px;
}

.btn-toggle-password .eye-icon {
    display: block;
    pointer-events: none;
}

.modal-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: var(--radius-pill);
    transition: var(--transition);
}

.modal-submit:hover {
    opacity: 0.95;
    box-shadow: 0 8px 20px var(--primary-glow);
}

.modal-success-msg {
    display: none;
    margin-top: 16px;
    padding: 12px;
    background: #dcfce7;
    color: #15803d;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

/* --- Community & Chat Section --- */
.community-section {
    padding: 70px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.community-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 32px;
    align-items: start;
}

.chat-form-card {
    background: #ffffff;
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.chat-form-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.chat-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid #cbd5e1;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: #f8fafc;
    outline: none;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-block {
    width: 100%;
    margin-top: 8px;
    justify-content: center;
}

/* Chat Feed Side */
.chat-feed-card {
    background: #ffffff;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 480px;
}

.chat-feed-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.chat-feed-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-translate-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid #c7d2fe;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    color: #4338ca;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.12);
    user-select: none;
}

.chat-translate-btn:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #c7d2fe 100%);
    border-color: #a5b4fc;
    color: #312e81;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.chat-translate-btn:active {
    transform: translateY(0);
}

.chat-translate-btn.translating {
    opacity: 0.8;
    pointer-events: none;
    cursor: wait;
}

.chat-translate-btn.translating .chat-translate-icon {
    display: inline-block;
    animation: spinTranslate 1s linear infinite;
}

.chat-translate-btn.active-translated {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #6ee7b7;
    color: #065f46;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.15);
}

.chat-translate-btn.active-translated:hover {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #047857;
}

@keyframes spinTranslate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.chat-translated-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 4px;
    padding: 1px 6px;
    margin-left: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    animation: fadeInMsg 0.2s ease;
}

.chat-card-translate-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 4px;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: auto;
}

.chat-card-translate-btn:hover {
    color: var(--primary);
    background: #f1f5f9;
}

.chat-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chat-filter-btn {
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.chat-filter-btn:hover {
    color: var(--primary);
    background: #e2e8f0;
}

.chat-filter-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.chat-messages-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 440px;
    overflow-y: auto;
    padding-right: 6px;
}

.chat-messages-list::-webkit-scrollbar {
    width: 6px;
}

.chat-messages-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.chat-messages-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.chat-msg-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: var(--transition);
    animation: fadeInMsg 0.3s ease;
}

@keyframes fadeInMsg {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-msg-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.chat-msg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-msg-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a5b4fc 0%, var(--primary) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.chat-author-info {
    display: flex;
    flex-direction: column;
}

.chat-author-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.chat-msg-time {
    font-size: 0.78rem;
    color: #94a3b8;
}

.chat-msg-badge {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

.chat-msg-badge.idea {
    background: #fef3c7;
    color: #d97706;
}

.chat-msg-badge.review {
    background: #dcfce7;
    color: #15803d;
}

.chat-msg-badge.question {
    background: #e0e7ff;
    color: #4338ca;
}

.chat-msg-body {
    font-size: 0.93rem;
    line-height: 1.55;
    color: var(--text-dark);
}

.chat-msg-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.chat-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.chat-like-btn:hover,
.chat-like-btn.liked {
    background: #ffe4e6;
    border-color: #f43f5e;
    color: #e11d48;
}

.chat-empty-msg {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Chat Form Auth Overlay */
.chat-form-card {
    position: relative;
}

.chat-auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    z-index: 10;
    text-align: center;
    padding: 20px;
}

.chat-auth-overlay p {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.chat-auth-overlay .btn-primary {
    padding: 10px 24px;
}

/* Admin Reply Box */
.admin-reply-box {
    margin-top: 14px;
    padding: 12px 16px;
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.9rem;
    color: #166534;
}

.admin-reply-box strong {
    display: block;
    margin-bottom: 4px;
    color: #15803d;
}

/* =======================================================
   RESPONSIVE LAYOUT FOR COMMUNITY & CHAT ("Чат и Идеи")
   ======================================================= */

/* Вертикальный режим смартфонов (форма и лента сообщений располагаются вертикально друг под другом) */
@media screen and (orientation: portrait) and (max-width: 900px), screen and (max-width: 600px) {
    .community-section {
        padding: 40px 0 30px;
    }

    .community-section .section-header {
        margin-bottom: 28px;
    }

    .community-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .chat-form-card {
        padding: 22px 18px;
    }

    .chat-feed-card {
        padding: 20px 16px;
        min-height: auto;
    }

    .chat-form-title {
        font-size: 1.22rem;
        margin-bottom: 16px;
    }

    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px; /* Предотвращает нежелательный зум на смартфонах в Safari iOS */
        padding: 10px 14px;
    }

    .chat-feed-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .chat-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .chat-filter-btn {
        padding: 6px 12px;
        font-size: 0.82rem;
    }

    .chat-feed-actions {
        width: 100%;
        justify-content: stretch;
    }

    .chat-translate-btn {
        width: 100%;
        justify-content: center;
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .chat-messages-list {
        max-height: 480px;
        padding-right: 4px;
    }

    .back-to-home-wrapper {
        margin: 32px 0 20px;
    }

    .btn-back-home {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* Горизонтальный режим смартфонов (поля остаются горизонтально рядом) */
@media screen and (orientation: landscape) and (max-height: 550px) {
    .community-section {
        padding: 30px 0 20px;
    }

    .community-section .section-header {
        margin-bottom: 20px;
    }

    .community-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        align-items: start;
    }

    .chat-form-card,
    .chat-feed-card {
        padding: 18px 16px;
    }

    .chat-messages-list {
        max-height: 300px;
    }
}

/* --- Footer --- */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr;
    gap: 36px;
    padding-bottom: 40px;
    border-bottom: 1px solid #1e293b;
}

.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 12px;
}

.footer-tagline {
    font-size: 0.95rem;
    max-width: 440px;
    line-height: 1.6;
}

.footer-col-title {
    font-family: var(--font-heading);
    color: #ffffff;
    font-size: 1.05rem;
    margin-bottom: 14px;
}

.footer-legal-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-legal-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-legal-links a:hover {
    color: var(--accent-sky);
    text-decoration: underline;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.footer-contact a {
    color: var(--accent-sky);
    font-weight: 600;
    transition: var(--transition);
}

.footer-contact a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-payment-note {
    font-size: 0.85rem;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    margin-top: 4px;
    display: inline-block;
}

@media (max-width: 860px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 30px;
    font-size: 0.9rem;
}

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-cta-group, .hero-badges {
        justify-content: center;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .float-card-1 {
        top: -10px;
        left: 0;
    }

    .float-card-2 {
        bottom: -10px;
        right: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-contact {
        align-items: center;
    }
}

/* Body scroll locking when modal or mobile menu is active */
html.modal-open,
body.modal-open,
body.menu-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

@keyframes navFadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =======================================================
   RESPONSIVE NAVIGATION MENU (<= 1024px)
   ======================================================= */
@media (max-width: 1024px) {
    .site-header {
        --header-h: 80px;
    }

    .header-inner {
        height: var(--header-h);
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        box-shadow: 0 20px 30px rgba(0, 0, 0, 0.12);
        border-bottom: 1px solid #e2e8f0;
        display: none;
        max-height: calc(100vh - var(--header-h));
        max-height: calc(100dvh - var(--header-h));
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        z-index: 1000;
    }

    .main-nav.open {
        display: flex;
        animation: navFadeInDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    /* Custom smooth scrollbar for mobile navigation drawer */
    .main-nav::-webkit-scrollbar {
        width: 5px;
    }
    .main-nav::-webkit-scrollbar-track {
        background: #f1f5f9;
    }
    .main-nav::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }
    .main-nav::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link.active {
        background: rgba(124, 58, 237, 0.12);
        color: var(--primary);
        font-weight: 700;
    }

    .lang-dropdown-menu {
        left: 50%;
        right: auto;
        transform: translate(-50%, -8px);
        min-width: 180px;
        max-height: 200px;
        overflow-y: auto;
    }

    .lang-dropdown.open .lang-dropdown-menu {
        transform: translate(-50%, 0);
    }
}

/* --- ГОРИЗОНТАЛЬНЫЙ РЕЖИМ (ПЛАНШЕТЫ И СМАРТФОНЫ В ЛАНДШАФТЕ): 1 СТРОКА (880px - 1024px) --- */
@media (min-width: 880px) and (max-width: 1024px) {
    .main-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        padding: 12px 20px;
        gap: 8px 12px;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 6px 8px;
        width: auto;
        margin: 0;
    }

    .nav-links li {
        display: inline-flex;
        align-items: center;
        flex-shrink: 0;
    }

    .nav-link {
        display: inline-flex;
        align-items: center;
        padding: 6px 12px;
        border-radius: var(--radius-pill);
        font-size: 0.88rem;
        white-space: nowrap;
        width: auto;
    }

    .btn-auth-nav {
        padding: 6px 14px;
        font-size: 0.86rem;
        white-space: nowrap;
        width: auto;
    }

    .lang-dropdown {
        width: auto;
        margin: 0;
        flex-shrink: 0;
    }

    .lang-dropdown-btn {
        padding: 6px 12px;
        font-size: 0.84rem;
        width: auto;
    }
}

/* --- ГОРИЗОНТАЛЬНЫЙ РЕЖИМ: 2 СТРОКИ (660px - 879px) --- */
@media (min-width: 660px) and (max-width: 879px) {
    .main-nav {
        flex-direction: column;
        align-items: center;
        padding: 14px 18px 20px;
        gap: 10px;
    }

    .nav-links {
        display: grid;
        grid-template-columns: repeat(4, auto);
        justify-content: center;
        align-items: center;
        gap: 8px 12px;
        width: auto;
        max-width: 100%;
        margin: 0 auto;
    }

    .nav-links li {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .nav-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 7px 14px;
        border-radius: var(--radius-pill);
        font-size: 0.88rem;
        white-space: nowrap;
        width: 100%;
        text-align: center;
    }

    .btn-auth-nav {
        padding: 7px 16px;
        font-size: 0.86rem;
        white-space: nowrap;
        width: 100%;
        justify-content: center;
    }

    .lang-dropdown {
        width: auto;
        margin: 2px 0 0;
    }

    .lang-dropdown-btn {
        padding: 6px 14px;
        font-size: 0.84rem;
        width: auto;
    }
}

/* --- ГОРИЗОНТАЛЬНЫЙ РЕЖИМ: 3 СТРОКИ (480px - 659px или ландшафт) --- */
@media (max-width: 659px) and (orientation: landscape), (min-width: 480px) and (max-width: 659px) {
    .main-nav {
        flex-direction: column;
        align-items: center;
        padding: 10px 14px 18px;
        gap: 8px;
    }

    .nav-links {
        display: grid;
        grid-template-columns: repeat(3, auto);
        justify-content: center;
        align-items: center;
        gap: 6px 8px;
        width: auto;
        max-width: 100%;
        margin: 0 auto;
    }

    .nav-links li {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .nav-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 5px 11px;
        border-radius: var(--radius-pill);
        font-size: 0.83rem;
        white-space: nowrap;
        width: 100%;
        text-align: center;
    }

    .btn-auth-nav {
        padding: 5px 12px;
        font-size: 0.83rem;
        white-space: nowrap;
        width: 100%;
        justify-content: center;
    }

    .lang-dropdown {
        width: auto;
        margin: 2px 0 0;
    }

    .lang-dropdown-btn {
        padding: 5px 12px;
        font-size: 0.82rem;
        width: auto;
    }
}

/* --- КОМПАКТНЫЙ ЛАНДШАФТ СМАРТФОНОВ (малая высота экрана <= 520px) --- */
@media screen and (orientation: landscape) and (max-height: 520px) {
    .site-header {
        --header-h: 56px;
    }

    .header-inner {
        height: 56px;
    }

    .site-logo-img {
        width: 36px;
        height: 36px;
    }

    .logo-text h1 {
        font-size: 1.15rem;
    }

    .logo-text span {
        font-size: 0.72rem;
    }

    .mobile-toggle {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .main-nav {
        padding: 8px 12px 16px;
        gap: 6px;
        max-height: calc(100vh - 56px);
        max-height: calc(100dvh - 56px);
    }

    .nav-link {
        padding: 4px 9px;
        font-size: 0.8rem;
    }

    .btn-auth-nav {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .lang-dropdown-btn {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .lang-dropdown-menu {
        max-height: 140px;
    }
}

/* --- ВЕРТИКАЛЬНЫЙ РЕЖИМ ДЛЯ СМАРТФОНОВ (портретная ориентация, ширина < 480px или portrait < 576px) --- */
@media (max-width: 479px), ((max-width: 575px) and (orientation: portrait)) {
    .main-nav {
        flex-direction: column;
        align-items: center;
        padding: 16px 16px max(36px, env(safe-area-inset-bottom, 36px));
        gap: 12px;
        max-height: calc(100vh - var(--header-h, 80px));
        max-height: calc(100dvh - var(--header-h, 80px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
        max-width: 290px;
        margin: 0 auto;
        text-align: center;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-link {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 9px 16px;
        border-radius: var(--radius-pill);
        font-size: 1rem;
    }

    .btn-auth-nav {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 9px 16px;
        font-size: 0.95rem;
    }

    .lang-dropdown {
        width: 100%;
        max-width: 220px;
        margin: 4px auto 0;
    }

    .lang-dropdown-btn {
        width: 100%;
        justify-content: center;
    }

    .lang-dropdown-menu {
        left: 50%;
        right: auto;
        transform: translate(-50%, -8px);
        width: 100%;
        max-width: 220px;
    }

    .lang-dropdown.open .lang-dropdown-menu {
        transform: translate(-50%, 0);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
    }
}

/* =======================================================
   ADMIN MODERATOR & AUTHENTICATION STYLES
   ======================================================= */

/* Auth Navigation Button */
.btn-auth-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-auth-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

.btn-auth-nav.admin-active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Admin Status Bar in Chat */
.admin-status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #f59e0b;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    color: #92400e;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
    animation: fadeIn 0.3s ease;
}

.admin-badge-icon {
    font-size: 1.3rem;
}

/* Pinned Message Card */
.chat-msg-card.pinned {
    border: 2px solid #f59e0b !important;
    background: #fffdf5 !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.15) !important;
    position: relative;
}

.pinned-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #fef3c7;
    color: #b45309;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
}

/* Moderator Action Bar on Message Cards */
.chat-admin-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}

.btn-admin-act {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-admin-del {
    background: #fee2e2;
    color: #dc2626;
}

.btn-admin-del:hover {
    background: #fca5a5;
    color: #991b1b;
}

.btn-admin-pin {
    background: #fef3c7;
    color: #d97706;
}

.btn-admin-pin:hover {
    background: #fde68a;
    color: #b45309;
}

.btn-admin-block {
    background: #f3f4f6;
    color: #4b5563;
}

.btn-admin-block:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* Admin Author Tag */
.chat-author-admin-tag {
    display: inline-block;
    padding: 2px 6px;
    background: #fef3c7;
    color: #b45309;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 4px;
    margin-left: 6px;
}

/* Auth & Dashboard Modals */
.auth-extra-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 4px 0 10px;
}

.auth-mode-toggle {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-dark);
}

.auth-forgot-link {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--primary, #6366f1);
    text-decoration: underline;
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin-left: auto;
}

.auth-forgot-link:hover {
    opacity: 0.75;
}

.auth-footer-hint {
    margin-top: 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
}

.dashboard-card {
    text-align: left;
    max-width: 480px;
}

.user-profile-info {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 16px 0;
    border: 1px solid #e2e8f0;
}

.user-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.user-info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.info-val {
    font-size: 0.92rem;
    color: var(--text-dark);
}

.badge-status {
    padding: 4px 10px;
    background: #e0e7ff;
    color: #4338ca;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 12px;
}

.badge-status.premium {
    background: #dcfce7;
    color: #15803d;
}

.badge-admin {
    padding: 4px 10px;
    background: #fef3c7;
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 12px;
}

.dash-subscription-box {
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    padding: 16px;
    border-radius: var(--radius-md);
}

/* ==========================================================================
   Page View & Router Navigation Styles
   ========================================================================== */
.page-section,
.page-view {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.page-section.active-page,
.page-view.active-page {
    display: block !important;
    opacity: 1;
    animation: fadeInPage 0.35s ease-out forwards;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to Home Button */
.back-to-home-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px 0 30px;
    padding-top: 20px;
    border-top: 1px dashed rgba(124, 58, 237, 0.15);
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, #6d28d9 100%);
    color: #ffffff !important;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    box-shadow: 0 8px 24px var(--primary-glow);
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-back-home:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(124, 58, 237, 0.4);
    background: linear-gradient(135deg, #8b5cf6 0%, var(--primary) 100%);
}

/* --- Main Page Chat CTA Banner --- */
.chat-banner-section {
    padding: 40px 0 60px;
}

.chat-banner-card {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 2px solid #ddd6fe;
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.1);
    transition: var(--transition);
}

.chat-banner-card:hover {
    box-shadow: 0 16px 40px rgba(124, 58, 237, 0.18);
    transform: translateY(-3px);
}

.chat-banner-icon {
    font-size: 3.5rem;
    flex-shrink: 0;
}

.chat-banner-content {
    flex: 1;
}

.chat-banner-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.chat-banner-content p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- Author Section Layout & Formatting --- */
.author-section {
    margin-top: 50px;
}

.author-card {
    background: #ffffff;
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--card-shadow);
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 900px) {
    .author-card {
        grid-template-columns: 1fr;
        padding: 24px;
        gap: 24px;
    }

    .chat-banner-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
}

.author-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-right: 20px;
    border-right: 2px dashed #f1f5f9;
}

@media (max-width: 900px) {
    .author-sidebar {
        padding-right: 0;
        border-right: none;
        border-bottom: 2px dashed #f1f5f9;
        padding-bottom: 24px;
    }
}

.author-photo-frame {
    position: relative;
    width: 220px;
    height: 220px;
    margin-bottom: 16px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border: 4px solid #ffffff;
    outline: 2px solid var(--primary-light);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, outline-color 0.3s ease;
}

.author-photo-frame:hover,
.author-photo-frame:focus-visible {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
    outline-color: var(--primary);
}

.author-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.author-photo-frame:hover .author-photo {
    transform: scale(1.06);
}

.author-photo-zoom-hint {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
    z-index: 2;
}

.author-photo-frame:hover .author-photo-zoom-hint {
    opacity: 1;
    transform: scale(1.12);
    background: var(--primary);
}

.author-badge-tag {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

/* --- Photo Lightbox Modal --- */
.photo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
    padding: 24px;
    box-sizing: border-box;
}

.photo-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.photo-modal-wrapper {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-modal-overlay.active .photo-modal-wrapper {
    transform: scale(1);
}

.photo-modal-img {
    max-width: 88vw;
    max-height: 82vh;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    border: 3px solid rgba(255, 255, 255, 0.25);
    background: #0f172a;
}

.photo-modal-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    color: #0f172a;
    border: none;
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    z-index: 10;
}

.photo-modal-close:hover {
    transform: scale(1.12) rotate(90deg);
    background: var(--primary);
    color: #ffffff;
}

.photo-modal-caption {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.author-name {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.author-role {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 14px;
}

.author-email-badge {
    display: inline-block;
    padding: 8px 16px;
    background: #f1f5f9;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: var(--transition);
}

.author-email-badge:hover {
    background: #e2e8f0;
    color: var(--primary-dark);
}

.author-video-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    transition: var(--transition);
}

.author-video-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff !important;
}

.author-video-link:active {
    transform: translateY(0);
}

.author-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.author-heading {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.author-lead {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.author-p {
    font-size: 1rem;
    color: #334155;
    line-height: 1.7;
    margin-bottom: 8px;
}

.author-box {
    background: #faf5ff;
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: 0 12px 12px 0;
    margin: 8px 0;
}

.author-box-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.author-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.author-bullets li {
    font-size: 0.96rem;
    color: #475569;
    line-height: 1.5;
}

.author-final {
    font-size: 1rem;
    font-style: italic;
    color: #475569;
    line-height: 1.6;
    margin-top: 8px;
}

.author-contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-weight: 600;
    font-size: 1rem;
}

.author-contact-link {
    color: var(--primary);
    text-decoration: underline;
}

/* --- Contacts Section --- */
.contacts-section {
    padding: 60px 0;
}

.contacts-card {
    max-width: 640px;
    margin: 0 auto;
    background: #ffffff;
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--card-shadow);
    text-align: center;
}

.contacts-list-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

.contacts-email-box {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 20px 28px;
    margin-bottom: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contacts-email-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-light, #93c5fd);
}

.contacts-email-icon {
    font-size: 2.2rem;
}

.contacts-email-info {
    text-align: left;
}

.contacts-email-label {
    display: block;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.contacts-email-address {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.contacts-email-address:hover {
    text-decoration: underline;
}

.contacts-desc {
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Language-Specific YouTube Channel Visibility (visible for RU, EN, JA; hidden for CN) --- */
html[lang="cn"] .contacts-youtube-box,
html[lang="zh-CN"] .contacts-youtube-box,
html[lang="cn"] .footer-youtube-link,
html[lang="zh-CN"] .footer-youtube-link,
html[lang="cn"] #author-video-link,
html[lang="zh-CN"] #author-video-link,
html[lang="cn"] #btn-shorts-review,
html[lang="zh-CN"] #btn-shorts-review {
    display: none !important;
}

html:not([lang="ru"]) .ru-only {
    display: none !important;
}

/* Contacts YouTube Card Styling */
.contacts-youtube-box {
    text-decoration: none;
    cursor: pointer;
    background: #fff8f8;
    border-color: #fecaca;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.contacts-youtube-box:hover {
    transform: translateY(-2px);
    border-color: #ef4444;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.15);
}

.contacts-youtube-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.2s ease;
}

.contacts-youtube-box:hover .contacts-youtube-icon {
    transform: scale(1.1);
}

.contacts-youtube-address {
    color: #dc2626 !important;
    transition: color 0.2s ease;
}

.contacts-youtube-box:hover .contacts-youtube-address {
    color: #b91c1c !important;
    text-decoration: underline;
}

/* Footer YouTube Link */
.footer-youtube-link {
    display: inline-flex !important;
    align-items: center;
    color: #ff6b6b !important;
    font-weight: 600;
}

.footer-youtube-link:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Auth Modal Tabs */
.auth-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
    gap: 4px;
}

.auth-tab-btn {
    flex: 1;
    padding: 9px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab-btn:hover {
    color: var(--text-dark, #1e293b);
}

.auth-tab-btn.active {
    background: #ffffff;
    color: var(--primary, #6366f1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#auth-user-modal .modal-desc {
    margin-bottom: 18px;
}

/* Google OAuth Button & Divider */
.auth-oauth-section {
    margin-bottom: 16px;
}

.btn-google-auth {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 13px 20px;
    background: #ffffff;
    color: #1e293b;
    border: 2px solid #cbd5e1;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    transition: all 0.2s ease;
}

.btn-google-auth:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.09);
}

.btn-google-auth:active {
    transform: translateY(0);
    background: #f1f5f9;
}

.btn-google-auth:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.btn-google-auth .google-icon {
    flex-shrink: 0;
    display: block;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 16px 0 4px;
    color: var(--text-muted, #64748b);
    font-size: 0.84rem;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
    padding: 0 12px;
    white-space: nowrap;
}

/* =======================================================
   STORIES CATALOG COMPONENT & MODAL STYLES
   ======================================================= */

/* Catalog Trigger Button in Section Header */
.stories-catalog-trigger-wrapper {
    margin: 1.5rem 0 2.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.btn-catalog-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(124, 58, 237, 0.35);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-catalog-trigger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: 0.5s;
}

.btn-catalog-trigger:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 36px rgba(124, 58, 237, 0.45);
    background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%);
}

.btn-catalog-trigger:hover::before {
    left: 100%;
}

.btn-catalog-trigger:active {
    transform: translateY(-1px) scale(0.99);
}

.btn-shorts-review {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff !important;
    background: linear-gradient(135deg, #ef4444 0%, #f43f5e 100%);
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(239, 68, 68, 0.35);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-shorts-review::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: 0.5s;
}

.btn-shorts-review:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 36px rgba(239, 68, 68, 0.45);
    background: linear-gradient(135deg, #dc2626 0%, #e11d48 100%);
    color: #ffffff !important;
}

.btn-shorts-review:hover::before {
    left: 100%;
}

.btn-shorts-review:active {
    transform: translateY(-1px) scale(0.99);
}

@media (max-width: 640px) {
    .btn-catalog-trigger,
    .btn-shorts-review {
        width: 100%;
        max-width: 360px;
        font-size: 1.05rem;
        padding: 14px 20px;
    }
}

/* Catalog Modal Overlay (Full Screen in Current Browser Window) */
.catalog-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    z-index: 2500;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.catalog-modal-overlay.active,
.catalog-modal-overlay.modal-open {
    opacity: 1;
    visibility: visible;
}

/* Catalog Modal Card */
.catalog-modal-card {
    background: #ffffff;
    border-radius: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    position: relative;
    transform: none;
    transition: none;
    overflow: hidden;
    border: none;
}

.catalog-modal-overlay.active .catalog-modal-card,
.catalog-modal-overlay.modal-open .catalog-modal-card {
    transform: none;
}

/* Catalog Modal Header */
.catalog-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 36px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.catalog-header-title-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

.catalog-modal-emoji {
    font-size: 2.2rem;
    line-height: 1;
}

.catalog-modal-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.catalog-modal-subtitle {
    font-size: 0.92rem;
    color: var(--text-muted);
    font-weight: 500;
}

.catalog-modal-close {
    background: #e2e8f0;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.catalog-modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

/* Catalog Modal Toolbar */
.catalog-modal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 36px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.catalog-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.catalog-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-catalog-ctrl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: var(--text-dark);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-catalog-ctrl:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    transform: translateY(-1px);
}

/* Search Wrapper */
.catalog-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.catalog-search-icon {
    position: absolute;
    left: 14px;
    font-size: 0.95rem;
    pointer-events: none;
    color: #94a3b8;
}

.catalog-search-input {
    padding: 9px 36px 9px 38px;
    border-radius: var(--radius-pill);
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-size: 0.92rem;
    font-family: var(--font-body);
    color: var(--text-dark);
    width: 260px;
    transition: var(--transition);
}

.catalog-search-input:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    width: 290px;
}

.catalog-btn-clear-search {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
}

.catalog-btn-clear-search:hover {
    color: #ef4444;
}

/* Sort Dropdown */
.catalog-sort-wrapper {
    position: relative;
}

.catalog-sort-btn {
    gap: 8px;
}

.catalog-sort-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.catalog-sort-wrapper.open .catalog-sort-arrow {
    transform: rotate(180deg);
}

.catalog-sort-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 210px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    padding: 6px;
    z-index: 100;
    list-style: none;
}

.catalog-sort-dropdown-menu.hidden {
    display: none;
}

.catalog-sort-option {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.15s ease;
}

.catalog-sort-option:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.catalog-sort-option.active {
    background: #ede9fe;
    color: var(--primary);
    font-weight: 700;
}

/* Category Filter Dropdown */
.catalog-category-menu {
    min-width: 250px;
    max-height: 320px;
    overflow-y: auto;
}

.catalog-category-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.catalog-category-icon {
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1;
}

.catalog-category-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-category-btn #catalog-category-current-label {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Catalog Modal Body */
.catalog-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 36px;
    background: #f8fafc;
}

.catalog-modal-body::-webkit-scrollbar {
    width: 8px;
}

.catalog-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.catalog-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.catalog-modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Grid Views: Detailed */
.catalog-grid-view.detailed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* Story Card (Detailed View) */
.catalog-story-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    position: relative;
}

.catalog-story-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(124, 58, 237, 0.18);
    border-color: #c4b5fd;
}

.catalog-story-card:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

/* Top Badges on Cover */
.catalog-card-top-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
    pointer-events: none;
}

.catalog-card-meta-badge {
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.catalog-card-meta-num {
    color: #facc15;
}

.catalog-card-meta-date {
    color: #e2e8f0;
    font-weight: 500;
}

.catalog-card-cover-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #e2e8f0;
    overflow: hidden;
}

.catalog-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.catalog-story-card:hover .catalog-card-image {
    transform: scale(1.06);
}

.catalog-card-info {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.catalog-card-author {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}

.catalog-card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog-card-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog-card-btn {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
    margin-top: auto;
}

.catalog-story-card:hover .catalog-card-btn {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

/* Grid Views: Brief (Multi-Column Grid on Wide Screens) */
.catalog-grid-view.brief {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px 14px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.catalog-brief-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 10px;
    min-width: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.catalog-brief-row:hover {
    background: #ffffff;
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.14);
}

.catalog-brief-row:active {
    transform: translateY(0);
}

.catalog-brief-row:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.catalog-brief-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.catalog-brief-num-badge {
    background: #ede9fe;
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.catalog-brief-date {
    font-size: 0.78rem;
    color: #64748b;
    white-space: nowrap;
    flex-shrink: 0;
}

.catalog-brief-title {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.catalog-brief-row:hover .catalog-brief-title {
    color: var(--primary);
}

.catalog-brief-arrow {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    padding-left: 2px;
}

.catalog-brief-row:hover .catalog-brief-arrow {
    transform: translateX(3px);
}

/* No Results State */
.catalog-no-results {
    text-align: center;
    padding: 60px 20px;
}

.catalog-no-results.hidden {
    display: none;
}

.no-results-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.catalog-no-results p {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Catalog Modal Footer */
.catalog-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 14px 36px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    flex-shrink: 0;
}

.btn-close-catalog-footer {
    padding: 9px 24px;
    font-size: 0.95rem;
    border-radius: var(--radius-pill);
    border-color: #cbd5e1;
    color: var(--text-dark);
}

.btn-close-catalog-footer:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: var(--text-dark);
    box-shadow: none;
}

/* Responsive Styles for Catalog Modal */
@media (max-width: 768px) {
    .catalog-modal-card {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .catalog-modal-header {
        padding: 14px 16px;
    }

    .catalog-modal-title {
        font-size: 1.15rem;
    }

    .catalog-modal-subtitle {
        font-size: 0.82rem;
    }

    .catalog-modal-toolbar {
        padding: 10px 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .catalog-toolbar-left,
    .catalog-toolbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .catalog-search-wrapper {
        flex: 1 1 100%;
        order: -1;
    }

    .catalog-category-wrapper,
    .catalog-sort-wrapper {
        flex: 1 1 0;
    }

    .catalog-category-btn,
    .catalog-sort-btn {
        width: 100%;
        justify-content: space-between;
    }

    .catalog-category-btn #catalog-category-current-label {
        max-width: none;
    }

    .catalog-sort-dropdown-menu,
    .catalog-category-menu {
        min-width: 0;
        max-width: calc(100vw - 32px);
    }

    .catalog-search-input {
        width: 100%;
    }

    .catalog-search-input:focus {
        width: 100%;
    }

    .catalog-modal-body {
        padding: 14px 16px;
    }

    .catalog-grid-view.detailed {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .catalog-grid-view.brief {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .catalog-brief-date {
        display: none;
    }

    .catalog-modal-footer {
        padding: 10px 16px;
    }
}
