.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}
.tutorial-overlay.show {
    opacity: 1;
}
.tutorial-step {
    background: linear-gradient(135deg, rgba(0, 225, 185, 0.95) 0%, rgba(0, 184, 225, 0.95) 100%);
    border-radius: 16px;
    padding: 20px 25px;
    max-width: 420px;
    width: 90%;
    color: white;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.2);
}
.tutorial-step.show {
    transform: scale(1);
}
.tutorial-icon {
    font-size: 45px;
    margin-bottom: 15px;
    animation: tutorialIconFloat 3s ease-in-out infinite;
}
.tutorial-step h2 {
    margin: 0 0 12px 0;
    font-size: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    line-height: 1.3;
}
.tutorial-step p {
    margin: 0 0 18px 0;
    font-size: 15px;
    line-height: 1.5;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.tutorial-animation {
    margin: 15px 0;
    font-size: 24px;
    animation: tutorialPulse 2s infinite;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    line-height: 1.3;
}
.tutorial-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.tutorial-progress {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.tutorial-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.tutorial-step button {
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.tutorial-step button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.tutorial-step button:active {
    transform: translateY(0);
}
.tutorial-prev {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}
.tutorial-prev:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}
.tutorial-next {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #00B8E1 !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}
.tutorial-next:hover {
    background: white !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.4);
}
.tutorial-skip {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}
.tutorial-skip:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}
@keyframes tutorialIconFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}
@keyframes tutorialPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.03);
        opacity: 0.9;
    }
}
@keyframes tutorialSuccess {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}
@keyframes tutorialSlideIn {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}
@media (max-width: 768px) {
    .tutorial-step {
        padding: 18px 20px;
        max-width: 95%;
        margin: 10px;
        border-radius: 14px;
    }
    .tutorial-icon {
        font-size: 38px;
        margin-bottom: 12px;
    }
    .tutorial-step h2 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    .tutorial-step p {
        font-size: 14px;
        margin-bottom: 15px;
        line-height: 1.4;
    }
    .tutorial-animation {
        font-size: 20px;
        padding: 10px;
        margin: 12px 0;
        line-height: 1.2;
    }
    .tutorial-controls {
        flex-direction: column;
        gap: 12px;
        margin-top: 16px;
    }
    .tutorial-buttons {
        width: 100%;
        justify-content: center;
        gap: 6px;
    }
    .tutorial-step button {
        padding: 9px 14px;
        font-size: 12px;
    }
}
@media (max-width: 480px) {
    .tutorial-step {
        padding: 16px 18px;
        max-width: 96%;
        border-radius: 12px;
    }
    .tutorial-icon {
        font-size: 32px;
        margin-bottom: 10px;
    }
    .tutorial-step h2 {
        font-size: 16px;
        margin-bottom: 8px;
        line-height: 1.2;
    }
    .tutorial-step p {
        font-size: 13px;
        margin-bottom: 12px;
        line-height: 1.3;
    }
    .tutorial-animation {
        font-size: 18px;
        padding: 8px;
        margin: 10px 0;
        line-height: 1.1;
    }
    .tutorial-progress {
        font-size: 12px;
        padding: 3px 8px;
    }
    .tutorial-buttons {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    .tutorial-step button {
        width: 100%;
        padding: 10px;
        font-size: 12px;
    }
}
@media (max-width: 360px) {
    .tutorial-step {
        padding: 14px 16px;
    }
    .tutorial-icon {
        font-size: 28px;
        margin-bottom: 8px;
    }
    .tutorial-step h2 {
        font-size: 15px;
    }
    .tutorial-step p {
        font-size: 12px;
    }
    .tutorial-animation {
        font-size: 16px;
        padding: 6px;
    }
}
.tutorial-step.survivor-mode {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.95) 0%, rgba(255, 107, 107, 0.95) 100%);
}
.tutorial-step.speed-mode {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.95) 0%, rgba(255, 140, 0, 0.95) 100%);
}
.tutorial-step.beslik-mode {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.95) 0%, rgba(147, 112, 219, 0.95) 100%);
}
.tutorial-step.online-mode {
    background: linear-gradient(135deg, rgba(34, 193, 195, 0.95) 0%, rgba(253, 187, 45, 0.95) 100%);
}
.tutorial-step::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.1), 
        rgba(255, 255, 255, 0.2), 
        rgba(255, 255, 255, 0.1), 
        rgba(255, 255, 255, 0.2)
    );
    background-size: 400% 400%;
    border-radius: 19px;
    z-index: -1;
    animation: tutorialGlow 4s ease-in-out infinite;
    opacity: 0.7;
}
@keyframes tutorialGlow {
    0%, 100% {
        background-position: 0% 50%;
        opacity: 0.5;
    }
    25% {
        background-position: 100% 50%;
        opacity: 0.8;
    }
    50% {
        background-position: 100% 100%;
        opacity: 0.6;
    }
    75% {
        background-position: 0% 100%;
        opacity: 0.9;
    }
}
.tutorial-step::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    z-index: -1;
    animation: tutorialPulseBorder 3s ease-in-out infinite;
}
@keyframes tutorialPulseBorder {
    0%, 100% {
        border-color: rgba(255, 255, 255, 0.2);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        border-color: rgba(255, 255, 255, 0.5);
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
}
.tutorial-step {
    animation: tutorialSlideIn 0.5s ease-out;
}
.tutorial-step button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}
.tutorial-step button:hover::before {
    left: 100%;
}
.tutorial-animation br {
    line-height: 0.8;
}
.tutorial-step .tutorial-animation {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 480px) {
    .tutorial-step .tutorial-animation {
        white-space: normal;
        word-break: break-word;
    }
}