/* Custom Styles for AI Image Recognition Demo */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

* {
    box-sizing: border-box;
}

body {
    background-color: #f8f9fa;
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

/* Better card shadows */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-bottom: none;
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    background: var(--primary-gradient);
    color: white;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

/* Subtle animated background pattern */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

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

.hero-section .lead {
    color: rgba(255, 255, 255, 0.9);
}

.hero-section .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Drop Zone */
.drop-zone {
    border: 3px dashed #dee2e6;
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
    background-image: radial-gradient(circle at center, #f0f0f0 0%, transparent 70%);
}

.drop-zone:hover {
    border-color: #667eea;
    background-color: #f0f4ff;
    transform: scale(1.01);
}

.drop-zone.drag-over {
    border-color: #198754;
    background-color: #d1e7dd;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(25, 135, 84, 0.2);
}

.drop-zone.has-file {
    border-color: #198754;
    border-style: solid;
}

.drop-zone i {
    transition: transform 0.3s ease;
}

.drop-zone:hover i {
    transform: scale(1.1);
}

/* Image Preview */
#imagePreview {
    max-height: 300px;
    object-fit: contain;
    border: 1px solid #dee2e6;
}

/* Results Cards */
.result-card {
    border-left: 4px solid #198754;
    transition: transform 0.2s ease;
}

.result-card:hover {
    transform: translateX(5px);
}

.result-card.celebrity {
    border-left-color: #ffc107;
}

.result-card.label {
    border-left-color: #0d6efd;
}

.result-card.error {
    border-left-color: #dc3545;
}

/* Confidence Badge */
.confidence-badge {
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
}

.confidence-high {
    background-color: #198754;
}

.confidence-medium {
    background-color: #ffc107;
    color: #000;
}

.confidence-low {
    background-color: #dc3545;
}

/* Recent Results Grid */
.recent-item {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.recent-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.recent-item img {
    height: 120px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-item:hover img {
    transform: scale(1.05);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Status Messages */
.status-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.status-error {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.status-processing {
    background-color: #cff4fc;
    border-color: #b6effb;
    color: #055160;
}

/* Celebrity Card */
.celebrity-card {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    border: none;
}

.celebrity-card .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Biography Text */
.biography-text {
    font-style: italic;
    color: #555;
    border-left: 3px solid #ffc107;
    padding-left: 1rem;
    margin-top: 0.5rem;
}

/* Label Pills */
.label-pill {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border-radius: 2rem;
    background-color: #e9ecef;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.label-pill:hover {
    background-color: #0d6efd;
    color: white;
}

.label-pill .confidence {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .drop-zone {
        padding: 2rem 1rem;
    }
    
    .recent-item img {
        height: 80px;
    }
}

/* Animation for new results */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-animate {
    animation: slideIn 0.3s ease-out;
}

/* Processing Animation */
.processing-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}


/* Delete Button on Thumbnails */
.delete-btn {
    top: 5px;
    right: 5px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.recent-item:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    transform: scale(1.1);
}


/* Button enhancements */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

.btn-primary:disabled {
    background: #ccc;
    transform: none;
    box-shadow: none;
}

/* Navbar enhancement */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Form select styling */
.form-select {
    border-radius: 8px;
    padding: 0.6rem 1rem;
    border: 2px solid #e9ecef;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* Footer enhancement */
footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
}

/* Tooltip-style info badges */
.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    font-size: 0.75rem;
    color: #667eea;
}

/* Success state animation */
@keyframes successPop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.success-animate {
    animation: successPop 0.4s ease-out;
}

/* Skeleton loading effect */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Image preview enhancement */
#previewContainer {
    position: relative;
}

#imagePreview {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Mode description styling */
#modeDescription {
    font-size: 0.8rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-top: 0.5rem;
}

/* Card header gradients */
.card-header.bg-primary {
    background: var(--primary-gradient) !important;
}

.card-header.bg-success {
    background: var(--success-gradient) !important;
}

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

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
