/* ════════════════════════════════════════════════════
   MACROINVERTEBRADOS AR — styles.css
   ════════════════════════════════════════════════════ */
:root {
    --agua:  #48cae4;
    --crema: #f8f4ef;
    --texto: #1a1a1a;
    --muted: #6b7280;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; margin: 0; overflow: hidden; background: #000; }

/* ── HUD superior ──────────────────────────────────── */
#hud-top {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9000;
    padding: 14px 20px 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.65), transparent);
    display: flex; align-items: center; gap: 12px;
}
#hud-top .logo {
    font-family: 'Syne', sans-serif; font-weight: 700;
    font-size: 15px; color: #fff; letter-spacing: 0.04em; line-height: 1.2;
}
#hud-top .logo span {
    display: block; font-weight: 400; font-size: 11px;
    color: var(--agua); letter-spacing: 0.1em; text-transform: uppercase;
}
#badge-activo {
    margin-left: auto; display: none;
    background: rgba(255,255,255,0.12); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2); border-radius: 20px;
    padding: 5px 14px; font-size: 12px; color: rgba(255,255,255,0.85);
}

/* ── Navegación ← → ────────────────────────────────── */
#nav-modelos {
    position: fixed; bottom: 28px; left: 0; right: 0; z-index: 9100;
    display: flex; align-items: center; justify-content: center; gap: 16px;
    pointer-events: none;
}
.btn-nav {
    pointer-events: auto;
    width: 50px; height: 50px; border-radius: 50%; border: none;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff; font-size: 22px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.btn-nav:active { background: rgba(72,202,228,0.35); transform: scale(0.92); }
#nav-nombre {
    background: rgba(0,0,0,0.55); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.18); border-radius: 20px;
    padding: 8px 18px; color: #fff;
    font-family: 'Syne', sans-serif; font-size: 12px; letter-spacing: 0.04em;
    text-align: center; max-width: 190px; line-height: 1.3;
    pointer-events: none;
}
#nav-contador {
    display: block; font-family: 'DM Sans', sans-serif;
    font-size: 11px; color: var(--agua); margin-top: 3px; letter-spacing: 0.08em;
}

/* ── Guía de marcador ──────────────────────────────── */
#guia-marcador {
    position: fixed; bottom: 110px; left: 50%;
    transform: translateX(-50%); z-index: 9000;
    text-align: center; pointer-events: none; transition: opacity 0.5s;
}
#guia-marcador .marco {
    width: 160px; height: 160px;
    border: 2px solid rgba(255,255,255,0.35);
    border-radius: 16px; margin: 0 auto 12px; position: relative;
    animation: pulsoMarco 2s ease-in-out infinite;
}
#guia-marcador .marco::before,
#guia-marcador .marco::after {
    content: ''; position: absolute;
    width: 26px; height: 26px; border-color: var(--agua); border-style: solid;
}
#guia-marcador .marco::before {
    top: -2px; left: -2px; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0;
}
#guia-marcador .marco::after {
    bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0;
}
@keyframes pulsoMarco { 0%,100%{opacity:.45} 50%{opacity:1} }
#guia-marcador p { font-size: 12px; color: rgba(255,255,255,0.65); letter-spacing: 0.06em; }

/* ── Notificación ──────────────────────────────────── */
#notif {
    position: fixed; top: 68px; left: 50%;
    transform: translateX(-50%) translateY(-16px);
    background: rgba(0,0,0,0.72); backdrop-filter: blur(10px);
    color: #fff; padding: 8px 18px; border-radius: 20px;
    font-size: 13px; opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 9100; white-space: nowrap; pointer-events: none;
}
#notif.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Cruceta shooter ───────────────────────────────── */
#crosshair {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 8800; pointer-events: none;
    width: 36px; height: 36px; transition: opacity 0.2s;
}
#crosshair::before, #crosshair::after {
    content: ''; position: absolute;
    background: rgba(255,255,255,0.88); border-radius: 2px;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
}
#crosshair::before { width: 14px; height: 2px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
#crosshair::after  { width: 2px; height: 14px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
#crosshair .dot {
    position: absolute; width: 3px; height: 3px;
    background: var(--agua); border-radius: 50%;
    top: 50%; left: 50%; transform: translate(-50%,-50%);
    box-shadow: 0 0 6px var(--agua); transition: transform 0.15s, box-shadow 0.15s;
}
#crosshair .corner {
    position: absolute; width: 7px; height: 7px;
    border-color: rgba(72,202,228,0.82); border-style: solid;
}
#crosshair .corner.tl { top: 0;    left: 0;   border-width: 2px 0 0 2px; }
#crosshair .corner.tr { top: 0;    right: 0;  border-width: 2px 2px 0 0; }
#crosshair .corner.bl { bottom: 0; left: 0;   border-width: 0 0 2px 2px; }
#crosshair .corner.br { bottom: 0; right: 0;  border-width: 0 2px 2px 0; }
#crosshair.activo::before,
#crosshair.activo::after { background: var(--agua); }
#crosshair.activo .dot {
    transform: translate(-50%,-50%) scale(1.7);
    background: #fff; box-shadow: 0 0 8px var(--agua), 0 0 18px var(--agua);
}

/* ── Overlay ───────────────────────────────────────── */
#overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0);
    z-index: 9990; pointer-events: none; transition: background 0.4s;
}
#overlay.activo { background: rgba(0,0,0,0.32); pointer-events: auto; }

/* ── Panel de información ──────────────────────────── */
#panel-info {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 9999; transform: translateY(110%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
#panel-info.abierto { transform: translateY(0); }

/* Franja de color característica en el tope del panel */
#panel-franja {
    height: 9px; border-radius: 24px 24px 0 0;
    transition: background 0.35s;
}
.panel-inner {
    background: var(--crema); padding: 0 20px 28px;
    max-height: 72vh; overflow-y: auto;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.4);
}
.panel-handle {
    width: 40px; height: 4px; background: #d1d5db;
    border-radius: 2px; margin: 12px auto 18px;
}
.panel-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.icono-animal {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; flex-shrink: 0;
}
.panel-header .meta { flex: 1; }
.panel-tag {
    font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; padding: 3px 10px; border-radius: 20px;
    display: inline-block; margin-bottom: 5px; color: #fff;
}
.panel-titulo {
    font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 700;
    color: var(--texto); line-height: 1.2;
}
.panel-cientifico { font-size: 12px; font-style: italic; color: var(--muted); margin-top: 2px; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.stat-card { background: #fff; border-radius: 12px; padding: 10px 13px; border: 1px solid #e5e7eb; }
.stat-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 3px; }
.stat-valor { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 600; color: var(--texto); }

.panel-desc { font-size: 13px; line-height: 1.75; color: #374151; margin-bottom: 16px; }

.calidad-agua {
    background: #fff; border-radius: 14px; padding: 13px 15px;
    border: 1px solid #e5e7eb; margin-bottom: 18px;
}
.calidad-label {
    font-size: 10px; color: var(--muted); margin-bottom: 7px;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
}
.calidad-barra-fondo { height: 7px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.calidad-barra-fill  { height: 100%; border-radius: 4px; }
.calidad-texto { font-size: 12px; font-weight: 600; margin-top: 6px; }

.btn-cerrar {
    width: 100%; padding: 14px; border: none; border-radius: 14px;
    font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500;
    cursor: pointer; color: #fff; transition: transform 0.15s, filter 0.2s;
}
.btn-cerrar:active { transform: scale(0.98); filter: brightness(1.15); }
