/* Custom CSS for ImagePro Tools */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.1"><circle cx="30" cy="30" r="4"/></g></svg>') repeat;
    opacity: 0.1;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

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

.upload-area:hover {
    border-color: var(--primary-color) !important;
    background-color: rgba(0, 123, 255, 0.05);
}

.upload-area.dragover {
    border-color: var(--success-color) !important;
    background-color: rgba(40, 167, 69, 0.1);
    transform: scale(1.02);
}

/* File List */
.file-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.file-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Image Preview */
.image-preview {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 10px 0;
}

/* Tool Cards */
.tool-card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1.1rem;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
    border-radius: 10px;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    font-weight: 600;
}

/* Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 6px 12px;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-info {
    border-left-color: var(--info-color);
}

.alert-success {
    border-left-color: var(--success-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

.alert-danger {
    border-left-color: var(--danger-color);
}

/* List Groups */
.list-group-item {
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
}

.list-group-item:hover {
    background-color: rgba(0,123,255,0.05);
}

.list-group-item-action:hover {
    background-color: rgba(0,123,255,0.1);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #343a40 0%, #212529 100%);
}

footer h5, footer h6 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
}

footer a:hover {
    color: var(--primary-color) !important;
    transition: color 0.3s ease;
}

/* Content Container Improvements */
.container {
    max-width: 1200px;
    padding-left: 20px;
    padding-right: 20px;
}

/* Main Content Padding */
main.container {
    padding-left: 30px;
    padding-right: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section .display-4 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    main.container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 576px) {
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    main.container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #28a745;
    stroke-miterlimit: 10;
    margin: 10% auto;
    box-shadow: inset 0px 0px 0px #28a745;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.success-checkmark .checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #28a745;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark .checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #28a745;
    }
}

/* Image Comparison */
.image-comparison {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.image-comparison .before,
.image-comparison .after {
    text-align: center;
    flex: 1;
    min-width: 250px;
}

.image-comparison .arrow {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0 20px;
}

/* Quality Slider */
.form-range::-webkit-slider-thumb {
    background: var(--primary-color);
}

.form-range::-moz-range-thumb {
    background: var(--primary-color);
}

/* File Size Display */
.file-size {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--info-color);
}

.file-size.reduced {
    color: var(--success-color);
}

.file-size.increased {
    color: var(--warning-color);
}

/* Drag and Drop Styles */
.drag-active {
    border: 2px dashed var(--success-color) !important;
    background-color: rgba(40, 167, 69, 0.1) !important;
}

.drag-reject {
    border: 2px dashed var(--danger-color) !important;
    background-color: rgba(220, 53, 69, 0.1) !important;
}

/* Processing States */
.processing {
    opacity: 0.7;
    pointer-events: none;
}

.processing .card {
    position: relative;
}

.processing .card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    z-index: 10;
}

/* AdSense Optimization */
.ad-container {
    margin: 20px 0;
    text-align: center;
}

.ad-container .ad-label {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Schema.org Styles */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-weight: bold;
}
