@keyframes confetti {
    0% {
        transform: translateY(-100vh) rotateZ(0deg);
        opacity: 1;
    }

    90% {
        transform: translateY(90vh) rotateZ(640deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotateZ(720deg);
        opacity: 0;
    }
}

.confetti {
    position: absolute;
    width: 15px;
    height: 10px;
    background: var(--theme-primary);
    animation: confetti 2s linear;
    border-radius: 10%;
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.welcome-hero {
    padding: 7rem 0 3rem;
    background: var(--theme-gradient-hero);
    min-height: 50vh;
    display: flex;
    align-items: center;
    position: relative;
}

.welcome-title {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-description {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.instruction-text {
    font-size: 1.25rem;
    color: var(--theme-text-body);
    margin-bottom: 2rem;
}

.pro-tip-container {
    margin-top: 2rem;
}

.pro-tip-text {
    font-size: 1.1rem;
    color: var(--theme-text-muted);
    font-style: italic;
}

.faq-link {
    color: var(--theme-primary);
}

.instruction-section {
    padding: 4rem 0;
    background: var(--theme-bg-light);
}

.instruction-section:nth-child(even) {
    background: var(--theme-bg-neutral);
}

.instruction-card {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
}

.instruction-card h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--theme-text-header);
}

.instruction-image {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.instruction-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.2);
    transition: transform 0.3s ease;
}

.instruction-image img:hover {
    transform: scale(1.05);
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--theme-gradient-cta);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
}

/* Video Grid Styles */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.video-card {
    background: var(--theme-bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--theme-border);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.2);
    border-color: var(--theme-primary);
}

.video-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    aspect-ratio: 16/9;
    background: #000;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.video-card:hover .video-container iframe {
    transform: scale(1.02);
}

/* Video Placeholder Styles */
.video-placeholder {
    position: relative;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    padding-bottom: 56.25%;
    height: 0;
    max-width: 100%;
    margin: 2rem 0;
}

.video-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-placeholder:hover img {
    transform: scale(1.05);
}

.video-placeholder .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    z-index: 2;
}

.video-placeholder:hover .play-button {
    background: rgba(249, 115, 22, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1rem;
    z-index: 3;
}

.video-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--theme-text-header);
}

.video-card p {
    color: var(--theme-text-body);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.video-card .btn {
    width: 100%;
    margin-top: auto;
}

@media (max-width: 768px) {
    .welcome-title {
        font-size: 2.5rem;
    }

    .instruction-card h2 {
        font-size: 2rem;
    }

    .instruction-card {
        padding: 2rem 1rem;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    .video-card {
        scroll-snap-align: start;
        min-width: 280px;
    }

    .video-card {
        padding: 1rem;
    }

    .video-container iframe {
        width: 100%;
        height: 100%;
    }

    .carousel-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .carousel-control {
        padding: 0.5rem;
        font-size: 1.2rem;
    }
}

/* Carousel Controls */
.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.carousel-control {
    background: var(--theme-bg-light);
    border: 2px solid var(--theme-border);
    color: var(--theme-text-header);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-control:hover {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: white;
    transform: scale(1.1);
}

.carousel-indicators {
    display: flex;
    gap: 0.5rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--theme-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background: var(--theme-primary);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: var(--theme-primary);
    transform: scale(1.2);
}

/* Video Error State */
.video-error {
    text-align: center;
    padding: 3rem;
    background: var(--theme-bg-neutral);
    border-radius: 12px;
    border: 2px dashed var(--theme-border);
}

.video-error h3 {
    color: var(--theme-text-header);
    margin-bottom: 1rem;
}

.video-error p {
    color: var(--theme-text-body);
    margin-bottom: 2rem;
}

/* Smooth Transitions */
.video-grid {
    transition: opacity 0.3s ease;
}

.video-grid.loading {
    opacity: 0.5;
}