/* Cursor Following Button Styles */
.tl-cursor-following-button-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh; /* Default height */
    overflow: hidden;
    /* Transition for smooth height changes */
    transition: height 0.3s ease;
}

.tl-cursor-button {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 1px solid #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tl-cursor-button:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.tl-button-icon {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tl-button-icon i,
.tl-button-icon svg {
    font-size: 24px;
    color: #ffffff;
    transition: all 0.3s ease;
}

.tl-circular-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #ffffff;
    font-weight: 500;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SVG стили для кругового текста */
.tl-circular-svg {
    width: 90% !important;
    height: 90% !important;
    fill: none;
    stroke: none;
    transform-origin: center center;
    /* Базовая анимация вращения */
    animation: rotate 10s linear infinite;
}

/* Класс для отключения анимации */
.tl-circular-svg.no-rotation {
    animation: none !important;
}

/* Класс для противоположного направления вращения */
.tl-circular-svg.counter-clockwise {
    animation-direction: reverse;
}

/* Классы для разной скорости вращения */
.tl-circular-svg.speed-slow {
    animation-duration: 20s;
}

.tl-circular-svg.speed-medium {
    animation-duration: 10s;
}

.tl-circular-svg.speed-fast {
    animation-duration: 5s;
}

.tl-circular-svg text {
    fill: #ffffff;
    font-weight: 500;
    text-transform: uppercase;
}

.tl-circular-svg textPath {
    fill: #ffffff;
}

/* Для направления против часовой стрелки */
.tl-circular-svg.counter-clockwise {
    animation-direction: reverse;
}

/* Анимация вращения для контейнера */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animation keyframes */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .tl-cursor-button {
        width: 80px;
        height: 80px;
    }
    
    .tl-button-icon i,
    .tl-button-icon svg {
        font-size: 18px;
    }
    
    .tl-circular-text text {
        font-size: 10px;
        letter-spacing: 1px;
    }
}

@media (max-width: 480px) {
    .tl-cursor-button {
        width: 60px;
        height: 60px;
    }
    
    .tl-button-icon i,
    .tl-button-icon svg {
        font-size: 14px;
    }
    
    .tl-circular-text text {
        font-size: 8px;
        letter-spacing: 0.5px;
    }
}

/* Button visibility */
.tl-cursor-button.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Smooth movement transition */
.tl-cursor-button.moving {
    transition: transform 0.1s ease-out;
}

/* Glow effect on hover */
.tl-cursor-button.glow-effect:hover {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Scale effect on hover */
.tl-cursor-button.scale-effect:hover {
    transform: scale(1.2);
}

/* Rotation effect on hover */
.tl-cursor-button.rotate-effect:hover .tl-circular-text {
    animation-duration: 2s;
}

/* Pause rotation on hover */
.tl-cursor-button:hover .tl-circular-text.pause-on-hover {
    animation-play-state: paused;
}

/* Custom animation speeds */
.tl-circular-text.speed-slow {
    animation-duration: 20s;
}

.tl-circular-text.speed-fast {
    animation-duration: 5s;
}

/* Video popup overlay styles */
.tl-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tl-video-overlay.active {
    opacity: 1;
    visibility: visible;
}

.tl-video-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    aspect-ratio: 16/9;
    background-color: #000;
    border-radius: 10px;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.tl-video-overlay.active .tl-video-container {
    transform: scale(1);
}

.tl-video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.tl-video-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tl-video-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Loading spinner */
.tl-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
