/* Tutorial modal + top-bar button + first-visit banner */

.tutorial-top-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.tutorial-top-bar-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(240, 147, 251, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tutorial-top-bar-btn svg {
    flex-shrink: 0;
    opacity: 0.9;
}

.page-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.tutorial-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
    margin-bottom: 0;
    padding: 10px 16px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    animation: tutorialBannerIn 0.35s ease;
}

.image-area-wrapper > .tutorial-banner,
.video-creation-section > .tutorial-banner {
    width: 100%;
    margin-top: 0;
    margin-bottom: 14px;
}

.tutorial-banner-link {
    background: none;
    border: none;
    padding: 0;
    color: #a5b4fc;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tutorial-banner-link:hover {
    color: #c4b5fd;
}

.tutorial-banner-dismiss {
    background: none;
    border: none;
    padding: 2px 6px;
    margin-left: 4px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s ease;
}

.tutorial-banner-dismiss:hover {
    color: rgba(255, 255, 255, 0.8);
}

@keyframes tutorialBannerIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tutorial-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10500;
    padding: 16px;
    box-sizing: border-box;
    animation: tutorialFadeIn 0.25s ease;
}

.tutorial-modal-card {
    background: linear-gradient(160deg, #12122a 0%, #15213b 60%, #0e2f58 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    max-width: 960px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.7);
    color: white;
    font-family: inherit;
    overflow: hidden;
    animation: tutorialSlideUp 0.25s ease;
}

.tutorial-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    gap: 16px;
}

.tutorial-modal-header-text h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.tutorial-modal-header-text p {
    margin: 4px 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.tutorial-modal-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease;
}

.tutorial-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.tutorial-modal-body {
    position: relative;
    flex: 1;
    min-height: 0;
    padding: 0;
    background: #0a0a14;
}

.tutorial-modal-iframe-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 62.5%; /* 16:10 aspect ratio */
    height: 0;
    overflow: hidden;
}

.tutorial-modal-iframe-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.tutorial-modal-footer {
    padding: 14px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    text-align: center;
}

.tutorial-modal-external-link {
    font-size: 12px;
    color: #7dd3fc;
    text-decoration: none;
}

.tutorial-modal-external-link:hover {
    text-decoration: underline;
}

@keyframes tutorialFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes tutorialSlideUp {
    from {
        transform: translateY(24px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .tutorial-top-bar-btn span {
        display: none;
    }

    .tutorial-top-bar-btn {
        padding: 8px 12px;
    }

    .tutorial-banner {
        flex-wrap: wrap;
        text-align: center;
        font-size: 12px;
    }

    .tutorial-modal-header {
        padding: 16px;
    }

    .tutorial-modal-iframe-wrap {
        padding-bottom: 75%; /* taller on mobile */
    }
}
