/* =====================
   Reset & Base
   ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg: #0a0a0a;
    --bg2: #141414;
    --bg3: #1e1e1e;
    --border: #2a2a2a;
    --accent: #f4a020;
    --accent2: #e8890d;
    --text: #f0f0f0;
    --text2: #aaaaaa;
    --danger: #e05252;
    --success: #4caf50;
    --panel-height: 60vh;
    --nav-height: 65px;
    --top-bar-height: 52px;
}

[data-theme="light"] {
    --bg: #f5f5f5;
    --bg2: #ffffff;
    --bg3: #e8e8e8;
    --border: #d0d0d0;
    --accent: #e8890d;
    --accent2: #d47a0a;
    --text: #1a1a1a;
    --text2: #666666;
    --danger: #d32f2f;
    --success: #388e3c;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    -webkit-touch-callout: none;
}

/* Prevent iOS keyboard zoom on all inputs */
input, textarea, select {
    font-size: 16px !important;
}


/* =====================
   Splash Screen
   ===================== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(160deg, #0a2a3f 0%, #1a5276 50%, #0a2a3f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    text-align: center;
}

.splash-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    animation: splashBounce 1.5s ease-in-out infinite;
}

@keyframes splashBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.splash-title {
    font-size: 22px;
    font-weight: 700;
    color: #f4a020;
    margin-top: 16px;
}

.splash-loader {
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    margin: 20px auto 0;
    overflow: hidden;
}

.splash-loader::after {
    content: '';
    display: block;
    width: 50%;
    height: 100%;
    background: #f4a020;
    border-radius: 2px;
    animation: splashLoad 1s ease-in-out infinite;
}

@keyframes splashLoad {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* =====================
   Screens
   ===================== */
#app {
    height: 100%;
    width: 100%;
    position: relative;
}

.screen {
    display: none;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.screen.active {
    display: flex;
}

/* =====================
   Login Screen
   ===================== */
#login-screen {
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%);
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 340px;
    padding: 32px 24px;
}

.logo-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 8px;
}

.login-container h1 {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: var(--accent);
    margin-bottom: 8px;
}

.login-container input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.login-container input:focus {
    border-color: var(--accent);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--accent2);
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: var(--text2);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.error {
    color: var(--danger);
    font-size: 13px;
    text-align: center;
    min-height: 18px;
}

/* =====================
   Group Screen
   ===================== */
#group-screen {
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%);
}

.group-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 340px;
    padding: 32px 24px;
}

.group-container h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
}

.group-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
}

.group-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.group-item:hover {
    border-color: var(--accent);
}

.group-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.group-item-members {
    font-size: 12px;
    color: var(--text2);
}

.group-divider {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
}

.group-divider::before,
.group-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.group-divider span {
    font-size: 13px;
    color: var(--text2);
}

/* =====================
   Main Screen
   ===================== */
#main-screen {
    flex-direction: column;
    position: relative;
}

/* =====================
   Map
   ===================== */
#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* =====================
   Top Bar
   ===================== */
.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-bar-height);
    background: var(--bg);
    opacity: 0.95;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.app-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-label {
    font-size: 13px;
    color: var(--text2);
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text2);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: var(--danger);
}

/* =====================
   Hamburger Menu
   ===================== */
/* =====================
   PTT Call Banner
   ===================== */
.ptt-call-banner {
    position: fixed;
    top: calc(var(--top-bar-height) + 4px);
    left: 8px;
    right: 8px;
    background: var(--accent);
    color: #000;
    padding: 12px 16px;
    border-radius: 12px;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(244, 160, 32, 0.5);
    animation: callPulse 1s ease-in-out infinite;
}

.ptt-call-banner.hidden {
    display: none;
}

@keyframes callPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(244, 160, 32, 0.4); }
    50% { box-shadow: 0 0 25px rgba(244, 160, 32, 0.8); }
}

#ptt-call-text {
    flex: 1;
}

.ptt-call-banner .btn-small {
    background: #000;
    color: var(--accent);
    font-size: 12px;
}

/* =====================
   SOS Button & Modal
   ===================== */
.sos-btn {
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    letter-spacing: 1px;
}

.sos-cancel-btn {
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 900;
    cursor: pointer;
    animation: sosPulse 1s ease-in-out infinite;
}

.sos-cancel-btn.hidden {
    display: none;
}

.sos-modal-content {
    text-align: center;
}

.sos-warning {
    font-size: 48px;
    margin-bottom: 4px;
}

.sos-coords {
    font-size: 13px;
    color: var(--text2);
    background: var(--bg3);
    padding: 8px;
    border-radius: 8px;
    margin: 8px 0;
}

.btn-sos {
    width: 100%;
    padding: 16px;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    letter-spacing: 2px;
    animation: sosPulse 1s ease-in-out infinite;
}

@keyframes sosPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(224, 82, 82, 0.4); }
    50% { box-shadow: 0 0 25px rgba(224, 82, 82, 0.8); }
}

.sos-active-banner {
    position: fixed;
    top: calc(var(--top-bar-height) + 4px);
    left: 8px;
    right: 8px;
    background: var(--danger);
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(224, 82, 82, 0.5);
    animation: sosPulse 1.5s ease-in-out infinite;
}

.sos-active-banner.hidden {
    display: none;
}

.sos-active-banner .btn-small {
    font-size: 11px;
    padding: 4px 10px;
}

/* =====================
   Water Level
   ===================== */
.water-search-row {
    display: flex;
    gap: 8px;
}

.water-search-row input {
    flex: 1;
}

.water-results {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.water-station-item {
    padding: 10px 12px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.water-station-item:hover {
    border-color: var(--accent);
}

.water-station-name {
    font-size: 13px;
    font-weight: 600;
}

.water-station-dist {
    font-size: 11px;
    color: var(--text2);
}

.water-data.hidden {
    display: none;
}

.water-station-info {
    background: var(--bg3);
    border-radius: 10px;
    padding: 12px;
    margin: 8px 0;
}

.water-station-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.water-readings {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.water-reading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg3);
    border-radius: 8px;
}

.water-reading-label {
    font-size: 13px;
    color: var(--text2);
}

.water-reading-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.hamburger-btn {
    font-size: 22px;
    color: var(--text);
}

.hamburger-menu {
    position: absolute;
    top: var(--top-bar-height);
    right: 0;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 0 0 12px 12px;
    min-width: 220px;
    max-height: calc(100vh - var(--top-bar-height) - var(--nav-height));
    z-index: 150;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    animation: menuSlide 0.15s ease;
    overflow-y: auto;
}

.hamburger-menu.hidden {
    display: none;
}

@keyframes menuSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}

.menu-item:hover {
    background: var(--bg3);
}

.menu-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.menu-text {
    flex: 1;
}

.menu-status {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg3);
    color: var(--text2);
}

.menu-item.waterway-active .menu-status,
.menu-item.topo-active .menu-status {
    background: rgba(79, 195, 247, 0.2);
    color: #4fc3f7;
}

.menu-item.topo-active .menu-status {
    background: rgba(129, 199, 132, 0.2);
    color: #81c784;
}

.menu-item.trails-active .menu-status {
    background: rgba(255, 183, 77, 0.2);
    color: #ffb74d;
}

.menu-item.hillshade-active .menu-status {
    background: rgba(186, 139, 99, 0.2);
    color: #d4a574;
}

.menu-arrow {
    font-size: 14px;
    color: var(--text2);
    transition: transform 0.2s;
}

.menu-arrow.open {
    transform: rotate(90deg);
}

.sub-menu {
    background: var(--bg3);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    max-height: 50vh;
    overflow-y: auto;
}

.sub-menu.hidden {
    display: none;
}

.sub-menu-item {
    padding-left: 36px !important;
    padding-top: 16px !important;
    padding-bottom: 16px !important;
    font-size: 13px !important;
    min-height: 48px;
}

.menu-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.menu-item-danger {
    color: var(--danger);
}

.menu-item-danger:hover {
    background: rgba(224, 82, 82, 0.1);
}

/* =====================
   FAB Button
   ===================== */
.fab {
    position: absolute;
    right: 16px;
    bottom: calc(var(--nav-height) + 16px);
    width: 52px;
    height: 52px;
    background: var(--accent);
    border: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(244, 160, 32, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(244, 160, 32, 0.5);
}

/* =====================
   Drop Pin Overlay
   ===================== */
/* =====================
   Weather Widget
   ===================== */
/* =====================
   Solunar / Fish Activity
   ===================== */
.solunar-rating {
    text-align: center;
    padding: 16px;
    background: var(--bg3);
    border-radius: 12px;
    margin-bottom: 12px;
}

.solunar-rating-stars {
    font-size: 28px;
    letter-spacing: 4px;
}

.solunar-rating-label {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    margin-top: 4px;
}

.solunar-rating-desc {
    font-size: 12px;
    color: var(--text2);
    margin-top: 2px;
}

.solunar-moon {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg3);
    border-radius: 10px;
    margin-bottom: 12px;
}

.solunar-moon-icon {
    font-size: 36px;
}

.solunar-moon-info {
    display: flex;
    flex-direction: column;
}

.solunar-moon-phase {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.solunar-moon-pct {
    font-size: 12px;
    color: var(--text2);
}

.solunar-periods {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.solunar-period {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--bg3);
}

.solunar-period.major {
    border-left: 3px solid var(--accent);
}

.solunar-period.minor {
    border-left: 3px solid var(--text2);
}

.solunar-period-type {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.solunar-period.major .solunar-period-type {
    color: var(--accent);
}

.solunar-period.minor .solunar-period-type {
    color: var(--text2);
}

.solunar-period-time {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.solunar-period-duration {
    font-size: 11px;
    color: var(--text2);
}

.solunar-sun {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    background: var(--bg3);
    border-radius: 10px;
    margin-bottom: 12px;
}

.solunar-sun-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.solunar-sun-icon {
    font-size: 20px;
}

.solunar-sun-time {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.solunar-sun-label {
    font-size: 10px;
    color: var(--text2);
}

.solunar-forecast {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.solunar-forecast-day {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg3);
    border-radius: 8px;
}

.solunar-forecast-name {
    font-size: 13px;
    font-weight: 600;
    min-width: 40px;
}

.solunar-forecast-moon {
    font-size: 18px;
}

.solunar-forecast-stars {
    font-size: 14px;
    letter-spacing: 2px;
}

.solunar-forecast-label {
    font-size: 12px;
    font-weight: 600;
    min-width: 50px;
    text-align: right;
}

/* =====================
   Trip Planner
   ===================== */
.trip-panel-actions {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.trip-panel-actions .btn-primary {
    width: 100%;
}

.trip-location-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trip-coords {
    flex: 1;
    font-size: 12px;
    color: var(--text2);
}

.btn-small {
    padding: 6px 12px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.checklist-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.checklist-custom-row {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.checklist-custom-row input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    outline: none;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg3);
    border-radius: 6px;
    font-size: 13px;
}

.checklist-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 16px;
    cursor: pointer;
}

.trip-details {
    background: var(--bg3);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trip-detail-row {
    display: flex;
    gap: 8px;
    font-size: 14px;
}

.trip-detail-icon {
    min-width: 22px;
    text-align: center;
}

.trip-detail-text {
    color: var(--text);
}

.checklist-view {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.checklist-view-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg3);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.checklist-view-item.checked {
    opacity: 0.5;
    text-decoration: line-through;
}

.checklist-checkbox {
    font-size: 16px;
}

.trip-attendees {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.trip-attendee {
    padding: 4px 10px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text);
}

.trip-attendee.going {
    border-color: var(--success);
    color: var(--success);
}

.trip-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.trip-card:hover {
    border-color: var(--accent);
}

.trip-card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.trip-card-date {
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 4px;
}

.trip-card-info {
    font-size: 12px;
    color: var(--text2);
}

.trip-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.trip-card-attendees {
    font-size: 12px;
    color: var(--text2);
}

.trip-card-actions {
    display: flex;
    gap: 6px;
}

/* =====================
   Catches / Personal Best
   ===================== */
.catches-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

.catches-tab {
    flex: 1;
    padding: 8px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text2);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.catches-tab.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.catches-add-row {
    padding: 12px;
    border-top: 1px solid var(--border);
}

.catches-add-row .btn-primary {
    width: 100%;
}

.catch-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.catch-card-photo {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
}

.catch-card-body {
    padding: 12px;
}

.catch-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.catch-card-species {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.catch-card-pb {
    font-size: 14px;
}

.catch-card-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 6px;
}

.catch-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.catch-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

.catch-stat-label {
    font-size: 10px;
    color: var(--text2);
}

.catch-card-meta {
    font-size: 11px;
    color: var(--text2);
    display: flex;
    justify-content: space-between;
}

.catch-pb-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text);
}

.catch-pb-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
}

.leaderboard-rank {
    font-size: 24px;
    min-width: 36px;
    text-align: center;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.leaderboard-catch {
    font-size: 12px;
    color: var(--text2);
}

.leaderboard-weight {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

/* =====================
   Regulations & Knots
   ===================== */
/* =====================
   Activity Feed
   ===================== */
.activity-feed-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--bg3);
}

.activity-icon {
    font-size: 18px;
    min-width: 24px;
    text-align: center;
}

.activity-text {
    flex: 1;
    font-size: 13px;
    color: var(--text);
}

.activity-time {
    font-size: 10px;
    color: var(--text2);
    white-space: nowrap;
}

.import-status {
    font-size: 13px;
    color: var(--success);
    text-align: center;
    padding: 8px 0;
    min-height: 20px;
}

.regs-content {
    margin-top: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.regs-card {
    background: var(--bg3);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 8px;
}

.regs-card h4 {
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 6px;
}

.regs-card p {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
}

.regs-link {
    display: block;
    margin-top: 12px;
    padding: 12px;
    background: var(--accent);
    color: #000;
    text-align: center;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.knots-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.knot-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.knot-card:hover {
    border-color: var(--accent);
}

.knot-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.knot-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.knot-card-use {
    font-size: 11px;
    color: var(--accent);
    background: var(--bg2);
    padding: 2px 8px;
    border-radius: 4px;
}

.knot-card p {
    font-size: 12px;
    color: var(--text2);
    line-height: 1.4;
}

.knot-steps {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.knot-steps.hidden {
    display: none;
}

.knot-step {
    display: flex;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text);
}

.knot-step-num {
    min-width: 24px;
    height: 24px;
    background: var(--accent);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.knot-difficulty {
    font-size: 11px;
}

.weather-current-detail {
    background: var(--bg3);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.weather-detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.weather-detail-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.weather-detail-label {
    font-size: 10px;
    color: var(--text2);
}

.weather-forecast {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.forecast-day {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg3);
    border-radius: 8px;
}

.forecast-day-name {
    font-size: 13px;
    font-weight: 600;
    min-width: 40px;
}

.forecast-day-icon {
    font-size: 20px;
}

.forecast-day-temps {
    font-size: 13px;
}

.forecast-day-high {
    font-weight: 700;
    color: var(--text);
}

.forecast-day-low {
    color: var(--text2);
}

.forecast-day-wind {
    font-size: 11px;
    color: var(--text2);
    min-width: 60px;
    text-align: right;
}

.drop-pin-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 250;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.drop-pin-overlay.hidden {
    display: none;
}

.drop-pin-crosshair {
    font-size: 40px;
    margin-bottom: -20px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    animation: pinBounce 0.4s ease;
}

@keyframes pinBounce {
    0% { transform: translateY(-30px); opacity: 0; }
    60% { transform: translateY(5px); }
    100% { transform: translateY(0); opacity: 1; }
}

.drop-pin-hint {
    background: rgba(10, 10, 10, 0.85);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 30px;
}

.drop-pin-actions {
    position: absolute;
    bottom: calc(var(--nav-height) + 16px);
    display: flex;
    gap: 10px;
    pointer-events: all;
    padding: 0 24px;
    width: 100%;
    max-width: 360px;
}

.drop-pin-actions .btn-primary,
.drop-pin-actions .btn-secondary {
    flex: 1;
    padding: 14px;
}

.fab-compass {
    bottom: calc(var(--nav-height) + 140px);
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: 24px;
    width: 44px;
    height: 44px;
}

.fab-compass.active {
    background: transparent;
    border: none;
    filter: drop-shadow(0 0 6px var(--accent));
}

.fab-record {
    bottom: calc(var(--nav-height) + 78px);
    left: 16px;
    right: auto;
    background: var(--bg2);
    border: 2px solid var(--danger);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    font-size: 20px;
    width: 48px;
    height: 48px;
}

.fab-record.recording {
    background: var(--danger);
    animation: recordPulse 1.5s ease-in-out infinite;
    border-color: #fff;
}

@keyframes recordPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(224, 82, 82, 0.4); }
    50% { box-shadow: 0 0 20px rgba(224, 82, 82, 0.8); }
}

.fab-refresh {
    bottom: calc(var(--nav-height) + 78px);
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: 24px;
    width: 44px;
    height: 44px;
}

.fab-refresh.spinning {
    animation: spin 0.6s ease;
}

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

/* =====================
   Bottom Navigation
   ===================== */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--bg);
    opacity: 0.95;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    border-top: 1px solid var(--border);
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text2);
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s;
}

.nav-btn.active {
    color: var(--accent);
}

.nav-icon {
    font-size: 22px;
    position: relative;
    display: inline-block;
}

.chat-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.chat-badge.hidden {
    display: none;
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
}

/* =====================
   More Panel
   ===================== */
.more-panel {
    position: absolute;
    bottom: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg2);
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    z-index: 200;
    padding: 16px;
    animation: slideUp 0.2s ease;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
}

.more-panel.hidden {
    display: none;
}

.more-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.more-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 8px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.more-item:hover,
.more-item:active {
    border-color: var(--accent);
    background: var(--bg);
}

.more-icon {
    font-size: 28px;
}

.more-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

/* =====================
   Panels
   ===================== */
.panel {
    position: absolute;
    bottom: var(--nav-height);
    left: 0;
    right: 0;
    height: var(--panel-height);
    background: var(--bg2);
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.25s ease;
}

.panel.hidden {
    display: none;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

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

.panel-header h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--accent);
}

.panel-close {
    background: none;
    border: none;
    color: var(--text2);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
}

/* =====================
   Spots List
   ===================== */
.scroll-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.spot-distance {
    font-size: 11px;
    font-weight: 400;
    color: var(--text2);
    margin-left: 6px;
}

.spot-marker-dist {
    font-size: 11px;
    opacity: 0.7;
}

.buddy-online-dist {
    font-size: 10px;
    color: var(--text2);
    white-space: nowrap;
}

.measure-display {
    position: absolute;
    bottom: calc(var(--nav-height) + 16px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg2);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 10px 16px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.measure-display.hidden {
    display: none;
}

.spot-group-header {
    padding: 10px 14px 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
    margin-top: 4px;
}

.spot-group-count {
    font-size: 12px;
    font-weight: 400;
    color: var(--text2);
}

.spot-item {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.spot-item:hover {
    border-color: var(--accent);
}

.spot-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.spot-info p {
    font-size: 12px;
    color: var(--text2);
}

.spot-actions {
    display: flex;
    gap: 8px;
}

.btn-goto {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.btn-photos {
    background: transparent;
    color: var(--text2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-photos.has-photos {
    color: #4fc3f7;
    border-color: #4fc3f7;
    box-shadow: 0 0 8px rgba(79, 195, 247, 0.5);
    animation: photoGlow 2s ease-in-out infinite;
}

@keyframes photoGlow {
    0%, 100% { box-shadow: 0 0 6px rgba(79, 195, 247, 0.3); }
    50% { box-shadow: 0 0 12px rgba(79, 195, 247, 0.7); }
}

.btn-nav {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.btn-edit {
    background: transparent;
    color: #4fc3f7;
    border: 1px solid #4fc3f7;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}

.btn-delete {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}

/* =====================
   Chat
   ===================== */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
}

.chat-bubble.mine {
    background: var(--accent);
    color: #000;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-bubble.theirs {
    background: var(--bg3);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-bubble .bubble-time {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 4px;
    text-align: right;
}

.chat-bubble .bubble-sender {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 3px;
    opacity: 0.7;
}

.chat-input-row {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border);
}

.chat-input-row input {
    flex: 1;
    padding: 12px 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    outline: none;
}

.chat-input-row input:focus {
    border-color: var(--accent);
}

.sos-bubble {
    background: var(--danger) !important;
    color: #fff !important;
    max-width: 85% !important;
    align-self: center !important;
    border-radius: 14px !important;
}

.btn-sos-locate {
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.system-bubble {
    background: transparent !important;
    color: var(--text2) !important;
    font-size: 12px !important;
    text-align: center !important;
    align-self: center !important;
    max-width: 100% !important;
    padding: 4px 8px !important;
}

.ping-bubble {
    background: var(--accent) !important;
    color: #000 !important;
    max-width: 85% !important;
    align-self: center !important;
    border-radius: 14px !important;
}

.map-share-bubble {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.map-share-title {
    font-weight: 700;
    font-size: 14px;
}

.map-share-info {
    font-size: 12px;
    opacity: 0.7;
}

.map-share-view,
.map-share-download {
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.map-share-view {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
}

.map-share-download {
    background: #4caf50;
    color: #fff;
}

.btn-send {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 18px;
    cursor: pointer;
}

/* =====================
   Push To Talk
   ===================== */
.ptt-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px;
}

.ptt-status {
    font-size: 14px;
    color: var(--text2);
    font-weight: 600;
}

.ptt-btn {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--bg3);
    border: 3px solid var(--accent);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s;
    -webkit-user-select: none;
    user-select: none;
}

.ptt-btn:active,
.ptt-btn.talking {
    background: var(--accent);
    transform: scale(0.96);
    box-shadow: 0 0 30px rgba(244, 160, 32, 0.5);
}

.ptt-btn:active .ptt-label,
.ptt-btn.talking .ptt-label {
    color: #000;
}

.ptt-icon {
    font-size: 40px;
}

.ptt-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text2);
}

.buddies-talking {
    font-size: 14px;
    color: var(--success);
    font-weight: 600;
    min-height: 20px;
}

/* =====================
   Add Spot Modal
   ===================== */
.modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 24px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.modal-content input,
.modal-content textarea {
    padding: 12px 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.modal-content textarea {
    min-height: 80px;
    resize: vertical;
}

.modal-content input:focus,
.modal-content textarea:focus {
    border-color: var(--accent);
}

/* =====================
   Route & Download Styles
   ===================== */
.route-stats {
    font-size: 13px;
    color: var(--text2);
    padding: 8px 0;
}

.route-label {
    background: transparent;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    text-shadow: -1px -1px 2px #000, 1px -1px 2px #000, -1px 1px 2px #000, 1px 1px 2px #000;
}

.route-start-label {
    color: #4caf50;
}

.route-end-label {
    color: #e05252;
}

.route-item {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.route-item:hover {
    border-color: var(--accent);
}

.route-item h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.route-item p {
    font-size: 12px;
    color: var(--text2);
}

.route-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.zoom-range {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
}

.zoom-range select {
    padding: 8px 12px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    outline: none;
}

.download-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.download-progress.hidden {
    display: none;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.2s;
}

.progress-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text2);
    min-width: 40px;
}

/* =====================
   PTT Toast Notification
   ===================== */
.ptt-toast {
    position: fixed;
    top: calc(var(--top-bar-height) + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    background: var(--bg2);
    border: 1px solid var(--accent);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    z-index: 500;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.ptt-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.recording-indicator {
    position: absolute;
    top: calc(var(--top-bar-height) + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--danger);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 100;
    animation: recordPulse 1.5s ease-in-out infinite;
}

/* =====================
   Navigation Panel
   ===================== */
.nav-summary {
    padding: 12px 20px;
    background: var(--bg3);
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 20px;
    font-size: 14px;
}

.nav-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.nav-stat-label {
    font-size: 11px;
    color: var(--text2);
}

.nav-step {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}

.nav-step.active {
    background: rgba(244, 160, 32, 0.1);
    border-left: 3px solid var(--accent);
}

.nav-step-icon {
    font-size: 20px;
    min-width: 28px;
    text-align: center;
}

.nav-step-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.nav-step-dist {
    font-size: 12px;
    color: var(--text2);
    min-width: 50px;
    text-align: right;
}

.panel-close-nav {
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.nav-start-marker,
.nav-end-marker {
    font-size: 24px;
    text-align: center;
}

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

/* =====================
   Spot Detail & Photos
   ===================== */
.spot-detail-content {
    max-height: 80vh;
    overflow-y: auto;
}

.spot-detail-coords {
    font-size: 12px;
    color: var(--text2);
    margin-bottom: 8px;
}

.spot-detail-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.spot-tab {
    flex: 1;
    padding: 10px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text2);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.spot-tab.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.spot-tab-content.hidden {
    display: none;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 12px;
    min-height: 60px;
}

.photo-thumb {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text2);
    font-size: 13px;
    padding: 20px;
}

.reports-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 60px;
}

.report-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
}

.report-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.report-card-user {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

.report-card-date {
    font-size: 11px;
    color: var(--text2);
}

.report-card-photo {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.report-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.report-tag {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    color: var(--text);
}

.report-caption {
    font-size: 13px;
    color: var(--text);
    margin-top: 6px;
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    padding: 6px 12px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text2);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.chip.selected {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    font-weight: 700;
}

.file-input {
    width: 100%;
    padding: 10px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
}

.select-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    -webkit-appearance: none;
}

.select-input:focus {
    border-color: var(--accent);
}

/* Photo Viewer */
.photo-viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-viewer img {
    max-width: 95%;
    max-height: 90%;
    object-fit: contain;
}

.photo-viewer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

/* =====================
   Saved Maps
   ===================== */
.saved-maps-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.saved-map-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.saved-map-item:hover {
    border-color: var(--accent);
}

.saved-map-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.saved-map-info p {
    font-size: 11px;
    color: var(--text2);
}

.saved-map-actions {
    display: flex;
    gap: 6px;
}

.cache-stats {
    font-size: 12px;
    color: var(--text2);
    text-align: center;
    padding: 8px 0;
}

.saved-maps-empty {
    text-align: center;
    color: var(--text2);
    font-size: 13px;
    padding: 20px;
}

.field-label {
    font-size: 12px;
    color: var(--text2);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.success-msg {
    color: var(--success);
    font-size: 13px;
    text-align: center;
    min-height: 18px;
}

.modal-coords {
    font-size: 12px;
    color: var(--text2);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    flex: 1;
}

/* =====================
   Leaflet Overrides
   ===================== */
.leaflet-container {
    background: #1a1a1a;
}

.leaflet-control-zoom a {
    background: var(--bg2) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

/* =====================
   Buddies Online Widget
   ===================== */
.buddies-online-widget {
    position: absolute;
    top: calc(var(--top-bar-height) + 100px);
    left: 8px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    z-index: 100;
    min-width: 130px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.buddies-online-widget.hidden {
    display: none;
}

.buddies-online-header {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    padding: 8px 10px 4px;
    border-bottom: 1px solid var(--border);
}

.buddies-online-list {
    padding: 4px 0;
}

.buddy-online-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 12px;
    color: var(--text);
    cursor: pointer;
}

.buddy-online-item:hover {
    background: var(--bg3);
}

.buddy-online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4caf50;
    flex-shrink: 0;
}

.buddy-online-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.buddies-online-empty {
    padding: 8px 10px;
    font-size: 11px;
    color: var(--text2);
}

.leaflet-top {
    top: calc(var(--top-bar-height) + 8px) !important;
}

/* =====================
   Spot Cluster Bubbles
   ===================== */
.spot-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 2px 10px rgba(79, 195, 247, 0.4);
}

.spot-cluster-small {
    width: 36px;
    height: 36px;
    font-size: 13px;
    background: rgba(79, 195, 247, 0.85);
    border: 2px solid rgba(79, 195, 247, 1);
}

.spot-cluster-medium {
    width: 44px;
    height: 44px;
    font-size: 15px;
    background: rgba(41, 121, 255, 0.85);
    border: 2px solid rgba(41, 121, 255, 1);
    box-shadow: 0 2px 14px rgba(41, 121, 255, 0.5);
}

.spot-cluster-large {
    width: 52px;
    height: 52px;
    font-size: 17px;
    background: rgba(25, 80, 200, 0.85);
    border: 2px solid rgba(25, 80, 200, 1);
    box-shadow: 0 2px 18px rgba(25, 80, 200, 0.5);
}

/* Override default markercluster styles */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background: none !important;
}

.marker-cluster div {
    background: none !important;
}

.spot-marker-label {
    background: transparent;
    color: var(--accent);
    padding: 3px 8px;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    text-shadow: -1px -1px 2px #000, 1px -1px 2px #000, -1px 1px 2px #000, 1px 1px 2px #000;
}

/* =====================
   My Position Marker
   ===================== */
.my-marker {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.my-marker-dot {
    width: 16px;
    height: 16px;
    background: #4fc3f7;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.6), 0 0 20px rgba(79, 195, 247, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.my-marker-label {
    position: absolute;
    top: 22px;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid #4fc3f7;
    color: #4fc3f7;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(79, 195, 247, 0.6), 0 0 20px rgba(79, 195, 247, 0.3); }
    50% { box-shadow: 0 0 16px rgba(79, 195, 247, 0.8), 0 0 30px rgba(79, 195, 247, 0.5); }
}

/* =====================
   Buddy Position Marker
   ===================== */
.buddy-marker {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.buddy-marker-dot {
    width: 14px;
    height: 14px;
    background: #4caf50;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

.buddy-marker-name {
    position: absolute;
    top: 20px;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid #4caf50;
    color: #4caf50;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
