@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');


html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: radial-gradient(ellipse at 60% 10%, #23283a 0%, #181c24 100%), linear-gradient(120deg, #23283a 60%, #181c24 100%);
    color: #f2f5ff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.4s;
    position: relative;
}
#bg-animated {
    position: fixed;
    left: 0; top: 0;
    width: 100vw; height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

@keyframes bgLineMove {
    0% { left: -20vw; }
    100% { left: 0vw; }
}

.bg-anim-blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.22;
    filter: blur(32px);
    z-index: 0;
    pointer-events: none;
    animation: blobFloat 18s ease-in-out infinite alternate;
    transition: background 1.5s;
}

@keyframes blobFloat {
    0%   { transform: translateY(0) scale(1) rotate(0deg);}
    40%  { transform: translateY(-30px) scale(1.08) rotate(7deg);}
    60%  { transform: translateY(20px) scale(0.95) rotate(-7deg);}
    100% { transform: translateY(0) scale(1) rotate(0deg);}
}

.bg-anim-dot {
    position: absolute;
    border-radius: 50%;
    opacity: 0.22;
    filter: blur(2.5px);
    background: radial-gradient(circle, #aabaff 0%, #ff5e7e 100%);
    animation: bgDotFloat 12s ease-in-out infinite alternate;
}

@keyframes bgDotFloat {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-18px) scale(1.15); }
    100% { transform: translateY(0) scale(1); }
}
body::before, body::after {
    content: "";
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
    transition: opacity 0.5s;
}
body::before {
    width: 420px;
    height: 420px;
    left: -180px;
    top: -120px;
    background: radial-gradient(circle at 30% 30%, #7b8cff 0%, #23283a 80%);
    animation: blob-move-1 18s ease-in-out infinite alternate;
}
body::after {
    width: 340px;
    height: 340px;
    right: -120px;
    bottom: -100px;
    background: radial-gradient(circle at 70% 70%, #ff5e7e 0%, #23283a 80%);
    animation: blob-move-2 22s ease-in-out infinite alternate;
}

@keyframes blob-move-1 {
    0% { left: -180px; top: -120px; }
    50% { left: -100px; top: 40px; }
    100% { left: -180px; top: -120px; }
}
@keyframes blob-move-2 {
    0% { right: -120px; bottom: -100px; }
    50% { right: 0px; bottom: 40px; }
    100% { right: -120px; bottom: -100px; }
}

body .decor-dot {
    position: fixed;
    z-index: 1;
    pointer-events: none;
    border-radius: 50%;
    opacity: 0.7;
    filter: blur(2px);
    animation: decor-dot-float 8s ease-in-out infinite alternate;
}
body .decor-dot.dot1 {
    width: 18px; height: 18px;
    left: 32px; top: 80px;
    background: radial-gradient(circle, #aabaff 0%, #7b8cff 80%, transparent 100%);
    animation-delay: 0s;
}
body .decor-dot.dot2 {
    width: 12px; height: 12px;
    right: 48px; top: 160px;
    background: radial-gradient(circle, #ff5e7e 0%, #c7d0f7 80%, transparent 100%);
    animation-delay: 2s;
}
body .decor-dot.dot3 {
    width: 14px; height: 14px;
    left: 80px; bottom: 60px;
    background: radial-gradient(circle, #b3c7ff 0%, #aabaff 80%, transparent 100%);
    animation-delay: 4s;
}
body .decor-dot.dot4 {
    width: 10px; height: 10px;
    right: 60px; bottom: 120px;
    background: radial-gradient(circle, #ff5e7e 0%, #7b8cff 80%, transparent 100%);
    animation-delay: 1s;
}
@keyframes decor-dot-float {
    0% { transform: translateY(0) scale(1);}
    50% { transform: translateY(-18px) scale(1.15);}
    100% { transform: translateY(0) scale(1);}
}

::-webkit-scrollbar {
    width: 10px;
    background: #23283a;
}
::-webkit-scrollbar-thumb {
    background: #2e3447;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: #aabaff;
}

hr {
    border: none;
    border-top: 2px solid #23283a;
    margin: 25px 0;
    opacity: 0.18;
    border-radius: 2px;
}

.topbar {
    width: 100%;
    max-width: 100vw;
    background: linear-gradient(90deg, #23283ad9 60%, #202534cc 100%);
    box-shadow: 0 4px 32px 0 #23283a88, 0 0 0 1px #7b8cff22;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1.5px solid #23283a;
    flex-wrap: wrap;
    transition: background 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(16px);
    border-radius: 0 0 18px 18px;
    box-sizing: border-box;
}

.topbar .logo {
    font-size: 1.5em;
    font-weight: 700;
    color: #c7d0f7;
    letter-spacing: 1.5px;
    text-shadow: 0 0 18px #aabaff88;
    text-decoration: none;
    transition: color 0.2s, text-shadow 0.2s;
}
.topbar .logo:hover {
    color: #fff;
    text-shadow: 0 0 24px #aabaffcc;
}

.topbar .icons {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.topbar .icon-link {
    color: #aabaff;
    font-size: 1.3em;
    transition: color 0.18s, background 0.18s, box-shadow 0.18s;
    padding: 6px 8px;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
}
.topbar .icon-link:hover {
    color: #fff;
    background: #7b8cff44;
    box-shadow: 0 0 12px #aabaff88;
}

.container {
    max-width: 900px;
    margin: 70px auto 36px auto;
    background: linear-gradient(135deg, #23283ad9 60%, #202534e6 100%);
    border-radius: 38px 18px 38px 18px;
    box-shadow:
        0 12px 48px 0 #23283a99,
        0 0 0 2px #aabaff22,
        0 0 80px 0 #7b8cff22 inset;
    padding: 48px 38px 36px 38px;
    transition: box-shadow 0.3s, background 0.3s, border-radius 0.3s;
    position: relative;
    overflow: visible;
    border: none;
    backdrop-filter: blur(12px);
    outline: 2px solid #7b8cff33;
    outline-offset: 6px;
}

.container:hover {
    box-shadow:
        0 20px 80px 0 #aabaff44,
        0 0 0 2px #c7d0f744,
        0 0 120px 0 #aabaff33 inset;
    background: linear-gradient(135deg, #23283ae6 60%, #202534f2 100%);
    border-radius: 18px 38px 18px 38px;
    outline: 2.5px solid #aabaff55;
}

h1, h2, h3, h4 {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
    letter-spacing: 0.7px;
    margin-top: 0;
}

h1 {
    color: #c7d0f7;
    font-size: 2.3em;
    margin-bottom: 22px;
    text-shadow: 0 0 24px #aabaff88;
}

h2 {
    color: #b3c7ff;
    font-size: 1.35em;
    margin-bottom: 12px;
    text-shadow: 0 0 12px #aabaff44;
}

h3 {
    color: #aabaff;
    font-size: 1.15em;
    margin-bottom: 8px;
    text-shadow: 0 0 8px #aabaff33;
}

section {
    margin-bottom: 44px;
    padding: 28px 32px 20px 32px;
    background: linear-gradient(120deg, #202534f2 70%, #23283ad9 100%);
    border-radius: 20px;
    border-left: 6px solid #b3c7ff;
    box-shadow: 0 8px 32px 0 #aabaff22;
    position: relative;
    z-index: 1;
    transition: background 0.2s, box-shadow 0.2s;
}

section:hover {
    background: linear-gradient(120deg, #23283ae6 70%, #202534f2 100%);
    box-shadow: 0 16px 48px 0 #aabaff44, 0 0 0 2px #c7d0f744;
}

b, strong {
    color: #c7d0f7;
    font-weight: 700;
    text-shadow: 0 0 12px #aabaff44;
}

.note {
    color: #dbe4ff;
    font-size: 1.05em;
    display: block;
    margin: 12px 0 0 0;
    background: linear-gradient(90deg, #23283ad9 80%, #202534e6 100%);
    border-left: 5px solid #b3c7ff;
    padding: 10px 18px;
    border-radius: 14px;
    box-shadow: 0 4px 24px 0 #aabaff22;
}

ul {
    margin: 12px 0 16px 18px;
    padding-left: 0;
}

li {
    margin-bottom: 6px;
    margin-left: 0;
    line-height: 1.7;
    font-size: 1.04em;
}

code, pre {
    background: #1a1d23;
    color: #c7d0f7;
    padding: 3px 10px;
    margin: 10px 10px;
    border-radius: 9px;
    font-size: 1.07em;
    font-family: 'Fira Mono', 'Consolas', monospace;
    box-shadow: 0 0 12px #aabaff22;
}

pre {
    display: block;
    padding: 18px 22px;
    margin: 16px 0;
    overflow-x: auto;
    background: linear-gradient(90deg, #202534f2 80%, #23283ad9 100%);
    border-left: 5px solid #c7d0f7;
    box-shadow: 0 4px 24px 0 #aabaff22;
}

a {
    color: #c7d0f7;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid #aabaff44;
    transition: color 0.18s, border-bottom 0.18s, background 0.18s, box-shadow 0.18s;
    padding: 2px 4px;
    border-radius: 7px;
    background: transparent;
    box-shadow: 0 0 8px #aabaff11;
}
a:hover, a:focus {
    color: #fff;
    background: #aabaff33;
    border-bottom: 2px solid #c7d0f7;
    outline: none;
    text-shadow: 0 0 16px #c7d0f7cc;
    box-shadow: 0 0 24px #c7d0f744;
}

::selection {
    background: #aabaff33;
}

.commands {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 16px 0;
}
.command {
    background: linear-gradient(90deg, #202534f2 80%, #23283ad9 100%);
    border: 2px solid #23283a;
    border-radius: 14px;
    padding: 10px 20px;
    font-weight: 600;
    color: #c7d0f7;
    transition: background 0.2s, border 0.2s, color 0.2s, box-shadow 0.2s;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 1.07em;
    box-shadow: 0 2px 16px 0 #aabaff22;
    cursor: pointer;
    text-shadow: 0 0 8px #aabaff33;
}
.command:hover {
    background: #23283ad9;
    border: 2px solid #c7d0f7;
    color: #fff;
    box-shadow: 0 4px 32px 0 #c7d0f744;
    text-shadow: 0 0 16px #c7d0f7cc;
}

hr.section-start {
    display: none;
}
.section-block {
    background: linear-gradient(120deg, #202534f2 70%, #23283ad9 100%);
    border-radius: 20px;
    border-left: 6px solid #b3c7ff;
    box-shadow: 0 8px 32px 0 #aabaff22;
    padding: 22px 22px 16px 22px;
    margin: 26px 0;
}

.bg-ball,
#bg-balls {
    display: none !important;
}

.red {
    color: #ff5e7e;
    font-weight: bold;
    text-shadow: 0 0 12px #ff5e7e44;
}
.cyan {
    color: #c7d0f7;
    font-weight: bold;
    text-shadow: 0 0 12px #c7d0f744;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Основной медиа-запрос для планшетов и мобильных */
@media (max-width: 768px) {
    body {
        background: radial-gradient(ellipse at 30% 10%, #23283a 0%, #181c24 100%);
        padding: 0;
    }
    
    body::before, 
    body::after,
    .bg-anim-blob, 
    .bg-anim-dot,
    .decor-dot {
        display: none;
    }
    
    .topbar {
        padding: 8px 4%;
        min-height: 48px;
        border-radius: 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100vw;
        position: sticky;
        left: 0;
    }
    
    .topbar .logo {
        font-size: clamp(1rem, 4vw, 1.2rem);
        white-space: nowrap;
    }
    
    .topbar .icons {
        gap: clamp(8px, 3vw, 12px);
    }
    
    .container {
        width: 96vw;
        margin: 12px auto;
        padding: 4vw;
        border-radius: 12px;
        box-shadow: 
            0 4px 24px 0 #23283a99,
            0 0 0 1px #aabaff22;
        outline: none;
    }
    
    h1 {
        font-size: clamp(1.4rem, 6vw, 1.6rem);
        margin-bottom: 12px;
        word-break: break-word;
    }
    
    h2 {
        font-size: clamp(1.1rem, 4.5vw, 1.2rem);
    }
    
    h3 {
        font-size: clamp(1rem, 4vw, 1.1rem);
    }
    .container > section {
        width: auto;
        margin-left: 2vw;
        margin-right: 2vw;
    }
    
    section {
        width: 100%;
        padding: 4vw 3vw;
        margin-bottom: 16px;
        border-radius: 10px;
        border-left-width: 3px;
    }
    
    .section-block {
        padding: 4vw;
        margin: 12px 0;
    }
    
    .note, 
    pre, 
    code {
        width: 100%;
        overflow-x: auto;
    }
    
    pre {
        padding: 3vw;
        white-space: pre-wrap;
        word-wrap: break-word;
    }
    
    ul {
        margin-left: 5vw;
        padding-left: 0;
    }
    
    .commands {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .command {
        flex: 1 1 auto;
        min-width: 120px;
    }
    
    /* Оптимизация скроллбара */
    ::-webkit-scrollbar {
        width: 4px;
    }
}

/* Мелкие мобильные (вертикальная ориентация) */
@media (max-width: 480px) and (orientation: portrait) {
    .topbar {
        flex-direction: row;
        padding: 6px 3%;
        min-height: 44px;
    }
    
    .container {
        width: 94vw;
        padding: 3vw;
    }
    
    section {
        padding: 3vw 2vw;
    }
    
    .commands {
        flex-direction: column;
        gap: 6px;
    }
    
    .command {
        width: 100%;
        min-width: unset;
    }
}

/* Ландшафтная ориентация */
@media (max-width: 768px) and (orientation: landscape) {
    .topbar {
        padding: 6px 3%;
    }
    
    .container {
        width: 96vw;
        padding: 3vw;
    }
    
    h1 {
        font-size: clamp(1.3rem, 4vw, 1.5rem);
    }
}

/* Особые исправления для iOS */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        body {
            padding-bottom: env(safe-area-inset-bottom);
        }
        
        .topbar {
            padding-top: max(8px, env(safe-area-inset-top));
        }
    }
}