
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f8faff;
    color: #1a1a2e;
    line-height: 1.6;
}
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}


.header {
    background: #0f0f1f;
    padding: 12px 0;
    border-bottom: 2px solid rgba(74, 108, 247, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo span {
    color: #FFF8DC;
}
.logo i {
    color: #4a6cf7;
}
.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
    align-items: center;
}
.nav-menu a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
}
.nav-menu a:hover {
    color: #fff;
    background: rgba(74, 108, 247, 0.15);
}
.btn-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    background: #4a6cf7;
    padding: 6px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.btn-profile:hover {
    background: #3a5bd9;
}


.materials-hero {
    padding: 40px 0 30px;
    background: linear-gradient(135deg, #0f0f1f 0%, #1a1a3e 100%);
    border-bottom: 1px solid rgba(74, 108, 247, 0.1);
}
.materials-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}
.materials-hero-text h1 {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}
.materials-hero-text h1 span {
    color: #4a6cf7;
}
.materials-hero-text p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
}
.hero-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    opacity: 0.7;
}
@media (max-width: 600px) {
    .materials-hero-content {
        flex-direction: column;
        text-align: center;
    }
    .hero-logo { width: 60px; height: 60px; }
}


.methodology-wrapper-full {
    padding: 30px 0 60px;
}

.doc-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px 32px;
    margin-bottom: 28px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.02);
    border: 1px solid #f0f2f8;
}
.doc-card h2 {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f1f5f9;
}
.doc-card p {
    color: #334155;
    margin-bottom: 16px;
}
.doc-card ul, .doc-card ol {
    padding-left: 24px;
    margin-bottom: 16px;
    color: #334155;
}
.doc-card li {
    margin-bottom: 6px;
}


.highlight-blue { color: #3b82f6; font-weight: 600; }
.highlight-purple { color: #8b5cf6; font-weight: 600; }
.highlight-yellow { color: #eab308; font-weight: 600; }
.highlight-green { color: #22c55e; font-weight: 600; }

.note-tip {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0;
}
.note-info {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0;
}
.schema-block {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 16px 0;
    border: 1px solid #e9edf4;
}
.schema-center {
    text-align: center;
}
.schema-caption {
    text-align: center;
    font-size: 13px;
    color: #64748b;
    margin-top: 12px;
    font-style: italic;
}


.lang-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 16px 0;
}
.lang-card {
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    border: 2px solid transparent;
    transition: transform 0.2s;
}
.lang-card:hover {
    transform: translateY(-4px);
}
.lang-html {
    background: #fef2f2;
    border-color: #fca5a5;
}
.lang-css {
    background: #f0fdf4;
    border-color: #86efac;
}
.lang-js {
    background: #fffbeb;
    border-color: #fcd34d;
}
.lang-icon {
    font-size: 40px;
}
.lang-name {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin: 4px 0;
}
.lang-fullname {
    font-size: 11px;
    color: #64748b;
    letter-spacing: 0.5px;
}
.lang-role {
    font-size: 15px;
    margin: 8px 0 4px;
    color: #0f172a;
}
.lang-features {
    list-style: none;
    padding: 0;
    font-size: 13px;
    color: #475569;
    text-align: left;
    display: inline-block;
}
.lang-features li {
    padding: 2px 0;
}
.lang-example {
    background: #0f172a;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 8px;
    word-break: break-all;
}
.lang-example .tag { color: #f472b6; }
.lang-example .prop { color: #60a5fa; }
.lang-example .value { color: #34d399; }
.lang-example .kw { color: #f472b6; }
.lang-example .str { color: #34d399; }


.schema-pyramid {
    max-width: 400px;
    margin: 16px auto;
}
.pyramid-level {
    padding: 12px 16px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    border-radius: 4px;
    margin-bottom: 4px;
}
.pyramid-level:first-child { border-radius: 8px 8px 4px 4px; }
.pyramid-level:last-child { border-radius: 4px 4px 8px 8px; }


.schema-duo {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.duo-item {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    border-radius: 16px;
    padding: 20px 18px;
    text-align: center;
}
.duo-client {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 2px solid #93c5fd;
}
.duo-server {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #86efac;
}
.duo-icon {
    font-size: 44px;
}
.duo-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}
.duo-sub {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}
.duo-list {
    list-style: none;
    padding: 0;
    text-align: left;
    font-size: 14px;
    color: #334155;
}
.duo-list li {
    padding: 4px 0;
}
.duo-example {
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
    background: rgba(255,255,255,0.6);
    padding: 6px 10px;
    border-radius: 8px;
}
.duo-arrow-big {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}
.arrow-request { color: #3b82f6; }
.arrow-response { color: #22c55e; }
@media (max-width: 700px) {
    .duo-arrow-big { flex-direction: row; gap: 16px; }
}


.schema-dialog {
    max-width: 550px;
    margin: 0 auto;
}
.dialog-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    flex-wrap: wrap;
}
.dialog-request {
    background: #eff6ff;
    border: 1px solid #93c5fd;
}
.dialog-response {
    background: #f0fdf4;
    border: 1px solid #86efac;
}
.dialog-icon { font-size: 22px; }
.dialog-label {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
}
.dialog-text {
    font-size: 14px;
    color: #334155;
    flex: 1;
}
.dialog-text b { color: #0f172a; }
.dialog-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    background: rgba(255,255,255,0.7);
}
.dialog-request .dialog-badge { color: #3b82f6; }
.dialog-response .dialog-badge { color: #22c55e; }


.algorithm-flow {
    max-width: 550px;
    margin: 0 auto;
}
.algo-step {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e9edf4;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.algo-step .algo-num {
    background: #4a6cf7;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.algo-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    flex-wrap: wrap;
}
.algo-icon { font-size: 24px; }
.algo-title {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
}
.algo-desc {
    font-size: 13px;
    color: #64748b;
}
.algo-desc b { color: #0f172a; }
.algo-arrow {
    text-align: center;
    font-size: 20px;
    color: #94a3b8;
    padding: 2px 0;
}
.algo-final {
    background: #eff6ff;
    border-color: #93c5fd;
}
.algo-final .algo-num { background: #22c55e; }


.task-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}
.task-step {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e9edf4;
}
.task-step .task-num {
    background: #e2e8f0;
    color: #0f172a;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.task-step code {
    background: #0f172a;
    color: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
}


.roadmap-timeline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}
.timeline-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8fafc;
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid #e9edf4;
    flex-wrap: wrap;
}
.timeline-month {
    font-weight: 700;
    font-size: 13px;
    color: #4a6cf7;
    background: #eff6ff;
    padding: 2px 12px;
    border-radius: 20px;
    min-width: 80px;
    text-align: center;
}
.timeline-topic {
    font-weight: 700;
    font-size: 15px;
    color: #0f172a;
    min-width: 120px;
}
.timeline-desc {
    font-size: 13px;
    color: #64748b;
    flex: 1;
}


.media-item {
    margin: 16px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9edf4;
}
.media-item img {
    width: 100%;
    height: auto;
    display: block;
}
.media-item .caption {
    padding: 8px 16px;
    font-size: 14px;
    color: #475569;
    background: #f8fafc;
    border-top: 1px solid #eef2f7;
}


@media (max-width: 860px) {
    .doc-card { padding: 20px; }
}
@media (max-width: 480px) {
    .doc-card h2 { font-size: 22px; }
    .duo-item { min-width: 100%; }
    .lang-cards { grid-template-columns: 1fr; }
    .timeline-item { flex-direction: column; align-items: flex-start; gap: 4px; }
}


.lang-example-full {
    background: #0f172a;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 10px 0 4px;
    overflow-x: auto;
    text-align: left;
}
.lang-example-full .file-name {
    color: #94a3b8;
    font-size: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 8px;
    font-weight: 600;
}
.lang-example-full pre {
    margin: 0;
    padding: 0;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.7;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-word;
}
.lang-example-full code {
    font-family: inherit;
}


.lang-example-full .tag      { color: #f472b6; }
.lang-example-full .attr     { color: #60a5fa; }
.lang-example-full .str      { color: #34d399; }
.lang-example-full .comment  { color: #64748b; font-style: italic; }
.lang-example-full .selector { color: #f472b6; }
.lang-example-full .prop     { color: #60a5fa; }
.lang-example-full .value    { color: #34d399; }
.lang-example-full .kw       { color: #f472b6; }
.lang-example-full .func     { color: #fbbf24; }
.lang-example-full .var      { color: #e2e8f0; }
.lang-example-full .num      { color: #fbbf24; }