:root {
    --bg-color: rgb(8,5, 57);  /* User preferred dark indigo */
    --accent-color: rgb(87, 255, 255);    /* User preferred bright cyan */
    --excite-color: rgb(255, 99, 178);    /* User preferred bright cyan */
    --panel-bg: rgba(20, 17, 51, 0.6);
    --border-color: rgba(87, 255, 255, 0.2);
    --text-color: rgb(220, 220, 255);
    --text-main: rgb(220, 220, 255);
    --text-muted: #a0a0b5;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    /*font-family: 'Times New Roman', Times, serif;*/
    font-size: 18px;
    line-height: 1.65;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.container {
    max-width: 800px;
    width: 100%;
    padding: 40px 20px;
    box-sizing: border-box;
}

.header {
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 20px;
    margin-bottom: 40px;
    text-align: center;
}

h1 {
    font-family: 'Times New Roman', Times, serif;
    color: var(--accent-color);
    font-size: 2.1rem;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: normal;
}

.subtitle {
    color: var(--accent-color);
    font-style: italic;
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
    text-align: left;
}

.meta-box {
    background-color: var(--panel-bg);
    border: 1px solid var(--accent-color);
    padding: 20px;
    margin-bottom: 40px;
    border-radius: 4px;
}

.meta-box p {
    margin: 6px 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.meta-box p strong {
    color: var(--text-main);
}

h2 {
    font-family: "Play", sans-serif;
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-top: 45px;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
    font-weight: normal;
}

h3 {
    font-family: "Play", sans-serif;
    color: var(--text-main);
    font-size: 1.2rem;
    font-style: italic;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: normal;
}

p {
    font-family: "Play", sans-serif;
    margin: 0 0 20px 0;
    text-align: left;
}

ul {
    font-family: "Play", sans-serif;
    margin: 0 0 20px 0;
    padding-left: 25px;    
}

ol {
    font-family: "Play", sans-serif;
}

li {
    font-family: "Play", sans-serif;
    margin-bottom: 10px;
}




article h2 {
    position: relative;
    padding-left: 15px;
    /* Исходное состояние левой рамки (голубой цвет) */
    border-left: 3px solid var(--accent-color);
    
    /* Градиент зафиксирован: слева немного розового, переходящего в голубой, который плавно к 50% уходит в полный ноль */
    background-image: linear-gradient(
        to right, 
        rgba(255, 99, 178, 0.15) 0%, 
        rgba(87, 255, 255, 0.1) 20%, 
        rgba(87, 255, 255, 0) 50%
    );
    
    /* Увеличиваем размер фона в 2 раза по ширине, чтобы сдвинуть его вправо по умолчанию */
    background-size: 200% 100%;
    background-position: 100% 0%;
    background-repeat: no-repeat;
    
    /* Плавные переходы для всех изменяемых параметров */
    transition: background-position 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

article h2:hover {
    /* При наведении рамка плавно наливается розовым */
    border-left-color: var(--excite-color);
    
    /* Сдвигаем фон влево, плавно проявляя градиент, который мягко растворяется и не образует резких границ («трапеций») */
    background-position: 0% 0%;
    
    /* Свечение рамки слева */
    box-shadow: -8px 0 15px -5px rgba(255, 99, 178, 0.4);
}





.math {
    font-family: 'Times New Roman', serif;
    font-style: italic;
    font-weight: bold;
    color: var(--accent-color);
}

.equation-block {
    text-align: center;
    margin: 30px 0;
    font-size: 1.3rem;
    background-color: var(--panel-bg);
    padding: 20px;
    border-radius: 4px;
    border: 1px solid rgba(87, 255, 255, 0.05);
    overflow-x: auto;
}


.equation-block:hover, .diagram:hover {
    border-color: rgba(87, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(87, 255, 255, 0.15);
    background-color: rgba(20, 17, 51, 0.8);
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 30px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th {
    background-color: var(--panel-bg);
    color: var(--accent-color);
    font-weight: bold;
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

td {
    border: 1px solid var(--border-color);
    padding: 12px;
    vertical-align: top;
    font-size: 0.95rem;
}

tr:nth-child(even) {
    background-color: rgba(16, 8, 61, 0.4);
}

.diagram {
    font-family: 'Courier New', Courier, monospace;
    white-space: pre;
    background-color: rgb(9, 4, 38);
    color: var(--accent-color);
    padding: 20px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    margin: 30px 0;
    font-size: 1.05rem;
    line-height: 1.4;
    overflow-x: auto;
}

.chatper-link {
    text-decoration: none;
    color: var(--text-color);
}

.chatper-link:hover {
    color: var(--accent-color);
}

footer {
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.age-restriction {
    background-color: var(--panel-bg);
    border: 1px solid var(--excite-color);
    color: var(--excite-color);
    font-weight: 900;
    margin-left:24px;
    padding: 5px 10px 5px 10px;
    border-radius: 4px;
}

.block-highlighted, .block-warning {
    padding: 18px 24px;
    margin: 25px 0;
    border-radius: 4px;
    box-sizing: border-box;
}

.block-highlighted ul, .block-highlighted ol,
.block-warning ul, .block-warning ol {
    margin-bottom: 0;
}

.block-highlighted {
    background-color: rgba(30, 25, 75, 0.7);
    border: 1px solid rgba(87, 255, 255, 0.25);
}
.block-highlighted strong {
    color: rgb(87, 225, 255);
}

.block-warning {
    background-color: rgba(55, 15, 45, 0.5);
    color: rgb(220,220,200);
    border: 1px solid rgba(255, 87, 120, 0.25);
}
.block-warning strong {
    color: rgb(255, 110, 140);
}

/* Стиль для блока цитат (blockquote) */
blockquote {
    font-family: 'Courier New', Courier, monospace;
    font-style: italic;
    border-left: 3px solid var(--accent-color);
    padding-left: 20px;
    margin: 25px 0 25px 10px;
    color: var(--text-muted);
}

blockquote br {
    margin-bottom: 8px;
}




/* Стиль для интеграции музыки */
.audio-track {
    background: linear-gradient(90deg, rgba(87, 225, 255, 0.1) 0%, rgba(20, 17, 51, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-left: 1px solid var(--accent-color);
    padding: 14px 20px;
    margin: 30px 0;
    border-radius: 0 4px 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.audio-track span {
    font-family: 'Play', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 1px;
    color: var(--excite-color);;
}

.audio-link {
    margin-left: 14px;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid var(--accent-color);
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-family: 'Play', sans-serif;
    text-transform: uppercase;
    
    /* Идеальное центрирование иконки и текста */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Отступ между иконкой и текстом */
}

.audio-link:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 0 10px rgba(87, 225, 255, 0.5);
}

/* Управляем цветом иконки через currentColor и добавляем плавный переход */
.audio-link svg {
    fill: currentColor;
    transition: fill 0.3s ease;
    display: block; /* Убирает лишние подстрочные отступы у инлайновых элементов */
}

.play-icon {
    transform: translateY(-1px);
}


.nav-back-container {
    margin-bottom: 30px;
    margin-top: 40px;
    display: flex;
    align-items: center;
    padding-top: 30px;
}


.nav-back-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--accent-color);
    transition: opacity 0.2s ease;
}


.nav-back-link:hover {
    opacity: 0.8;
}


.nav-back-icon {
    height: 27px;
    width: auto;
    margin-right: 12px;
    display: block;
}


.nav-back-text {
    font-family: "Play", sans-serif;
    /*font-family: 'Times New Roman', Times, serif;*/
    font-size: 18px;
    line-height: 27px;
}



.link {
    color: var(--text-muted);
    border-bottom: none;
    text-decoration: none;
    transition: color 0.2s ease;
}

.link:hover {
    color: var(--accent-color);
}


@media (max-width: 600px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.2rem; }
    body { font-size: 16px; }
    .audio-track span { font-size: 0.85rem; }
    .diagram { font-size: 0.75rem; }
}

