/* Storyboard Generator Styles */

/* Storyboard Title */
.storyboard-title {
    margin: 0 0 20px 0;
    font-size: 1.4em;
    color: #e8edf3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.storyboard-title .generator-icon {
    color: #6afcff;
}

/* Storyboard Frames Container */
.storyboard-frames {
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
}

/* Filmstrip Layout */
.storyboard-layout-filmstrip {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    padding: 15px 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 10%, rgba(0,0,0,0.2) 90%, rgba(0,0,0,0.4) 100%);
    border-top: 3px solid #1a1a1a;
    border-bottom: 3px solid #1a1a1a;
    scrollbar-width: thin;
    scrollbar-color: #6afcff30 transparent;
}

.storyboard-layout-filmstrip::-webkit-scrollbar {
    height: 8px;
}

.storyboard-layout-filmstrip::-webkit-scrollbar-track {
    background: transparent;
}

.storyboard-layout-filmstrip::-webkit-scrollbar-thumb {
    background: #6afcff30;
    border-radius: 4px;
}

.storyboard-layout-filmstrip::-webkit-scrollbar-thumb:hover {
    background: #6afcff50;
}

.storyboard-layout-filmstrip .storyboard-frame {
    flex: 0 0 auto;
    width: 280px;
    position: relative;
}

.storyboard-layout-filmstrip .storyboard-frame img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid rgba(106, 252, 255, 0.2);
}

/* Filmstrip perforations effect */
.storyboard-layout-filmstrip::before,
.storyboard-layout-filmstrip::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 10px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 15px,
        #1a1a1a 15px,
        #1a1a1a 25px
    );
    pointer-events: none;
}

/* Grid Layout */
.storyboard-layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.storyboard-layout-grid .storyboard-frame {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.storyboard-layout-grid .storyboard-frame img {
    width: 100%;
    height: auto;
    display: block;
}

/* Vertical Layout */
.storyboard-layout-vertical {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.storyboard-layout-vertical .storyboard-frame {
    display: flex;
    flex-direction: column;
    background: rgba(72, 101, 139, 0.15);
    border-radius: 8px;
    overflow: hidden;
}

.storyboard-layout-vertical .storyboard-frame img {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.storyboard-layout-vertical .frame-caption {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
}

/* Frame Number Badge */
.frame-number {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #6afcff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

/* Frame Caption */
.frame-caption {
    padding: 10px 12px;
    font-size: 0.9em;
    color: #b8c5d6;
    background: rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}

/* More Scenes Indicator */
.storyboard-more {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    background: rgba(106, 252, 255, 0.1);
    border: 1px dashed rgba(106, 252, 255, 0.3);
    border-radius: 6px;
    padding: 20px;
}

.storyboard-more a {
    color: #6afcff;
    text-decoration: none;
    font-weight: 500;
}

.storyboard-more a:hover {
    text-decoration: underline;
}

/* Scene Breakdown Section */
.scene-breakdown {
    margin-top: 25px;
}

.scene-breakdown h4 {
    color: #6afcff;
    margin-bottom: 15px;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.scenes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scene-item {
    background: rgba(72, 101, 139, 0.15);
    border-radius: 8px;
    padding: 15px;
    border-left: 3px solid #6afcff;
}

.scene-item strong {
    color: #6afcff;
    display: block;
    margin-bottom: 8px;
}

.scene-item p {
    margin: 0;
    color: #e8edf3;
    line-height: 1.5;
}

/* Hover Effects */
.storyboard-frame {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.storyboard-layout-filmstrip .storyboard-frame:hover,
.storyboard-layout-grid .storyboard-frame:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(106, 252, 255, 0.2);
    z-index: 5;
}

/* Image Link Styling */
.storyboard-frame a {
    display: block;
    text-decoration: none;
}

.storyboard-frame img {
    transition: filter 0.2s ease;
}

.storyboard-frame a:hover img {
    filter: brightness(1.1);
}

/* No Images State */
.storyboard-no-images {
    text-align: center;
    padding: 30px;
    background: rgba(106, 252, 255, 0.1);
    border: 1px solid rgba(106, 252, 255, 0.3);
    border-radius: 8px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .storyboard-layout-filmstrip .storyboard-frame {
        width: 220px;
    }

    .storyboard-layout-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .storyboard-layout-vertical .storyboard-frame img {
        max-width: 100%;
    }

    .frame-number {
        font-size: 0.7em;
        padding: 3px 8px;
    }
}

@media (max-width: 480px) {
    .storyboard-layout-filmstrip .storyboard-frame {
        width: 180px;
    }

    .storyboard-layout-grid {
        grid-template-columns: 1fr;
    }
}

/* Output Item Storyboard Preview */
.output-item .storyboard-frames {
    max-height: 300px;
    overflow: hidden;
}

.output-item .storyboard-layout-filmstrip {
    padding: 10px 0;
}

.output-item .storyboard-layout-filmstrip .storyboard-frame {
    width: 180px;
}

/* Animation for frame loading */
@keyframes frameSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.storyboard-frame {
    animation: frameSlideIn 0.3s ease forwards;
}

.storyboard-frame:nth-child(2) { animation-delay: 0.1s; }
.storyboard-frame:nth-child(3) { animation-delay: 0.2s; }
.storyboard-frame:nth-child(4) { animation-delay: 0.3s; }
.storyboard-frame:nth-child(5) { animation-delay: 0.4s; }
.storyboard-frame:nth-child(6) { animation-delay: 0.5s; }
.storyboard-frame:nth-child(7) { animation-delay: 0.6s; }
.storyboard-frame:nth-child(8) { animation-delay: 0.7s; }
