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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.header-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.telegram-button {
    display: inline-block;
    margin-top: 25px;
    padding: 18px 40px;
    background: linear-gradient(135deg, #229ED9 0%, #0088cc 50%, #0066aa 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2em;
    box-shadow: 0 8px 25px rgba(34, 158, 217, 0.6), 0 0 20px rgba(34, 158, 217, 0.4);
    transition: all 0.3s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    animation: pulse-glow 2s ease-in-out infinite;
}

.telegram-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.telegram-button:hover::before {
    left: 100%;
}

.telegram-button:hover {
    background: linear-gradient(135deg, #2BA8E6 0%, #229ED9 50%, #0088cc 100%);
    box-shadow: 0 12px 40px rgba(34, 158, 217, 0.8), 0 0 30px rgba(34, 158, 217, 0.6);
    transform: translateY(-3px) scale(1.05);
}

.telegram-button:active {
    transform: translateY(-1px) scale(1.02);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(34, 158, 217, 0.6), 0 0 20px rgba(34, 158, 217, 0.4);
    }
    50% {
        box-shadow: 0 8px 30px rgba(34, 158, 217, 0.8), 0 0 30px rgba(34, 158, 217, 0.6);
    }
}

main {
    padding: 60px 40px;
}

.content {
    max-width: 900px;
    margin: 0 auto;
}

.text-content {
    font-size: 1.1em;
    line-height: 1.8;
    color: #444;
}

.text-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.text-content h2 {
    font-size: 1.8em;
    color: #667eea;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.text-content h3 {
    font-size: 1.4em;
    color: #764ba2;
    margin-top: 30px;
    margin-bottom: 15px;
}

.text-content h4 {
    font-size: 1.2em;
    color: #555;
    margin-top: 25px;
    margin-bottom: 12px;
    font-weight: 600;
}

.text-content ul {
    margin: 20px 0;
    padding-left: 30px;
}

.text-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.text-content a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.text-content a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.info-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 1.1em;
}

.info-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.info-table tr:last-child td {
    border-bottom: none;
}

.info-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.info-table tr:hover {
    background-color: #e9ecef;
    transition: background-color 0.3s ease;
}

.info-table a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.info-table a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.table-of-contents {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #667eea;
    padding: 25px 30px;
    margin: 40px 0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.table-of-contents h3 {
    color: #667eea;
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.table-of-contents > ul > li {
    margin-bottom: 12px;
}

.table-of-contents ul ul {
    margin-top: 8px;
    padding-left: 25px;
    margin-bottom: 8px;
}

.table-of-contents ul ul li {
    margin-bottom: 6px;
    position: relative;
}

.table-of-contents ul ul li::before {
    content: '▸';
    position: absolute;
    left: -20px;
    color: #764ba2;
    font-size: 0.9em;
}

.table-of-contents a {
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 4px 0;
}

.table-of-contents a:hover {
    color: #667eea;
    padding-left: 8px;
    font-weight: 600;
}

.table-of-contents > ul > li > a {
    font-weight: 600;
    color: #333;
    font-size: 1.05em;
}

footer {
    background: #f8f9fa;
    padding: 30px;
    text-align: center;
    color: #666;
    border-top: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

footer .telegram-button {
    margin-top: 0;
}

footer p {
    margin: 0;
    margin-top: 10px;
}

.scroll-top-button {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1em;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.scroll-top-button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
}

/* Адаптивность */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
        letter-spacing: 1px;
    }
    
    header {
        padding: 25px 15px;
    }
    
    .header-image {
        border-radius: 10px;
        margin-top: 15px;
        max-width: 100%;
    }
    
    .telegram-button {
        padding: 15px 30px;
        font-size: 1.1em;
        margin-top: 20px;
        letter-spacing: 0.8px;
    }
    
    main {
        padding: 30px 15px;
    }
    
    body {
        padding: 10px;
    }
    
    .text-content {
        font-size: 1em;
        line-height: 1.7;
    }
    
    .text-content h2 {
        font-size: 1.5em;
        margin-top: 30px;
        margin-bottom: 15px;
    }
    
    .text-content h3 {
        font-size: 1.25em;
        margin-top: 25px;
        margin-bottom: 12px;
    }
    
    .text-content h4 {
        font-size: 1.1em;
        margin-top: 20px;
        margin-bottom: 10px;
    }
    
    .text-content p {
        text-align: left;
        margin-bottom: 15px;
    }
    
    .text-content ul {
        padding-left: 20px;
        margin: 15px 0;
    }
    
    .info-table {
        font-size: 0.9em;
        margin: 20px 0;
    }
    
    .info-table th,
    .info-table td {
        padding: 10px 12px;
    }
    
    .table-of-contents {
        padding: 20px 20px;
        margin: 30px 0;
    }
    
    .table-of-contents h3 {
        font-size: 1.3em;
    }
    
    .table-of-contents > ul > li > a {
        font-size: 1em;
    }
    
    .container {
        border-radius: 15px;
    }
    
    footer {
        padding: 20px 15px;
        font-size: 0.9em;
        gap: 15px;
    }
    
    footer .telegram-button {
        padding: 15px 30px;
        font-size: 1.1em;
    }
    
    .scroll-top-button {
        padding: 10px 25px;
        font-size: 0.95em;
    }
}

/* Очень маленькие экраны (320px - 480px) */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
        margin-bottom: 15px;
        letter-spacing: 0.5px;
    }
    
    header {
        padding: 20px 10px;
    }
    
    .telegram-button {
        padding: 12px 25px;
        font-size: 1em;
        margin-top: 15px;
        letter-spacing: 0.5px;
    }
    
    main {
        padding: 25px 10px;
    }
    
    body {
        padding: 5px;
    }
    
    .text-content {
        font-size: 0.95em;
        line-height: 1.6;
    }
    
    .text-content h2 {
        font-size: 1.3em;
        margin-top: 25px;
        margin-bottom: 12px;
    }
    
    .text-content h3 {
        font-size: 1.15em;
        margin-top: 20px;
        margin-bottom: 10px;
    }
    
    .text-content h4 {
        font-size: 1.05em;
        margin-top: 18px;
        margin-bottom: 8px;
    }
    
    .text-content ul {
        padding-left: 18px;
        margin: 12px 0;
    }
    
    .text-content li {
        margin-bottom: 8px;
        line-height: 1.6;
    }
    
    .info-table {
        font-size: 0.85em;
        margin: 15px 0;
    }
    
    .info-table th,
    .info-table td {
        padding: 8px 10px;
    }
    
    .table-of-contents {
        padding: 15px 15px;
        margin: 20px 0;
    }
    
    .table-of-contents h3 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }
    
    .table-of-contents > ul > li > a {
        font-size: 0.95em;
    }
    
    .table-of-contents ul ul {
        padding-left: 20px;
    }
    
    .container {
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }
    
    footer {
        padding: 15px 10px;
        font-size: 0.85em;
        gap: 12px;
    }
    
    footer .telegram-button {
        padding: 12px 25px;
        font-size: 1em;
    }
    
    .scroll-top-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    .header-image {
        margin-top: 10px;
    }
}

