/* Kursomierz — Onboarding Modal */

.onb-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    opacity: 0;
    transition: background 400ms ease, backdrop-filter 400ms ease, opacity 400ms ease;
    padding: 1rem;
}

.onb-overlay.onb-visible {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    opacity: 1;
}

.onb-overlay.onb-closing {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    opacity: 0;
}

.onb-modal {
    background: #12162a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 400ms ease;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.03);
}

.onb-visible .onb-modal {
    transform: scale(1);
    opacity: 1;
}

.onb-closing .onb-modal {
    transform: scale(0.95);
    opacity: 0;
}

.onb-content {
    padding: 1.5rem 2rem 1rem;
    text-align: center;
    will-change: transform, opacity;
    flex: 1;
    overflow: hidden;
}

.onb-video-wrap {
    margin-bottom: 1rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    background: #0a0e1a;
}

.onb-video {
    width: 100%;
    height: auto;
    max-height: 50vh;
    display: block;
    border-radius: 16px;
    opacity: 0;
    transform: scale(0.98);
    animation: onbVideoIn 500ms 200ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    object-fit: contain;
}

.onb-video::-webkit-media-controls {
    display: none !important;
}

.onb-video::-webkit-media-controls-enclosure {
    display: none !important;
}

@keyframes onbVideoIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.onb-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #f0f4f8;
    margin: 0 0 0.5rem;
    letter-spacing: -0.3px;
}

.onb-desc {
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0 0 1.25rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Confetti */
.onb-confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.onb-confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    opacity: 0;
    animation: confettiFall 3s ease-in forwards;
}

@keyframes confettiFall {
    0% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
    100% { opacity: 0; transform: translateY(500px) rotate(720deg) scale(0.5); }
}

/* Dots */
.onb-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.onb-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: background 300ms ease, transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.onb-dot-active {
    background: #38bdf8;
    transform: scale(1.3);
}

/* Footer */
.onb-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.onb-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: color 200ms ease, background 200ms ease, transform 150ms ease;
    font-family: inherit;
}

.onb-btn:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
}

.onb-btn:active {
    transform: scale(0.96);
}

.onb-btn-next {
    color: #f0f4f8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.onb-btn-next:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #fff;
}

.onb-btn-finish {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #fff;
    font-weight: 600;
}

.onb-btn-finish:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(139, 92, 246, 0.3));
}

/* Responsive */
@media (max-width: 560px) {
    .onb-modal {
        max-width: 100%;
        border-radius: 16px;
    }

    .onb-content {
        padding: 1.5rem 1.25rem 1rem;
    }

    .onb-footer {
        padding: 0.75rem 1.25rem 1.25rem;
    }

    .onb-title {
        font-size: 1.2rem;
    }

    .onb-desc {
        font-size: 0.82rem;
    }

    .onb-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
}


/* Thank You screen */
.onb-thankyou {
    max-width: 500px;
    text-align: center;
}

.onb-ty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: tyBounce 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tyBounce {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.onb-ty-btn {
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
}
