* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --nav-height: 72px;

    /* Core palette - Light theme (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f4f6f8;
    --bg-tertiary: #e6e8eb;
    --card-bg: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-strong: rgba(255, 255, 255, 0.82);
    --stroke: rgba(15, 23, 42, 0.08);
    --stroke-strong: rgba(15, 23, 42, 0.16);

    --text-primary: #0f172a;
    --text-secondary: #1f2937;
    --text-muted: #6b7280;

    --accent: #2b8af7;
    --accent-contrast: #ffffff;
    --accent-soft: rgba(43, 138, 247, 0.12);
    --accent-strong: rgba(43, 138, 247, 0.18);

    /* Legacy tokens remapped to monochrome-friendly values */
    --primary: var(--accent);
    --primary-light: var(--accent);
    --primary-dark: var(--accent);
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 18px 36px rgba(0, 0, 0, 0.18);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Safe areas for iOS */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    
    /* Map style */
    --map-style: light;
}

/* Dark theme */
:root.dark-theme {
    --bg-primary: #1c1c1e;
    --bg-secondary: #2c2c2e;
    --bg-tertiary: #3a3a3c;
    --card-bg: #2c2c2e;
    --glass-bg: rgba(44, 44, 46, 0.9);
    --glass-strong: rgba(44, 44, 46, 0.95);
    --stroke: rgba(255, 255, 255, 0.1);
    --stroke-strong: rgba(255, 255, 255, 0.2);

    --text-primary: #ffffff;
    --text-secondary: #ebebf5;
    --text-muted: #8e8e93;

    --accent: #0a84ff;
    --accent-contrast: #ffffff;
    --accent-soft: rgba(10, 132, 255, 0.2);
    --accent-strong: rgba(10, 132, 255, 0.3);

    --accent-pink: #ff375f;
    --accent-cyan: #64d2ff;
    --accent-green: #30d158;
    --accent-orange: #ff9f0a;
    --success: #30d158;
    --warning: #ff9f0a;
    --danger: #ff453a;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 18px 36px rgba(0, 0, 0, 0.6);
    
    --map-style: dark;
}

body, html {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
    overflow: hidden;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* ===== MAP CONTAINER ===== */
#map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: var(--nav-height);
    width: 100%;
}

/* Hide Mapbox attribution for cleaner look */
.mapboxgl-ctrl-attrib,
.mapboxgl-ctrl-attrib-button,
.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right,
.mapboxgl-compact {
    display: none !important;
}

/* Hide all bottom controls that might show Mapbox logo */
.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    z-index: -1 !important;
}

.mapboxgl-ctrl-top-left {
    top: calc(var(--safe-top) + 60px) !important;
    left: 12px !important;
}

.mapboxgl-ctrl-group {
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    overflow: hidden;
}

.mapboxgl-ctrl-group button {
    width: 40px !important;
    height: 40px !important;
}

/* ===== CONNECTION STATUS PILL ===== */
.connection-status {
    position: absolute;
    top: calc(var(--safe-top) + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(0);
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg);
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--stroke);
}

.connection-status.connected {
    background: var(--accent);
    color: var(--accent-contrast);
    border-color: transparent;
}

.connection-status.disconnected {
    background: var(--glass-strong);
    color: var(--text-primary);
    border-color: var(--stroke-strong);
}

.connection-status.connecting {
    background: var(--glass-strong);
    color: var(--text-primary);
    border-color: var(--stroke-strong);
}

.connection-status.hidden {
    transform: translateX(-50%) translateY(-100px);
    opacity: 0;
}

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

.connection-status.connecting .status-dot {
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ===== AVATAR MARKERS - ZENLY STYLE ===== */
.marker-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.marker-wrapper:active {
    transform: scale(0.92);
}

.marker-wrapper.pop-in {
    animation: marker-pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes marker-pop-in {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.marker-ring {
    position: relative;
    padding: 3px;
    border-radius: 50%;
    background: var(--accent);
}

.marker-ring.live::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.4;
    animation: live-ring 2s ease-out infinite;
    will-change: transform, opacity;
}

@keyframes live-ring {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(1.4); opacity: 0; }
}

.marker-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    object-fit: cover;
    background: var(--bg-secondary);
    display: block;
}

.marker-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-badge::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-contrast);
    border-radius: 50%;
}

.marker-label {
    margin-top: 6px;
    padding: 5px 12px;
    background: var(--glass-strong);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: var(--shadow-md);
}

.marker-label.you {
    background: var(--accent);
    color: var(--accent-contrast);
}

.marker-time {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

/* Marker update animation */
.marker-wrapper.updating .marker-ring {
    animation: marker-update 0.4s ease;
}

@keyframes marker-update {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Spiderfied markers (anti-collision offset) */
.marker-wrapper.spiderfied {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.marker-wrapper.spiderfied::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, var(--accent) 0%, transparent 100%);
    transform-origin: top center;
    transform: translateX(-50%) rotate(180deg);
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}

.marker-wrapper.spiderfied .marker-ring {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ===== FLOATING ACTION BUTTONS ===== */
.fab-container {
    position: absolute;
    bottom: calc(var(--nav-height) + 16px);
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10001;
}

.fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fab:active {
    transform: scale(0.9);
}

.fab:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: var(--shadow-xl), 0 0 0 4px var(--accent-soft);
}

.fab:hover {
    box-shadow: var(--shadow-xl), 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.fab.primary {
    background: var(--accent);
    color: var(--accent-contrast);
}

/* ===== BOTTOM NAVIGATION - ZENLY STYLE ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 10000;
    border-top: 1px solid var(--stroke);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    min-width: 64px;
}

.nav-item:active {
    transform: scale(0.9);
}

.nav-item:focus-visible {
    outline: none;
}

.nav-item:focus-visible .nav-icon {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.nav-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.nav-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-muted);
    stroke-width: 2;
    fill: none;
    transition: all 0.25s ease;
}

.nav-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.25s ease;
    letter-spacing: 0.02em;
}

.nav-item.active .nav-icon {
    background: var(--accent-soft);
    transform: scale(1.1);
}

.nav-item.active .nav-icon svg {
    stroke: var(--accent);
}

.nav-item.active .nav-label {
    color: var(--accent);
    font-weight: 700;
}

/* Notification badge on nav */
.nav-badge {
    position: absolute;
    top: 2px;
    right: 14px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--accent);
    color: var(--accent-contrast);
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== PAGE VIEWS ===== */
.page-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(var(--nav-height) + var(--safe-bottom));
    background: var(--bg-secondary);
    z-index: 900;
    overflow-y: auto;
    overflow-x: hidden;
    padding: calc(var(--safe-top) + 16px) 16px 24px;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-view.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.page-header {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: -16px;
    margin-bottom: 24px;
}

/* ===== FRIENDS LIST - REDESIGNED ===== */
.friends-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding-left: 4px;
}

.friend-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.friend-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-soft);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

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

.friend-card:hover::before {
    opacity: 0.05;
}

.friend-card:focus {
    justify-content: flex-start;
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.friend-card-info {
    justify-content: flex-start;
    margin-top: 2px;
}

.friend-card-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
    z-index: 5;
}

.friend-card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-tertiary);
}

.friend-card-avatar.live {
    border-color: var(--accent);
}

.friend-card-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--card-bg);
}

.friend-card-status-dot.offline {
    background: var(--text-muted);
}

.friend-card-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 5;
}

.friend-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.friend-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
}

.friend-card-location-icon {
    font-size: 12px;
}

.friend-card-time {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.friend-card-time.live {
    color: var(--accent);
    font-weight: 600;
}

.friend-card-action {
    padding: 9px 14px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    min-width: 86px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.friend-card-action:active {
    background: var(--accent);
    color: var(--accent-contrast);
    transform: scale(0.95);
}

.friend-card-action.disabled {
    cursor: default;
    color: var(--text-muted);
    padding: 10px 18px;
    font-size: 16px;
    font-weight: 700;
}

.friend-card-action.danger {
    background: var(--danger);
    color: white;
}

.friend-card-action.danger:active {
    background: #d03333;
    color: white;
}

/* Icon buttons (favorite / remove) */
.friend-card-icon-btn,
.friend-card-favorite-btn,
.friend-card-tag-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
    color: var(--text-muted);
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    z-index: 11;
}

.friend-card-icon-btn:hover,
.friend-card-favorite-btn:hover,
.friend-card-tag-btn:hover {
    background: var(--accent-soft);
    transform: scale(1.05);
}

.friend-card-icon-btn:active,
.friend-card-favorite-btn:active,
.friend-card-tag-btn:active {
    transform: scale(0.95);
}

.friend-card-icon-btn.danger {
    background: var(--danger);
    color: white;
}

.friend-card-icon-btn.danger:hover {
    background: #e53e3e;
    color: white;
}

.friend-card-icon-btn.danger:active {
    background: #d03333;
}

/* ===== GHOST MODE CARD ===== */
.ghost-mode-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ghost-mode-card.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 2px solid rgba(139, 92, 246, 0.3);
}

.ghost-mode-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.ghost-mode-icon {
    font-size: 36px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    line-height: 1;
}

.ghost-mode-card.active .ghost-mode-icon {
    transform: scale(1.1);
}

.ghost-mode-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ghost-mode-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.ghost-mode-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.ghost-mode-toggle {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ghost-mode-toggle:active {
    transform: scale(0.92);
}

.toggle-track {
    width: 52px;
    height: 32px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid var(--stroke);
}

.ghost-mode-card.active .toggle-track {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-color: transparent;
}

.toggle-thumb {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ghost-mode-card.active .toggle-thumb {
    transform: translateX(20px);
}

/* ===== PROFILE PAGE - REDESIGNED ===== */
.profile-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
}

.profile-avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--card-bg);
    background: var(--bg-secondary);
}

.profile-avatar-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    background: var(--accent);
    border: 3px solid var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-badge svg {
    width: 14px;
    height: 14px;
    stroke: var(--accent-contrast);
    stroke-width: 3;
}

.profile-name {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.profile-username {
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

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

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 600;
}

/* ===== SETTINGS PAGE - REDESIGNED ===== */
.settings-group {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.settings-group-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    padding-left: 4px;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--stroke);
    cursor: pointer;
    transition: background 0.15s ease;
}

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

.settings-item:active {
    background: var(--bg-secondary);
}

.settings-item-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.settings-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.settings-icon.purple,
.settings-icon.green,
.settings-icon.blue,
.settings-icon.orange {
    background: var(--accent-soft);
    color: var(--text-primary);
}

.settings-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-value {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.settings-chevron {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
    stroke-width: 2;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 24px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.empty-state-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 260px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ===== UTILITIES ===== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.1) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.4s, opacity 0.4s;
}

.ripple:active::after {
    transform: scale(0, 0);
    opacity: 1;
    transition: 0s;
}

/* ===== SCROLLBAR ===== */
.page-view::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* ===== MAP LOADING OVERLAY ===== */
.map-loading {
    position: absolute;
    inset: 0;
    background: var(--bg-primary);
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: opacity 0.5s ease;
}

.map-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

/* ===== BOTTOM SHEET SYSTEM ===== */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.sheet-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.bottom-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    z-index: 1200;
    max-height: 90vh;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.bottom-sheet.active {
    transform: translateY(0);
}

.sheet-handle {
    width: 36px;
    height: 5px;
    background: var(--bg-tertiary);
    border-radius: 2.5px;
    margin: 8px auto 0;
    flex-shrink: 0;
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    flex-shrink: 0;
}

.sheet-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sheet-close:active {
    transform: scale(0.9);
    background: var(--bg-secondary);
}

.sheet-close svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-secondary);
    stroke-width: 2.5;
}

.sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
}

/* ===== SEARCH INPUT ===== */
.search-container {
    position: relative;
    margin-bottom: 16px;
}

.search-input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 44px;
    border: 2px solid var(--bg-tertiary);
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 500;
    background: var(--bg-secondary);
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: var(--primary);
    background: var(--bg-primary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
    stroke-width: 2;
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.search-clear.visible {
    display: flex;
}

.search-clear svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
}

/* ===== SHARE INVITE BUTTON ===== */
.share-invite-btn {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--accent-soft);
    border: 2px dashed var(--accent);
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 20px;
}

.share-invite-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.share-invite-btn:active {
    transform: scale(0.98);
    background: var(--accent-strong);
}

/* ===== SEARCH RESULTS ===== */
.search-results {
    min-height: 200px;
}

.search-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

/* ===== USER CARD (Search Result) ===== */
.user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-card:active {
    transform: scale(0.98);
    background: var(--bg-tertiary);
}

.user-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.user-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-tertiary);
    flex-shrink: 0;
}

.user-card-info {
    flex: 1;
    min-width: 0;
}

.user-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.user-card-action {
    flex-shrink: 0;
}

/* ===== ADD FRIEND BUTTON ===== */
.add-friend-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.add-friend-btn:active {
    transform: scale(0.9);
}

.add-friend-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.add-friend-btn svg {
    width: 20px;
    height: 20px;
    stroke: white;
    stroke-width: 2.5;
}

.add-friend-btn.pending {
    background: var(--bg-tertiary);
}

.add-friend-btn.pending svg {
    stroke: var(--text-muted);
}

.add-friend-btn.success {
    background: var(--accent);
}

/* ===== REQUEST CARD ===== */
.request-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

.request-card.removing {
    transform: translateX(-100%);
    opacity: 0;
    margin-bottom: 0;
    padding: 0;
    height: 0;
}

.request-card-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.request-card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-tertiary);
    flex-shrink: 0;
}

.request-card-info {
    flex: 1;
    min-width: 0;
}

.request-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.request-card-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.request-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.request-btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.request-btn:active {
    transform: scale(0.95);
}

.request-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

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

.request-btn.decline {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.request-btn.cancel {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--bg-tertiary);
}

/* ===== PENDING SECTION ===== */
.pending-section {
    margin-bottom: 24px;
}

.pending-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    cursor: pointer;
}

.pending-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pending-count {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 12px;
}

.pending-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.pending-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.pending-card-info {
    flex: 1;
    min-width: 0;
}

.pending-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.pending-card-time {
    font-size: 12px;
    color: var(--text-muted);
}

.pending-cancel-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pending-cancel-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
}

/* ===== CELEBRATION MODAL ===== */
.celebration-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.celebration-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.celebration-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.celebration-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    text-align: center;
    max-width: 320px;
    width: 100%;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.celebration-modal.active .celebration-content {
    transform: scale(1);
}

.celebration-emoji {
    font-size: 48px;
    margin-bottom: 8px;
    animation: celebration-bounce 0.6s ease;
}

@keyframes celebration-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.celebration-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    border: 4px solid var(--accent-green);
    animation: celebration-avatar 0.5s ease 0.2s both;
}

@keyframes celebration-avatar {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.celebration-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.celebration-text {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.celebration-btn {
    width: 100%;
    height: 52px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.celebration-btn:active {
    transform: scale(0.98);
}

.celebration-secondary {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
}

/* ===== CONFETTI ===== */
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2100;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    animation: toast-in 0.3s ease;
    pointer-events: auto;
}

.toast.success {
    background: var(--accent-green);
    color: white;
}

.toast.error {
    background: var(--danger);
    color: white;
}

.toast.info {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
}

.toast.removing {
    animation: toast-out 0.2s ease forwards;
}

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

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

/* ===== ADD FRIEND FAB ===== */
.fab.add-friend {
    background: linear-gradient(135deg, var(--primary), var(--accent-pink));
    color: white;
    position: relative;
}

.fab.add-friend::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    z-index: -1;
    animation: fab-glow 2s ease-in-out infinite;
}

@keyframes fab-glow {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.15; }
}

/* ===== SKELETON LOADING ===== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 6px;
}

.skeleton-text-short {
    width: 60%;
}

.skeleton-text-medium {
    width: 80%;
}

/* ===== REQUESTS BADGE ON FRIENDS TAB ===== */
.nav-badge.requests {
    background: var(--accent-pink);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== FRIENDS PAGE HEADER WITH ADD BUTTON ===== */
.friends-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.friends-header-left h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin: 0;
}

.friends-header-left p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

/* ===== FRIENDS PAGE SEARCH ===== */
.friends-search-container {
    margin-bottom: 20px;
}

.friends-search-container .search-container {
    margin-bottom: 12px;
}

.friends-search-container .share-invite-btn {
    width: 100%;
    margin-bottom: 0;
}

.friends-search-container .search-results {
    margin-top: 16px;
    max-height: 300px;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
}

.friends-search-container .search-results .user-card {
    padding: 12px 16px;
}

.friends-search-container .search-results:empty {
    display: none !important;
}

/* ===== REQUESTS SECTION ===== */
.requests-section {
    margin-bottom: 24px;
}

.requests-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.requests-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.requests-section-count {
    background: var(--accent-pink);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
}

/* ===== USER PREVIEW SHEET ===== */
.user-preview {
    text-align: center;
    padding: 20px 0;
}

.user-preview-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    border: 3px solid var(--bg-tertiary);
}

.user-preview-name {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.user-preview-username {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.user-preview-mutual {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.user-preview-action {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.user-preview-action:active {
    transform: scale(0.98);
}

.user-preview-action.primary {
    background: var(--primary);
    color: white;
}

.user-preview-action.pending {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.user-preview-action.mutual {
    background: linear-gradient(135deg, var(--primary), var(--accent-pink));
    color: white;
}

.user-preview-action.friends {
    background: var(--accent-green);
    color: white;
}

.user-preview-action.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    margin-top: 12px;
}

.user-preview-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.user-preview-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.user-preview-status .status-dot.live {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.user-preview-status .status-dot.offline {
    background: var(--text-muted);
}

.user-preview-status.live {
    color: var(--accent-green);
}

/* Friend Detail Actions */
.friend-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-bottom: 70px;
}

.friend-detail-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.friend-detail-btn:active {
    transform: scale(0.98);
}

.friend-detail-btn .icon {
    width: 20px;
    height: 20px;
}

.friend-detail-btn.favorite {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.friend-detail-btn.favorite.active {
    background: rgba(251, 191, 36, 0.15);
    color: #FBBF24;
}

.friend-detail-btn.favorite.active .icon path {
    fill: #FBBF24;
    stroke: #FBBF24;
}

.friend-detail-btn.message {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.friend-detail-btn.remove {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.friend-detail-btn.remove:active {
    background: rgba(239, 68, 68, 0.2);
}

.user-preview-cancel {
    margin-top: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
}

/* ===== SPINNER ===== */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner.dark {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: var(--text-muted);
}

/* ===== PRIVACY MODE CONTROLS ===== */
.privacy-mode-container {
    padding: 16px 16px 24px;
}

.privacy-mode-group {
    display: grid;
    gap: 12px;
}

.privacy-mode-label {
    cursor: pointer;
    display: block;
}

.privacy-mode-label input[type="radio"] {
    display: none;
}

.privacy-mode-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 2px solid var(--bg-tertiary);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    background: var(--bg-primary);
}

.privacy-mode-label input[type="radio"]:checked + .privacy-mode-option {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.privacy-mode-option:active {
    transform: scale(0.98);
}

.privacy-mode-emoji {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.privacy-mode-text {
    flex: 1;
}

.privacy-mode-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.privacy-mode-desc {
    font-size: 14px;
    color: var(--text-muted);
}

.privacy-mode-status {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease;
}

.privacy-mode-status.loading::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-secondary);
    margin-left: 8px;
    animation: blink 1.4s infinite;
}

@keyframes blink {
    0%, 20%, 50%, 80%, 100% {
        opacity: 1;
    }
    40% {
        opacity: 0.5;
    }
    60% {
        opacity: 0.3;
    }
}

/* ===== DELETE ACCOUNT BUTTON ===== */
.delete-account-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: var(--radius-lg);
    color: var(--danger);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-account-btn:active {
    transform: scale(0.98);
}

.delete-account-btn:hover {
    background: rgba(239, 68, 68, 0.15);
}

.delete-icon {
    font-size: 20px;
}

/* ===== CONFIRMATION DIALOG ===== */
.confirmation-dialog {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: flex-end;
}

.confirmation-dialog.active {
    display: flex;
}

.dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.2s ease;
}

.dialog-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 32px 24px;
    text-align: center;
    width: 100%;
    animation: slideUp 0.3s ease;
}

.dialog-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.dialog-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.dialog-message {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dialog-btn {
    height: 48px;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog-btn:active {
    transform: scale(0.98);
}

.dialog-btn.cancel {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

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

@media (max-width: 380px) {
    .dialog-actions {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   MEDIA MARKERS
   ========================================================================== */

.media-marker-wrapper {
    cursor: pointer;
    transform-origin: bottom center;
    transition: transform 0.3s ease;
}

.media-marker-wrapper:hover {
    transform: scale(1.1);
}

.media-marker-wrapper.pop-in {
    animation: markerPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Spiderfied media markers (anti-collision offset) */
.media-marker-wrapper.spiderfied {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.media-marker-wrapper.spiderfied::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 2px;
    height: 25px;
    background: linear-gradient(to bottom, rgba(139, 92, 246, 0.6) 0%, transparent 100%);
    transform: translateX(-50%) translateY(100%);
    pointer-events: none;
}

.media-marker-container {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 3px solid white;
}

.media-marker-container.voice {
    background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
}

.media-marker-container.video {
    background: linear-gradient(135deg, #EC4899 0%, #F43F5E 100%);
}

.media-marker-icon {
    width: 20px;
    height: 20px;
    color: white;
    z-index: 1;
}

.media-marker-icon svg {
    width: 100%;
    height: 100%;
}

/* Voice marker playing state */
.media-marker-container.voice.playing {
    animation: voicePlaying 0.5s ease-in-out infinite alternate;
}

.media-marker-container.voice.loading {
    opacity: 0.7;
}

@keyframes voicePlaying {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
    }
    100% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 5px rgba(139, 92, 246, 0.6);
    }
}

.media-marker-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    opacity: 0;
    animation: mediaPulse 2s ease-out infinite;
}

@keyframes mediaPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.media-marker-label {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-strong);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   MEDIA PLAYER MODAL
   ========================================================================== */

.media-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-player-modal.visible {
    opacity: 1;
}

.media-player-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.media-player-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.media-player-modal.visible .media-player-content {
    transform: translateY(0);
}

.media-player-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.media-player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.media-player-info {
    flex: 1;
}

.media-player-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
}

.media-player-time {
    font-size: 13px;
    color: var(--text-muted);
}

.media-player-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.media-player-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.media-player-close svg {
    width: 18px;
    height: 18px;
}

.media-player-body {
    min-height: 120px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.media-player-body.voice {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.media-player-body.video {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, rgba(244, 63, 94, 0.1) 100%);
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.voice-player,
.video-player {
    text-align: center;
    padding: 20px;
}

.voice-player-icon,
.video-player-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.voice-player-status,
.video-player-status {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.voice-player-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.voice-play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s ease;
}

.voice-play-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.voice-play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.voice-play-btn svg {
    width: 28px;
    height: 28px;
    margin-left: 3px;
}

.media-player-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.media-player-location,
.media-player-expires {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   VIDEO NOTE MARKER PREVIEW
   ========================================================================== */

.media-marker-container.video {
    overflow: hidden;
}

.media-marker-video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
}

.media-marker-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.media-marker-play-overlay svg {
    width: 10px;
    height: 10px;
    fill: white;
    margin-left: 2px;
}

/* ==========================================================================
   VIDEO NOTE PLAYER (CENTERED CIRCLE)
   ========================================================================== */

.video-note-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-note-modal.visible {
    opacity: 1;
}

.video-note-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    cursor: pointer;
}

.video-note-player-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-note-modal.visible .video-note-player-container {
    transform: scale(1);
}

.video-note-header {
    display: none;
}

.video-note-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.video-note-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.video-note-circle {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.3);
    background: #000;
}

.video-note-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-note-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-note-loading .loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.video-note-close {
    display: none;
}

/* Mobile adjustments */
@media (max-width: 380px) {
    .video-note-circle {
        width: 240px;
        height: 240px;
    }
    
    .video-note-close {
        top: -50px;
        right: -20px;
    }
}

/* ==========================================
   Friend Tags Management Styles
   ========================================== */

/* Friend card action buttons */
.friend-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-left: 0;
}

.friend-card-actions .icon {
    width: 18px;
    height: 18px;
}

.friend-card-favorite-btn.active {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}

.friend-card-icon-btn.loading,
.friend-card-favorite-btn.loading,
.friend-card-tag-btn.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Tag Management Bottom Sheet */
#tagManagementSheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: var(--card-bg);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: var(--shadow-xl);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

#tagManagementSheet.visible {
    transform: translateY(0);
}

.tag-sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1099;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tag-sheet-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

.tag-sheet-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--stroke);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tag-sheet-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.tag-sheet-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.tag-sheet-close:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.tag-sheet-content {
    padding: 12px 0;
    overflow-y: auto;
    flex: 1;
}

/* Tag List */
.tag-list {
    display: flex;
    flex-direction: column;
}

.tag-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    gap: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.tag-item:hover {
    background: var(--bg-secondary);
}

.tag-item:active {
    background: var(--bg-tertiary);
}

.tag-item-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.tag-item-icon.favorites {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.tag-item-icon.custom {
    background: var(--accent-soft);
    color: var(--accent);
}

.tag-item-info {
    flex: 1;
    min-width: 0;
}

.tag-item-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-item-count {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.tag-item-check {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    border: 2px solid var(--stroke-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tag-item.active .tag-item-check {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Create Tag Item */
.tag-item.create-tag {
    border-top: 1px solid var(--stroke);
    margin-top: 8px;
    padding-top: 20px;
}

.tag-item.create-tag .tag-item-icon {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.tag-item.create-tag:hover .tag-item-icon {
    background: var(--accent-soft);
    color: var(--accent);
}

/* Tag Loading State */
.tag-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.tag-item.loading .tag-item-check {
    animation: pulse 1s ease-in-out infinite;
}

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

/* Empty tags state */
.tags-empty {
    padding: 32px 20px;
    text-align: center;
    color: var(--text-muted);
}

.tags-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.tags-empty-text {
    font-size: 15px;
    line-height: 1.5;
}

/* Tag colors for custom tags */
.tag-item-icon[data-color="blue"] {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.tag-item-icon[data-color="green"] {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.tag-item-icon[data-color="purple"] {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.tag-item-icon[data-color="pink"] {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

.tag-item-icon[data-color="orange"] {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.tag-item-icon[data-color="cyan"] {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
}

/* Handle indicator for bottom sheet */
.tag-sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--stroke-strong);
    border-radius: var(--radius-full);
    margin: 8px auto;
}

/* Responsive adjustments */
@media (max-width: 380px) {
    .friend-card-favorite-btn,
    .friend-card-tag-btn {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .tag-item {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .tag-item-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .tag-item-name {
        font-size: 15px;
    }
}

/* =============================================================================
   SAVED PLACES STYLES
   ============================================================================= */

/* Saved Places Button on Map */
.saved-places-btn {
    position: fixed;
    bottom: calc(var(--nav-height) + 20px + var(--safe-bottom));
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--glass-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 50;
    transition: all 0.2s ease;
}

.saved-places-btn:hover,
.saved-places-btn:active {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.saved-places-btn .places-icon {
    font-size: 22px;
}

/* Current Visit Duration Badge */
.current-visit-badge {
    position: fixed;
    bottom: calc(var(--nav-height) + 80px + var(--safe-bottom));
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--accent);
    color: var(--accent-contrast);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    font-size: 14px;
    font-weight: 600;
    z-index: 50;
    animation: fadeInUp 0.3s ease;
}

.current-visit-badge .visit-icon {
    font-size: 14px;
}

.current-visit-badge .visit-duration {
    min-width: 40px;
    text-align: center;
}

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

/* Places Page Tabs */
.places-page-tabs {
    display: flex;
    gap: 8px;
    margin: 0 16px 16px;
    padding: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.places-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.places-tab.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* Places Actions */
.places-actions {
    padding: 0 16px 16px;
}

/* Places List in Page */
.saved-places-list.page-list {
    padding: 0 16px;
    max-height: none;
    overflow-y: visible;
    flex: 1;
}

/* Places Footer */
.places-footer {
    padding: 16px;
    background: var(--bg-primary);
    border-top: 1px solid var(--stroke);
    position: sticky;
    bottom: 0;
}

/* Save Current Location Button */
.save-current-location-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: var(--accent-soft);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.save-current-location-btn:hover,
.save-current-location-btn:active {
    background: var(--accent-strong);
}

/* Saved Places List */
.saved-places-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 45vh;
    overflow-y: auto;
    padding-bottom: 16px;
}

/* Place Card */
.place-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.place-card:hover,
.place-card:active {
    background: var(--bg-tertiary);
}

.place-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.place-card-info {
    flex: 1;
    min-width: 0;
}

.place-card-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.place-card-name.unnamed {
    color: var(--text-muted);
    font-style: italic;
}

.place-card-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-muted);
}

.place-card-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.place-card-favorite {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.place-card-favorite:hover {
    background: var(--accent-soft);
}

.place-card-favorite.active {
    color: #fbbf24;
}

/* Detect Frequent Places Button */
.detect-places-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.detect-places-btn:hover,
.detect-places-btn:active {
    background: var(--bg-tertiary);
}

/* Place Detail Sheet */
.place-detail {
    padding: 8px 0;
}

.place-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.place-detail-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.place-detail-name {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease;
}

.place-detail-name:focus {
    border-color: var(--accent);
}

.place-detail-name::placeholder {
    color: var(--text-muted);
}

.place-detail-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.place-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.place-stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.place-stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.place-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.place-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.place-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.place-action-btn:hover,
.place-action-btn:active {
    background: var(--bg-tertiary);
}

.place-action-btn.delete {
    color: var(--danger);
}

.place-action-btn.navigate {
    color: var(--accent);
}

.place-save-btn {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-contrast);
    cursor: pointer;
    transition: all 0.2s ease;
}

.place-save-btn:hover,
.place-save-btn:active {
    opacity: 0.9;
}

/* Empty state for places */
.saved-places-list .empty-state {
    padding: 40px 20px;
}

.saved-places-list .empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.saved-places-list .empty-state-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.saved-places-list .empty-state-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}