/* Важные заметки */
.important-note,
.warning-note {
    margin: 25px 0;
    padding: 20px 25px;
    border-radius: 12px;
    font-weight: 500;
    border-left: 5px solid;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.important-note {
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.2), rgba(255, 215, 0, 0.1));
    border-left-color: #ffd700;
    color: #ffffff;
}

.warning-note {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.2), rgba(196, 30, 58, 0.1));
    border-left-color: #c41e3a;
    color: #ffb3b3;
}

.important-note strong,
.warning-note strong {
    color: #ffd700;
    font-size: 1.1rem;
    background: none;
    padding: 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
/* Вступительное сообщение */
.intro-message {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 20px;
    text-align: center;
    font-size: 1.2rem;
    color: #f0f0f0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.intro-message p {
    margin: 0;
    line-height: 1.6;
}
/* Сетка советов */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.tip-card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #c41e3a, #ffd700, #c41e3a);
}

.tip-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.tip-card h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.tip-card p {
    color: #d0d0d0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Модальное окно для полноэкранного просмотра */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    cursor: pointer;
    justify-content: center;
    align-items: center;
}

.fullscreen-modal.active {
    display: flex;
}

.fullscreen-modal img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border: 3px solid #c41e3a;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.3);
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffd700;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 10001;
}

.fullscreen-close:hover {
    color: #c41e3a;
}

.fullscreen-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: #ffd700;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    margin: 0 auto;
    max-width: 80%;
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

/* Кликабельные изображения */
.clickable-image-container {
    margin: 20px 0;
    cursor: pointer;
    display: inline-block;
    max-width: 100%;
}

.clickable-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 2px solid rgba(196, 30, 58, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: block;
}

.clickable-image-container img:hover {
    border-color: rgba(255, 215, 0, 0.5);
}

.clickable-image-container img:active {
    opacity: 0.8;
    transform: scale(0.98);
}

/* Галереи изображений */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.image-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

/* Стили для нумерованных списков инструкций */
.instruction-steps {
    list-style-type: none;
    counter-reset: step-counter;
    margin: 30px 0;
    padding: 0;
}

.instruction-steps > li {
    counter-increment: step-counter;
    position: relative;
    padding: 20px 20px 20px 70px;
    margin-bottom: 25px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.instruction-steps > li:hover {

    box-shadow: 0 5px 15px rgba(196, 30, 58, 0.2);
    border-color: rgba(196, 30, 58, 0.3);
}

.instruction-steps > li::before {
    content: counter(step-counter);
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #c41e3a, #8b0000);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 20px rgba(196, 30, 58, 0.5);
}

.instruction-steps > li h3 {
    margin: 0 0 10px 0;
    color: #ffd700;
    font-size: 1.3rem;
}

.instruction-steps > li p {
    margin: 10px 0;
    color: #d0d0d0;
    line-height: 1.6;
}

.instruction-steps > li code {
    background: #2a2a2a;
    color: #ff9999;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    border: 1px solid #444;
}

.instruction-steps > li a {
    color: #ff9999;
    text-decoration: none;
    border-bottom: 1px solid #ff9999;
}

.instruction-steps > li a:hover {
    color: #ffd700;
    border-bottom-color: #ffd700;
}

/* Вложенные списки */
.instruction-steps ul,
.instruction-steps ol {
    margin: 15px 0 10px 20px;
    padding-left: 20px;
}

.instruction-steps ul > li,
.instruction-steps ol > li {
    margin-bottom: 10px;
    color: #d0d0d0;
    line-height: 1.6;
}

.instruction-steps ul > li {
    list-style-type: disc;
}

.instruction-steps ul > li::marker {
    color: #ffd700;
}

.instruction-steps ol > li {
    list-style-type: decimal;
}

.instruction-steps ol > li::marker {
    color: #c41e3a;
    font-weight: bold;
}

/* Вложенные нумерованные списки (для подпунктов) */
.instruction-steps ol ol {
    counter-reset: sub-step-counter;
    list-style-type: none;
}

.instruction-steps ol ol > li {
    counter-increment: sub-step-counter;
    position: relative;
    padding-left: 30px;
}

.instruction-steps ol ol > li::before {
    content: counter(step-counter) "." counter(sub-step-counter);
    position: absolute;
    left: 0;
    color: #ffd700;
    font-weight: bold;
}

/* Стили для ненумерованных списков в инструкциях */
.instruction-list {
    list-style-type: none;
    margin: 20px 0;
    padding: 0;
}

.instruction-list > li {
    position: relative;
    padding: 15px 15px 15px 45px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border-left: 3px solid #c41e3a;
}

.instruction-list > li::before {
    content: "•";
    position: absolute;
    left: 15px;
    color: #ffd700;
    font-size: 1.5rem;
    line-height: 1;
}

/* Главы */
.instruction-chapter {
    margin-bottom: 60px;
    scroll-margin-top: 30px;
    animation: fadeInUp 0.6s ease forwards;
}

.instruction-chapter:nth-child(3) { animation-delay: 0.1s; }
.instruction-chapter:nth-child(4) { animation-delay: 0.2s; }
.instruction-chapter:nth-child(5) { animation-delay: 0.3s; }
.instruction-chapter:nth-child(6) { animation-delay: 0.4s; }
.instruction-chapter:nth-child(7) { animation-delay: 0.5s; }
.instruction-chapter:nth-child(8) { animation-delay: 0.6s; }

.instruction-chapter h2 {
    position: relative;
    padding-left: 20px;
}

.instruction-chapter h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 40px;
    background: linear-gradient(180deg, #c41e3a, #ffd700);
    border-radius: 5px;
}

/* Контент главы */
.chapter-content {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.chapter-content > p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e0e0e0;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border-left: 3px solid #c41e3a;
}

.chapter-content h3 {
    color: #ffd700;
    margin: 30px 0 20px 0;
    font-size: 1.4rem;
}

.chapter-content h3:first-of-type {
    margin-top: 0;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .instruction-main h1 {
        font-size: 2rem;
    }

    .instruction-main h2 {
        font-size: 1.6rem;
    }

    .instruction-main h3 {
        font-size: 1.2rem;
    }

    .instruction-steps > li {
        padding: 15px 15px 15px 60px;
    }

    .instruction-steps > li::before {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }

    .image-gallery,
    .image-pair {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .chapter-content {
        padding: 20px;
    }

    .fullscreen-close {
        font-size: 40px;
        top: 10px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .instruction-main {
        padding: 10px;
    }

    .chapter-content {
        padding: 15px;
    }

    .instruction-steps > li {
        padding: 12px 12px 12px 50px;
    }

    .instruction-steps > li::before {
        width: 30px;
        height: 30px;
        font-size: 1rem;
        left: 8px;
    }
}

/* Связанные ссылки */
.related-links {
    margin: 60px 0;
    text-align: center;
}

.related-links h2 {
    margin-bottom: 30px;
    color: #ffd700;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.related-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 60, 60, 0.9);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-link:hover {
    border-color: #ffd700;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.1);
}

.link-icon {
    font-size: 1.8rem;
}

.link-text {
    color: #f0f0f0;
    font-size: 1.1rem;
    font-weight: 500;
}

.related-link:hover .link-text {
    color: #ffd700;
}
