/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    color: white;
    margin-bottom: 10px;
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 0;
}

/* Main content */
main {
    flex: 1;
}

/* Upload section */
.upload-container {
    text-align: center;
    margin-bottom: 40px;
}

.upload-label {
    display: block;
    margin: 0 auto;
    padding: 40px;
    background: white;
    border: 3px dashed #667eea;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 500px;
    text-align: center;
}

.upload-label:hover {
    background: #f8f9fa;
    border-color: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.upload-icon {
    display: block;
    font-size: 3rem;
    margin-bottom: 15px;
}

.upload-text {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.upload-hint {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
}

#file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Screen reader only */
.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;
}

/* EXIF data display */
#exif-data {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: none;
}

.exif-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.exif-table th,
.exif-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.exif-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.exif-table tr:hover {
    background-color: #f8f9fa;
}

/* Map container */
#map-container {
    margin-bottom: 30px;
}

#map-container h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

#map {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Footer styles */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

footer p {
    margin: 5px 0;
}

/* Drag and drop styles */
.drag-over {
    background: #e8f5e8 !important;
    border-color: #28a745 !important;
    transform: scale(1.02) !important;
}

/* Focus styles for accessibility */
.upload-label:focus-within {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

#file-input:focus + .upload-label {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Error message */
.error {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid #c62828;
}

/* Success message */
.success {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid #2e7d32;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    #file-input {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    #exif-data {
        padding: 20px;
    }
    
    .exif-table th,
    .exif-table td {
        padding: 8px;
        font-size: 14px;
    }
    
    #map {
        height: 300px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    #file-input {
        padding: 10px 15px;
    }
    
    #exif-data {
        padding: 15px;
    }
    
    .exif-table {
        font-size: 12px;
    }
    
    #map {
        height: 250px;
    }
}

/* Animation for smooth transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}