/* Custom CSS for Civic Report Platform */

/* Photo upload area */
.photo-upload-area {
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.photo-upload-area:hover {
    border-color: #007bff !important;
    background-color: #f8f9fa;
}

.photo-upload-area.dragover {
    border-color: #007bff !important;
    background-color: #e3f2fd;
}

#previewImage {
    transition: opacity 0.3s ease;
}

#photoPreview {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
:root {
    --primary-green: #2E7D32;
    --secondary-orange: #FF5722;
    --background-grey: #F5F5F5;
    --text-dark: #212121;
    --map-blue: #1976D2;
    --success-green: #4CAF50;

    /* Category colors */
    --garbage-color: #FF5722;
    --traffic-color: #FF9800;
    --pollution-color: #607D8B;
    --water-color: #2196F3;
    --electricity-color: #1976D2;
    --corruption-color: #424242;
    --drug-abuse-color: #dc3545;
    --poor-education-color: #fd7e14;
    --poor-happiness-color: #20c997;
    --category-bg: #f8f9fa;
}

/* Base styles */
body {
    font-family: 'Roboto', 'Open Sans', sans-serif;
    background-color: var(--background-grey);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.bg-primary {
    background-color: var(--primary-green) !important;
}

.btn-primary {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

.btn-primary:hover {
    background-color: #1B5E20;
    border-color: #1B5E20;
}

.btn-danger {
    background-color: var(--secondary-orange);
    border-color: var(--secondary-orange);
}

.btn-danger:hover {
    background-color: #E64A19;
    border-color: #E64A19;
}

.text-primary {
    color: var(--primary-green) !important;
}

.text-success {
    color: var(--success-green) !important;
}

/* Landing page styles */
.landing-main {
    padding-top: 0;
}

.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content h1 {
    font-weight: 700;
    color: var(--text-dark);
}

.feature-highlight {
    text-align: center;
    padding: 1rem;
}

.feature-highlight i {
    font-size: 1.5rem;
}

/* Mock phone preview */
.mock-phone {
    max-width: 300px;
    margin: 0 auto;
    background: #000;
    border-radius: 30px;
    padding: 20px;
    position: relative;
}

.phone-screen {
    background: white;
    border-radius: 20px;
    padding: 20px;
    min-height: 400px;
}

.app-header {
    background: var(--primary-green);
    color: white;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
}

.camera-preview {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
}

.category-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pill {
    background: #e9ecef;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.pill.garbage { background: #ffebee; color: #c62828; }
.pill.traffic { background: #fff3e0; color: #ef6c00; }
.pill.pollution { background: #eceff1; color: #455a64; }

/* Feature cards */
.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: white;
}

.feature-icon.garbage { background: var(--garbage-color); }
.feature-icon.traffic { background: var(--traffic-color); }
.feature-icon.pollution { background: var(--pollution-color); }
.feature-icon.water { background: var(--water-color); }
.feature-icon.electricity { background: var(--electricity-color); }
.feature-icon.corruption { background: var(--corruption-color); }

/* Category indicators */
.category-indicator {
    width: 4px;
    height: 40px;
    border-radius: 2px;
}

.category-garbage { background-color: var(--garbage-color); }
.category-traffic { background-color: var(--traffic-color); }
.category-pollution { background-color: var(--pollution-color); }
.category-water { background-color: var(--water-color); }
.category-electricity { background-color: var(--electricity-color); }
.category-corruption { background-color: var(--corruption-color); }

/* Category buttons */
.category-btn {
    padding: 0.5rem 0.375rem;
    height: auto;
    text-align: center;
    border-radius: 8px;
    transition: all 0.2s;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-btn i {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.category-btn:hover {
    transform: translateY(-2px);
}

.category-btn small {
    font-size: 0.75rem;
    font-weight: 500;
}

.map-container {
    height: 500px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e9ecef;
}

/* Star glow animation for drives */
@keyframes starGlow {
    0% {
        filter: drop-shadow(0 0 8px rgba(255, 193, 7, 0.8)) 
                drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
        transform: scale(1);
    }
    100% {
        filter: drop-shadow(0 0 12px rgba(255, 193, 7, 1)) 
                drop-shadow(0 0 8px rgba(255, 255, 255, 0.8))
                drop-shadow(0 0 16px rgba(255, 193, 7, 0.4));
        transform: scale(1.05);
    }
}

.star-container {
    position: relative;
}

/* Drive marker styles */
.drive-marker {
    animation: starGlow 2s ease-in-out infinite alternate;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.4);
}

.drive-popup .leaflet-popup-content-wrapper {
    border-left: 4px solid #FFD700;
    border-radius: 8px;
}

.drive-popup {
    min-width: 250px;
}

.drive-popup .leaflet-popup-content {
    margin: 12px 16px;
}

/* Enhanced star glow animation */
@keyframes starGlow {
    0% {
        filter: drop-shadow(0 0 6px rgba(255, 193, 7, 0.8));
        transform: scale(1);
    }
    100% {
        filter: drop-shadow(0 0 12px rgba(255, 193, 7, 1)) 
                drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
        transform: scale(1.1);
    }
}

/* Drive information display enhancements */
.drive-popup .bg-light {
    background-color: #f8f9fa !important;
    border: 1px solid #e9ecef;
}

.drive-popup .leaflet-popup-content-wrapper {
    min-width: 300px;
    max-width: 350px;
}

.drive-popup .leaflet-popup-content {
    margin: 16px 20px;
    width: auto !important;
}

/* Contact information styling */
.contact-info-section {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
}

.contact-info-section:hover {
    background: linear-gradient(135deg, #d4f4d4 0%, #e8f5e8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Timeline styling */
.timeline-info-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.timeline-info-section:hover {
    background: linear-gradient(135deg, #bbdefb 0%, #e3f2fd 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Location styling */
.location-info-section {
    background: linear-gradient(135deg, #ffebee 0%, #ffeaea 100%);
    border-left: 4px solid #dc3545;
    transition: all 0.3s ease;
}

.location-info-section:hover {
    background: linear-gradient(135deg, #ffcdd2 0%, #ffebee 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.star-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: starPulse 2s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes starPulse {
    0% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Map styles */
.leaflet-container {
    font-family: 'Roboto', sans-serif;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

/* Timeline styles */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 20px;
    bottom: -20px;
    width: 2px;
    background: #e9ecef;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #e9ecef;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .mock-phone {
        max-width: 250px;
    }

    .floating-controls {
        position: static;
        margin-top: 1rem;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .control-btn {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

/* Form enhancements */
.form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.25);
}

.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.25);
}

/* Status badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Error page styles */
.error-page {
    padding: 3rem 1rem;
}

.error-page i {
    opacity: 0.7;
}

/* Stats cards */
.stats-card {
    transition: all 0.3s ease;
}

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

/* Utilities */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.rounded-3 {
    border-radius: 0.5rem !important;
}

/* Participant name responsive utilities */
.min-width-0 {
    min-width: 0;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive participant display */
@media (max-width: 576px) {
    .participant-item {
        padding: 0.75rem 0 !important;
    }
    
    .participant-item .fw-semibold {
        font-size: 0.9rem;
    }
    
    .participant-item small {
        font-size: 0.75rem;
    }
    
    .participant-item .badge {
        font-size: 0.65rem;
        padding: 0.2em 0.4em;
    }
    
    .participants-list {
        max-height: 300px;
        overflow-y: auto;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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

.control-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.control-btn.btn-success {
    background-color: #28a745;
    color: white;
}

.control-btn.btn-success:hover {
    background-color: #218838;
    color: white;
}