/* Основные настройки */
:root {
    --primary-color: #58A8FF;
    --secondary-color: #9C32FF;
    --gradient: linear-gradient(135deg, #58A8FF, #9C32FF);
    --text-color: #FFFFFF;
    --hint-color: rgba(255, 255, 255, 0.7);
    --background: #17191C;
    --card-bg: #24262D;
    --card-border: #363A45;
}

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

body {
    background-color: var(--tg-theme-bg-color, var(--background));
    color: var(--tg-theme-text-color, var(--text-color));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Красивый градиентный фон на всю страницу */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    background-image: radial-gradient(circle at 10% 20%, rgba(88, 168, 255, 0.1) 0%, rgba(0, 0, 0, 0) 40%), 
                      radial-gradient(circle at 90% 40%, rgba(156, 50, 255, 0.1) 0%, rgba(0, 0, 0, 0) 40%),
                      radial-gradient(circle at 50% 90%, rgba(88, 168, 255, 0.1) 0%, rgba(0, 0, 0, 0) 40%);
    z-index: -1;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* Заголовок в стиле BotHost с анимированным градиентом */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.logo {
    width: 70px;
    height: 70px;
    font-size: 36px;
    background: var(--gradient);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    box-shadow: 0 8px 32px rgba(88, 168, 255, 0.3);
}

/* Переливающийся синий заголовок */
.bothost-title {
    font-size: 40px;
    font-weight: 800;
    background: linear-gradient(to right, #58A8FF, #4866FF, #58A8FF);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(88, 168, 255, 0.5);
}

@keyframes shine {
    to { background-position: 200% center; }
}

.subtitle {
    color: var(--tg-theme-hint-color, var(--hint-color));
    font-size: 18px;
    margin-top: 10px;
}

/* Оглавление */
.toc {
    background-color: var(--tg-theme-secondary-bg-color, var(--card-bg));
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 40px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
}

.toc h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 20px;
}

.toc ol {
    padding-left: 30px;
}

.toc li {
    margin-bottom: 12px;
}

.toc a {
    color: var(--tg-theme-link-color, var(--primary-color));
    text-decoration: none;
    transition: all 0.2s;
    padding: 5px 0;
    display: inline-block;
}

.toc a:hover {
    color: #ffffff;
    transform: translateX(5px);
}

/* Разделы */
.section {
    margin-bottom: 50px;
}

.section h2 {
    font-size: 26px;
    color: var(--primary-color);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--card-border);
}

.section h2:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 3px;
    width: 60px;
    background: var(--gradient);
    border-radius: 3px;
}

/* Информационные блоки */
.info-block {
    background-color: var(--tg-theme-secondary-bg-color, var(--card-bg));
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.info-block h3 {
    font-size: 20px;
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.info-block p {
    margin-bottom: 15px;
    font-size: 16px;
}

.info-block ul, .info-block ol {
    padding-left: 25px;
    margin-bottom: 15px;
}

.info-block li {
    margin-bottom: 10px;
}

/* Скриншоты */
.screenshot {
    margin: 25px 0;
    text-align: center;
}

.screenshot img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--card-border);
}

.caption {
    margin-top: 12px;
    font-size: 14px;
    opacity: 0.7;
    font-style: italic;
}

/* Код */
code {
    background-color: rgba(0, 0, 0, 0.3);
    color: #f8f8f8;
    padding: 3px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

/* Подвал */
footer {
    margin-top: 60px;
}

.footer-gradient {
    background: var(--gradient);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(88, 168, 255, 0.3);
}

.footer-logo {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
}

.copyright {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 15px;
}

/* Адаптивность */
@media (max-width: 600px) {
    .logo {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
    
    .bothost-title {
        font-size: 32px;
    }
    
    .info-block {
        padding: 20px;
    }
}
