/**
 * Movie Synopsis Generator Public CSS
 */

/* Global styles - these will apply to all pages */
.movie-synopsis-container {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    color: #333;
    background-color: #f9f9f9;
}

/* Mobile viewport optimization */
html, body {
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* Cinema-inspired theme elements */
.cinema-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    border-top: 4px solid #e50914;
}

/* Mobile optimization for cards */
@media (max-width: 767px) {
    .cinema-card {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
}

.cinema-header {
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cinema-title {
    color: #e50914;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.cinema-button {
    background-color: #e50914;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cinema-button:hover {
    background-color: #c70812;
}

.cinema-button:disabled {
    background-color: #999;
    cursor: not-allowed;
}

.cinema-button-secondary {
    background-color: #333;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cinema-button-secondary:hover {
    background-color: #555;
}

/* Form elements */
.cinema-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.cinema-form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.cinema-form-input:focus {
    border-color: #e50914;
    outline: none;
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.2);
}

.cinema-form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    background-color: white;
}

.cinema-form-select:focus {
    border-color: #e50914;
    outline: none;
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.2);
}

/* Slider styling */
.range-slider {
    width: 100%;
    margin-bottom: 1.5rem;
}

.range-slider input[type=range] {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.range-slider input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e50914;
    cursor: pointer;
}

.range-slider input[type=range]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e50914;
    cursor: pointer;
}

.range-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e50914;
    margin-top: 0.5rem;
    text-align: center;
}

/* Alert messages */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Navigation */
.cinema-nav {
    background-color: #1a1a1a;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cinema-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.cinema-nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.cinema-nav-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.cinema-nav-item {
    margin-left: 1.5rem;
}

.cinema-nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.cinema-nav-link:hover {
    color: #e50914;
}

.cinema-nav-toggle {
    display: none;
    color: white;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Preview page styling */
.preview-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.logline-container {
    background-color: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #e50914;
}

.synopsis-container {
    background-color: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #333;
}

.preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

/* Profile page styling */
.synopsis-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.synopsis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.synopsis-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.synopsis-actions {
    display: flex;
    gap: 0.5rem;
}

.synopsis-content {
    margin-top: 1rem;
}

.synopsis-meta {
    font-size: 0.875rem;
    color: #666;
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.synopsis-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.synopsis-parameters {
    font-size: 0.9rem;
    color: #444;
}

.synopsis-parameters p {
    margin-bottom: 0.5rem;
}

.synopsis-parameters strong {
    font-weight: 600;
    color: #333;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .cinema-nav-menu {
        display: none;
    }
    
    /* Enhanced mobile optimizations */
    .cinema-header h1 {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }
    
    .cinema-header p {
        font-size: 1rem !important;
    }
    
    .cinema-header .container {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    input, select, textarea {
        font-size: 16px !important; /* Prevents iOS zoom */
    }
    
    /* Fix for long text in user profile */
    .cinema-card {
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: break-word;
        max-width: 100%;
    }
    
    /* Specifically target email and user fields */
    .cinema-card .font-bold {
        max-width: 100%;
        display: inline-block;
        text-overflow: ellipsis;
        overflow-wrap: break-word;
        word-break: break-all;
    }
    
    .cinema-nav-menu.show {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: #1a1a1a;
        padding: 1rem;
        z-index: 10;
    }
    
    .cinema-nav-item {
        margin: 0.5rem 0;
    }
    
    .cinema-nav-toggle {
        display: block;
    }
    
    .preview-actions {
        flex-direction: column;
    }
    
    .cinema-button, .cinema-button-secondary {
        width: 100%;
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .preview-actions button, 
    .preview-actions a {
        margin-right: 0 !important;
        margin-bottom: 0.75rem;
    }
    
    .cinema-form-label {
        font-size: 1.05rem;
    }
    
    .cinema-form-input, 
    .cinema-form-select {
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 0.75rem;
    }
    
    .cinema-header {
        padding: 1.5rem 0;
    }
    
    .cinema-header h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .cinema-header p {
        font-size: 1rem;
    }
    
    .cinema-nav-logo {
        font-size: 1.1rem;
    }
    
    /* Grid adjustments for mobile */
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Movie poster styling for the home page */
.movie-poster-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.movie-poster {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

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

/* For fullscreen poster on home page */
.hero-poster {
    position: relative;
    height: 80vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Additional typography classes */
.text-center {
    text-align: center;
}

.font-bold {
    font-weight: 700;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-gray-600 {
    color: #666;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.hidden {
    display: none;
}
