/* assets/style.css - Dark Theme Matching Other AI Tools */

.image-to-prompt-generator,
.ultra-cheap-prompt-generator {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: radial-gradient(ellipse at top, #1e1b4b 0%, #0f0f23 100%);
    min-height: 90vh;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.image-to-prompt-generator *,
.ultra-cheap-prompt-generator * {
    box-sizing: border-box;
}

/* Header Section */
.upload-section {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
}

.upload-section h3 {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 30px;
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    color: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(139, 92, 246, 0.5);
    position: relative;
    overflow: hidden;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-top: -40px;
    margin-left: -40px;
    margin-right: -40px;
}

.upload-section h3::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" patternUnits="userSpaceOnUse" width="100" height="100"><circle cx="20" cy="20" r="0.5" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="0.3" fill="white" opacity="0.1"/><circle cx="40" cy="80" r="0.4" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    animation: float 25s infinite linear;
    z-index: 1;
}

@keyframes float {
    0% { transform: translateY(0px) translateX(0px); }
    100% { transform: translateY(-100px) translateX(-100px); }
}

.upload-section h3 > * {
    position: relative;
    z-index: 2;
}

/* Remove all cost/usage related sections */
.usage-info,
.usage-notice,
.upgrade-notice {
    display: none !important;
}

/* File Upload Area - Dark Theme */
.file-upload-area {
    position: relative;
    margin-bottom: 25px;
}

.file-upload-area input[type="file"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.upload-label {
    display: block;
    padding: 40px 20px;
    border: 3px dashed rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(30, 41, 59, 0.5);
    position: relative;
}

.upload-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #8b5cf6 50%, transparent 100%);
    border-radius: 12px 12px 0 0;
}

.upload-label:hover {
    border-color: #8b5cf6;
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-2px);
}

.file-upload-area.drag-over .upload-label {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
    color: #8b5cf6;
}

.upload-text {
    font-size: 18px;
    font-weight: 600;
    color: #f1f5f9;
}

.upload-subtitle {
    font-size: 14px;
    color: #94a3b8;
}

/* Image Preview - Dark Theme */
.image-preview {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

/* Options Section - Dark Theme */
.options-section {
    display: grid;
    gap: 30px;
    margin-bottom: 25px;
}

.options-section label {
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 10px;
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.options-section select,
.options-section textarea {
    width: 100%;
    padding: 16px 20px;
    margin: 0.5rem 0;
    background: #0f172a !important;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    color: #e2e8f0 !important;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.options-section select:focus,
.options-section textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
    background: rgba(15, 23, 42, 0.9) !important;
    color: #f8fafc !important;
}

.options-section select {
    cursor: pointer;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%238b5cf6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6,9 12,15 18,9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    appearance: none;
}

.options-section select option {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    padding: 10px;
}

.options-section textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.options-section textarea::placeholder {
    color: #64748b;
}

/* Form Groups */
.form-group {
    margin-bottom: 30px;
    padding: 1.25rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    position: relative;
}

.form-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #8b5cf6 50%, transparent 100%);
    border-radius: 12px 12px 0 0;
}

/* Character Counter */
.char-counter {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 8px;
    text-align: right;
    padding: 6px 12px;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.char-counter.over-limit {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    font-weight: 600;
}

/* Generate Button - Enhanced */
.generate-button {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4);
    margin-top: 20px;
}

.generate-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.5);
}

.generate-button:active {
    transform: translateY(0);
}

.generate-button:disabled {
    background: #475569;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.generate-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.generate-button:hover::before {
    left: 100%;
}

/* Results Section - Dark Theme */
.results-section {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-left: 5px solid #8b5cf6;
    animation: fadeInUp 0.5s ease-out;
}

.results-section h3 {
    color: #f1f5f9;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Prompt Output */
.prompt-output {
    position: relative;
    margin-bottom: 25px;
}

.prompt-output textarea {
    width: 100%;
    min-height: 200px;
    padding: 20px;
    border: 2px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.7;
    resize: vertical;
    background: rgba(15, 23, 42, 0.6) !important;
    color: #cbd5e1 !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
    background-image:
        linear-gradient(90deg, rgba(139, 92, 246, 0.1) 1px, transparent 1px),
        linear-gradient(180deg, rgba(139, 92, 246, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.prompt-output textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
    color: #f1f5f9 !important;
}

/* Prompt Actions */
.prompt-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

@media (max-width: 640px) {
    .prompt-actions {
        grid-template-columns: 1fr;
    }
}

.copy-button,
.download-button,
.try-again-button {
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.copy-button {
    background: rgba(71, 85, 105, 0.5);
    color: #cbd5e1;
    border: 2px solid rgba(148, 163, 184, 0.2);
}

.copy-button:hover {
    background: rgba(71, 85, 105, 0.8);
    border-color: #8b5cf6;
    transform: translateY(-1px);
}

.copy-button.copied {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: white !important;
}

.download-button {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: 2px solid transparent;
}

.download-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.try-again-button {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: 2px solid transparent;
}

.try-again-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Loading Section - Dark Theme */
.loading-section {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
}

.loading-content {
    max-width: 400px;
    margin: 0 auto;
}

.loading-section h3,
.loading-content h3 {
    color: #f1f5f9 !important;
    margin: 20px 0 10px 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.loading-section p {
    color: #94a3b8;
    font-size: 16px;
    margin: 0 0 30px 0;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(71, 85, 105, 0.5);
    border-top: 4px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message - Dark Theme */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #ef4444;
    font-weight: 500;
}

/* Info Boxes - Dark Theme */
.info-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #3b82f6;
}

.info-box h4 {
    margin: 0 0 15px 0;
    color: #60a5fa;
    font-weight: 700;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
    color: #94a3b8;
}

.info-box li {
    margin-bottom: 8px;
    color: #cbd5e1;
}

/* Stats Display */
.stats-display {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #10b981;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .image-to-prompt-generator,
    .ultra-cheap-prompt-generator {
        margin: 0 -15px;
        border-radius: 0;
    }
    
    .upload-section,
    .results-section {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .image-to-prompt-generator,
    .ultra-cheap-prompt-generator {
        padding: 15px;
        margin: 0 -20px;
        border-radius: 0;
    }
    
    .upload-section {
        padding: 20px;
    }
    
    .upload-section h3 {
        font-size: 2rem;
        margin-left: -20px;
        margin-right: -20px;
        padding: 30px 20px;
    }
    
    .upload-label {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .upload-text {
        font-size: 16px;
    }
    
    .results-section {
        padding: 25px;
    }
    
    .prompt-actions {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .upload-section h3 {
        font-size: 1.75rem;
    }
    
    .generate-button {
        font-size: 16px;
        padding: 16px 24px;
    }
    
    .options-section select,
    .options-section textarea {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .results-section {
        padding: 20px;
    }
    
    .form-group {
        padding: 1rem;
        margin-bottom: 1rem;
    }
}

/* Animation for smooth transitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced scrollbar styling */
.image-to-prompt-generator ::-webkit-scrollbar,
.ultra-cheap-prompt-generator ::-webkit-scrollbar {
    width: 8px;
}

.image-to-prompt-generator ::-webkit-scrollbar-track,
.ultra-cheap-prompt-generator ::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 4px;
}

.image-to-prompt-generator ::-webkit-scrollbar-thumb,
.ultra-cheap-prompt-generator ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    border-radius: 4px;
}

.image-to-prompt-generator ::-webkit-scrollbar-thumb:hover,
.ultra-cheap-prompt-generator ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed, #0891b2);
}

/* Focus states for better accessibility */
.image-to-prompt-generator button:focus,
.image-to-prompt-generator select:focus,
.image-to-prompt-generator textarea:focus,
.image-to-prompt-generator input:focus,
.ultra-cheap-prompt-generator button:focus,
.ultra-cheap-prompt-generator select:focus,
.ultra-cheap-prompt-generator textarea:focus,
.ultra-cheap-prompt-generator input:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* Selection styling */
.image-to-prompt-generator ::selection,
.ultra-cheap-prompt-generator ::selection {
    background: rgba(139, 92, 246, 0.3);
    color: #f1f5f9;
}

/* Print styles */
@media print {
    .image-to-prompt-generator,
    .ultra-cheap-prompt-generator {
        background: white;
        color: black;
        box-shadow: none;
    }
    
    .loading-section,
    .error-message,
    .prompt-actions {
        display: none !important;
    }
    
    .upload-section,
    .results-section {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
    }
    
    .upload-section h3 {
        background: #f5f5f5;
        color: black;
    }
    
    .prompt-output textarea {
        color: black !important;
        background: white !important;
    }
}