/* Lightbox navigation arrow buttons */
.lb-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: var(--high-vis);
    border: none;
    font-size: 2.5rem;
    width: 48px;
    height: 64px;
    cursor: pointer;
    z-index: 30;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    opacity: 0.5;
}
.lb-nav-btn:hover, .lb-nav-btn:focus {
    background: var(--high-vis);
    color: #000;
    outline: none;
    opacity: 1;
}
.lb-nav-left {
    left: 10px;
}
.lb-nav-right {
    right: 10px;
}

:root {
    --police-blue: #002366;
    --fire-red: #d90429;
    --high-vis: #ccff00;
    --dark-bg: #050505;
    --brand-font: 'Arial Black', Arial, sans-serif;
    --body-font: 'Arial', Arial, sans-serif;
}

html, body {
    font-family: var(--body-font);
    background: var(--dark-bg);
    color: #fff;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Loading Indicator */
.img-loading-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border: 4px solid #eee;
    border-top: 4px solid var(--high-vis);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 20;
}
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Consistent image watermark overlay */
.img-watermark-text {
    pointer-events: none;
    user-select: none;
    z-index: 10;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: none !important;
}

.img-watermark-text::after {
    content: '';
    display: none;
}

.logo {
    font-size: 1.5rem;
    font-style: italic;
    letter-spacing: -1px;
    font-family: var(--brand-font);
}
.logo span { color: var(--high-vis); }

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}
nav ul li { margin-left: 20px; }
nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: color 0.2s, border-bottom 0.2s;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}
nav ul li a:hover, nav ul li a:focus {
    color: var(--high-vis);
    border-bottom: 2px solid var(--high-vis);
    outline: none;
}
nav ul li a.active {
    color: var(--high-vis);
    border-bottom: 2px solid var(--high-vis);
}
/* --- PROFESSIONAL CARD META LAYOUT --- */
.card-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--high-vis);
    letter-spacing: 1px;
    margin-bottom: 6px;
    text-shadow: 0 1px 6px #000a;
    font-family: 'Arial Black', Arial, sans-serif;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-family: monospace;
}
.card-date {
    color: #999;
    font-size: 0.85rem;
    font-family: monospace;
    letter-spacing: 1px;
}
.card-ref {
    color: #fff;
    background: #222;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 0.85rem;
    font-family: monospace;
    font-weight: bold;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.card-location {
    color: var(--high-vis);
    font-size: 0.8rem;
    font-family: monospace;
    letter-spacing: 1px;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-description {
    color: #e0e0e0;
    font-size: 0.97rem;
    font-family: 'Arial', sans-serif;
    margin-top: 2px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
}
.lightbox-gallery-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 30px 10px 10px 10px;
    background: #111;
    border-radius: 12px 0 0 12px;
    box-sizing: border-box;
}
.lightbox-gallery-grid {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
    margin-top: 18px;
    margin-bottom: 0;
    width: 100%;
    max-width: 90vw;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--high-vis) #222;
    -webkit-overflow-scrolling: touch;
}
.lightbox-gallery-grid::-webkit-scrollbar {
    height: 8px;
}
.lightbox-gallery-grid::-webkit-scrollbar-thumb {
    background: var(--high-vis);
    border-radius: 4px;
}
.lightbox-gallery-grid::-webkit-scrollbar-track {
    background: #222;
}
.lightbox-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border: 2px solid #222;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.7;
    transition: border 0.2s, opacity 0.2s;
    background: #222;
}
.lightbox-thumb.active {
    border: 2px solid var(--high-vis);
    opacity: 1;
    box-shadow: 0 0 8px var(--high-vis);
}
.lightbox-main-img {
    max-width: 90vw;
    max-height: 60vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 16px #000a;
    display: block;
    margin: 0 auto 18px auto;
    background: #111;
    object-fit: contain;
}
@media (max-width: 1024px) {
    .lightbox-main-img {
        max-width: 98vw;
        max-height: 40vh;
    }
    .lightbox-gallery-area {
        border-radius: 0;
        padding: 18px 2vw 8px 2vw;
    }
}
.lightbox-main-img {
    max-width: 80vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 16px #000a;
    display: block;
    margin: 0 auto 20px auto;
    background: #111;
    object-fit: contain;
}
@media (max-width: 768px) {
    .lightbox-main-img {
        max-width: 98vw;
        max-height: 40vh;
    }
}
/* --- POLISHED CARD INFO LAYOUT --- */
.card-info {
    padding: 12px 14px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #181a1b;
    border-radius: 0 0 12px 12px;
    height: 120px;
    box-sizing: border-box;
    overflow: hidden;
}
.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--high-vis);
    letter-spacing: 2px;
    margin-bottom: 2px;
}
.card-date {
    font-size: 0.95rem;
    color: #b0b0b0;
    font-family: monospace;
    font-weight: normal;
    letter-spacing: 1px;
}
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    font-size: 0.92rem;
    color: #b0b0b0;
    font-family: monospace;
    align-items: center;
    line-height: 1.3;
}
.meta-label {
    color: var(--high-vis);
    font-size: 0.8em;
    font-family: monospace;
    margin-right: 2px;
    letter-spacing: 1px;
}
.meta-val {
    color: #e0e0e0;
    font-size: 0.95em;
    font-family: monospace;
    margin-right: 10px;
}
/* --- IMAGE WATERMARK OVERLAY FOR GALLERY CARDS --- */

.wm-copyright {
    font-size: 1.2em;
    vertical-align: middle;
    margin-left: 2px;
}
.wm-warning {
    color: #ccff00;
    font-size: 0.75rem;
    font-family: monospace;
    text-shadow: 0 1px 4px #000;
    opacity: 0.85;
    margin-bottom: 2px;
    letter-spacing: 1px;
}
/* --- MODERN CARD POLISH FOR INCIDENTS & FLEET --- */
.card {
    background: #181a1b;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    border: 1px solid #23272a;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, border 0.2s;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
    height: 380px;
}
.card:hover {
    border-color: var(--high-vis);
    box-shadow: 0 8px 32px rgba(204,255,0,0.08);
}
.card-header {
    padding: 18px 20px 0 20px;
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--high-vis);
    letter-spacing: 2px;
}
.img-container {
    position: relative;
    height: 260px;
    min-height: 260px;
    max-height: 260px;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 0 12px 12px;
    z-index: 1;
}
.meta {
    padding: 12px 20px 0 20px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #b0b0b0;
    border: none;
}
.incident-description {
    padding: 10px 20px 20px 20px;
    font-size: 0.95rem;
    color: #e0e0e0;
    font-family: 'Arial', sans-serif;
    flex: 1;
}
.location-label {
    color: var(--high-vis);
    font-size: 0.7rem;
    font-family: monospace;
    display: block;
    margin-bottom: 4px;
    letter-spacing: 1px;
}
.desc-text {
    margin: 0;
    color: #d0d0d0;
    font-size: 0.93rem;
    line-height: 1.5;
}
/* --- INCIDENTS & FLEET PAGE CONTROLS --- */
.archive-controls { max-width: 1200px; margin: 0 auto 40px auto; padding: 20px; }
.search-container { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 20px; }
.tactical-input { flex-grow: 1; background: #0a0a0a; border: 1px solid #222; color: #555; padding: 15px; font-family: monospace; font-size: 0.9rem; letter-spacing: 1px; outline: none; }
.tactical-input:focus { border-color: var(--high-vis); }
.sort-group { display: flex; flex-direction: column; align-items: flex-end; }
.sort-status { font-family: monospace; font-size: 0.6rem; color: #444; margin-bottom: 5px; text-transform: uppercase; }
.btn-sort { background: #111; border: 1px solid #333; color: #fff; padding: 12px 25px; font-family: monospace; cursor: pointer; font-size: 0.8rem; letter-spacing: 1px; transition: 0.3s; }
.btn-sort:hover { border-color: var(--high-vis); color: var(--high-vis); }
.tactical-select { width: 100%; background: #0a0a0a; border: 1px solid #222; color: #fff; padding: 15px; font-family: monospace; font-size: 0.85rem; appearance: none; cursor: pointer; outline: none; }

/* --- LIGHTBOX & PROTECTION --- */
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.7); color: var(--high-vis); padding: 20px 10px; cursor: pointer; z-index: 20; font-family: monospace; user-select: none; border: 1px solid #333; }
.lb-nav:hover { background: var(--high-vis); color: #000; }
.close-lightbox { position: fixed; top: 20px; right: 30px; color: #fff; font-size: 3rem; cursor: pointer; z-index: 10001; font-family: monospace; }
.long-log-label { color: var(--high-vis); font-family: monospace; font-size: 0.7rem; display: block; margin-bottom: 5px; }
.meta-description { font-size: 0.85rem; color: #ccc; line-height: 1.5; }
.lightbox-caption { margin-top:20px; border-top:1px solid #222; padding-top:10px; font-family:monospace; font-size:0.75rem; color: #888; }
.btn-primary { margin-top: 20px; width: 100%; }
.hidden-canvas { display: none; }
/* Bluelightmediaofficial MASTER TACTICAL STYLES v4.7 */
:root {
    --police-blue: #002366;
    --fire-red: #d90429;
    --high-vis: #ccff00;
    --dark-bg: #050505;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Arial Black', sans-serif; }
body { background: var(--dark-bg); color: #fff; min-height: 100vh; display: flex; flex-direction: column; }

/* MOBILE-READY TOP NAV HUD */
header { background: rgba(0,0,0,0.9); backdrop-filter: blur(10px); border-bottom: 2px solid var(--high-vis); padding: 1.2rem 5%; z-index: 1000; }
nav { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-size: 1.5rem; font-style: italic; letter-spacing: -1px; }
.logo span { color: var(--high-vis); }
nav ul { display: flex; list-style: none; }
nav ul li { margin-left: 20px; }
nav ul li a { color: #fff; text-decoration: none; font-size: 0.75rem; text-transform: uppercase; transition: 0.3s; }
nav ul li a.active { color: var(--high-vis); }

/* GRID SYSTEM */
.container { padding: 40px 5%; flex: 1; }
.urgent-header { color: var(--high-vis); border-left: 10px solid var(--fire-red); padding-left: 15px; margin-bottom: 20px; font-size: 2.5rem; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }



/* CARDS */
.card { background: #111; border: 1px solid #222; overflow: hidden; cursor: pointer; transition: 0.3s; position: relative; display: flex; flex-direction: column; }
.card:hover { border-color: var(--high-vis); }
.img-container { position: relative; height: 300px; overflow: hidden; }
.img-container img { width: 100%; height: 100%; object-fit: cover; }
.meta { padding: 15px; font-family: monospace; font-size: 0.75rem; color: #888; border-top: 1px solid #222; }

/* LIGHTBOX HUD */
.lightbox { display: none; position: fixed; z-index: 9999; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.96); justify-content: center; align-items: center; }
.lightbox-main { display: flex; width: 95%; height: 90%; background: #000; border: 1px solid #333; position: relative; }
.lightbox-image-area { flex: 3; display: flex; align-items: center; justify-content: center; background: #080808; position: relative; }
.lightbox-image-area img { max-width: 100%; max-height: 100%; object-fit: contain; }

.metadata-sidebar { flex: 1; padding: 30px; border-left: 1px solid #222; display: flex; flex-direction: column; min-width: 320px; background: #0a0a0a; }
.meta-label { font-size: 0.6rem; color: #666; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 5px; }
.meta-val { font-size: 1.1rem; color: var(--high-vis); font-family: monospace; margin-bottom: 15px; }

/* SCROLLABLE LONG DESCRIPTION LOG */
.lightbox-desc-area {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #222;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 10px;
}

.lightbox-desc-area div { font-size: 0.85rem; color: #ccc; line-height: 1.6; font-family: sans-serif; }

/* CUSTOM SCROLLBAR */
.lightbox-desc-area::-webkit-scrollbar { width: 4px; }
.lightbox-desc-area::-webkit-scrollbar-track { background: #0a0a0a; }
.lightbox-desc-area::-webkit-scrollbar-thumb { background: var(--high-vis); border-radius: 2px; }

/* FOOTER & BATTENBURG */
.battenburg-footer { height: 35px; background-image: linear-gradient(45deg, #ccff00 25%, #000 25%, #000 50%, #ccff00 50%, #ccff00 75%, #000 75%, #000 100%); background-size: 35px 35px; width: 100%; }
.legal-footer { background: #050505; border-top: 1px solid #1a1a1a; padding: 40px 5%; }
.legal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.legal-item h4 { color: var(--high-vis); font-family: monospace; font-size: 0.7rem; letter-spacing: 2px; margin-bottom: 15px; }
.legal-item p { color: #555; font-size: 0.75rem; line-height: 1.6; }

/* --- MOBILE TACTICAL MEDIA QUERIES --- */

/* === PERFORMANCE & SLOW CONNECTION OPTIMIZATIONS === */
/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Progressive image loading - fade in when loaded */
img {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}
img[loading="lazy"] {
    background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}
img[loading="lazy"].loaded,
img[loading="lazy"][src]:not([src=""]) {
    animation: none;
    background: none;
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Better image rendering */
img {
    image-rendering: -webkit-optimize-contrast;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Touch-friendly targets for mobile */
@media (pointer: coarse) {
    nav ul li a,
    .btn,
    button,
    .card,
    .poll-option,
    a {
        min-height: 44px;
        min-width: 44px;
    }
    
    nav ul li {
        margin-left: 8px;
    }
    
    nav ul li a {
        padding: 12px 8px;
        font-size: 0.75rem;
    }
}

/* Save-data mode for slow connections */
@media (prefers-reduced-data: reduce) {
    img[loading="lazy"] {
        content-visibility: auto;
    }
    
    .img-watermark-text::after,
    .protection-overlay,
    .preview-tile-overlay {
        display: none !important;
    }
}

/* === TABLET BREAKPOINT (1024px) === */
@media (max-width: 1024px) {
    .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .lightbox-main { flex-direction: column; overflow-y: auto; }
    .metadata-sidebar { width: 100%; border-left: none; border-top: 1px solid #222; padding: 20px; }
}

@media (max-width: 768px) {
    header nav { flex-direction: column; padding: 10px; }
    .logo { margin-bottom: 10px; font-size: 1.2rem; }
    nav ul { flex-wrap: wrap; justify-content: center; gap: 8px; }
    nav ul li { margin-left: 0; }
    
    .photo-grid { grid-template-columns: 1fr; gap: 16px; }
    .urgent-header { font-size: 1.6rem; padding-left: 12px; border-left-width: 6px; }
    
    .container { padding: 20px 4%; }
    
    /* Card optimizations for mobile */
    .card { height: auto; min-height: 320px; }
    .img-container { height: 200px; min-height: 200px; max-height: 200px; }
    .card-info { padding: 10px 12px; height: auto; min-height: 100px; }
    .card-title { font-size: 0.9rem; }
    .card-ref { max-width: 140px; font-size: 0.75rem; padding: 2px 8px; }
    .card-location { font-size: 0.7rem; }
    .meta { padding: 10px; font-size: 0.7rem; }
    
    /* Lightbox mobile fixes */
    .lightbox-main { width: 100%; height: 100%; border: none; flex-direction: column; }
    .lightbox-image-area { height: 45vh; min-height: 200px; }
    .lightbox-desc-area { max-height: 150px; }
    .metadata-sidebar { min-width: unset; padding: 15px; }
    .meta-val { font-size: 0.95rem; }
    .lb-nav-btn { width: 40px; height: 50px; font-size: 1.8rem; }
    
    /* Lightbox gallery thumbnails */
    .lightbox-gallery-grid { gap: 6px; max-width: 100vw; }
    .lightbox-thumb { width: 48px; height: 48px; }
    .lightbox-main-img { max-width: 100vw; max-height: 35vh; border-radius: 6px; }
    
    /* Footer mobile */
    .legal-grid { grid-template-columns: 1fr; gap: 20px; }
    .legal-footer { padding: 25px 4%; }
    
    /* Watermark scaling */
    .img-watermark-text::after { font-size: 5vw; }
}

/* === SMALL MOBILE BREAKPOINT (480px) === */
@media (max-width: 480px) {
    .logo { font-size: 1rem; }
    nav ul li a { font-size: 0.65rem; padding: 8px 6px; }
    
    .urgent-header { font-size: 1.3rem; margin-bottom: 15px; }
    .container { padding: 15px 3%; }
    
    .card { min-height: 280px; border-radius: 12px; }
    .img-container { height: 160px; min-height: 160px; max-height: 160px; }
    .card-info { padding: 8px 10px; min-height: 80px; }
    .card-title { font-size: 0.85rem; letter-spacing: 0.5px; }
    .card-meta-row { gap: 6px 10px; font-size: 0.8rem; }
    .card-date { font-size: 0.75rem; }
    .card-ref { font-size: 0.7rem; max-width: 100px; }
    
    /* Lightbox small mobile */
    .lightbox-image-area { height: 40vh; }
    .lightbox-thumb { width: 40px; height: 40px; }
    .lb-nav-btn { width: 36px; height: 44px; font-size: 1.5rem; opacity: 0.7; }
    .lb-nav-left { left: 4px; }
    .lb-nav-right { right: 4px; }
    
    .metadata-sidebar { padding: 12px; }
    .meta-label { font-size: 0.55rem; }
    .meta-val { font-size: 0.85rem; margin-bottom: 10px; }
    
    /* Spinner sizing */
    .img-loading-spinner { width: 28px; height: 28px; }
    
    /* Watermark scaling */
    .img-watermark-text::after { font-size: 6vw; letter-spacing: 0.08em; }
}

/* === EXTRA SMALL MOBILE (360px and below) === */
@media (max-width: 360px) {
    .logo { font-size: 0.9rem; }
    nav ul { gap: 4px; }
    nav ul li a { font-size: 0.6rem; padding: 6px 4px; }
    
    .urgent-header { font-size: 1.1rem; }
    
    .card { min-height: 250px; border-radius: 10px; }
    .img-container { height: 140px; min-height: 140px; max-height: 140px; }
    .card-info { padding: 6px 8px; }
    .card-title { font-size: 0.8rem; }
    
    .lightbox-thumb { width: 36px; height: 36px; }
}

/* === SLOW CONNECTION OPTIMIZATIONS === */
.slow-connection .img-watermark-text::after,
.slow-connection .protection-overlay,
.slow-connection .preview-tile-overlay {
    display: none !important;
}

.slow-connection .card:hover {
    transform: none !important;
    box-shadow: none !important;
}

.slow-connection * {
    transition-duration: 0.1s !important;
    animation-duration: 0.1s !important;
}

/* Touch device optimizations */
.touch-device .card:hover {
    transform: none;
}

.touch-device .lb-nav-btn {
    opacity: 0.8;
}

/* Image load error state */
img.load-error {
    background: #1a1a1a;
    position: relative;
}

img.load-error::after {
    content: 'IMAGE_UNAVAILABLE';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-family: monospace;
    font-size: 0.7rem;
}

/* Improved focus states for accessibility */
a:focus-visible,
button:focus-visible,
.card:focus-visible {
    outline: 2px solid var(--high-vis);
    outline-offset: 2px;
}

/* Print styles - hide unnecessary elements */
@media print {
    nav, .battenburg-footer, .lightbox, .img-loading-spinner,
    .img-watermark-text, .protection-overlay, .activity-feed-sidebar,
    .activity-feed-ticker {
        display: none !important;
    }
    
    .container { padding: 0; }
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
    .card { break-inside: avoid; page-break-inside: avoid; }
}

/* === LIVE ACTIVITY FEED STYLES === */

/* Desktop Sidebar */
.activity-feed-sidebar {
    position: fixed;
    top: 70px;
    right: 15px;
    width: 260px;
    max-height: calc(100vh - 100px);
    background: linear-gradient(180deg, rgba(8, 8, 8, 0.98) 0%, rgba(5, 5, 5, 0.98) 100%);
    border: 1px solid #1a1a1a;
    border-top: 3px solid var(--high-vis);
    border-radius: 0 0 8px 8px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.03);
    overflow: hidden;
}

.activity-feed-sidebar.hidden {
    display: none;
}

.activity-feed-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #0f0f0f 0%, #0a0a0a 100%);
    border-bottom: 1px solid #222;
    position: relative;
}

.activity-feed-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(204, 255, 0, 0.3), transparent);
}

.activity-feed-pulse {
    width: 8px;
    height: 8px;
    background: #ff0000;
    border-radius: 50%;
    animation: pulse-glow 1.5s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(255, 0, 0, 0.6);
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(255, 0, 0, 0.6); }
    50% { opacity: 0.4; box-shadow: 0 0 12px rgba(255, 0, 0, 0.8); }
}

.activity-feed-title {
    font-family: 'Arial Black', monospace;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--high-vis);
    letter-spacing: 2px;
    flex: 1;
    text-shadow: 0 0 10px rgba(204, 255, 0, 0.3);
}

.activity-feed-time {
    font-family: monospace;
    font-size: 0.55rem;
    color: #888;
    background: rgba(204, 255, 0, 0.1);
    border: 1px solid rgba(204, 255, 0, 0.2);
    padding: 3px 8px;
    border-radius: 2px;
    letter-spacing: 1px;
}

.activity-feed-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
    scrollbar-width: thin;
    scrollbar-color: #333 #0a0a0a;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 40px,
        rgba(255,255,255,0.01) 40px,
        rgba(255,255,255,0.01) 41px
    );
}

.activity-feed-list::-webkit-scrollbar {
    width: 4px;
}

.activity-feed-list::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 2px;
}

.activity-feed-list::-webkit-scrollbar-thumb:hover {
    background: var(--high-vis);
}

.activity-feed-list::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.activity-feed-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    cursor: pointer;
    transition: all 0.2s ease;
    animation: feedItemFadeIn 0.3s ease-out forwards;
    opacity: 0;
    position: relative;
}

.activity-feed-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: transparent;
    transition: background 0.2s;
}

@keyframes feedItemFadeIn {
    from { opacity: 0; transform: translateX(15px); }
    to { opacity: 1; transform: translateX(0); }
}

.activity-feed-item:hover {
    background: rgba(204, 255, 0, 0.03);
}

.activity-feed-item:hover::before {
    background: var(--high-vis);
}

.activity-icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.03);
    border-radius: 4px;
}

.activity-content {
    flex: 1;
    min-width: 0;
    font-family: monospace;
}

.activity-type {
    font-size: 0.5rem;
    font-weight: bold;
    letter-spacing: 1.5px;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.activity-title {
    font-size: 0.72rem;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
    font-weight: 500;
}

.activity-location,
.activity-user {
    font-size: 0.6rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    font-size: 0.55rem;
    color: #444;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.activity-feed-footer {
    padding: 10px 16px;
    background: linear-gradient(180deg, #0a0a0a 0%, #080808 100%);
    border-top: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.activity-feed-footer::before {
    content: '⚡';
    font-size: 0.65rem;
    opacity: 0.5;
}

.activity-feed-status {
    font-family: monospace;
    font-size: 0.55rem;
    color: #444;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.activity-feed-empty {
    padding: 40px 20px;
    text-align: center;
    font-family: monospace;
    font-size: 0.7rem;
    color: #333;
    letter-spacing: 1px;
}

.activity-feed-empty::before {
    content: '📡';
    display: block;
    font-size: 1.5rem;
    margin-bottom: 10px;
    opacity: 0.3;
}

/* Mobile Ticker */
.activity-feed-ticker {
    display: none;
    position: sticky;
    top: 0;
    z-index: 899;
    background: linear-gradient(90deg, rgba(5, 5, 5, 0.98) 0%, rgba(10, 10, 10, 0.95) 50%, rgba(5, 5, 5, 0.98) 100%);
    border-bottom: 2px solid var(--high-vis);
    padding: 10px 15px;
    font-family: monospace;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.activity-feed-ticker.hidden {
    display: none !important;
}

.ticker-pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #ff0000;
    border-radius: 50%;
    margin-right: 10px;
    animation: pulse-glow 1.5s ease-in-out infinite;
    vertical-align: middle;
}

.ticker-label {
    color: var(--high-vis);
    font-weight: bold;
    margin-right: 10px;
    letter-spacing: 2px;
    font-size: 0.65rem;
}

.ticker-content {
    color: #ccc;
    transition: opacity 0.3s ease;
}

.ticker-time {
    color: #555;
    margin-left: 10px;
    font-size: 0.6rem;
}

/* Activity feed responsive behavior */
@media (max-width: 1200px) {
    .activity-feed-sidebar {
        display: none;
    }
    
    .activity-feed-ticker {
        display: flex;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .activity-feed-ticker {
        padding: 6px 10px;
        font-size: 0.65rem;
    }
    
    .ticker-pulse {
        width: 5px;
        height: 5px;
        margin-right: 6px;
    }
}

@media (max-width: 480px) {
    .activity-feed-ticker {
        font-size: 0.6rem;
        padding: 5px 8px;
    }
    
    .ticker-label {
        margin-right: 5px;
    }
}

/* Adjust main content when sidebar is visible */
@media (min-width: 1201px) {
    body.has-activity-feed .container {
        margin-right: 290px;
    }
    
    body.has-activity-feed .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Slow connection - disable activity feed animations */
.slow-connection .activity-feed-item {
    animation: none;
    opacity: 1;
}

.slow-connection .activity-feed-pulse,
.slow-connection .ticker-pulse {
    animation: none;
}

/* ==========================================
   FAVORITES / WATCHLIST SYSTEM
   ========================================== */

/* Save button container on cards */
.card-save-btn {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 15;
}

/* Favorite heart button on cards */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.favorite-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.favorite-btn .heart-icon {
    font-size: 1.2rem;
    color: #fff;
    transition: all 0.3s ease;
    line-height: 1;
}

.favorite-btn.favorited .heart-icon {
    color: #ff4444;
}

.favorite-btn.favorited {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid rgba(255, 68, 68, 0.5);
}

/* Heart pulse animation on favorite */
@keyframes heartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.favorite-btn.favorited .heart-icon {
    animation: heartPulse 0.4s ease;
}

/* Login required modal */
.favorites-login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 20000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.favorites-modal-content {
    background: #1a1a1a;
    border: 2px solid var(--high-vis);
    border-radius: 8px;
    padding: 40px;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.favorites-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
}

.favorites-modal-close:hover {
    color: #fff;
}

.favorites-modal-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.favorites-modal-content h3 {
    color: var(--high-vis);
    font-family: monospace;
    font-size: 1.2rem;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.favorites-modal-content p {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.favorites-modal-btn {
    display: inline-block;
    background: var(--high-vis);
    color: #000;
    font-weight: bold;
    padding: 14px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-family: monospace;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.favorites-modal-btn:hover {
    background: #fff;
    transform: translateY(-2px);
}

/* My Archive page styles */
.my-archive-header {
    text-align: center;
    padding: 40px 20px;
}

.my-archive-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.stat-box {
    background: rgba(204, 255, 0, 0.1);
    border: 1px solid rgba(204, 255, 0, 0.3);
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--high-vis);
    font-family: monospace;
}

.stat-label {
    font-size: 0.75rem;
    color: #888;
    letter-spacing: 2px;
    margin-top: 5px;
}

.archive-section {
    margin: 40px 0;
}

.archive-section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.archive-section-icon {
    font-size: 1.5rem;
}

.archive-section-title {
    font-family: monospace;
    font-size: 1rem;
    color: var(--high-vis);
    letter-spacing: 2px;
}

.archive-empty {
    display: none;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.archive-empty.visible {
    display: block;
}

.archive-empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.archive-empty p {
    font-family: monospace;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.archive-browse-btn {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--high-vis);
    color: var(--high-vis);
    padding: 12px 28px;
    font-family: monospace;
    font-size: 0.85rem;
    text-decoration: none;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.archive-browse-btn:hover {
    background: var(--high-vis);
    color: #000;
}

/* Remove favorite button variant (for My Archive page) */
.favorite-btn.remove-mode {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid rgba(255, 68, 68, 0.5);
}

.favorite-btn.remove-mode:hover {
    background: rgba(255, 68, 68, 0.4);
}

.favorite-btn.remove-mode .heart-icon {
    color: #ff4444;
}

/* Mobile adjustments for favorites */
@media (max-width: 768px) {
    .favorite-btn {
        width: 32px;
        height: 32px;
    }
    
    .favorite-btn .heart-icon {
        font-size: 1rem;
    }
    
    .my-archive-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-box {
        padding: 15px 25px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .favorites-modal-content {
        margin: 20px;
        padding: 30px 20px;
    }
}

/* Nav icon styling (for My Archive heart) */
.nav-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-icon {
    color: #ff4444;
    font-size: 0.9em;
}

/* ==========================================
   MY ARCHIVE PAGE - CLEAN STYLES
   ========================================== */

/* Login overlay */
.archive-login-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.archive-login-overlay.visible {
    display: flex;
}

.archive-login-box {
    background: #1a1a1a;
    border: 2px solid var(--high-vis);
    border-radius: 8px;
    padding: 50px 40px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 8px 32px #000;
}

.archive-login-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.archive-login-box h2 {
    color: var(--high-vis);
    font-family: monospace;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.archive-login-box p {
    color: #ccc;
    font-size: 1rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

.archive-login-btn {
    display: inline-block;
    background: var(--high-vis);
    color: #000;
    font-weight: bold;
    padding: 14px 36px;
    border-radius: 6px;
    text-decoration: none;
    font-family: monospace;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.archive-login-btn:hover {
    background: #fff;
    transform: translateY(-2px);
}

/* Locked main content */
main.locked {
    opacity: 0.3;
    pointer-events: none;
}

/* Archive subtitle */
.archive-subtitle {
    color: #888;
    font-family: monospace;
    font-size: 0.85rem;
    margin-top: 10px;
}

/* Card removal animation */
.card.removing {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s, transform 0.3s;
}

/* Mobile adjustments for archive login */
@media (max-width: 768px) {
    .archive-login-box {
        margin: 20px;
        padding: 35px 25px;
    }
    
    .archive-login-icon {
        font-size: 3rem;
    }
}

/* ==========================================
   EASTER EGG: CLASSIFIED CARD
   ========================================== */

.classified-card {
    position: relative;
    margin-top: 60px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    background: #0a0a0a;
    border: 2px dashed #333;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.3;
}

.classified-card:hover {
    opacity: 1;
    border-color: #ff0000;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.3);
}

.classified-card:hover .classified-overlay {
    opacity: 0;
}

.classified-card:hover .classified-reveal {
    opacity: 1;
    transform: translateY(0);
}

.classified-card:hover .classified-title,
.classified-card:hover .classified-meta,
.classified-card:hover .classified-location {
    opacity: 0;
}

.classified-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 0, 0, 0.1) 10px,
        rgba(0, 0, 0, 0.1) 20px
    );
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: opacity 0.3s;
    pointer-events: none;
}

.classified-stamp {
    background: #ff0000;
    color: #fff;
    padding: 10px 30px;
    font-family: monospace;
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: 4px;
    transform: rotate(-15deg);
    border: 3px solid #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.classified-content {
    padding: 20px;
}

.classified-img {
    background: #111;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border: 1px solid #222;
}

.redacted-image {
    font-size: 4rem;
    opacity: 0.3;
}

.classified-info {
    position: relative;
}

.classified-title {
    font-family: monospace;
    font-size: 1rem;
    color: #444;
    margin-bottom: 10px;
    transition: opacity 0.3s;
}

.classified-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #333;
    margin-bottom: 8px;
    font-family: monospace;
    transition: opacity 0.3s;
}

.classified-location {
    font-size: 0.75rem;
    color: #333;
    font-family: monospace;
    transition: opacity 0.3s;
}

.classified-reveal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    color: #ccff00;
    font-family: monospace;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
}

.classified-reveal p {
    margin: 8px 0;
    font-size: 0.85rem;
}