/* Custom Styles for File Converter */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #16a34a;
    --danger-color: #dc2626;
    --warning-color: #f59e0b;
    --info-color: #0891b2;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Body and Typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Header Styles */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

/* Hero Section */
.hero-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    color: white;
    margin: -2rem -15px 2rem -15px;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--box-shadow-lg);
}

.hero-section h1 {
    color: white !important;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section p {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Card Styles */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.2);
}

.card-body {
    padding: 2rem;
}

/* Drop Zone Styles */
.drop-zone {
    border: 3px dashed var(--primary-color);
    border-radius: var(--border-radius);
    background: rgba(37, 99, 235, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover {
    border-color: #1d4ed8;
    background: rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.drop-zone.dragover {
    border-color: var(--success-color);
    background: rgba(22, 163, 74, 0.1);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(22, 163, 74, 0.3);
}

.drop-zone i {
    opacity: 0.7;
}

/* Progress Bar Styles */
.progress {
    border-radius: 50px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 50px;
    transition: width 0.6s ease;
}

/* Button Styles */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(13, 110, 253, 0.3);
}

.btn-success {
    box-shadow: 0 4px 6px rgba(25, 135, 84, 0.25);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(25, 135, 84, 0.3);
}

/* Form Styles */
.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.alert-success {
    background: linear-gradient(135deg, #d1e7dd, #a3d9c0);
    color: #0f5132;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f1aab1);
    color: #721c24;
}

.alert-info {
    background: linear-gradient(135deg, #cdf4f9, #9eeaf9);
    color: #055160;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffecb5);
    color: #664d03;
}

/* Format Cards */
.formats-section .card {
    height: 100%;
    text-align: center;
    transition: all 0.3s ease;
}

.formats-section .card:hover {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.formats-section .card i {
    margin-bottom: 1rem;
}

/* Features Section */
.features-section .text-center {
    margin-bottom: 2rem;
}

.features-section i {
    margin-bottom: 1rem;
}

/* Social Links */
.social-links a {
    display: inline-block;
    margin: 0 0.5rem 0.5rem 0;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-2px);
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white !important;
}

.footer-brand h4 {
    font-weight: 700;
    color: white !important;
}

footer .social-links a {
    color: #e2e8f0 !important;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

footer .social-links a:hover {
    color: var(--primary-color) !important;
}

footer ul li a {
    color: #e2e8f0 !important;
    transition: color 0.3s ease;
}

footer ul li a:hover {
    color: var(--primary-color) !important;
}

footer p, footer .text-muted {
    color: #e2e8f0 !important;
}

footer .contact-info p {
    color: #e2e8f0 !important;
}

/* Back to Top Button */
#backToTop {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#backToTop:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* File Info */
#fileInfo {
    animation: fadeIn 0.5s ease;
}

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

/* Progress Section */
#progressSection {
    animation: slideDown 0.5s ease;
}

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

/* Result Section */
#resultSection {
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* Loading Animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Accordion Styles */
.accordion-button {
    border-radius: var(--border-radius);
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

.accordion-body {
    background-color: #f8f9fa;
}

/* Contact Form */
.contact-info p {
    margin-bottom: 0.75rem;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
        margin: -1rem -15px 1rem -15px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .drop-zone {
        min-height: 150px;
        padding: 2rem 1rem;
    }
    
    .btn-lg {
        padding: 0.625rem 1.5rem;
        font-size: 1rem;
    }
    
    .social-links {
        text-align: center;
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .drop-zone {
        min-height: 120px;
        padding: 1.5rem 0.5rem;
    }
    
    .drop-zone h4 {
        font-size: 1.1rem;
    }
    
    .btn-lg {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --dark-color: #f8f9fa;
        --light-color: #212529;
    }
    
    body {
        background-color: #1a1a1a;
        color: var(--dark-color);
    }
    
    .card {
        background-color: #2d3748;
        color: var(--dark-color);
    }
    
    .form-control, .form-select {
        background-color: #2d3748;
        border-color: #4a5568;
        color: var(--dark-color);
    }
    
    .drop-zone {
        background: rgba(13, 110, 253, 0.1);
        border-color: var(--primary-color);
    }
}

/* Print Styles */
@media print {
    .navbar, footer, #backToTop, .btn, .drop-zone {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark-color);
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .drop-zone {
        border-width: 4px;
    }
}

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