@keyframes instruction-modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.instruction-close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    z-index: 10;
}

.instruction-close-modal:hover {
    color: var(--success-light);
}

.instruction-modal-container {
    display: flex;
    height: 100%;
}

.instruction-modal-left-panel {
    width: 25%;
    padding: 20px 0;
    overflow-y: hidden;
    scrollbar-gutter: stable;
}

.instruction-modal-left-panel:hover {
    overflow-y: auto;
}

.instruction-modal-left-panel::-webkit-scrollbar {
    width: 2px;
}

.instruction-modal-left-panel::-webkit-scrollbar-track {
    background: rgba(var(--text-color), 0.1);
    border-radius: 3px;
}

.instruction-modal-left-panel::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

.instruction-menu-option {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(var(--accent-color), 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: white;
    font-family: "Montserrat", sans-serif;
    font-weight: 300;
    font-size: 16px;
    text-align: start;
}

.instruction-menu-option:hover {
    background: rgba(var(--accent-color-back), 0.15);
    font-weight: 300;
}

.instruction-menu-option.instruction-active {
    background: rgba(var(--accent-color-back), 0.25);
    font-weight: 300;
}

.instruction-menu-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: rgba(var(--accent-color-back), 0.8);
    transition: height 0.3s ease;
}

.instruction-modal-right-panel {
    width: 70%;
    padding: 25px;
    overflow-y: hidden;
    scrollbar-gutter: stable;
    max-height: calc(85vh - 40px);
}

.instruction-modal-right-panel:hover {
    overflow-y: auto;
}

.instruction-modal-right-panel::-webkit-scrollbar {
    width: 2px;
}

.instruction-modal-right-panel::-webkit-scrollbar-track {
    background: rgba(var(--text-color), 0.1);
    border-radius: 3px;
}

.instruction-modal-right-panel::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

.instruction-content-section {
    display: none;
    animation: instruction-fadeIn 0.5s;
}

@keyframes instruction-fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.instruction-active-content {
    display: block;
}

.instruction-content-section h2 {
    color: var(--success-light);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.instruction-content-section p,
.instruction-content-section ul {
    color: var(--text-color);
    margin-bottom: 15px;
}

.instruction-content-section ul {
    color: var(--text-color);
    padding-left: 20px;
}

.instruction-content-section li {
    color: var(--text-color);
    margin-bottom: 8px;
}

.instruction-content-image {
    width: 100%;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.instruction-action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.instruction-action-buttons button {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

#instruction-start-tour-btn {
    background-color: #4f46e5;
    color: white;
}

#instruction-start-tour-btn:hover {
    background-color: #7c3aed;
}

#instruction-close-modal-btn {
    background-color: #e5e7eb;
    color: #1f2937;
}

#instruction-close-modal-btn:hover {
    background-color: #d1d5db;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .instruction-modal-content {
        width: 95%;
        margin: 10% auto;
        height: 80%;
    }

    .instruction-modal-container {
        flex-direction: column;
    }

    .instruction-modal-left-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 10px 0;
        max-height: 150px;
        overflow-x: auto;
        display: flex;
        flex-wrap: nowrap;
    }

    .instruction-menu-option {
        padding: 12px 15px;
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .instruction-menu-option.instruction-active {
        border-left: none;
        border-bottom-color: #4f46e5;
    }

    .instruction-modal-right-panel {
        width: 100%;
        padding: 20px;
        max-height: calc(80vh - 150px);
    }

    .instruction-action-buttons {
        flex-direction: column;
    }
}