:root {
    --bg-dark: #0a0a0a;
    --bg-card: rgba(20, 20, 20, 0.8);
    --accent-red: #c0392b;
    --accent-blue: #2980b9;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --font-main: 'Inter', sans-serif;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    padding: 1rem 1.5rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, transparent 100%);
    position: relative;
    width: 100%;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-container {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.logo-container img {
    width: 60%;
    max-width: 300px;
    height: auto;
    display: block;
}

@media (min-width: 768px) {
    .logo-container img {
        max-width: 450px;
    }
}

main {
    margin-top: 0;
    padding: 1rem;
    min-height: calc(100vh - 100px);
}

#map {
    height: 60vh;
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 10;
}

.filters {
    display: flex;
    overflow-x: auto;
    padding: 1rem 0;
    gap: 0.8rem;
    width: 100%;
    max-width: 1000px;
    justify-content: center;
    scrollbar-width: none; /* Hide scrollbar for cleaner look */
}

.filters::-webkit-scrollbar {
    display: none;
}

@media (max-width: 768px) {
    .filters {
        justify-content: flex-start;
        padding-left: 10px;
    }
}

.filter-btn {
    white-space: nowrap;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: var(--accent-red);
    color: white;
    border-color: var(--accent-red);
}

.location-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.location-card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    border-radius: 12px;
    transition: transform 0.2s;
}

.location-card:active {
    transform: scale(0.98);
}

h1, h2, h3 {
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
}

/* Tooltip/Popup styling for Leaflet */
.leaflet-popup-content-wrapper {
    background: var(--bg-dark) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--accent-red);
}
.leaflet-popup-tip {
    background: var(--accent-red) !important;
}

/* Desktop styles */
@media (min-width: 768px) {
    main {
        padding: 2rem 5rem;
    }
    .location-list {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* Search & Controls */
.controls-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.search-container {
    width: 100%;
    max-width: 600px;
    margin: 1rem auto 2rem;
    padding: 0 1rem;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

#search-input {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1.5rem; /* Extra right padding for the 'x' */
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.search-clear {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    display: none; /* Hidden by default */
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.search-clear:hover {
    color: var(--accent-red);
}

/* Floating Action Button for Suggestions */
/* General Metal Button Style */
.btn-metal {
    background: var(--accent-red);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: transform 0.2s, background 0.3s;
}

.btn-metal:hover {
    transform: scale(1.05);
    background: #e74c3c;
}

/* Floating Action Button for Suggestions */
.btn-fab {
    position: fixed;
    bottom: calc(85px + env(safe-area-inset-bottom));
    right: 1.5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    z-index: 999;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-fab::before {
    content: "\f067"; /* FontAwesome plus icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* Tooltip for FAB */
.btn-fab::after {
    content: "Add Location";
    position: absolute;
    right: 70px;
    background: rgba(0,0,0,0.8);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.btn-fab:hover::after {
    opacity: 1;
}

/* Grouped List */
.category-group {
    margin-bottom: 3rem;
}

.category-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--accent-red);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.8); 
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 10% auto; 
    padding: 2rem;
    border: 1px solid var(--accent-red);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    position: relative;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover { color: white; }

.modal input, .modal select, .modal textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 1rem;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: 4px;
}

/* Toon Alle utility */
.toon-alle-container {
    margin-top: 1.5rem;
    text-align: right;
}

.toon-alle-link {
    color: var(--accent-red) !important;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* PWA Bottom Menu Refinement */
.pwa-bottom-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 10000;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.pwa-bottom-menu .menu-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    text-decoration: none;
    font-size: 0.6rem; /* Smaller text for more items */
    font-weight: 500;
    transition: all 0.2s ease;
    height: 100%;
    -webkit-tap-highlight-color: transparent;
    padding: 5px 2px;
}

.pwa-bottom-menu .menu-item i {
    font-size: 1.4rem; /* Larger, more readable icons */
    margin-bottom: 2px;
}

.pwa-bottom-menu .menu-item.active {
    color: var(--accent-red);
}

/* Ensure content doesn't get hidden behind bottom menu */
body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
}

/* Hide instructions for routing */
.leaflet-routing-container {
    display: none !important;
}

/* User Location Marker */
.user-location-marker {
    background: none;
    border: none;
}

.pulse {
    width: 14px;
    height: 14px;
    background: #4285F4;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    animation: locationPulse 2s infinite;
}

@keyframes locationPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(66, 133, 244, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(66, 133, 244, 0); }
}
