/* Elshony AI - Modern CSS Styling */

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

/* Navigation Buttons */
.nav-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    background: #f1f5f9;
    color: #6366f1;
}

.nav-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

/* Feature Cards */
.feature-card {
    background: white;
    padding: 24px 16px;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.15);
    border-color: #6366f1;
}

.feature-card i {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section Management */
.section {
    margin-bottom: 24px;
}

.section.hidden {
    display: none;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: white;
    color: #6366f1;
    padding: 12px 24px;
    border: 2px solid #6366f1;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #6366f1;
    color: white;
    transform: translateY(-2px);
}

/* Input and Form Styles */
input, textarea, select {
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Search Type Buttons */
.search-type-btn {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
}

.search-type-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.search-type-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: transparent;
}

/* Image Tool Buttons */
.image-tool-btn {
    padding: 20px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    text-align: center;
}

.image-tool-btn:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
    transform: translateY(-2px);
}

.image-tool-btn.active {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    border-color: transparent;
}

/* Image Tool Sections */
.image-tool {
    transition: all 0.3s ease;
}

.image-tool.hidden {
    display: none;
}

/* File Type Buttons */
.file-type-btn {
    padding: 16px 12px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    text-align: center;
}

.file-type-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    transform: translateY(-2px);
}

.file-type-btn.active {
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: white;
    border-color: transparent;
}

/* Search Results */
.search-result-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #6366f1;
}

.search-result-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    font-size: 18px;
}

.search-result-url {
    color: #10b981;
    font-size: 14px;
    margin-bottom: 8px;
}

.search-result-description {
    color: #64748b;
    line-height: 1.6;
}

/* Code Output Styles */
#code-content {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .feature-card {
        padding: 16px 12px;
    }
    
    .btn-primary, .btn-secondary {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .search-type-btn, .image-tool-btn, .file-type-btn {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .image-tool-btn i, .file-type-btn i {
        font-size: 18px;
    }
    
    #welcome h2 {
        font-size: 2.5rem;
    }
    
    .section h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    #welcome h2 {
        font-size: 2rem;
    }
    
    .grid {
        gap: 12px;
    }
    
    .feature-card {
        padding: 12px 8px;
    }
    
    .search-type-btn, .image-tool-btn, .file-type-btn {
        padding: 10px 6px;
        font-size: 11px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1e1b4b, #312e81, #1e40af);
    }
    
    .bg-white\/60 {
        background: rgba(30, 41, 59, 0.6) !important;
    }
    
    .text-gray-800 {
        color: #f1f5f9 !important;
    }
    
    .text-gray-600 {
        color: #cbd5e1 !important;
    }
    
    .border-gray-300 {
        border-color: #475569 !important;
    }
    
    .bg-gray-50 {
        background-color: #334155 !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Better Accessibility */
button:focus-visible, 
input:focus-visible, 
textarea:focus-visible, 
select:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border: 2px solid #fff;
    }
    
    .btn-secondary {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
}

/* Print Styles */
@media print {
    .nav-btn, .btn-primary, .btn-secondary {
        background: transparent !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }
    
    .bg-gradient-to-r, .bg-gradient-to-br {
        background: #fff !important;
        color: #000 !important;
    }
}

/* Utility Classes */
.glass-morphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.text-gradient {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Selection */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: #1e293b;
}