/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f8961e;
    --info-color: #7209b7;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark-color);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Header */
.app-header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    text-align: center;
}

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Control Panel */
.control-panel {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 1.5rem 2rem;
    background: var(--light-color);
    border-bottom: 1px solid #dee2e6;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-start {
    background: var(--success-color);
    color: white;
}

.btn-stop {
    background: var(--danger-color);
    color: white;
}

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

.btn-secondary {
    background: var(--gray-color);
    color: white;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.9rem;
    border-radius: 6px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-color);
}

.status-dot.active {
    background: var(--success-color);
    animation: pulse 2s infinite;
}

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

.map-controls {
    display: flex;
    gap: 8px;
}

.btn-control {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background: white;
    color: var(--dark-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-control:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

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

.language-selector {
    margin-left: auto;
}

.language-dropdown {
    padding: 8px 12px;
    border-radius: var(--border-radius);
    border: 2px solid #dee2e6;
    background: white;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.language-dropdown:hover {
    border-color: var(--primary-color);
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    padding: 2rem;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Map Section */
.map-section {
    position: relative;
}

.map-container {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    height: 500px;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.map-overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(5px);
}

.coordinates-display {
    display: flex;
    gap: 15px;
    font-family: monospace;
}

.zoom-level {
    color: var(--primary-color);
    font-weight: 500;
}

.map-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: var(--border-radius);
    max-width: 200px;
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(5px);
}

.map-legend h4 {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Search Loader */
.search-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.loader-content {
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 90%;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.search-progress {
    margin: 25px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--gray-color);
    font-weight: 500;
}

.loader-message {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-top: 15px;
    line-height: 1.5;
}

/* Info Panel */
.info-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    border: 1px solid #e9ecef;
}

.card-header {
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.card-header h3 {
    color: var(--dark-color);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 1.5rem;
}

.location-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.coordinates {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.coord {
    display: flex;
    justify-content: space-between;
    font-family: monospace;
    font-size: 0.9rem;
}

.coord-label {
    color: var(--gray-color);
}

.coord-value {
    color: var(--dark-color);
    font-weight: 500;
}

.location-actions {
    display: flex;
    gap: 10px;
}

.setting-group {
    margin-bottom: 15px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-group label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.setting-group span:first-child {
    color: var(--dark-color);
}

.radius-value {
    min-width: 50px;
    text-align: right;
    font-weight: 600;
    color: var(--primary-color);
}

input[type="range"] {
    width: 60%;
    margin: 0 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    transition: var(--transition);
}

.checkbox-label input:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray-color);
}

/* Discovery Section */
.discovery-section {
    padding: 0 2rem 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    color: var(--dark-color);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.category-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 16px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.category-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

.poi-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .poi-list {
        grid-template-columns: 1fr;
    }
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-color);
}

.empty-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.empty-state p {
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.poi-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    border: 1px solid #e9ecef;
    transition: var(--transition);
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

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

.poi-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.poi-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.poi-content h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.poi-description {
    color: var(--gray-color);
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 0.9rem;
}

.poi-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.poi-meta span {
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--gray-color);
}

.poi-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

.btn-directions {
    background: var(--success-color);
    color: white;
}

.btn-center {
    background: var(--warning-color);
    color: white;
}

/* Notifications */
.notifications-section {
    padding: 0 2rem 2rem;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
    border-radius: var(--border-radius);
    border: 1px solid #e9ecef;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    transition: var(--transition);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--info-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.notification-text {
    color: var(--gray-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

.notification-time {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-color);
    margin-top: 5px;
}

/* Footer */
.app-footer {
    background: var(--dark-color);
    color: white;
    padding: 1.5rem 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.sources {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.source-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.map-attribution {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.map-attribution a {
    color: white;
    text-decoration: none;
}

.map-attribution a:hover {
    text-decoration: underline;
}

.copyright {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 5px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 1.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    opacity: 0.8;
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.share-input label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.input-group {
    display: flex;
    gap: 5px;
}

.input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .control-panel {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .control-group {
        justify-content: center;
    }
    
    .status-indicator {
        margin-left: 0;
        justify-content: center;
    }
    
    .map-controls {
        justify-content: center;
    }
    
    .language-selector {
        margin-left: 0;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .discovery-section,
    .notifications-section {
        padding: 0 1rem 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .section-controls {
        justify-content: center;
    }
}

/* Utility Classes */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-in {
    animation: slideIn 0.5s ease forwards;
}

.highlight {
    animation: highlight 2s ease;
}

@keyframes highlight {
    0% { background-color: rgba(67, 97, 238, 0.1); }
    100% { background-color: transparent; }
}

/* Bron selectie styling */
.sources-selection {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.sources-selection h4 {
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sources-selection h4 i {
    color: var(--primary-color);
}

.source-checkboxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .source-checkboxes {
        grid-template-columns: 1fr;
    }
}

.source-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.source-checkbox:hover {
    background: #e9ecef;
}

.source-checkbox input[type="checkbox"] {
    display: none;
}

.source-checkbox .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.source-checkbox input:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.source-checkbox input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.source-label {
    font-size: 0.9rem;
    color: var(--dark-color);
}

.source-icon {
    margin-left: auto;
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Source indicator in POI items */
.poi-source-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--gray-color);
}

.source-wikipedia { border-left: 3px solid #006699; }
.source-openstreetmap { border-left: 3px solid #7bcd34; }
.source-googlemaps { border-left: 3px solid #4285f4; }
.source-atlasobscura { border-left: 3px solid #ff6b6b; }

/* API status indicator */
.api-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    margin-top: 5px;
}

.api-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.api-status-dot.active {
    background-color: #4caf50;
    animation: pulse 2s infinite;
}

.api-status-dot.inactive {
    background-color: #f44336;
}

.api-status-dot.demo {
    background-color: #ff9800;
}

/* Settings info box */
.settings-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 10px 15px;
    margin-top: 15px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.settings-info h5 {
    margin: 0 0 5px 0;
    color: #1976d2;
    font-size: 0.9rem;
}

.settings-info p {
    margin: 0;
    color: #555;
}