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

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    position: relative;
}

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

header {
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(139, 69, 255, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
    width: 100%;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #8b45ff;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: #8b45ff;
    outline: none;
}

.lang-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-width: 100%;
}

.lang-switcher a {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(139, 69, 255, 0.3);
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
}

/* UA :link / :visited override (otherwise blue/purple defaults win) */
.lang-switcher a:link,
.lang-switcher a:visited {
    color: rgba(255, 255, 255, 0.88);
}

.lang-switcher a:hover,
.lang-switcher a:focus-visible {
    color: #ffffff;
    border-color: rgba(139, 69, 255, 0.65);
    outline: none;
}

.lang-switcher a.is-active {
    color: #ffffff;
    background: rgba(139, 69, 255, 0.25);
    border-color: #8b45ff;
}

.cta-button {
    background: linear-gradient(135deg, #8b45ff 0%, #a855f7 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 69, 255, 0.3);
}

.cta-button:hover,
.cta-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 255, 0.4);
    outline: none;
}

.hero {
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(800px, 160vmin);
    height: min(800px, 160vmin);
    background: radial-gradient(circle, rgba(139, 69, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #8b45ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 20px;
    color: #b0b0b0;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, #8b45ff 0%, #a855f7 100%);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 69, 255, 0.3);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 69, 255, 0.4);
    outline: none;
}

.btn-secondary {
    background: transparent;
    color: #8b45ff;
    padding: 16px 32px;
    border: 2px solid #8b45ff;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    background: #8b45ff;
    color: white;
    transform: translateY(-3px);
    outline: none;
}

.features {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.02);
}

.features h2 {
    text-align: center;
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 60px;
    color: #8b45ff;
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(139, 69, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 69, 255, 0.3);
    box-shadow: 0 10px 30px rgba(139, 69, 255, 0.1);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: #8b45ff;
}

.feature-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #ffffff;
}

.feature-card p {
    color: #b0b0b0;
    font-size: 16px;
}

.section-muted {
    padding: 60px 0;
    max-width: 720px;
    margin: 0 auto;
}

.section-muted h2 {
    color: #8b45ff;
    margin-bottom: 16px;
    font-size: 1.75rem;
}

.section-muted p {
    color: #b0b0b0;
}

.stats {
    padding: 80px 0;
    text-align: center;
}

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

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: #8b45ff;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 18px;
    color: #b0b0b0;
}

footer {
    padding: 60px 0 40px;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(139, 69, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: #8b45ff;
    margin-bottom: 20px;
    font-weight: 600;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover,
.footer-section ul li a:focus-visible {
    color: #8b45ff;
    outline: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(139, 69, 255, 0.1);
    color: #666;
}

.blog-list {
    padding: 120px 0 80px;
}

.blog-list h1 {
    font-size: 2.5rem;
    margin-bottom: 32px;
    color: #8b45ff;
}

.blog-card {
    display: block;
    padding: 24px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(139, 69, 255, 0.15);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s;
}

.blog-card:hover,
.blog-card:focus-visible {
    border-color: rgba(139, 69, 255, 0.4);
    outline: none;
}

.blog-card h2 {
    font-size: 1.35rem;
    color: #fff;
    margin-bottom: 8px;
}

.blog-card .excerpt {
    color: #b0b0b0;
    font-size: 0.95rem;
}

.pagination {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 32px;
    flex-wrap: wrap;
}

.pagination a {
    color: #8b45ff;
    text-decoration: none;
    font-weight: 600;
}

.pagination a:hover {
    text-decoration: underline;
}

.article-page {
    padding: 120px 0 80px;
    max-width: 800px;
    margin: 0 auto;
}

.article-page article {
    color: #e0e0e0;
}

.article-page h1 {
    font-size: 2.25rem;
    margin-bottom: 24px;
    color: #fff;
}

.article-body {
    font-size: 1.05rem;
}

.article-body h2 {
    margin: 32px 0 12px;
    color: #8b45ff;
    font-size: 1.5rem;
}

.article-body h3 {
    margin: 24px 0 10px;
    color: #c4b5fd;
    font-size: 1.2rem;
}

.article-body p {
    margin-bottom: 16px;
}

.article-body ul,
.article-body ol {
    margin: 0 0 16px 1.25rem;
}

.article-body a {
    color: #a855f7;
}

.article-cta {
    margin-top: 48px;
    padding: 24px;
    border-radius: 16px;
    background: rgba(139, 69, 255, 0.12);
    border: 1px solid rgba(139, 69, 255, 0.25);
    text-align: center;
}

.article-cta .btn-primary {
    display: inline-block;
    margin-top: 12px;
}

.error-page {
    padding: 140px 0 80px;
    text-align: center;
}

.error-page h1 {
    font-size: 2rem;
    color: #8b45ff;
    margin-bottom: 16px;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #8b45ff;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    will-change: transform;
}

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

.fade-in-up {
    animation: fadeInUp 0.65s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.admin-wrap {
    padding: 100px 0 60px;
    max-width: 1100px;
    margin: 0 auto;
}

.admin-wrap table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    overflow: hidden;
}

.admin-wrap th,
.admin-wrap td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(139, 69, 255, 0.15);
}

.admin-wrap input[type="text"],
.admin-wrap input[type="password"],
.admin-wrap textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #111;
    color: #fff;
    margin-bottom: 8px;
}

.admin-wrap label {
    display: block;
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 12px;
}

.admin-locale {
    margin-bottom: 32px;
    padding: 16px;
    border: 1px solid rgba(139, 69, 255, 0.2);
    border-radius: 12px;
}

@media (max-width: 900px) {
    /* Языки на отдельной строке на планшетах/телефонах — не растягивают ширину страницы */
    .lang-switcher {
        flex: 1 1 100%;
        order: 2;
        padding-top: 8px;
        margin-top: 4px;
        border-top: 1px solid rgba(139, 69, 255, 0.12);
    }

    .logo {
        order: 1;
    }

    .nav-links {
        order: 1;
    }

    .cta-button {
        order: 1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

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

    .logo {
        text-align: center;
        font-size: 24px;
        order: 0;
    }

    .lang-switcher {
        order: 2;
        flex: none;
        width: 100%;
        max-width: 100%;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        gap: 5px;
        row-gap: 8px;
    }

    .lang-switcher a {
        font-size: 11px;
        padding: 5px 7px;
    }

    .cta-button {
        order: 1;
        align-self: center;
        width: 100%;
        max-width: 320px;
        text-align: center;
        box-sizing: border-box;
    }
}
