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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #1e1e2e;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    padding: 40px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    color: #e0e0e0;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #b0b0b0;
    font-size: 1.1em;
}

.form-section {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.required {
    color: #e74c3c;
}

#prompt {
    width: 100%;
    padding: 12px;
    border: 2px solid #3a3a4a;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
    background: #2a2a3a;
    color: #e0e0e0;
}

#prompt:focus {
    outline: none;
    border-color: #667eea;
}

.char-counter {
    text-align: right;
    font-size: 0.85em;
    color: #b0b0b0;
    margin-top: 5px;
}

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

select, input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #3a3a4a;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s;
    background: #2a2a3a;
    color: #e0e0e0;
}

select:focus, input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
}

.cost-estimate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 20px;
}

.generate-btn {
    width: 100%;
    padding: 16px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #3a3a4a;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar.active .progress-bar-fill {
    animation: progress 2s ease-in-out infinite;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 100%;
    border-radius: 10px;
}

@keyframes progress {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

.status {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 500;
}

.status.info {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #1976d2;
}

.status.success {
    background: #e8f5e9;
    color: #388e3c;
    border-left: 4px solid #388e3c;
}

.status.error {
    background: #ffebee;
    color: #d32f2f;
    border-left: 4px solid #d32f2f;
}

.video-container {
    margin-top: 30px;
    padding: 20px;
    background: #2a2a3a;
    border-radius: 8px;
}

.video-container h2 {
    color: #e0e0e0;
    margin-bottom: 15px;
}

#video {
    width: 100%;
    border-radius: 8px;
    background: #000;
    margin-bottom: 15px;
}

.download-btn {
    padding: 12px 24px;
    border: none;
    background: #28a745;
    color: white;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.download-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #3a3a4a;
    color: #b0b0b0;
    font-size: 0.9em;
    line-height: 1.6;
}

footer p {
    margin-bottom: 10px;
}

.pricing-info {
    background: #2a2a3a;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

/* Image Upload Section Styles */
.image-upload-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #262635;
    border-radius: 8px;
}

.image-upload-section h3 {
    color: #e0e0e0;
    font-size: 1.1em;
    margin-bottom: 15px;
}

.drop-zone {
    border: 2px dashed #667eea;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(102, 126, 234, 0.05);
}

.drop-zone:hover {
    border-color: #764ba2;
    background: rgba(102, 126, 234, 0.1);
}

.drop-zone.active {
    border-color: #764ba2;
    background: rgba(102, 126, 234, 0.15);
    transform: scale(1.02);
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.drop-zone p {
    color: #e0e0e0;
    margin: 10px 0;
    font-weight: 500;
}

.drop-zone-hint {
    color: #b0b0b0 !important;
    font-size: 0.9em !important;
    font-weight: 400 !important;
}

.image-preview-container {
    margin-top: 20px;
}

.image-preview {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 300px;
    margin-bottom: 15px;
}

.image-preview img {
    width: 100%;
    border-radius: 8px;
    border: 2px solid #3a3a4a;
    display: block;
}

.remove-image-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    border: none;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.remove-image-btn:hover {
    background: #c0392b;
}

.analyze-btn {
    padding: 12px 24px;
    border: none;
    background: #667eea;
    color: white;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 15px;
}

.analyze-btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

.analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.generated-prompt-container {
    margin-top: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-left: 4px solid #667eea;
    border-radius: 8px;
}

.prompt-info {
    margin-bottom: 15px;
}

.prompt-label {
    color: #e0e0e0;
    font-weight: 600;
    margin-bottom: 8px;
}

#generated-prompt {
    width: 100%;
    padding: 12px;
    border: 2px solid #3a3a4a;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
    background: #2a2a3a;
    color: #e0e0e0;
}

#generated-prompt:focus {
    outline: none;
    border-color: #667eea;
}

#generated-char-counter {
    text-align: right;
    font-size: 0.85em;
    color: #b0b0b0;
    margin-top: 5px;
}

.use-generated-btn,
.reanalyze-btn {
    padding: 10px 20px;
    border: none;
    color: white;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-right: 10px;
    margin-top: 10px;
}

.use-generated-btn {
    background: #667eea;
}

.use-generated-btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

.reanalyze-btn {
    background: #3a3a4a;
}

.reanalyze-btn:hover {
    background: #4a4a5a;
    transform: translateY(-2px);
}

.divider {
    text-align: center;
    color: #b0b0b0;
    margin: 20px 0;
    font-weight: 600;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #3a3a4a;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }
}