/* Storyboard page */
.storyboard-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.storyboard-page h1 {
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
}

.storyboard-page > p {
    margin-bottom: 32px;
    color: var(--muted-color);
    font-size: 15px;
}

.storyboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.storyboard-card {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-color);
    transition: 0.2s ease;
}

.storyboard-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.storyboard-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--bg-color);
}

.storyboard-card-content {
    padding: 20px;
}

.storyboard-card h3 {
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 17px;
}

.storyboard-card p {
    color: var(--muted-color);
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 700px) {
    .storyboard-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* Storyboard loading state */
.storyboard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 260px;
    margin-bottom: 28px;
    padding: 32px 20px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-color);
    text-align: center;
}

.storyboard-loading h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 18px;
}

.storyboard-loading p {
    margin: 0;
    color: var(--muted-color);
    font-size: 14px;
}

.loading-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: storyboardSpin 1s linear infinite;
}

.loading-dots::after {
    content: "...";
    display: inline-block;
    width: 20px;
    overflow: hidden;
    vertical-align: bottom;
    animation: storyboardDots 1.5s steps(4, end) infinite;
}

@keyframes storyboardSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes storyboardDots {
    0% {
        width: 0;
    }

    100% {
        width: 20px;
    }
}


.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    overflow: hidden;
    border: 2px solid #8b5cf6;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.15);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}