* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #ddd, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: twinkle 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(255, 255, 255, 0.5); }
    to { text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 40px rgba(0, 191, 255, 0.3); }
}

.ai-text {
    color: #00bfff;
}

.cinema-text {
    color: #ff6b6b;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.2rem;
    color: #cccccc;
    font-weight: 300;
}

.main-content {
    display: grid;
    gap: 3rem;
}

.generator-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.input-container {
    position: relative;
    margin-bottom: 2rem;
}

#moviePrompt {
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    font-size: 1rem;
    color: #ffffff;
    font-family: inherit;
    transition: all 0.3s ease;
}

#moviePrompt:focus {
    outline: none;
    border-color: #00bfff;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.3);
}

#moviePrompt::placeholder {
    color: #888;
}

.character-count {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 0.8rem;
    color: #888;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group label {
    font-weight: 500;
    color: #cccccc;
    font-size: 0.9rem;
}

.option-group select {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 0.8rem;
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-group select:focus {
    outline: none;
    border-color: #00bfff;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.3);
}

.option-group select option {
    background: #1a1a2e;
    color: #ffffff;
}

.generate-btn {
    width: 100%;
    background: linear-gradient(45deg, #ff6b6b, #00bfff);
    border: none;
    border-radius: 15px;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.4);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn.loading {
    pointer-events: none;
}

.btn-text {
    transition: opacity 0.3s ease;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.generate-btn.loading .btn-text {
    opacity: 0;
}

.generate-btn.loading .btn-loader {
    opacity: 1;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.output-section {
    display: none;
    animation: fadeInUp 0.6s ease;
}

.output-section.visible {
    display: block;
}

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

.movie-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.movie-header {
    text-align: center;
    margin-bottom: 2rem;
}

.movie-header h2 {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #00bfff, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.movie-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: #cccccc;
    font-size: 0.9rem;
}

.storyboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.storyboard-frame {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.storyboard-frame:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.frame-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: linear-gradient(45deg, #ff6b6b, #00bfff);
}

.frame-caption {
    padding: 1rem;
    font-size: 0.9rem;
    color: #cccccc;
    line-height: 1.4;
}

.script-section {
    margin-bottom: 2rem;
}

.script-section h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #00bfff;
}

.script-content {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    color: #ffffff;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

.movie-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: linear-gradient(45deg, #00bfff, #0099cc);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.3);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 191, 255, 0.4);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-overlay.visible {
    display: flex;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.film-reel {
    width: 80px;
    height: 80px;
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid #00bfff;
    border-radius: 50%;
    margin: 0 auto 2rem;
    animation: spin 2s linear infinite;
}

.loading-content h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #00bfff;
}

.loading-content p {
    color: #cccccc;
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #00bfff, #ff6b6b);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.poster-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.poster-container {
    display: flex;
    justify-content: center;
}

.movie-poster {
    width: 100%;
    max-width: 300px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.movie-poster:hover {
    transform: scale(1.05);
}

.movie-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.rating-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.star-rating .stars {
    font-size: 1.5rem;
    color: #ffd700;
    margin-right: 0.5rem;
}

.rating-text {
    color: #cccccc;
    font-size: 0.9rem;
}

.views-count {
    color: #888;
    font-size: 0.9rem;
}

.synopsis {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    line-height: 1.6;
    color: #ffffff;
}

.reviews-section h3 {
    font-family: 'Orbitron', monospace;
    color: #00bfff;
    margin-bottom: 1rem;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.review-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 10px;
    border-left: 3px solid #00bfff;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.reviewer-name {
    font-weight: 600;
    color: #ffffff;
}

.review-rating {
    color: #ffd700;
    font-size: 0.9rem;
}

.review-text {
    color: #cccccc;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.review-publication {
    color: #888;
    font-size: 0.8rem;
    font-style: italic;
}

.performance-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.performance-section h3 {
    font-family: 'Orbitron', monospace;
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.performance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.stat-label {
    display: block;
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
}

.section-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.nav-tab {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 0.8rem 1.5rem;
    color: #cccccc;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-tab.active {
    background: linear-gradient(45deg, #00bfff, #0099cc);
    color: #ffffff;
    border-color: #00bfff;
}

.nav-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.published-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.published-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.published-header h2 {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    color: #00bfff;
}

.published-controls {
    display: flex;
    gap: 1rem;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.movie-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: #00bfff;
}

.movie-card-poster {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(45deg, #ff6b6b, #00bfff);
}

.movie-card-content {
    padding: 1rem;
}

.movie-card-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.movie-card-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.movie-card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.movie-card-rating {
    color: #ffd700;
    font-size: 0.9rem;
}

.movie-card-views {
    color: #00bfff;
    font-size: 0.8rem;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #888;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #cccccc;
}

.empty-state p {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .generator-section,
    .movie-container {
        padding: 1.5rem;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .movie-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
    
    .poster-section {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .rating-section {
        justify-content: center;
        text-align: center;
    }
    
    .published-header {
        flex-direction: column;
        text-align: center;
    }
    
    .published-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .movies-grid {
        grid-template-columns: 1fr;
    }
    
    .section-nav {
        flex-direction: column;
    }
    
    .published-header h2 {
        margin-bottom: 0.5rem;
    }
    
    .published-controls {
        margin-bottom: 1rem;
    }
}