/* CSS Variables */
:root {
    --yb-yellow: #F3C800;
    --yb-dark: #2D3436;
    --bg-color: #F2F4F8;
    --card-radius: 20px;
    --nav-height: 90px;
    --ad-top-offset: 0px;
    --safe-top-offset: env(safe-area-inset-top, 0px);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
    color: var(--yb-dark);
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* App Container */
.app-container {
    min-height: 100vh;
    height: 100dvh;
    width: 100vw;
    padding-top: calc(var(--safe-top-offset) + var(--ad-top-offset));
    display: flex;
    flex-direction: column;
}

/* Header - Glassmorphism */
.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    position: relative;
    min-height: 60px;
}

/* Header Title Picker (Native System Select) */
.header-content {
    width: 100%;
    display: flex;
    justify-content: center;
}

.header-title-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.header-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.layer-select-label {
    cursor: pointer;
}

.layer-select-label i {
    font-size: 0.9rem;
    color: #666;
}

.unofficial-badge {
    font-size: 0.66rem;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.02em;
    line-height: 1;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    border-radius: 6px;
    padding: 3px 6px;
    display: inline-flex;
    align-items: center;
}

.layer-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Hamburger Menu Button - REMOVED */
/* Location Button - REMOVED */

/* Content Areas */
main {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.content-area {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(var(--nav-height) + 20px + env(safe-area-inset-bottom));
    background: var(--bg-color);
    display: none;
}

.content-area.active {
    display: block;
}

#view-map {
    padding-bottom: 0;
    overflow: hidden;
}

/* Home Page */
.greeting {
    padding: 24px 20px 16px;
    text-align: center;
}

.greeting h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--yb-dark);
}

.greeting p {
    font-size: 0.9rem;
    color: #666;
}

.home-credit-tool-wrap {
    padding: 0 20px 14px;
}

.home-credit-tool-btn {
    position: relative;
    display: block;
    width: 100%;
    text-decoration: none;
    color: #fff;
    border-radius: 18px;
    padding: 18px 52px 16px 16px;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 45%, #06b6d4 100%);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-credit-tool-btn:active {
    transform: scale(0.985);
}

.home-credit-tool-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    margin-bottom: 6px;
}

.home-credit-tool-desc {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
}

.home-credit-tool-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 0.66rem;
    font-weight: 800;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid rgba(146, 64, 14, 0.2);
    border-radius: 999px;
    padding: 2px 8px;
}

.home-credit-tool-arrow {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.8rem;
}

.quick-access {
    display: flex;
    gap: 12px;
    padding: 0 20px 20px;
}

.quick-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: #fff;
    border: none;
    border-radius: var(--card-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.quick-btn:active {
    transform: scale(0.95);
}

.quick-btn i {
    font-size: 2rem;
    color: var(--yb-yellow);
}

.quick-btn span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--yb-dark);
}

.section-title {
    padding: 20px 20px 10px;
    font-size: 1.1rem;
    font-weight: 800;
    color: #888;
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-container {
    padding: 0 16px;
}

.empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 0.9rem;
}

/* Station Card */
.station-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.station-card:active {
    transform: scale(0.98);
}

.station-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #333;
    padding-right: 40px;
}

.station-meta {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 12px;
}

.badge-row {
    display: flex;
    gap: 8px;
}

.badge {
    flex: 1;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 8px;
    text-align: center;
}

.badge.yellow {
    background: rgba(243, 200, 0, 0.15);
}

.badge-num {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1;
}

.badge-label {
    font-size: 0.7rem;
    color: #666;
    margin-top: 4px;
}

.pin-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #ddd;
    padding: 5px;
    cursor: pointer;
    transition: color 0.2s;
}

.pin-btn.active {
    color: var(--yb-yellow);
}

/* Info Page */
.info-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    padding: 20px;
    margin: 16px;
}

.info-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--yb-dark);
}

.info-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 8px;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #666;
    padding-left: 0;
}

.info-card li strong {
    color: var(--yb-dark);
}

/* Map */
#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.map-marker {
    background: #fff;
    border: 3px solid #666;
    border-radius: 50%;
    text-align: center;
    width: 36px;
    height: 36px;
    line-height: 30px;
    font-weight: bold;
    font-size: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    color: #333;
}

.marker-green {
    border-color: #2ecc71;
    color: #2ecc71;
}

.marker-orange {
    border-color: #f39c12;
    color: #f39c12;
}

.marker-red {
    border-color: #e74c3c;
    color: #e74c3c;
    background: #ffebeb;
}

.marker-ebike::after {
    content: "⚡";
    position: absolute;
    right: -6px;
    top: -8px;
    font-size: 12px;
    color: var(--yb-yellow);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* Settings Page */
.settings-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    padding: 20px;
    margin: 16px;
}

.settings-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--yb-dark);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 50px;
    height: 28px;
    background: #ccc;
    border-radius: 14px;
    position: relative;
    transition: background 0.3s;
}

.toggle-slider::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.toggle-label input:checked + .toggle-slider {
    background: var(--yb-yellow);
}

.toggle-label input:checked + .toggle-slider::after {
    transform: translateX(22px);
}

#default-layer-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
}

.input-group {
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--yb-dark);
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--yb-yellow);
    color: var(--yb-dark);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* FAB (Floating Action Button) */
.fab {
    position: fixed;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--yb-dark);
    color: var(--yb-yellow);
    border: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 1500;
}

.fab:active {
    transform: scale(0.9);
}

.refresh-fab {
    bottom: calc(110px + env(safe-area-inset-bottom));
    right: 24px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.refresh-fab.hide {
    transform: scale(0);
    pointer-events: none;
}

.map-recenter-btn {
    bottom: calc(110px + env(safe-area-inset-bottom));
    right: 24px;
}

/* Bottom Navigation - Glassmorphism */
.nav-bottom {
    position: fixed;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    z-index: 2000;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    isolation: isolate;
    overflow: hidden;
}

/* Liquid Glass Highlight */
#nav-highlight {
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    will-change: left, top, width, height;
    transition: left 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
                top 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
                width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
                height 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#nav-highlight::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: inherit;
    background: radial-gradient(120% 160% at 28% 18%, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0) 60%),
                radial-gradient(120% 160% at 72% 85%, rgba(243, 200, 0, 0.18), rgba(243, 200, 0, 0) 62%);
    opacity: 0.95;
}

#nav-highlight::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(243, 200, 0, 0.16), inset 0 -10px 20px rgba(0, 0, 0, 0.06);
    opacity: 0.9;
}

.nav-item {
    text-align: center;
    color: #aaa;
    font-size: 0.75rem;
    cursor: pointer;
    flex: 1;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 8px;
}

.nav-item.active {
    color: var(--yb-dark);
    font-weight: 800;
    transform: translateY(-2px);
}

.nav-item i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 6px;
}

/* Slide-up Card */
.slide-up-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.slide-up-overlay.open {
    opacity: 1;
    visibility: visible;
}

.slide-up-card {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px 24px 0 0;
    padding: 28px 24px;
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
    z-index: 3001;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
}

#slide-up-content {
    padding-right: 0;
}

#slide-up-content .store-header {
    padding-right: 48px;
}

.slide-up-card.open {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    color: #666;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.close-btn:active {
    transform: scale(0.95);
}

/* Store Header */
.store-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.store-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
    flex: 1;
    line-height: 1.3;
}

.pin-btn-large {
    background: none;
    border: none;
    padding: 8px;
    color: #ccc;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pin-btn-large.active {
    color: var(--yb-yellow);
}

.pin-btn-large:active {
    transform: scale(0.9);
}

/* Store Info */
.store-info {
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-item i {
    color: var(--yb-yellow);
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Action Buttons */
.action-buttons {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.website-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.website-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.website-btn:active {
    transform: translateY(0);
}

/* Navigation Buttons Grid */
.nav-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 0;
    width: 100%;
}

.nav-btn-modern {
    padding: 14px 16px;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    width: 100%;
}

.nav-btn-modern i {
    font-size: 1.5rem;
}

.nav-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-btn-modern:active {
    transform: translateY(0);
}

.google-btn {
    background: linear-gradient(135deg, #4285F4 0%, #357ae8 100%);
    color: #fff;
}

.apple-btn {
    background: linear-gradient(135deg, #000 0%, #2c2c2c 100%);
    color: #fff;
}

/* Map Action Menu (Secondary Card) */
.map-action-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 3500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.map-action-overlay.open {
    opacity: 1;
    visibility: visible;
}

.map-action-card {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px 24px 0 0;
    padding: 28px 24px;
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
    z-index: 3501;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
}

.map-action-card.open {
    transform: translateY(0);
}

#map-action-content {
    padding-right: 0;
}

#map-action-content .map-action-title {
    padding-right: 48px;
}

.map-action-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.map-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.map-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-action-btn i {
    font-size: 1.2rem;
}

.map-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.map-action-btn:active {
    transform: translateY(0);
}

.map-action-btn.info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.map-action-btn.navigate {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

/* Old nav-buttons for backward compatibility */
.nav-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.nav-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s;
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-btn.google {
    background: #4285F4;
    color: #fff;
}

.nav-btn.apple {
    background: #000;
    color: #fff;
}

/* Responsive */
@media (min-width: 768px) {
    .nav-bottom {
        max-width: 400px;
    }
    
    .station-card {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Focus States for Accessibility */
button:focus-visible,
.nav-item:focus-visible {
    outline: 2px solid var(--yb-yellow);
    outline-offset: 2px;
}

/* Location Picker Modal */
.location-picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 4000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.location-picker-overlay.open {
    opacity: 1;
    visibility: visible;
}

.location-picker-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 500px;
    height: 70vh;
    max-height: 600px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    z-index: 4001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.location-picker-modal.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.location-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.location-picker-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

#location-picker-map {
    flex: 1;
    position: relative;
    background: #f0f0f0;
}

.location-picker-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: #ccc;
    background: #f5f5f5;
}

.btn-secondary:active {
    transform: scale(0.98);
}

.manual-location-hint {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 12px;
}

.manual-location-hint.set {
    color: var(--yb-yellow);
    font-weight: 600;
}

/* Location Mode Selector */
.location-mode-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 4500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.location-mode-overlay.open {
    opacity: 1;
    visibility: visible;
}

.location-mode-card {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px 24px 0 0;
    padding: 28px 24px;
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
    z-index: 4501;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
}

.location-mode-card.open {
    transform: translateY(0);
}

.location-mode-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a1a;
    text-align: center;
}

.location-mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.location-mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--yb-yellow) 0%, #e6b800 100%);
    color: #fff;
}

.location-mode-btn i {
    font-size: 1.2rem;
}

.location-mode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.location-mode-btn:active {
    transform: translateY(0);
}


/* Search Container */
.search-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-color);
    padding: 16px 16px 8px 16px;
    margin-bottom: 16px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.search-box:focus-within {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 1);
}

.search-box i.fa-search {
    color: #999;
    margin-right: 12px;
    font-size: 1rem;
}

#search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: #333;
}

#search-input::placeholder {
    color: #999;
}

.clear-search {
    background: none;
    border: none;
    color: #999;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    display: none;
    transition: color 0.2s ease;
}

.clear-search.visible {
    display: block;
}

.clear-search:hover {
    color: #666;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 200;
}

.search-suggestions.visible {
    display: block;
}

.suggestion-item {
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(243, 200, 0, 0.1);
}

.suggestion-item:active {
    background: rgba(243, 200, 0, 0.2);
}

.suggestion-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.suggestion-meta {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestion-meta i {
    color: var(--yb-yellow);
}

.suggestion-distance {
    color: #999;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

/* Search Filters */
.search-filters {
    display: none;
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.search-filters.visible {
    display: block;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    justify-content: flex-start;
}

.filter-chips:last-child {
    margin-bottom: 0;
}

.filter-chip {
    padding: 6px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 20px;
    background: #fff;
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: var(--yb-yellow);
    color: #333;
}

.filter-chip.active {
    border-color: var(--yb-yellow);
    background: var(--yb-yellow);
    color: #fff;
}

.filter-chip.location-btn {
    background: linear-gradient(135deg, var(--yb-yellow) 0%, #e6b800 100%);
    border-color: var(--yb-yellow);
    color: #fff;
    padding: 6px 10px;
    font-size: 1rem;
}

.filter-chip.location-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(243, 200, 0, 0.3);
}

.filter-chip.location-btn i {
    display: block;
}



/* Update Notification */
.update-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, var(--yb-yellow) 0%, #e6b800 100%);
    color: #fff;
    padding: 16px 24px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.update-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.update-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
}

.update-content i {
    font-size: 1.2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


/* Collapsible Info Card */
.info-card.collapsible {
    cursor: default;
}

.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.collapsible-header:hover {
    color: var(--yb-yellow);
}

.collapsible-header h3 {
    margin: 0;
}

.collapsible-header i {
    font-size: 1rem;
    transition: transform 0.3s ease;
    color: #999;
}

.collapsible-header:hover i {
    color: var(--yb-yellow);
}

.collapsible.open .collapsible-header i {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.collapsible.open .collapsible-content {
    max-height: 3000px;
    margin-top: 16px;
}

.collapsible-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 8px;
    color: var(--yb-dark);
}

.collapsible-content h4:first-child {
    margin-top: 0;
}

.collapsible-content p {
    margin-bottom: 12px;
}

.collapsible-content ul {
    margin-bottom: 12px;
}

.collapsible-content a {
    color: var(--yb-yellow);
    text-decoration: none;
    font-weight: 600;
}

.collapsible-content a:hover {
    text-decoration: underline;
}

/* Info Card Links */
.info-card a {
    color: var(--yb-yellow);
    text-decoration: none;
    font-weight: 600;
}

.info-card a:hover {
    text-decoration: underline;
}


/* Sport-Only Mode - Hide YouBike Elements */
body.sport-only-mode .quick-btn[data-layer="youbike"] {
    display: none !important;
}

/* Hide title picker in sport-only mode */
body.sport-only-mode .layer-title-picker {
    display: none !important;
}

/* Legacy selector retained for compatibility */
body.sport-only-mode .layer-switch-btn[data-layer="youbike"],
body.sport-only-mode .quick-btn[data-layer="youbike"] {
    display: none !important;
}

/* Hide entire layer switcher in sport-only mode */
body.sport-only-mode .layer-switcher {
    display: none !important;
}

/* Show and center header title in sport-only mode */
body.sport-only-mode .header-title {
    display: block !important;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* Center the header content when in sport-only mode */
body.sport-only-mode .header-content {
    justify-content: center;
}

/* Hide default layer setting in sport-only mode */
body.sport-only-mode .info-card:has(#default-layer-select) {
    display: none !important;
}
