/* Custom styles for Veo 3 Prompt Generator */
/* تطوير عبدالرحمن شحاتة - https://www.taalimai.xyz/ */

/* Fonts */
* {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Custom Properties */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-bg: rgba(17, 24, 39, 0.95);
    --card-bg: rgba(31, 41, 55, 0.8);
    --border-color: rgba(107, 114, 128, 0.3);
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --accent-purple: #8b5cf6;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
}

/* Global Styles */
body {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #0f0f23 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* Gradient Text */
.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Dark Cards */
.dark-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dark-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-purple);
}

/* Buttons */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(75, 85, 99, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(107, 114, 128, 0.8);
    border-color: var(--accent-blue);
    transform: translateY(-1px);
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--accent-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Loading Dots Animation */
.loading-dots::after {
    content: '';
    animation: dots 2s infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Response Container */
.response-container {
    animation: slideInUp 0.5s ease-out;
}

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

/* Tips Section */
.tips-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(10px);
}

/* Form Elements */
input, textarea, select {
    transition: all 0.3s ease;
    background: rgba(31, 41, 55, 0.8) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

input:focus, textarea:focus, select:focus {
    outline: none !important;
    border-color: var(--accent-purple) !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
    background: rgba(31, 41, 55, 0.95) !important;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Image Upload Area */
.image-upload-area {
    transition: all 0.3s ease;
    cursor: pointer;
}

.image-upload-area:hover {
    border-color: var(--accent-purple) !important;
    background: rgba(139, 92, 246, 0.05);
}

/* Banner Styles */
.banner-ad {
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Interstitial Ad */
.interstitial-backdrop {
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.interstitial-content {
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Notification Styles */
.notification {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Modal Styles */
.modal-backdrop {
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: slideInUp 0.3s ease-out;
    max-height: 80vh;
    overflow-y: auto;
}

/* Scrollbar Styling */
.modal-content::-webkit-scrollbar,
.overflow-y-auto::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track,
.overflow-y-auto::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb,
.overflow-y-auto::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover,
.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.8);
}

/* Header Styles */
header {
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

/* Footer Styles */
footer {
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
}

/* Character Counter */
.char-counter {
    transition: color 0.3s ease;
}

/* Advanced Settings */
.advanced-settings {
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.advanced-settings:hover {
    background: rgba(31, 41, 55, 0.8);
    border-color: var(--accent-blue);
}

/* Image Preview */
.image-preview {
    animation: fadeIn 0.3s ease-out;
}

.image-preview img {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .dark-card {
        margin: 0 1rem;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: 90vh;
    }
    
    .tips-section {
        margin: 0 1rem;
    }
}

/* Print Styles */
@media print {
    .banner-ad,
    .interstitial-ad,
    header,
    footer,
    .btn-primary,
    .btn-secondary {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .dark-card {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(255, 255, 255, 0.5);
        --text-secondary: #ffffff;
    }
    
    .dark-card {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .loading-spinner {
        animation: none;
        border-top-color: var(--accent-purple);
    }
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent-blue);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Error States */
.error {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

.error-message {
    color: #fca5a5;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success States */
.success {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
}

.success-message {
    color: #6ee7b7;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Utility Classes */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.border-gradient {
    border: 1px solid;
    border-image: var(--primary-gradient) 1;
}

/* Animation Classes */
.animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce-slow {
    animation: bounce 2s infinite;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
    animation: slideInUp 0.5s ease-out;
}

/* Custom Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

