/* assets/css/tutorial.css */
@font-face {
    font-family: 'PressStart2P';
    src: url('../fonts/PressStart2P-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

#mobileTutorialOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    font-family: 'Inter', sans-serif;
    pointer-events: none; /* Пропускаем клики сквозь контейнер, если надо */
}

/* Затемнение фона (кулисы), блокирующее клики пользователя */
#tutScreenCurtain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
    z-index: 10;
    pointer-events: none; /* Изначально пропускаем клики, активируем только при показе туториала */
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Окно, прорезающее затемнение (чтобы выделить реальный элемент DOM) */
.tut-highlight-active {
    position: relative !important;
    z-index: 1000000 !important;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75), 0 0 15px rgba(255, 255, 255, 0.5) !important;
    border-radius: 8px; /* Добавим скругление для красоты, если его нет */
    transition: box-shadow 0.3s ease;
    background-color: var(--bg-color); /* чтобы элемент не был прозрачным, если он изначально прозрачный */
    pointer-events: auto !important; /* Разрешаем скрипту (или юзеру) кликать по нему */
}

/* Собака-помощник: по умолчанию внизу */
#tutAssistantWrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    border-top: 2px solid var(--accent-color);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto; /* Диалог должен ловить клики */
}

#tutAssistantWrapper.active {
    transform: translateY(0);
}

#tutAssistantWrapper.full-screen {
    height: 100%;
    justify-content: center;
    background: #0f172a;
    border-top: none;
    z-index: 1000;
}

#tutDogAvatar {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 10px;
    transition: all 0.5s ease;
}

#tutAssistantWrapper.full-screen #tutDogAvatar {
    width: 250px;
    height: 250px;
    margin-bottom: 30px;
}

#tutDialogBubble {
    width: 100%;
    text-align: center;
}

#tutDialogText {
    font-family: 'PressStart2P', monospace, sans-serif;
    font-size: 11px;
    line-height: 1.6;
    color: #fff;
    min-height: 50px;
    margin-bottom: 15px;
    text-align: left;
    word-wrap: break-word;
    text-shadow: 1px 1px 2px #000;
    display: block;
}

#tutAssistantWrapper.full-screen #tutDialogText {
    text-align: center;
    font-size: 14px;
    line-height: 1.8;
}

/* Кнопки диалога */
.tut-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.tut-btn {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

#tutBtnExit {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    text-decoration: underline;
    margin-top: 10px;
    cursor: pointer;
}

#tutBtnExit:hover {
    color: #fff;
}

/* Курсор анимации кликов */
#tutCursor.clicking {
    transform: translate(-4px, -2px) scale(0.85);
}

/* Волна при клике курсора (реализуется через JS-впрыск) */
.tut-ripple {
    position: fixed;
    width: 20px;
    height: 20px;
    background: rgba(59, 130, 246, 0.7);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    z-index: 9999998;
    pointer-events: none;
    animation: clickRipple 0.5s ease-out forwards;
}

@keyframes clickRipple {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}
