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

html {
    scroll-behavior: smooth;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-card: rgba(30, 30, 40, 0.6);
    --bg-requirement: rgba(20, 20, 28, 0.65);
    --bg-requirement-hover: rgba(30, 30, 40, 0.7);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #a8a8b8;
    --border-color: rgba(255,255,255,0.08);
    --card-hover-border: rgba(108, 85, 121, 0.5);
    --btn-primary-bg: #6c5579;
    --btn-primary-hover: #8b6b9e;
    --btn-outline-border: rgba(255,255,255,0.2);
    --btn-outline-text: #ffffff;
    --gradient-start: #fff;
    --gradient-end: #d0a2e9;
    --badge-bg: rgba(108, 85, 121, 0.2);
    --badge-text: #cdb5e0;
    --stat-number: #d0a2e9;
    --icon-box-bg: rgba(108, 85, 121, 0.2);
    --hero-p-color: #a0a0b0;
    --feature-p-color: #a0a0b0;
    --section-title-grad-start: #ffffff;
    --section-title-grad-end: #c0a0d0;
    --version-badge-color: #d0a2e9;
    --req-h4-color: #e2d0f0;
    --req-p-color: #a8a8b8;
    --req-badge-color: #cdb5e0;
    --footer-border: rgba(255,255,255,0.08);
    --code-bg: rgba(0,0,0,0.4);
    --code-color: #e0c0ff;
    --help-bg: rgba(30, 30, 40, 0.4);
    --version-number-color: #d0a2e9;
    --strong-color: #e0d0f0;
}

::selection {
    background: #6c5579 !important;
    color: #ffffff !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
}

::-moz-selection {
    background: #6c5579 !important;
    color: #ffffff !important;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body:not(.lang-loaded) {
    visibility: hidden;
}
body.lang-loaded {
    visibility: visible;
}

.cubes-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.cube {
    position: absolute;
    opacity: 0.15;
    animation: floatInPlace 6s ease-in-out infinite alternate;
    pointer-events: none;
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.cube-sm {
    width: 20px;
    height: 20px;
    animation-duration: 4s;
}

.cube-md {
    width: 40px;
    height: 40px;
    animation-duration: 6s;
}

.cube-lg {
    width: 60px;
    height: 60px;
    animation-duration: 8s;
}

.cube-xl {
    width: 80px;
    height: 80px;
    animation-duration: 10s;
}

@keyframes floatInPlace {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
        opacity: 0.25;
    }
    100% {
        transform: translateY(0px) rotate(-10deg);
        opacity: 0.1;
    }
}

.cube-gradient1 {
    background: linear-gradient(135deg, #6c5579, #8b6b9e);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(108, 85, 121, 0.3);
}

.cube-gradient2 {
    background: linear-gradient(225deg, #8b6b9e, #d0a2e9);
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(208, 162, 233, 0.25);
}

.cube-gradient3 {
    background: linear-gradient(45deg, #4a3a5a, #6c5579);
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(74, 58, 90, 0.3);
}

.cube-gradient4 {
    background: linear-gradient(160deg, #d0a2e9, #a07fb5);
    border-radius: 16px;
    box-shadow: 0 0 12px rgba(208, 162, 233, 0.2);
}

.cube-border {
    background: transparent;
    border: 2px solid rgba(108, 85, 121, 0.4);
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(108, 85, 121, 0.2);
}

.flag-icon {
    display: inline-block;
    width: 22px;
    height: 16px;
    border-radius: 2px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.flag-icon.ru {
    background-image: url('https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.5.0/flags/4x3/ru.svg');
}

.flag-icon.en {
    background-image: url('https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.5.0/flags/4x3/us.svg');
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
}

.btn-loading-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hidden {
    display: none !important;
}

.loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 4px;
}

.loading-dots span {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: white;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.container-narrow {
    max-width: 950px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 16px;
}

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

.logo img {
    width: 28px;
    height: 28px;
    margin-right: 10px;
    vertical-align: middle;
}

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
    font-size: 15px;
}

.nav a:hover {
    color: var(--gradient-end);
}

.theme-toggle, .lang-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    padding: 6px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.theme-toggle:hover, .lang-toggle:hover {
    border-color: var(--card-hover-border);
    transform: scale(1.02);
}

.theme-toggle span, .lang-toggle span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: white;
}

.btn-primary:hover {
    background: var(--btn-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 85, 121, 0.3);
}

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

.btn-outline:hover {
    border-color: var(--btn-primary-bg);
    background: rgba(108, 85, 121, 0.1);
}

.btn-large {
    padding: 16px 36px;
    font-size: 18px;
}

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

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 18px;
    color: var(--hero-p-color);
    max-width: 600px;
    margin: 0 auto 32px;
}

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

.feature-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 28px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--card-hover-border);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--feature-p-color);
    font-size: 14px;
}

.download-section {
    text-align: center;
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.version-badge {
    display: inline-block;
    background: var(--badge-bg);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 20px;
    color: var(--version-badge-color);
}

.download-options {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin: 32px 0 20px;
}

.download-card {
    background: var(--bg-requirement);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 30px 40px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 240px;
    flex: 1;
    max-width: 320px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.download-card:hover {
    transform: translateY(-6px);
    border-color: var(--card-hover-border);
    background: var(--bg-requirement-hover);
    box-shadow: 0 12px 30px rgba(108, 85, 121, 0.2);
}

.download-card:hover .card-icon img {
    filter: brightness(1.3) drop-shadow(0 0 12px rgba(208, 162, 233, 0.6));
    transition: all 0.3s ease;
}

.download-card .card-icon img {
    transition: all 0.3s ease;
}

.download-card.loading {
    pointer-events: none;
    opacity: 0.7;
    transform: scale(0.98);
}

.download-card .card-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.download-card .card-icon img {
    display: block;
}

.download-card .card-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.download-card .card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.download-card .card-badge {
    display: inline-block;
    background: var(--badge-bg);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--badge-text);
}

.download-card .card-status {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    min-height: 24px;
}

.download-card .card-status.error {
    color: #ff6b6b;
}

.download-card .card-status.success {
    color: #69db7c;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.requirements-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 48px;
    background: linear-gradient(135deg, var(--section-title-grad-start), var(--section-title-grad-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.requirements-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.req-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.req-item {
    flex: 1;
    min-width: 200px;
    background: var(--bg-requirement);
    backdrop-filter: blur(12px);
    border-radius: 28px;
    padding: 18px 22px;
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.req-item:hover {
    transform: translateY(-3px);
    border-color: var(--card-hover-border);
    background: var(--bg-requirement-hover);
    box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}

.req-icon-box {
    font-size: 34px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--icon-box-bg);
    border-radius: 24px;
    transition: all 0.2s;
}

.req-item:hover .req-icon-box {
    background: rgba(108, 85, 121, 0.4);
    transform: scale(1.02);
}

.req-content {
    flex: 1;
}

.req-content h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--req-h4-color);
    letter-spacing: -0.2px;
}

.req-content p {
    font-size: 13px;
    color: var(--req-p-color);
    line-height: 1.4;
    font-weight: 400;
}

.req-badge {
    display: inline-block;
    background: rgba(108, 85, 121, 0.3);
    border-radius: 40px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--req-badge-color);
    margin-left: 8px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 60px 0;
    text-align: center;
}

.stat-number {
    font-size: 42px;
    font-weight: 700;
    color: var(--stat-number);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 8px;
}

.footer {
    padding: 40px 0;
    border-top: 1px solid var(--footer-border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--gradient-end);
}

.footer-divider {
    color: var(--border-color);
}

.page-title {
    text-align: center;
    padding: 60px 0 40px;
}

.page-title h1 {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page-title p {
    color: var(--text-secondary);
    margin-top: 12px;
}

.page-header {
    text-align: center;
    padding: 60px 0 40px;
}

.page-header h1 {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 16px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 18px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gradient-end);
    text-decoration: none;
    margin-bottom: 20px;
    transition: gap 0.2s;
}

.back-link:hover {
    gap: 12px;
}

.changelog {
    padding: 20px 0 60px;
}

.version {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.version:hover {
    transform: translateY(-2px);
    border-color: var(--card-hover-border);
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.version-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--version-number-color);
}

.version-build {
    color: var(--text-secondary);
    font-size: 14px;
    margin-left: 8px;
}

.version-date {
    color: var(--text-secondary);
    font-size: 14px;
}

.version .version-badge {
    display: inline-block;
    background: var(--badge-bg);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-left: 12px;
    color: var(--badge-text);
}

.changes {
    list-style: none;
}

.changes li {
    padding: 8px 0 8px 28px;
    position: relative;
    color: var(--text-secondary);
    font-size: 14px;
}

.changes li::before {
    content: "▹";
    position: absolute;
    left: 0;
    top: 8px;
    color: var(--gradient-end);
}

.help-section {
    padding: 20px 0 60px;
}

.help-category {
    margin-bottom: 48px;
}

.help-category-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gradient-end);
    display: inline-block;
}

.help-item {
    background: var(--help-bg);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.help-item:hover {
    border-color: var(--card-hover-border);
    transform: translateY(-2px);
}

.help-question {
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.help-question:hover {
    color: var(--gradient-end);
}

.help-question::after {
    content: '▼';
    font-size: 14px;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.help-item.active .help-question::after {
    transform: rotate(180deg);
}

.help-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-secondary);
    line-height: 1.6;
}

.help-item.active .help-answer {
    padding: 0 24px 20px 24px;
    max-height: 500px;
}

.help-answer code {
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
    color: var(--code-color);
}

.help-answer ul, .help-answer ol {
    margin: 12px 0 12px 24px;
}

.help-answer li {
    margin: 8px 0;
}

.help-answer strong {
    color: var(--gradient-end);
}

code {
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
    color: var(--code-color);
}

strong {
    color: var(--strong-color);
}

.badge {
    display: inline-block;
    background: var(--badge-bg);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-left: 12px;
    color: var(--badge-text);
}

@media (max-width: 768px) {
    .hero h1 { font-size: 36px; }
    .stats { grid-template-columns: 1fr; gap: 24px; }
    .header { flex-direction: column; }
    .nav { justify-content: center; }
    .container { padding: 0 20px; }
    .page-title h1 { font-size: 32px; }
    .version-header { flex-direction: column; gap: 8px; }
    .help-question { font-size: 16px; padding: 16px 20px; }
    .help-item.active .help-answer { padding: 0 20px 16px 20px; }
}

@media (max-width: 760px) {
    .req-item {
        min-width: 100%;
        padding: 16px 20px;
    }
    .req-icon-box {
        font-size: 28px;
        width: 44px;
        height: 44px;
    }
    .section-title {
        font-size: 28px;
    }
    .download-card {
        min-width: 100%;
        max-width: 100%;
        padding: 24px;
    }
}

@media (max-width: 540px) {
    .req-row {
        gap: 14px;
    }
    .req-content h4 {
        font-size: 16px;
    }
}

#online-users {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#online-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
    flex-shrink: 0;
}

#online-text {
    color: var(--text-secondary);
    font-size: 14px;
}

#online-count {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
}

#online-suffix {
    color: var(--text-secondary);
    font-size: 14px;
}

@keyframes pulse-dot {
    0% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.85);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@media (max-width: 480px) {
    #online-users {
        flex-wrap: wrap;
        gap: 6px;
    }
    #online-text {
        font-size: 12px;
    }
    #online-count {
        font-size: 13px;
    }
    #online-suffix {
        font-size: 12px;
    }
    #online-dot {
        width: 8px;
        height: 8px;
    }
}