/**
 * Animations CSS for PowerMagician Landing Page
 * Contains all animations and transitions
 */

/* Fade in animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Glow animation */
@keyframes glow {
    0% {
        border-color: rgba(13, 79, 13, 0.3);
        box-shadow:
            0 0 10px rgba(13, 79, 13, 0.2),
            inset 0 0 10px rgba(13, 79, 13, 0.1);
    }
    50% {
        border-color: rgba(13, 79, 13, 0.6);
        box-shadow:
            0 0 30px rgba(13, 79, 13, 0.4),
            inset 0 0 20px rgba(13, 79, 13, 0.2);
    }
    100% {
        border-color: rgba(13, 79, 13, 0.3);
        box-shadow:
            0 0 10px rgba(13, 79, 13, 0.2),
            inset 0 0 10px rgba(13, 79, 13, 0.1);
    }
}

/* Pulse animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Ripple effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* --------------HERO SECTION ---------------*/
.hero-section {
    position: relative;
    min-height: 20vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /*background: linear-gradient(135deg, #000000 0%, #0d4f0d 50%, #000000 100%);*/
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(
            circle at 20% 50%,
            rgba(13, 79, 13, 0.3) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 50%,
            rgba(13, 79, 13, 0.3) 0%,
            transparent 50%
        );
    animation: heroGlow 10s ease-in-out infinite;
}

@keyframes heroGlow {
    0%,
    100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px;
    animation: fadeIn 1.5s ease-out;
}

.hero-title {
    font-size: 70px;
    font-weight: absolute;
    color: #b3ff66;
    /*-webkit-background-clip: text;
    -webkit-text-fill-color: transparent;*/
    margin-bottom: 20px;
    letter-spacing: 3px;
    animation: heroTitle 2s ease-out;
    text-shadow:
        1px 1px 2px gold,
        -1px -1px 2px indigo,
        0 2px 60px lightcoral,
        0 1px 2px palegoldenrod;;
}

@keyframes heroTitle {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.hero-subtitle {
    font-size: 15px;
    color: #ffaa00;
    margin-bottom: 40px;
    animation: fadeIn 1.8s ease-out 0.3s backwards;

        background: rgba(20, 30, 20, 0.45);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 16px;
        padding: 25px;
        border: 1px solid rgba(120, 255, 120, 0.25);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), inset 0 0 12px rgba(120, 255, 120, 0.08);
}
 /*скорректирвоал чтобы появились зеленыые кнопки */
.hero-button {
    display: inline-block;
    position: relative;
    z-index: 2;
    padding: 14px 28px;
    background: linear-gradient(90deg, #2ecc71 0%, #27ae60 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    -webkit-appearance: none;
    box-shadow: 0 6px 20px rgba(13, 79, 13, 0.25);
    animation: fadeIn 0.8s ease-out 0.6s both;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(13, 79, 13, 0.35);
}

.hero-button:active {
    transform: translateY(0);
}

/* --------------HEADER SECTION ---------------*/
.header-section {
    position: relative;
    min-height: 20vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /*background: linear-gradient(135deg, #000000 0%, #0d4f0d 50%, #000000 100%);*/
    overflow: hidden;
}

header-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(
            circle at 20% 50%,
            rgba(13, 79, 13, 0.3) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 50%,
            rgba(13, 79, 13, 0.3) 0%,
            transparent 50%
        );
    animation: heroGlow 10s ease-in-out infinite;
}

@keyframes headerGlow {
    0%,
    100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 55px;
    animation: fadeIn 1.5s ease-out;
}

.header-title {
    font-size: 73px;
    font-weight: absolute;
    color: #000000;
    padding: 5px;
    /*-webkit-background-clip: text;
    -webkit-text-fill-color: transparent;*/
    margin-bottom: 20px;
    letter-spacing: 3px;
    animation: heroTitle 2s ease-out;
    text-shadow:
        1px 1px 2px gold,
        -1px -1px 2px indigo,
        0 2px 60px lightcoral,
        0 1px 2px palegoldenrod;;
}

@keyframes headerTitle {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.header-subtitle {
    font-size: 18px;
    color: #ffaa00 !important;
    margin-top: 5px;
    margin-bottom: 5px;
    animation: fadeIn 1.8s ease-out 0.3s backwards;

        background: rgba(20, 30, 20, 0.45);
        /*backdrop-filter: blur(10px);*/
        /*-webkit-backdrop-filter: blur(10px);*/
        border-radius: 10px;
        padding: 15px;
        border: 1px solid rgba(120, 255, 120, 0.25);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), inset 0 0 12px rgba(120, 255, 120, 0.08);
}

.header-button {
    animation: fadeIn 2s ease-out 0.6s backwards;
}




/* Section animations */
.section {
    opacity: 1;
    transform: none;
    transition: none;
}

/* List item animations */
.feature-item {
    /*opacity: 0;*/
    transform: translateX(-20px);
    transition: all 0.5s ease-out;
}

.list-item-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Button hover effects */
.nav-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition:
        width 0.6s,
        height 0.6s;
}

.nav-button:hover::before {
    width: 300px;
    height: 300px;
}

.nav-button.active {
    background: #ffffff;
    color: #0d4f0d;
    font-weight: 600;
}

/* Enrollment button animations */
.enroll-button {
    position: relative;
    overflow: hidden;
    animation: pulse 2s ease-in-out infinite;
}

.enroll-button::after {
    content: "";
    font-size: 18px;
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.5s;
}

.enroll-button:hover::after {
    animation: shine 0.5s ease-in-out;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.enroll-button.clicked {
    animation: click 0.3s ease-out;
}

@keyframes click {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}






/* Social links animations */
.social-link {
    position: relative;
    overflow: hidden;
}

.social-link .social-icon {
    display: inline-block;
    margin-right: 10px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.social-link:hover .social-icon {
    animation: rotate 0.5s ease-in-out;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Video container animations */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.video-container {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease-out forwards;
}

.video-container:nth-child(2) {
    animation-delay: 0.2s;
}

.video-title {
    margin-top: 15px;
    font-size: 16px;
    color: #b3ff66;
    text-shadow: 0 2px 10px #ff00cc, 0 0 20px #330033;
    background: rgba(0, 0, 0, 0.55);
    text-align: center;
}

.video-placeholder {
    text-align: center;
    padding: 40px;
    background: rgba(13, 79, 13, 0.1);
    border-radius: 10px;
    margin-bottom: 20px;
}

.cta-link {
    color: #4caf50;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.cta-link:hover {
    transform: translateX(5px);
    text-decoration: underline;
}

/* Video loader */
.video-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #4caf50;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Header scroll effect */
.header {
    transition: all 0.3s ease;
}

.header-scrolled {
    box-shadow: 0 4px 30px rgba(13, 79, 13, 0.5);
    backdrop-filter: blur(10px);
}

/* Mobile menu animations */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    width: 30px;
    height: 30px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    margin: 5px 0;
    transition: all 0.3s ease;
    position: absolute;
    left: 2px;
}

.mobile-menu-toggle span:nth-child(1) {
    top: 2px;
}

.mobile-menu-toggle span:nth-child(2) {
    top: 11px;
}

.mobile-menu-toggle span:nth-child(3) {
    top: 20px;
}

.mobile-menu-toggle.menu-open span:nth-child(1) {
    transform: rotate(45deg);
    top: 11px;
}

.mobile-menu-toggle.menu-open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.menu-open span:nth-child(3) {
    transform: rotate(-45deg);
    top: 11px;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #0d4f0d 0%, #1a751a 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Enrollment section special effects */
.enroll-info {
    text-align: center;
    padding: 20px;
}

.enroll-description {
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: rgba(0, 0, 0, 0.95); !important;
}

.bot-name {
    font-size: 20px;
    font-weight: bold;
    color: #4caf50;
    margin: 20px 0;
    padding: 15px;
    /*background: rgba(13, 79, 13, 0.1);*/
    border-radius: 10px;
    display: inline-block;
    animation: glow 3s ease-in-out infinite;
}

/* Footer */
.footer {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, #000000 100%);
    padding: 40px 20px;
    text-align: center;
    margin-top: 80px;
    border-top: 2px solid rgba(13, 79, 13, 0.3);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.7);
    margin: 5px 0;
}

/* Responsive mobile menu */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        padding: 20px;
        z-index: 999;
    }

    .nav-menu-open {
        transform: translateY(0);
    }

    .hero-title {
        font-size: 48px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .videos-grid {
        grid-template-columns: 1fr;
    }
}

/* Parallax effect for sections */
.section {
    /* transition: transform 0.1s ease-out; */
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    /*background: rgba(255, 255, 255, 0.5);*/
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}
