:root {
    --red-50: #fef2f2;
    --red-500: #ef4444;
    --red-600: #dc2626;
    --red-700: #b91c1c;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--gray-800);
    line-height: 1.6;
}

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

.header {
    padding: 20px 0;
    border-bottom: 1px solid var(--gray-200);
    background: var(--white);
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo-emoji {
    font-size: 28px;
}

.nav {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    color: var(--gray-500);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--red-500);
}

.hero {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--gray-800);
}

.hero-title .emoji {
    font-size: 56px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--gray-500);
    margin: 0 auto 32px;
    max-width: 600px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--red-500);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-primary:hover {
    background-color: var(--red-600);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-secondary {
    background: var(--white);
    color: var(--red-500);
    border: 1px solid var(--red-500);
}

.btn-secondary:hover {
    background: var(--red-50);
    transform: translateY(-2px);
}

.features {
    padding: 80px 0;
    background-color: var(--gray-50);
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
}

.feature-card {
    background: var(--white);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
}

.feature-card:hover {
    border-color: var(--red-500);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.1);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--red-50);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.feature-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-text {
    color: var(--gray-500);
    font-size: 14px;
}

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

.how-it-works {
    padding: 80px 0;
}

.steps {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.step {
    text-align: center;
    max-width: 280px;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--red-500);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-text {
    color: var(--gray-500);
    font-size: 14px;
}

.commission {
    padding: 80px 0;
    background: var(--red-50);
    text-align: center;
}

.commission-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
}

.commission-value {
    font-size: 72px;
    font-weight: 700;
    color: var(--red-500);
}

.commission-note {
    color: var(--gray-500);
    margin-top: 8px;
}

.security {
    padding: 80px 0;
}

.security-inner {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 900px;
    margin: 0 auto;
}

.security-icon {
    font-size: 80px;
    flex-shrink: 0;
}

.security-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.security-content p {
    color: var(--gray-500);
    font-size: 16px;
    margin-bottom: 16px;
}

.security-list {
    list-style: none;
}

.security-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--gray-700);
}

.security-list .check {
    color: var(--red-500);
    font-weight: bold;
}

.cta {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(180deg, var(--white) 0%, var(--red-50) 100%);
}

.cta-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
}

.cta-note {
    color: var(--gray-500);
    margin-top: 16px;
}

.cta-note a {
    color: var(--red-500);
    text-decoration: none;
}

.cta-note a:hover {
    text-decoration: underline;
}

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

.docs-hero {
    padding: 72px 0 56px;
    text-align: center;
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
}

.docs-hero .hero-subtitle {
    max-width: 760px;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.docs-page {
    padding: 32px 0 64px;
}

.lang-switcher {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-bottom: 20px;
}

.lang-switcher a {
    color: var(--gray-500);
    font-weight: 600;
    text-decoration: none;
}

.lang-switcher a:hover {
    color: var(--red-500);
}

.toc {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 28px;
    margin: 0 0 48px;
}

.toc h2 {
    font-size: 28px;
    margin-bottom: 18px;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.toc-group-title {
    color: var(--gray-700);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.toc a {
    display: block;
    color: var(--gray-500);
    text-decoration: none;
    padding: 5px 0;
}

.toc a:hover {
    color: var(--red-500);
}

.section {
    margin-top: 56px;
}

.section > h2 {
    color: var(--gray-900);
    font-size: 32px;
    line-height: 1.25;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gray-200);
}

.endpoint {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    transition: all 0.2s;
}

.endpoint:hover {
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.08);
}

.endpoint > h3:first-child {
    color: var(--gray-900);
    font-size: 22px;
    line-height: 1.3;
    margin: 0 0 12px;
}

.endpoint h3:not(:first-child),
.section > h3 {
    color: var(--gray-800);
    font-size: 18px;
    margin: 28px 0 10px;
}

.method {
    display: inline-flex;
    justify-content: center;
    min-width: 72px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-right: 10px;
}

.method.post {
    background: var(--red-500);
    color: var(--white);
}

.method.get {
    background: var(--gray-800);
    color: var(--white);
}

.method.put {
    background: #f59e0b;
    color: var(--white);
}

.method.delete {
    background: var(--red-700);
    color: var(--white);
}

.url {
    display: inline-block;
    max-width: 100%;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    color: var(--gray-800);
    background: var(--gray-100);
    border-radius: 999px;
    padding: 5px 10px;
    overflow-wrap: anywhere;
}

.description {
    margin: 16px 0;
    color: var(--gray-500);
    font-size: 15px;
}

pre {
    background: var(--gray-900);
    color: #f9fafb;
    padding: 16px;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 13px;
    margin: 10px 0;
}

code {
    font-family: 'Fira Code', 'Courier New', monospace;
}

.params {
    overflow-x: auto;
}

.params table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.params th,
.params td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: top;
}

.params th {
    color: var(--gray-800);
    background: var(--gray-50);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.required {
    color: var(--red-600);
    font-weight: 700;
}

.optional {
    color: #15803d;
    font-weight: 700;
}

.alert {
    background: var(--red-50);
    border: 1px solid rgba(239, 68, 68, 0.24);
    padding: 18px;
    border-radius: 14px;
    margin: 15px 0;
}

.code-tabs {
    margin: 15px 0;
}

.code-tabs .tab-buttons {
    display: flex;
    gap: 2px;
    margin-bottom: 0;
    overflow-x: auto;
}

.code-tabs .tab-btn {
    padding: 8px 16px;
    border: none;
    background: var(--gray-200);
    cursor: pointer;
    font-size: 13px;
    border-radius: 8px 8px 0 0;
    white-space: nowrap;
}

.code-tabs .tab-btn.active {
    background: var(--gray-900);
    color: var(--white);
}

.code-tabs .tab-btn:hover:not(.active) {
    background: #d1d5db;
}

.code-tabs .tab-content {
    display: none;
}

.code-tabs .tab-content.active {
    display: block;
}

.code-tabs pre {
    margin: 0;
    border-radius: 0 12px 12px 12px;
}

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

    .hero-subtitle {
        font-size: 16px;
    }

    .section-title {
        font-size: 24px;
    }

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .security-inner {
        flex-direction: column;
        text-align: center;
    }

    .security-list li {
        justify-content: center;
    }

    .commission-value {
        font-size: 48px;
    }

    .header-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        justify-content: flex-start;
        gap: 16px;
    }

    .docs-hero {
        padding: 56px 0 40px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .endpoint,
    .toc {
        padding: 20px;
    }

    .section > h2 {
        font-size: 26px;
    }
}
