* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.5;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
}

/* Поддержка эмодзи */
h1,
h2,
h3,
.mobile-title,
.nav-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
}

.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.hamburger {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    color: #667eea;
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    transition: left 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav.active {
    left: 0;
}

.nav-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: rgba(102, 126, 234, 0.1);
}

.nav-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.nav-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #667eea;
}

.nav-items {
    padding: 15px 0;
}

.nav-item-link {
    display: block;
    padding: 12px 20px;
    color: #2c3e50;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    font-size: 0.95rem;
}

.nav-item-link:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.main-content {
    padding: 80px 20px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section h1,
.section h2,
.section h3,
.section h4,
.section h5,
.section h6 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.section h1 {
    font-size: 1.8rem;
}

.section h2 {
    font-size: 1.5rem;
}

.section h3 {
    font-size: 1.3rem;
}

.section h4 {
    font-size: 1.1rem;
}

.section h5 {
    font-size: 1rem;
}

.section h6 {
    font-size: 0.9rem;
}

.section p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.section ul,
.section ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.section li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.section code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.section pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.section pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.section table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    overflow: hidden;
}

.section th,
.section td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.section th {
    background: rgba(102, 126, 234, 0.1);
    font-weight: 600;
    color: #2c3e50;
}

.section blockquote {
    border-left: 4px solid #667eea;
    padding-left: 15px;
    margin: 15px 0;
    font-style: italic;
    color: #555;
}

.section img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.section a {
    color: #667eea;
    text-decoration: none;
}

.section a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .main-content {
        padding: 70px 15px 15px;
    }

    .section {
        padding: 15px;
        margin-bottom: 15px;
    }

    .section h1 {
        font-size: 1.5rem;
    }

    .section h2 {
        font-size: 1.3rem;
    }

    .section h3 {
        font-size: 1.1rem;
    }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}