:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #7c3aed;
    --light: #f8fafc;
    --dark: #1e293b;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f0f4ff 0%, #f8fafc 100%);
    color: var(--dark);
    transition: all 0.3s ease;
    min-height: 100vh;
}

.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.drop-zone {
    border: 2px dashed #cbd5e0;
    transition: all 0.3s ease;
}

.drop-zone.active {
    border-color: var(--primary);
    background-color: rgba(79, 70, 229, 0.05);
}

.btn-primary {
    background: var(--primary);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.ad-container {
    background: #f1f5f9;
    border-radius: 12px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 14px;
}

.step-card {
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.current-page {
    font-weight: 600;
    color: var(--primary);
}

.current-page::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
}

.mobile-menu.active {
    display: block;
}

/* Map Styles */
#map {
    height: 300px;
    width: 100%;
    border-radius: 12px;
    z-index: 1;
}

.leaflet-container {
    background: #f8fafc;
}

.coordinates-container {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.map-container {
    position: relative;
    margin-top: 20px;
}

.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    gap: 8px;
}

.map-btn {
    background: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.location-marker {
    background-color: var(--primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.input-with-map {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* New UI Improvements */
.progress-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.5s ease;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #1e293b;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(150%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #dcfce7;
    color: #166534;
    border-left: 4px solid #22c55e;
}

.notification.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.notification.info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.notification.warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 120px;
}

.step:not(:last-child):after {
    content: '';
    position: absolute;
    top: 20px;
    left: 60px;
    width: 60px;
    height: 2px;
    background: #e2e8f0;
}

.step.active:not(:last-child):after {
    background: var(--primary);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-weight: 600;
    color: #64748b;
}

.step.active .step-number {
    background: var(--primary);
    color: white;
}

.step-label {
    font-size: 14px;
    color: #64748b;
    text-align: center;
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 500;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 16px;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.file-size {
    font-size: 12px;
    color: #64748b;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn.primary {
    background: var(--primary);
    color: white;
}

.action-btn.secondary {
    background: #f1f5f9;
    color: #475569;
}

.action-btn:hover {
    transform: translateY(-1px);
}

.coordinates-display {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.coordinate-box {
    flex: 1;
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
}

.coordinate-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.coordinate-value {
    font-weight: 500;
}

.coordinate-value.empty {
    color: #94a3b8;
    font-style: italic;
}

.location-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.location-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    background: #f1f5f9;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.location-btn:hover {
    background: #e2e8f0;
}

.location-btn.primary {
    background: var(--primary);
    color: white;
}

.location-btn.primary:hover {
    background: var(--primary-dark);
}

.process-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.process-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.process-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.process-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.status-message {
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
}

.status-message.info {
    background: #dbeafe;
    color: #1e40af;
}

.status-message.success {
    background: #dcfce7;
    color: #166534;
}

.status-message.warning {
    background: #fef3c7;
    color: #92400e;
}

.status-message.error {
    background: #fee2e2;
    color: #991b1b;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1e293b;
}

.section-subtitle {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 24px;
}

.hero-section {
    padding: 60px 0;
    text-align: center;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 20px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-cta {
    display: inline-flex;
    gap: 12px;
    margin-bottom: 40px;
}

.hero-image {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Filename Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
}

.modal-body {
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.filename-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
}

.filename-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.filename-suggestion {
    font-size: 14px;
    color: #64748b;
    margin-top: 8px;
}

.filename-suggestion span {
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Lazy loading for images */
img[loading="lazy"] {
    opacity: 1; /* Fixed: Changed from 0 to 1 to show images immediately on mobile */
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Brand styling */
.brand-container {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    text-decoration: none;
}

.brand-name:hover {
    color: var(--primary);
}

.brand-domain {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: -2px;
    letter-spacing: 0.5px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .input-with-map {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 12px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .step-indicator {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .step:not(:last-child):after {
        display: none;
    }
    
    .coordinates-display {
        flex-direction: column;
    }
    
    /* Fix for mobile image display issue */
    #previewImage {
        max-height: 200px !important;
    }
    
    .mobile-menu {
        width: 100%;
        right: 0;
        left: 0;
    }
    
    .location-actions {
        flex-direction: column;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-title {
        font-size: 36px;
    }
    
    #previewImage {
        max-height: 300px !important;
    }
}
