* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background: #fff;
    color: #000;
    padding: 16px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #000;
}

.meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    opacity: 0.8;
    color: #000;
}

.powered a {
    color: #000;
    text-decoration: none;
    font-weight: 500;
}

.powered a:hover {
    text-decoration: underline;
    color: #0066cc;
}

#map {
    flex: 1;
    position: relative;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 20px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 50;
}

.footer.hidden {
    display: none;
}

.footer-content {
    display: flex;
    justify-content: center;
}

.btn-my-routes {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px 24px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s, background 0.2s, color 0.2s;
}

.btn-my-routes:active {
    transform: scale(0.95);
}

.btn-my-routes:hover {
    background: #667eea;
    color: white;
}

/* Modal Styles */
.modal {
    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;
}

.modal.hidden {
    display: none;
}

.modal-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.modal-text {
    padding: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-text p {
    margin-bottom: 12px;
}

.modal-text ol {
    margin-left: 24px;
    margin-bottom: 12px;
}

.modal-text li {
    margin-bottom: 8px;
}

.modal-actions {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s;
}

.btn-primary:active {
    transform: scale(0.95);
}

/* Popup Styles */
.popup-content {
    padding: 12px;
    font-size: 14px;
}

.popup-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.popup-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.popup-actions button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s;
}

.btn-reserve {
    background: #4caf50;
    color: white;
}

.btn-reserve:active {
    background: #45a049;
}

.btn-close {
    background: #f44336;
    color: white;
}

.btn-close:active {
    background: #da190b;
}

/* Leaflet Overrides */
.leaflet-control-container {
    z-index: 40;
}
