/* css/style.css - Главный файл, импортирующий все модули */
@import url('base.css');
@import url('layout.css');
@import url('components.css');
@import url('elements.css');
@import url('animations.css');
@import url('features.css');
@import url('black-hole.css');
@import url('limit-indicator.css');
@import url('new-element-showcase.css');
@import url('menu.css');
@import url('stats-modal.css');
@import url('responsive.css');
@import url('hint-button.css');
@import url('tutorial.css'); /* Новый файл со стилями туториала и подсказок */

/* Галочка для конечных элементов */
.dead-end-mark {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 10;
    animation: markPop 0.3s ease-out;
}

@keyframes markPop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* Мягкое отталкивание для конечных элементов в режиме новичка */
.element-gentle-bounce {
    animation: gentleBounce 0.4s ease-in-out !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3) !important;
    border-color: #ffd700 !important;
}

@keyframes gentleBounce {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(5px, -5px) scale(1.02);
    }
    50% {
        transform: translate(-5px, 5px) scale(0.98);
    }
    75% {
        transform: translate(3px, -3px) scale(1.01);
    }
}

/* Стили для конечных элементов в панели в режиме новичка */
#elementsPanel .element.dead-end {
    opacity: 0.7;
    filter: grayscale(30%);
    border-left: 4px solid #4caf50 !important;
    cursor: not-allowed !important;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    position: relative;
    transition: all 0.3s ease;
}

#elementsPanel .element.dead-end:hover {
    opacity: 0.9;
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
}

/* Индикатор режима новичка */
.beginner-mode-active {
    background: linear-gradient(135deg, #4caf50, #2196f3) !important;
    border-color: #ffeb3b !important;
    animation: beginnerPulse 2s infinite;
}

@keyframes beginnerPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(33, 150, 243, 0.5);
    }
}

/* Сообщение для конечных элементов */
.element-dead-end-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: #ffd700;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    z-index: 10000;
    animation: messageFade 2s ease-in-out;
    border: 2px solid #4caf50;
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.3);
    pointer-events: none;
}

@keyframes messageFade {
    0% { opacity: 0; transform: translate(-50%, -30%); }
    20% { opacity: 1; transform: translate(-50%, -50%); }
    80% { opacity: 1; transform: translate(-50%, -50%); }
    100% { opacity: 0; transform: translate(-50%, -70%); }
}

/* Конечные элементы на поле */
#gameField .element.dead-end {
    opacity: 0.8;
    filter: grayscale(20%);
    border: 2px solid #4caf50 !important;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.3) !important;
}

#gameField .element.dead-end::after {
    content: '✓';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 10;
}

/* Переключатель в меню */
.menu-toggle {
    margin-left: auto;
    font-size: 20px;
}

#menuBeginnerMode {
    background: linear-gradient(135deg, #4caf50, #2196f3);
    color: white;
    border: 1px solid #ffeb3b;
    transition: all 0.3s ease;
}

#menuBeginnerMode:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

#menuBeginnerMode .menu-icon {
    color: #ffeb3b;
    animation: rotate 3s infinite linear;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* НОВЫЕ СТИЛИ: Мягкая анимация засасывания */
.gentle-suck-particle {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    animation: gentleSuck 0.8s ease-out forwards;
    filter: blur(1px);
}

@keyframes gentleSuck {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(calc(cos(var(--angle)) * var(--distance) * 0.5), 
                           calc(sin(var(--angle)) * var(--distance) * 0.5)) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(calc(cos(var(--angle)) * var(--distance)), 
                           calc(sin(var(--angle)) * var(--distance))) scale(0);
        opacity: 0;
    }
}

/* НОВЫЕ СТИЛИ: Подсветка новых возможностей - УДАЛЕНО, ПЕРЕМЕЩЕНО В tutorial.css */
/* .new-combinations-hint {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: linear-gradient(135deg, #4caf50, #2196f3);
    color: white;
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 2px solid #ffd700;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s ease;
    max-width: 300px;
} */

/* hint-icon - УДАЛЕНО, ПЕРЕМЕЩЕНО В tutorial.css */

/* hint-content - УДАЛЕНО, ПЕРЕМЕЩЕНО В tutorial.css */

/* hint-title - УДАЛЕНО, ПЕРЕМЕЩЕНО В tutorial.css */

/* combo-item - УДАЛЕНО, ПЕРЕМЕЩЕНО В tutorial.css */

/* combo-more - УДАЛЕНО, ПЕРЕМЕЩЕНО В tutorial.css */

/* НОВЫЕ СТИЛИ: Подсветка возможных комбинаций - УДАЛЕНО, ПЕРЕМЕЩЕНО В tutorial.css */
/* .possible-combination {
    animation: possiblePulse 1.5s infinite !important;
    border: 3px solid #4caf50 !important;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5) !important;
    position: relative;
    z-index: 5;
} */

/* source-highlight - УДАЛЕНО, ПЕРЕМЕЩЕНО В tutorial.css */

/* Подсказка при наведении на подсвеченный элемент - УДАЛЕНО, ПЕРЕМЕЩЕНО В tutorial.css */
/* .possible-combination[data-hint]:hover::before {
    content: attr(data-hint);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    border: 2px solid #4caf50;
    margin-bottom: 10px;
    pointer-events: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
} */

/* Счетчик комбинаций в модальном окне */
.modal-combo-count {
    margin-top: 10px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4caf50, #2196f3);
    color: white;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    animation: comboPulse 2s infinite;
}

@keyframes comboPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(76, 175, 80, 0.8);
    }
}