* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --secondary-dark: #db2777;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --success: #10b981;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--dark);
    background: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.4);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-card {
    background: var(--primary);
    color: white;
    margin-top: 16px;
}

.btn-card:hover {
    background: var(--primary-dark);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav {
    padding: 16px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
}

.logo i {
    font-size: 28px;
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-menu a {
    font-weight: 500;
    color: var(--dark);
    transition: color 0.3s;
}

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 24px;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.4s both;
}

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

/* Features */
.features {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 60px;
    color: var(--dark);
}

.section-title-light {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 60px;
    color: white;
}

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

.feature-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.feature-icon i {
    font-size: 28px;
    color: white;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--gray);
}

/* Content Section */
.content-section {
    padding: 100px 0;
}

.content-section.bg-light {
    background: white;
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: -40px auto 60px;
    font-size: 1.1rem;
    color: var(--gray);
}

.topics-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.topic-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.topic-image {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topic-image i {
    font-size: 80px;
    color: white;
    opacity: 0.9;
}

.topic-content {
    padding: 40px;
}

.topic-content h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.topic-content p {
    color: var(--gray);
    margin-bottom: 16px;
}

/* Stats */
.stats-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Articles */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.article-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 16px;
}

.article-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.article-card p {
    color: var(--gray);
    margin-bottom: 16px;
}

.article-link {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.article-link:hover {
    color: var(--primary-dark);
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    padding: 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    color: white;
}

.cta-content h3 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.cta-content p {
    opacity: 0.9;
    margin-bottom: 24px;
}

.cta-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
}

.cta-feature i {
    font-size: 1.5rem;
    color: #10b981;
}

/* Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.category-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.category-card i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 16px;
}

.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.category-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Newsletter */
.newsletter-section {
    padding: 80px 0;
    background: var(--dark);
}

.newsletter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.newsletter-content {
    color: white;
}

.newsletter-content h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.newsletter-content p {
    opacity: 0.8;
}

.newsletter-form {
    display: flex;
    gap: 12px;
}

.newsletter-form input {
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    min-width: 300px;
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-col h4 {
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.footer-col p {
    opacity: 0.7;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    opacity: 0.7;
    transition: opacity 0.3s;
}

.footer-col ul li a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.6;
}

/* Floating Button */
.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.floating-btn.hidden {
    opacity: 0;
    visibility: hidden;
}

.fab-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
}

.fab-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.5);
}

.fab-btn i {
    font-size: 20px;
}

/* Page Header */
.page-header {
    padding: 140px 0 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.page-header p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* Content */
.page-content {
    padding: 80px 0;
}

.content-block {
    background: white;
    border-radius: 20px;
    padding: 60px;
    margin-bottom: 40px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.content-block h2 {
    font-size: 2rem;
    margin-bottom: 24px;
    color: var(--dark);
}

.content-block p {
    color: var(--gray);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.content-block ul {
    margin: 20px 0;
    padding-left: 24px;
}

.content-block li {
    margin-bottom: 12px;
    color: var(--gray);
}

/* Responsive */
/* codex-ui-fixes */
.logo,
.logo:hover,
.logo:focus,
.logo:active {
    text-decoration: none;
}

.menu-toggle,
.nav-toggle,
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.menu-toggle:hover,
.nav-toggle:hover,
.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(148, 163, 184, 0.5);
    transform: translateY(-1px);
}

.menu-toggle:focus-visible,
.nav-toggle:focus-visible,
.mobile-menu-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.menu-toggle i,
.nav-toggle i,
.mobile-menu-btn i,
.menu-toggle svg,
.nav-toggle svg,
.mobile-menu-btn svg {
    display: block;
    margin: 0 auto;
}

.menu-toggle span,
.nav-toggle span,
.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .cta-box {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .topic-card {
        grid-template-columns: 1fr;
    }
    
    .topic-image {
        min-height: 200px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .newsletter {
        flex-direction: column;
        text-align: center;
    }
    
    .newsletter-form {
        flex-direction: column;
        width: 100%;
    }
    
    .newsletter-form input {
        min-width: auto;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .content-block {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.fab-btn {
    animation: pulse 2s infinite;
}

.fab-btn:hover {
    animation: none;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 20px 0;
    font-size: 0.9rem;
    color: var(--gray);
}

.breadcrumbs a {
    color: var(--primary);
}

.breadcrumbs span {
    margin: 0 8px;
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid #e2e8f0;
    padding: 24px 0;
}

.faq-question {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.faq-answer {
    color: var(--gray);
    line-height: 1.8;
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.comparison-table th,
.comparison-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.comparison-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.comparison-table tr:hover {
    background: #f8fafc;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
    margin: 24px 0;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.author-info h4 {
    margin-bottom: 4px;
}

.author-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Tags */
.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.tag {
    padding: 4px 12px;
    background: #e2e8f0;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--gray);
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 12px;
    margin: 24px 0;
}

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.3s;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn.vk { background: #4C75A3; }
.share-btn.tg { background: #0088cc; }
.share-btn.ok { background: #F97316; }
