/* Image to Prompt Tool Styles */

:root {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --accent-color: #6366f1;
}

body {
    background: linear-gradient(135deg, #f6f8fd 0%, #f1f5f9 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

.header h1 {
    font-size: 2.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.subtitle {
    color: #64748b;
    font-size: 1.1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--accent-color);
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--glass-shadow);
    margin-bottom: 30px;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
}

.upload-area:hover, .upload-area.drag-over {
    border-color: var(--accent-color);
    background: rgba(99, 102, 241, 0.05);
    transform: scale(1.01);
}

.upload-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.upload-content h3 {
    margin-bottom: 8px;
    color: #1e293b;
}

.upload-content p {
    color: #64748b;
    margin-bottom: 8px;
}

.file-info {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 10px;
}

/* Preview Area */
#preview-container {
    margin-top: 30px;
    text-align: center;
}

.image-preview-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#image-preview {
    max-width: 100%;
    max-height: 400px;
    display: block;
    border-radius: 12px;
}

#remove-image-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

#remove-image-btn:hover {
    background: rgba(239, 68, 68, 0.9);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: white;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(99, 102, 241, 0.05);
}

.full-width {
    width: 100%;
    margin-top: 20px;
}

/* Loading State */
#loading-state {
    text-align: center;
    padding: 40px 0;
}

.loader-animation {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    opacity: 0;
    animation: pulse 2s infinite;
}

.loader-animation i {
    font-size: 2rem;
    color: var(--accent-color);
    animation: bounce 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Result Section */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.prompt-box {
    margin-bottom: 20px;
}

.prompt-box textarea {
    width: 100%;
    min-height: 200px;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.8);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #334155;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease;
}

.prompt-box textarea:focus {
    border-color: var(--accent-color);
}

.download-options {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.btn-group {
    display: flex;
    gap: 10px;
}

/* Utilities */
.hidden {
    display: none !important;
}

.mobile-only {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .glass-card {
        padding: 20px;
    }
    
    .download-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-group {
        width: 100%;
    }
    
    .btn-group .btn {
        flex: 1;
    }
}
