/* ============================================================
   HOFJES VAN NEDERLAND — "Hidden Garden" Design System
   A premium, organic aesthetic inspired by the tuinen themselves
   ============================================================ */

/* ===== CSS Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 🌿 Organic Palette — warm greens, aged stone, terracotta */
    --primary-color: #2d6a4f;
    --primary-dark: #1b4332;
    --primary-light: #d8f3dc;
    --primary-rgb: 45, 106, 79;
    --accent-color: #d4a373;
    --accent-dark: #bc8a5f;
    --accent-light: #fefae0;
    --secondary-color: #e07a5f;
    --background: #faf8f5;
    --surface: #ffffff;
    --surface-warm: #fdf8f0;
    --surface-variant: #f3f0ea;
    --border-color: rgba(45, 42, 38, 0.08);
    --border-warm: rgba(212, 163, 115, 0.2);
    --text-primary: #2d2a26;
    --text-secondary: #78716c;
    --text-tertiary: #a8a29e;
    --success: #40916c;
    --warning: #e9c46a;
    --error: #e07a5f;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #2d6a4f 0%, #40916c 50%, #52b788 100%);
    --gradient-warm: linear-gradient(135deg, #d4a373 0%, #e07a5f 100%);
    --gradient-sunset: linear-gradient(135deg, #e07a5f 0%, #d4a373 50%, #e9c46a 100%);
    --gradient-surface: linear-gradient(180deg, #faf8f5 0%, #f3f0ea 100%);

    /* Shadows — warm & layered */
    --shadow-sm: 0 1px 2px rgba(45,42,38,.04), 0 1px 3px rgba(45,42,38,.06);
    --shadow-md: 0 4px 6px -1px rgba(45,42,38,.06), 0 2px 4px -2px rgba(45,42,38,.04);
    --shadow-lg: 0 10px 25px -5px rgba(45,42,38,.08), 0 4px 10px -4px rgba(45,42,38,.04);
    --shadow-xl: 0 20px 40px -8px rgba(45,42,38,.10), 0 8px 16px -6px rgba(45,42,38,.04);
    --shadow-primary: 0 4px 14px rgba(45,106,79,.25);
    --shadow-glow: 0 0 30px rgba(45,106,79,.10);
    --shadow-warm: 0 4px 14px rgba(212,163,115,.20);
    --shadow-float: 0 12px 40px -8px rgba(45,42,38,.12), 0 4px 12px -4px rgba(45,42,38,.05);

    /* Panel width */
    --left-panel-width: 400px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(.4,0,.2,1);
    --transition-normal: 300ms cubic-bezier(.4,0,.2,1);
    --transition-spring: 500ms cubic-bezier(.34,1.56,.64,1);
    --transition-smooth: 400ms cubic-bezier(.16,1,.3,1);

    /* Border-radius */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
}

/* ===== Dark Mode Overrides ===== */
[data-theme="dark"] {
    --primary-color: #52b788;
    --primary-dark: #40916c;
    --primary-light: #1b4332;
    --primary-rgb: 82, 183, 136;
    --accent-color: #e0a87c;
    --accent-dark: #c49060;
    --accent-light: #3a3020;
    --secondary-color: #f09c84;
    --background: #121210;
    --surface: #1c1b18;
    --surface-warm: #221f1a;
    --surface-variant: #2a2722;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-warm: rgba(224, 168, 124, 0.15);
    --text-primary: #e8e4de;
    --text-secondary: #a8a29e;
    --text-tertiary: #78716c;
    --success: #52b788;
    --warning: #e9c46a;
    --error: #f09c84;

    --gradient-primary: linear-gradient(135deg, #40916c 0%, #52b788 50%, #74c69d 100%);
    --gradient-warm: linear-gradient(135deg, #e0a87c 0%, #f09c84 100%);
    --gradient-sunset: linear-gradient(135deg, #f09c84 0%, #e0a87c 50%, #e9c46a 100%);
    --gradient-surface: linear-gradient(180deg, #121210 0%, #1c1b18 100%);

    --shadow-sm: 0 1px 2px rgba(0,0,0,.20), 0 1px 3px rgba(0,0,0,.15);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.25), 0 2px 4px -2px rgba(0,0,0,.15);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,.30), 0 4px 10px -4px rgba(0,0,0,.15);
    --shadow-xl: 0 20px 40px -8px rgba(0,0,0,.35), 0 8px 16px -6px rgba(0,0,0,.20);
    --shadow-primary: 0 4px 14px rgba(82,183,136,.20);
    --shadow-glow: 0 0 30px rgba(82,183,136,.10);
    --shadow-warm: 0 4px 14px rgba(224,168,124,.12);
    --shadow-float: 0 12px 40px -8px rgba(0,0,0,.30), 0 4px 12px -4px rgba(0,0,0,.15);
}

[data-theme="dark"] .leaflet-control-attribution { background: rgba(28,27,24,.85) !important; color: var(--text-tertiary) !important; }
[data-theme="dark"] .leaflet-bar a { color: var(--text-primary) !important; background: var(--surface) !important; }
[data-theme="dark"] .leaflet-bar a:hover { background: var(--surface-variant) !important; }
[data-theme="dark"] .leaflet-popup-content-wrapper { background: var(--surface); color: var(--text-primary); }
[data-theme="dark"] .leaflet-popup-tip { background: var(--surface); }
[data-theme="dark"] .map-btn { background: rgba(28,27,24,.88); color: var(--text-primary); }
[data-theme="dark"] .map-btn:hover { background: var(--surface); }
[data-theme="dark"] .tuin-marker-img { border-color: var(--surface-variant); }
[data-theme="dark"] .leaflet-marker-icon.selected .tuin-marker-img { border-color: var(--primary-color); }
[data-theme="dark"] .download-btn { background: var(--surface-variant); }
[data-theme="dark"] .app-promo-strip { background: linear-gradient(135deg, rgba(82,183,136,.08) 0%, rgba(224,168,124,.06) 50%, rgba(240,156,132,.04) 100%); border-color: rgba(82,183,136,.15); }
[data-theme="dark"] .promo-close-btn { background: rgba(255,255,255,.06); }
[data-theme="dark"] .promo-close-btn:hover { background: rgba(255,255,255,.12); }
[data-theme="dark"] .interstitial-backdrop { background: rgba(0,0,0,.85); }
[data-theme="dark"] .mobile-sticky-download { background: rgba(28,27,24,.95); border-color: rgba(255,255,255,.08); }

/* ===== Theme Toggle ===== */
.theme-toggle {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background: var(--surface-variant);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    padding: 0;
    flex-shrink: 0;
}
.theme-toggle:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .08);
}
.theme-toggle-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gradient-primary);
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    transition: all var(--transition-spring);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}
.theme-toggle-thumb svg {
    width: 11px;
    height: 11px;
    fill: #fff;
}
[data-theme="dark"] .theme-toggle-thumb {
    left: calc(100% - 20px);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background: var(--background);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== App Container ===== */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ===== Hero Banner ===== */
.hero-banner {
    background: linear-gradient(135deg,
        rgba(45,106,79,.06) 0%,
        rgba(82,183,136,.06) 50%,
        rgba(212,163,115,.06) 100%);
    color: #000;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}
.hero-banner.hidden { display: none; }

.hero-close-btn {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border: none;
    background: rgba(45,42,38,.05);
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}
.hero-close-btn:hover {
    background: rgba(45,42,38,.10);
    transform: rotate(90deg);
}
.hero-close-btn svg { width: 18px; height: 18px; }

.hero-content { width: 100%; }

.hero-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.2;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -.4px;
}

.hero-description {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 0;
    color: var(--text-secondary);
}

/* ===== Map Overlay Buttons ===== */
.map-overlay-buttons {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 800;
}

.map-btn {
    width: 46px; height: 46px;
    border: none;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-primary);
    transition: all var(--transition-smooth);
}
.map-btn:hover {
    background: var(--surface);
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px) scale(1.05);
}
.map-btn:active { transform: scale(.92); }
.map-btn svg { width: 22px; height: 22px; }
.map-btn.locating {
    color: var(--primary-color);
    animation: locatePulse 1.5s infinite;
}
@keyframes locatePulse {
    0%,100% { box-shadow: var(--shadow-lg); }
    50% { box-shadow: 0 2px 12px rgba(45,106,79,.35); }
}

/* Hide toggle button on desktop */
.toggle-panel-btn { display: none; }

/* ===== Focus / Accessibility ===== */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.mode-btn:focus-visible { box-shadow: 0 0 0 2px var(--primary-color); }

/* ===== Layout Containers ===== */
.right-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.map-detail-container {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* ===== Left Panel ===== */
.left-panel {
    width: var(--left-panel-width);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 6px 0 30px rgba(45,42,38,.06);
    z-index: 10;
}

/* ===== Panel Header — Signature Brand Bar ===== */
.panel-header {
    padding: 20px 20px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}
/* Warm accent line */
.panel-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20px; right: 20px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
    opacity: .5;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    box-shadow: var(--shadow-sm);
}

.app-title {
    font-size: 17px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -.4px;
}

/* Language Selector */
.language-selector {
    display: flex;
    gap: 4px;
}

.lang-btn {
    padding: 6px 12px;
    border: 1.5px solid var(--border-color);
    background: var(--surface);
    border-radius: var(--radius-sm);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.flag-icon {
    width: 24px; height: 16px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
}
.lang-btn:hover {
    background: var(--surface-variant);
    border-color: rgba(45,42,38,.12);
}
.lang-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(45,106,79,.3);
}

/* ===== Mode Selector — Pill Tabs ===== */
.mode-selector {
    padding: 4px;
    display: flex;
    gap: 2px;
    background: var(--surface-variant);
    margin: 14px 16px 0;
    border-radius: var(--radius-lg);
    position: relative;
}

.mode-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 8px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-smooth);
    color: var(--text-tertiary);
    position: relative;
    z-index: 1;
}
.mode-btn:hover { color: var(--text-primary); }
.mode-btn.active {
    background: var(--surface);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}
.mode-btn svg {
    width: 20px; height: 20px;
    transition: transform var(--transition-spring);
}
.mode-btn.active svg { transform: scale(1.1); }

.mode-label {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
}

/* ===== Search Section ===== */
.search-section {
    padding: 14px 16px 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
}

.search-box {
    position: relative;
    margin-bottom: 8px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    color: var(--text-tertiary);
    pointer-events: none;
    transition: color var(--transition-normal);
}

.search-input {
    width: 100%;
    padding: 12px 36px 12px 42px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all var(--transition-smooth);
    background: var(--surface-variant);
    color: var(--text-primary);
}
.search-input::placeholder { color: var(--text-tertiary); }
.search-input:focus {
    border-color: var(--primary-color);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(45,106,79,.08);
}
.search-input:focus ~ .search-icon { color: var(--primary-color); }

.clear-btn {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    width: 24px; height: 24px;
    border: none;
    background: var(--text-tertiary);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition-fast);
}
.clear-btn:hover { background: var(--text-secondary); }

.city-filter {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    background: var(--surface-variant);
    cursor: pointer;
    outline: none;
    transition: all var(--transition-smooth);
    color: var(--text-primary);
}
.city-filter:focus {
    border-color: var(--primary-color);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(45,106,79,.08);
}

/* ===== Content Area ===== */
.content-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ===== Loading State ===== */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--surface-variant);
    border-top-color: var(--primary-color);
    border-right-color: var(--primary-color);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin-bottom: 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Tuinen List — Card Style ===== */
.tuinen-list { padding: 6px 0; }

.list-count {
    padding: 12px 20px 4px;
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
}

/* Individual tuin card rows */
.tuin-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    margin: 2px 10px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border-radius: var(--radius-md);
    position: relative;
    animation: cardSlideIn .35s cubic-bezier(.16,1,.3,1) both;
}
.tuin-item:hover { background: var(--surface-variant); }
.tuin-item.selected {
    background: rgba(45,106,79,.06);
    box-shadow: inset 3px 0 0 0 var(--primary-color);
}

@keyframes cardSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tuin-thumbnail {
    width: 52px; height: 52px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface-variant);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}
.tuin-item:hover .tuin-thumbnail {
    transform: scale(1.06);
    box-shadow: var(--shadow-md);
}
.tuin-thumbnail.placeholder {
    display: flex; align-items: center; justify-content: center;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 24px;
}

.tuin-info {
    flex: 1;
    min-width: 0;
}

.tuin-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -.2px;
    color: var(--text-primary);
}

.tuin-city {
    font-size: 12px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 4px;
}
/* City dot */
.tuin-city::before {
    content: '';
    display: inline-block;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--accent-color);
    flex-shrink: 0;
}

.favorite-btn {
    width: 36px; height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition-spring);
    flex-shrink: 0;
    color: var(--text-tertiary);
}
.favorite-btn:hover {
    background: rgba(224,122,95,.08);
    color: var(--secondary-color);
}
.favorite-btn svg { width: 20px; height: 20px; }
.favorite-btn.active {
    color: var(--secondary-color);
    animation: heartBeat .4s ease-out;
}

/* ===== Favorites List ===== */
.favorites-list { padding: 20px; }

.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-secondary);
}
.empty-state svg {
    width: 56px; height: 56px;
    color: var(--border-color);
    margin-bottom: 16px;
}
.empty-state h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 700;
}
.empty-state p { font-size: 14px; line-height: 1.5; }

/* ===== About Section ===== */
.about-section { padding: 28px 20px; }

.about-content {
    max-width: 500px;
    margin: 0 auto;
}

.about-icon {
    width: 48px; height: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.about-content h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -.4px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 28px;
}

.stat-card {
    padding: 26px 20px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-primary);
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
}

.about-text { margin-bottom: 28px; }
.about-text p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* ===== Feedback Section ===== */
.feedback-section {
    margin: 32px 0;
    padding: 24px;
    background: var(--surface-warm);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-warm);
}
.feedback-section h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
}
.feedback-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.rating-stars {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    justify-content: center;
}

.star-btn {
    background: none;
    border: none;
    font-size: 30px;
    color: var(--border-color);
    cursor: pointer;
    transition: all .2s;
    padding: 4px;
    position: relative;
}
.star-btn:hover { color: var(--accent-color); transform: scale(1.15); }
.star-btn.active { color: var(--accent-color); animation: starPulse .3s ease-out; }

@keyframes starPulse {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feedback-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: all var(--transition-normal);
    background: var(--surface);
    color: var(--text-primary);
}
.feedback-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45,106,79,.08);
}

.feedback-email {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition-normal);
    background: var(--surface);
    color: var(--text-primary);
}
.feedback-email:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45,106,79,.08);
}

.submit-feedback-btn {
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    font-family: inherit;
}
.submit-feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
    filter: brightness(1.08);
}
.submit-feedback-btn:active { transform: translateY(0); }
.submit-feedback-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.feedback-status {
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    text-align: center;
    display: none;
}
.feedback-status.success,
.feedback-status.error {
    display: block;
    animation: slideIn .3s ease-out;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.feedback-status.success {
    background: rgba(64,145,108,.1);
    color: var(--primary-dark);
    border: 1px solid rgba(64,145,108,.2);
    font-weight: 600;
}
.feedback-status.success::before { content: "✓ "; font-size: 16px; }
.feedback-status.error {
    background: rgba(224,122,95,.1);
    color: #8b3a2a;
    border: 1px solid rgba(224,122,95,.2);
    font-weight: 600;
}
.feedback-status.error::before { content: "⚠ "; font-size: 16px; }

.version-info {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}
.version-info p {
    font-size: 12px;
    color: var(--text-tertiary);
    margin: 4px 0;
}

/* ===== App Download Banner ===== */
.app-download-banner {
    padding: 14px 16px;
    background: linear-gradient(135deg,rgba(45,106,79,.05) 0%,rgba(212,163,115,.08) 100%);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}
.app-download-banner.hidden { display: none; }

.banner-close-btn {
    position: absolute;
    top: 8px; right: 8px;
    width: 24px; height: 24px;
    border: none;
    background: rgba(45,42,38,.08);
    border-radius: 50%;
    font-size: 16px; line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    transition: background var(--transition-fast);
}
.banner-close-btn:hover { background: rgba(45,42,38,.15); }

/* Mobile Drag Handle */
.panel-drag-handle {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 8px 0 4px;
    cursor: grab;
    touch-action: none;
    flex-shrink: 0;
}
.drag-indicator {
    width: 40px; height: 4px;
    background: var(--border-color);
    border-radius: 2px;
}

.banner-title {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.download-buttons {
    display: flex;
    gap: 8px;
}
.download-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--text-primary);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}
.download-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.store-icon {
    width: 22px; height: 22px;
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 13px;
}
.ios-icon {
    background: linear-gradient(135deg,#a5b4fc 0%,#4f46e5 100%);
    color: #fff;
    font-size: 16px;
}
.play-icon {
    background: linear-gradient(135deg,#6ee7b7 0%,#059669 100%);
    color: #fff;
    font-size: 14px;
}
.store-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.store-label {
    font-size: 8px;
    color: rgba(255,255,255,.8);
    line-height: 1;
}
.store-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-top: 2px;
    line-height: 1;
}

/* ===== Mobile App Interstitial Overlay ===== */
.mobile-app-interstitial {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn .4s ease-out;
}
.interstitial-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 18, 16, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.interstitial-card {
    position: relative;
    z-index: 1;
    background: var(--surface);
    border-radius: var(--radius-2xl);
    padding: 36px 28px 28px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--border-color);
    animation: scaleIn .4s cubic-bezier(.16,1,.3,1);
}
.interstitial-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 16px;
}
.interstitial-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}
.interstitial-subtitle {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.interstitial-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
}
.interstitial-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-primary);
    transition: all var(--transition-normal);
    margin-bottom: 12px;
}
.interstitial-download-btn svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.interstitial-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary), var(--shadow-glow);
}
.interstitial-dismiss-btn {
    display: inline-block;
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition-fast);
    text-decoration: none;
    width: 100%;
}
.interstitial-dismiss-btn:hover {
    color: var(--text-secondary);
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(.9) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ===== App Promo Strip (between mode-selector and search) ===== */
.app-promo-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin: 0 10px;
    background: linear-gradient(135deg, rgba(45,106,79,.08) 0%, rgba(212,163,115,.1) 50%, rgba(224,122,95,.06) 100%);
    border: 1px solid rgba(45,106,79,.15);
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.app-promo-strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}
.app-promo-strip:hover::before {
    opacity: 0.05;
}
.app-promo-strip:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(45,106,79,.1);
    transform: translateY(-1px);
}
.app-promo-strip.hidden { display: none; }
.promo-icon-wrap {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
.promo-app-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    box-shadow: var(--shadow-sm);
}
.promo-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.promo-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.promo-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.2;
}
.promo-arrow {
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}
.app-promo-strip:hover .promo-arrow {
    transform: translateX(3px);
}
.promo-close-btn {
    position: relative;
    z-index: 2;
    width: 22px;
    height: 22px;
    border: none;
    background: rgba(45,42,38,.06);
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.promo-close-btn:hover {
    background: rgba(45,42,38,.12);
    color: var(--text-secondary);
}

/* ===== Center Panel: Map ===== */
.center-panel {
    flex: 1;
    position: relative;
}
.center-panel.with-detail { flex: 1; }

.map-container {
    width: 100%;
    height: 100%;
}

/* ===== Right Panel (Detail) — Overlay Drawer ===== */
.right-panel {
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 460px;
    max-width: 100%;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 850;
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.16,1,.3,1),
                box-shadow .4s cubic-bezier(.16,1,.3,1);
    border-radius: var(--radius-2xl) 0 0 var(--radius-2xl);
    box-shadow: none;
    will-change: transform;
}
.right-panel.visible {
    transform: translateX(0);
    box-shadow: -12px 0 50px rgba(45,42,38,.10),
                -3px 0 12px rgba(45,42,38,.05);
}

/* ===== Detail Panel Content ===== */
.detail-header {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-start;
    background: var(--surface);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    transition: all var(--transition-normal);
    font-family: inherit;
}
.back-btn:hover {
    background: rgba(45,106,79,.06);
    transform: translateX(-2px);
}
.back-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.close-btn {
    width: 36px; height: 36px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition-fast);
}
.close-btn:hover { background: var(--surface-variant); }
.close-btn svg { width: 20px; height: 20px; }

.detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Detail image — full-bleed hero */
.detail-image {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    margin-bottom: 0;
    background: var(--surface-variant);
    display: block;
    border-radius: 0;
}
.detail-image.placeholder {
    display: flex; align-items: center; justify-content: center;
    background: var(--gradient-primary);
    color: rgba(255,255,255,.5);
    font-size: 56px;
}

/* Title row with favorite */
.detail-title-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    padding: 24px 28px 0;
}

.detail-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 0;
    letter-spacing: -.4px;
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}

.detail-favorite-btn {
    width: 44px; height: 44px;
    border: 1.5px solid var(--border-color);
    background: var(--surface);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: var(--text-tertiary);
    transition: all .25s cubic-bezier(.34,1.56,.64,1);
}
.detail-favorite-btn svg { width: 22px; height: 22px; }
.detail-favorite-btn:hover {
    border-color: var(--secondary-color);
    background: rgba(224,122,95,.06);
    color: var(--secondary-color);
}
.detail-favorite-btn.active {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    background: rgba(224,122,95,.08);
    animation: heartBeat .4s ease-out;
}

.detail-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
    padding: 0 28px;
}
.detail-location svg { width: 18px; height: 18px; color: var(--accent-color); }

.detail-section {
    margin-bottom: 24px;
    padding: 0 28px 28px;
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.section-content {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-secondary);
}
.section-content p { margin-bottom: 16px; }

/* ===== Markdown Content ===== */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
    color: var(--text-primary);
    font-weight: 700;
    margin-top: 28px;
    margin-bottom: 12px;
    letter-spacing: -.3px;
}
.markdown-content h1 { font-size: 22px; }
.markdown-content h2 { font-size: 19px; }
.markdown-content h3 { font-size: 17px; }
.markdown-content h4 { font-size: 15px; color: var(--text-secondary); }

.markdown-content p {
    margin-bottom: 16px;
    line-height: 1.8;
    font-size: 15px;
    color: var(--text-secondary);
}

.markdown-content ul,
.markdown-content ol {
    margin-bottom: 18px;
    padding-left: 24px;
}
.markdown-content li {
    margin-bottom: 8px;
    line-height: 1.75;
    font-size: 15px;
    color: var(--text-secondary);
}

.markdown-content strong {
    font-weight: 700;
    color: var(--text-primary);
}
.markdown-content em { font-style: italic; }

.markdown-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    border-bottom: 1px solid rgba(45,106,79,.2);
}
.markdown-content a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

.markdown-content blockquote {
    border-left: 3px solid var(--accent-color);
    padding: 14px 18px;
    margin: 18px 0;
    color: var(--text-secondary);
    font-style: italic;
    background: rgba(212,163,115,.06);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.markdown-content code {
    background: var(--surface-variant);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}
.markdown-content pre {
    background: var(--surface-variant);
    padding: 14px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin-bottom: 18px;
}
.markdown-content pre code { background: none; padding: 0; }

/* ===== Leaflet Customizations ===== */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}
.leaflet-popup-content {
    margin: 14px;
    min-width: 180px;
    font-family: 'Inter', sans-serif;
}

/* ===== Marker Styles ===== */
/* NOTE: Do NOT add position:relative — it overrides Leaflet's position:absolute */
.tuin-marker-wrapper {
    width: 40px; height: 40px;
    background: none !important;
    border: none !important;
}

.tuin-marker-img {
    width: 40px; height: 40px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(45,42,38,.18), 0 1px 3px rgba(45,42,38,.08);
    cursor: pointer;
    transition: all .25s cubic-bezier(.34,1.56,.64,1);
    object-fit: cover;
    display: block;
}
.tuin-marker-wrapper:hover .tuin-marker-img {
    transform: scale(1.15);
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(45,106,79,.25), 0 2px 4px rgba(45,42,38,.08);
}

/* Heart badge on favorite markers */
.marker-heart {
    position: absolute;
    bottom: -2px; right: -4px;
    font-size: 13px;
    color: var(--secondary-color);
    text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
    opacity: 0;
    transform: scale(0);
    transition: all .3s cubic-bezier(.34,1.56,.64,1);
    pointer-events: none;
    line-height: 1;
    z-index: 2;
}
.marker-heart.visible {
    opacity: 1;
    transform: scale(1);
}

/* Selected DivIcon — 2.5x size */
.leaflet-marker-icon.selected .tuin-marker-img {
    border-color: var(--primary-color);
    transform: scale(2.5);
    box-shadow: 0 0 0 2px rgba(45,106,79,.3), 0 4px 20px rgba(45,42,38,.2);
}

/* Old custom marker fallback */
.custom-marker {
    background: var(--primary-color);
    color: #fff;
    border: 3px solid #fff;
    border-radius: 50%;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: transform var(--transition-fast);
}
.custom-marker:hover { transform: scale(1.1); }
.custom-marker.selected {
    background: var(--secondary-color);
    transform: scale(1.2);
    z-index: 1000 !important;
}

/* Leaflet controls — warm tint */
.leaflet-control-attribution {
    font-size: 10px !important;
    background: rgba(250,248,245,.85) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-xs) 0 0 0 !important;
    padding: 3px 8px !important;
}
.leaflet-bar {
    border: none !important;
    box-shadow: var(--shadow-lg) !important;
    border-radius: var(--radius-md) !important;
    overflow: hidden;
}
.leaflet-bar a {
    color: var(--text-primary) !important;
    border-bottom-color: var(--border-color) !important;
    width: 34px !important; height: 34px !important;
    line-height: 34px !important;
    font-size: 16px !important;
}
.leaflet-bar a:hover { background-color: var(--surface-variant) !important; }
.leaflet-touch .leaflet-bar a {
    width: 38px !important; height: 38px !important;
    line-height: 38px !important;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    :root { --left-panel-width: 340px; }
}

@media (max-width: 768px) {
    .hero-banner { padding: 12px 16px; }
    .hero-title  { font-size: 16px; }
    .hero-description { font-size: 12px; }

    .app-container {
        flex-direction: column;
        position: relative;
    }

    .right-container { flex: 1; order: 1; }

    /* Left panel as bottom sheet */
    .left-panel {
        order: 2;
        width: 100%;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        z-index: 900;
        max-height: 45vh;
        border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
        box-shadow: 0 -8px 40px rgba(45,42,38,.10);
        transition: max-height .3s ease, transform .3s ease;
    }
    .left-panel.collapsed {
        max-height: 0;
        transform: translateY(100%);
    }
    .left-panel.expanded { max-height: 85vh; }

    .panel-drag-handle { display: flex; }
    .toggle-panel-btn { display: flex; }
    .back-btn-text { display: inline; }
    .map-detail-container { flex: 1; }
    .center-panel { flex: 1 !important; }

    .right-panel { width: 100%; border-radius: 0; }
    .right-panel.visible {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        width: 100% !important;
        z-index: 1000;
        transform: translateX(0);
        border-radius: 0;
        box-shadow: none;
    }

    .app-download-banner { padding: 10px 12px; }
    .banner-title { font-size: 12px; }
    .app-promo-strip { margin: 0 6px; padding: 8px 10px; gap: 10px; }
    .promo-app-icon { width: 30px; height: 30px; border-radius: 7px; }
    .promo-title { font-size: 12px; }
    .promo-subtitle { font-size: 10px; }
    .promo-close-btn { width: 20px; height: 20px; font-size: 12px; }
    .detail-title-row { padding: 20px 20px 0; }
    .detail-location { padding: 0 20px; }
    .detail-section { padding: 0 20px 20px; }
    .tuin-item { margin: 2px 6px; }

    /* Interstitial fills screen on mobile */
    .interstitial-card { padding: 28px 22px 22px; }
    .interstitial-icon { width: 60px; height: 60px; border-radius: 15px; }
    .interstitial-title { font-size: 20px; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(45,42,38,.10);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(45,42,38,.20); }

/* ===== Animations ===== */
@keyframes heartBeat {
    0%   { transform: scale(1); }
    25%  { transform: scale(1.3); }
    50%  { transform: scale(.95); }
    100% { transform: scale(1); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
