/* Custom CSS for AI Image Detector */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header Styles */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--warning-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    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 xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* Demo Images */
.demo-images {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.demo-image-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.demo-image-container:hover {
    transform: translateY(-5px);
}

.demo-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    display: block;
}

.demo-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    font-weight: bold;
    text-align: center;
    color: white;
}

.ai-label {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
}

.real-label {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
}

.vs-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 2rem 1rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
}

.feature-card h4 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--secondary-color);
    margin-bottom: 0;
}

/* Feature List */
.feature-list {
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.feature-item i {
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.feature-item h5 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--secondary-color);
    margin-bottom: 0;
}

/* Stats Container */
.stats-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-item {
    margin-bottom: 1.5rem;
}

.stat-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Upload Form Styles */
.upload-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #f0f8ff;
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: #e3f2fd;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.upload-subtext {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Result Styles */
.result-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
}

.result-image {
    max-width: 100%;
    height: 300px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.confidence-bar {
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    background: #e9ecef;
    margin: 1rem 0;
}

.confidence-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.confidence-ai {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
}

.confidence-real {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Processing Animation */
.processing {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
}

/* Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Footer Styles */
footer {
    margin-top: auto;
}

footer a:hover {
    color: var(--warning-color) !important;
}

.text-muted {
    --bs-text-opacity: 1;
    color: rgb(162 169 175 / 75%) !important;
}
/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
        min-height: auto;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .demo-images {
        flex-direction: column;
        gap: 1rem;
    }
    
    .vs-text {
        font-size: 1.2rem;
    }
    
    .demo-image {
        width: 150px;
        height: 150px;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .result-actions .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-section .container {
        padding: 2rem 1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .upload-container,
    .result-container {
        padding: 1.5rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.border-radius-custom {
    border-radius: 15px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error States */
.success {
    color: var(--success-color);
}

.error {
    color: var(--danger-color);
}

.warning {
    color: var(--warning-color);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Quality Enhancement Styles */
.quality-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #28a745);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.score-value {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
}

.score-label {
    font-size: 12px;
    opacity: 0.9;
}

.improvement-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.improvement-item:last-child {
    border-bottom: none;
}

/* Age Estimation Styles */
.age-display {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #28a745);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.age-number {
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
}

.age-label {
    font-size: 14px;
    opacity: 0.9;
}

.age-range-container {
    margin: 20px 0;
}

.age-range-bar {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    position: relative;
    margin: 10px 0;
    overflow: hidden;
}

.age-range-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #28a745);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.age-range-marker {
    position: absolute;
    top: -10px;
    transform: translateX(-50%);
    z-index: 2;
}

.marker-dot {
    width: 12px;
    height: 12px;
    background: #dc3545;
    border-radius: 50%;
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.marker-label {
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    margin-top: 5px;
    color: #333;
}

.age-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Metadata Extractor Styles */
.metadata-item {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metadata-item:last-child {
    border-bottom: none;
}

.metadata-label {
    font-weight: 600;
    color: #495057;
}

.metadata-value {
    color: #6c757d;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.metadata-section {
    margin-bottom: 30px;
}

.metadata-section h5 {
    color: #007bff;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

/* Responsive adjustments for new tools */
@media (max-width: 768px) {
    .quality-score-circle,
    .age-display {
        width: 100px;
        height: 100px;
    }
    
    .score-value,
    .age-number {
        font-size: 24px;
    }
    
    .age-range-labels {
        font-size: 10px;
    }
    
    .metadata-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .metadata-value {
        margin-top: 5px;
        word-break: break-all;
    }
}
