/* Base Styles */
:root {
    /* Primary colors */
    --primary: #76de80;
    --primary-dark: #4ade80;
    --primary-light: rgba(118, 222, 128, 0.15);
    
    /* Background colors */
    --bg-dark: #0f1014;
    --bg-card: #1a1d25;
    --bg-card-hover: #202430;
    --bg-accent: #2a2e3a;
    
    /* Text colors */
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #a0a0a0;
    
    /* Border and effects */
    --border: #3a3f50;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Code colors */
    --code-bg: #161922;
    --code-accent: #7dcfff;
    --code-param: #ff9e64;
}

/* Language specific display */
html[data-lang="eng"] .rus-version,
html[data-lang="rus"] .eng-version {
    display: none !important;
}

/* General styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.2em;
}

code {
    font-family: 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Consolas, monospace;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 2px 5px;
    font-size: 0.9em;
}

/* Header */
header {
    background-color: var(--bg-accent);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 36px;
    margin-right: 12px;
    filter: drop-shadow(0 2px 4px rgba(118, 222, 128, 0.2));
}

.site-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.01em;
}

.accent {
    color: var(--primary);
    position: relative;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav li {
    margin: 0 16px;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    font-size: 0.95rem;
}

nav a:hover {
    color: var(--primary);
}

nav a:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

nav a:hover:after {
    width: 100%;
}

.language-switch {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    background-color: rgba(118, 222, 128, 0.1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    padding: 6px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background-color: rgba(118, 222, 128, 0.15);
    border-color: var(--primary);
}

.lang-text {
    margin-right: 6px;
    font-weight: 500;
}

/* Hero section */
.hero {
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 30%, var(--primary-light), transparent 70%);
    z-index: 0;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
    position: relative;
    z-index: 1;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.primary-btn {
    background-color: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 4px 12px rgba(118, 222, 128, 0.3);
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(118, 222, 128, 0.4);
}

.secondary-btn {
    background-color: rgba(118, 222, 128, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.secondary-btn:hover {
    background-color: rgba(118, 222, 128, 0.15);
    transform: translateY(-2px);
}

.hero-cards {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 60px;
    position: relative;
    z-index: 1;
}

.feature-card {
    background-color: rgba(26, 29, 37, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 200px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    margin-bottom: 8px;
}

.feature-card p {
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Sections */
.section {
    padding: 80px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: -0.02em;
}

.section-description {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 60px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(118, 222, 128, 0.3);
    box-shadow: var(--shadow);
}

.card-content {
    padding: 32px;
}

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Libraries section */
.libraries-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.small-libs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.lib-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.lib-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.lib-header {
    padding: 20px;
    background-color: rgba(118, 222, 128, 0.05);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.lib-icon {
    font-size: 1.8rem;
    color: var(--primary);
    margin-right: 16px;
    background-color: rgba(118, 222, 128, 0.1);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.lib-title {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.lib-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.lib-desc {
    color: var(--text-muted);
    margin-bottom: 24px;
    flex-grow: 1;
    font-size: 0.95rem;
}

.lib-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lib-link {
    color: var(--primary);
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 0.9rem;
}

.lib-link svg {
    margin-left: 6px;
    width: 14px;
    height: 14px;
}

.lib-tag {
    background-color: rgba(118, 222, 128, 0.1);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Tabs */
.tabs {
    margin: 40px 0;
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    background-color: var(--bg-accent);
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: var(--primary);
    background-color: var(--bg-card);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
}

.tab-content {
    padding: 32px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Documentation styles */
.module-intro {
    background-color: rgba(118, 222, 128, 0.05);
    border-left: 3px solid var(--primary);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.function-list {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.function-list li {
    margin-bottom: 24px;
    padding: 16px;
    background-color: rgba(42, 46, 58, 0.5);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.function-list li:hover {
    background-color: rgba(42, 46, 58, 0.8);
    border-color: rgba(118, 222, 128, 0.2);
    transform: translateY(-2px);
}

.function-list code {
    display: inline-block;
    background-color: var(--code-bg);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Consolas, monospace;
    margin-right: 10px;
    font-size: 0.9rem;
    border: 1px solid rgba(118, 222, 128, 0.1);
}

.function-details {
    margin-top: 12px;
    padding-left: 20px;
    border-left: 2px solid var(--primary);
    font-size: 0.9rem;
}

.param-list {
    margin-top: 12px;
}

.param {
    margin-bottom: 6px;
    display: flex;
    align-items: flex-start;
}

.param-name {
    font-weight: bold;
    margin-right: 8px;
}

.param-type {
    color: var(--code-param);
    background: rgba(255, 158, 100, 0.1);
    padding: 0 5px;
    border-radius: 3px;
    font-size: 0.85rem;
}

.return-value {
    margin-top: 12px;
    font-style: italic;
}

.return-type {
    color: var(--code-accent);
    background: rgba(125, 207, 255, 0.1);
    padding: 0 5px;
    border-radius: 3px;
    font-size: 0.85rem;
}

/* Code blocks */
.code-block {
    position: relative;
    margin: 20px 0;
    background-color: var(--code-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(118, 222, 128, 0.1);
}

/* Custom scrollbar styling */
.code-block pre {
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

.code-block pre::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.code-block pre::-webkit-scrollbar-track {
    background: transparent;
}

.code-block pre::-webkit-scrollbar-thumb {
    background-color: #333;
    border-radius: 4px;
}

.code-block pre::-webkit-scrollbar-thumb:hover {
    background-color: #444;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(118, 222, 128, 0.15);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--primary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}

.copy-btn:hover {
    background-color: rgba(118, 222, 128, 0.25);
}

pre {
    margin: 0;
    padding: 0;
}

pre code {
    display: block;
    padding: 16px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    background: none;
    border-radius: 0;
}

/* Example tabs */
.example-tabs {
    margin-bottom: 40px;
}

.example-tab-buttons {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 24px;
    gap: 12px;
}

.example-tab-btn {
    padding: 10px 20px;
    background-color: rgba(118, 222, 128, 0.08);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.example-tab-btn:hover {
    background-color: rgba(118, 222, 128, 0.12);
    color: var(--text-primary);
}

.example-tab-btn.active {
    background-color: rgba(118, 222, 128, 0.15);
    color: var(--primary);
    border-color: var(--primary);
}

.example-pane {
    display: none;
}

.example-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Footer */
footer {
    background-color: var(--bg-accent);
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
}

.footer-logo img {
    height: 32px;
    margin-right: 12px;
}

.footer-title {
    font-size: 1.3rem;
    margin-bottom: 0;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-column h4 {
    margin-bottom: 16px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-column ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.copyright, .footer-disclaimer {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* Media queries */
@media (max-width: 992px) {
    .grid-2, .grid-3, .libraries-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .small-libs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-links {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        padding: 16px;
    }
    
    nav {
        margin-top: 16px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav li {
        margin: 8px 12px;
    }
    
    .language-switch {
        margin-top: 16px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-cards {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .feature-card {
        width: 100%;
        max-width: 280px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .small-libs-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .card-content {
        padding: 20px;
    }
    
    .lib-header {
        flex-direction: column;
        text-align: center;
    }
    
    .lib-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* Utility classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; } 