* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #ffffff;
    font-family: InterVariable, sans-serif;
    color: #111;
}

.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px 60px;
}

h1 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 30px;
}

/* SECTION */

.section {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    position: relative;
}

.section-title {
    position: absolute;
    top: -10px;
    left: 20px;
    background: #fff;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* CARD */

.card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    box-shadow: inset 0 0 8px rgba(236, 236, 236, 0.71);
    background: #fff;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
}

.actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn {
    padding: 6px 12px;
    border-radius: 10px;
    cursor: pointer;
    background: #e80031;
    color: #ffe9e9;
    display: flex;
    font-weight: 600;
    font-size: .8rem;
    gap: .35rem;
    align-items: center;
    justify-content: center;
    font-family: InterVariable, sans-serif;
    border: 2px solid #c41624;
    box-shadow: inset 0 0 15px #6d0202a1, inset 0 -40px 40px -30px rgba(114, 4, 4, .959);
    transition: .3s ease all;
    text-decoration: none;
}

.btn:hover {
    box-shadow: inset 0 0 15px #8a0303a1, inset 0 -40px 40px -30px rgba(143, 7, 7, 0.959);
    color: #ffd5d5;
    transition: .3s ease all;
}

.thumbs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.thumb img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    display: block;
    object-fit: cover;
}

/* SINGLE THUMBNAIL MODE */

.thumbs.single-thumb {
    display: flex;
    justify-content: center;
    align-items: center;
}

.thumbs.single-thumb .thumb {
    width: 100%;
}

.thumbs.single-thumb img {
    width: 100%;
}

/* TUTORIAL CARD */

.tutorial-card .thumb img {
    aspect-ratio: 16 / 9;
}

/* IFRAME VIEWER */

.viewer {
    position: fixed;
    inset: 0;
    background: #fff;
    display: none;
    flex-direction: column;
    z-index: 9999;
}

.viewer.open {
    display: flex;
}

.viewer iframe {
    flex: 1;
    width: 100%;
    border: none;
}

/* Bottom-right controls */

.viewer-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.control-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    box-shadow: inset 0 0 8px rgba(222, 222, 222, 0.71), 0 0 8px rgba(222, 222, 222, 0.71);
}

.control-btn i {
    text-shadow: 0 0 8px #9b9b9b88;
}

.control-btn:hover {
    background: #f3f4f6;
}

/* BLUR WHEN ONBOARDING ACTIVE */

body.onboarding-active .container {
    filter: blur(6px);
}

/* ONBOARDING OVERLAY */

.onboarding-overlay {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(6px);
    background: rgba(255, 255, 255, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.onboarding-overlay.active {
    display: flex;
}

.onboarding-card {
    width: 480px;
    background: white;
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid #cbcbcb;
    text-align: center;
    animation: fadeIn .4s ease;
}

.onboarding-card.zoom {
    animation: zoomToCorner 1.4s ease forwards;
}

.onboarding-content h2 {
    font-size: 22px;
    margin-bottom: 16px;
}

.onboarding-content p {
    color: #555;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.onboarding-content input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    font-family: InterVariable, sans-serif;
    margin-bottom: 12px;
}

.primary-btn {
    background: #111;
    color: white;
    border: none;
    padding: 12px 22px;
    border-radius: 12px;
    cursor: pointer;
    font-family: InterVariable, sans-serif;
    font-weight: 600;
}

/* TUTORIAL VIEWER */

.tutorial-viewer {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 10001;
    display: none;
    overflow: auto;
}

.tutorial-viewer.open {
    display: block;
}

.tutorial-container {
    max-width: 900px;
    margin: auto;
    padding: 60px 20px;
}

.tutorial-page-title {
    font-size: 30px;
    margin: 0 0 28px;
}

.tutorial-step {
    margin-bottom: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    background: #fff;
    box-shadow: inset 0 0 8px rgba(236, 236, 236, 0.45);
}

.tutorial-step h3 {
    margin: 0 0 14px;
    font-size: 18px;
}

.tutorial-step img {
    width: 100%;
    border-radius: 12px;
    margin: 0 0 14px;
    border: 1px solid #e5e7eb;
    display: block;
}

.tutorial-step p {
    margin: 0;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.close-tutorial {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.close-tutorial:hover {
    background: #f3f4f6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomToCorner {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(.1) translate(400%, 300%);
        opacity: 0;
    }
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .onboarding-card {
        width: calc(100% - 24px);
        padding: 28px 20px;
    }

    .tutorial-page-title {
        font-size: 24px;
    }
}