@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Oswald:wght@400;700&family=Rajdhani:wght@500;700&display=swap');

:root {
    --bg-dark: #0a0a0f;
    --bg-panel: #0d0d14;
    --bg-panel-alt: #111119;
    --accent-blue: #00d4ff;
    --accent-red: #ff2a2a;
    --accent-amber: #ffaa00;
    --text-primary: #e0e0e8;
    --text-muted: #6a6a80;
    --border-color: #1a1a2e;
    --glow-blue: 0 0 20px rgba(0, 212, 255, 0.3);
    --glow-red: 0 0 20px rgba(255, 42, 42, 0.3);
    --scanline-opacity: 0.03;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    min-height: 100%;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Share Tech Mono', monospace;
    overflow-x: hidden;
}

/* Scanline overlay */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, var(--scanline-opacity)) 2px,
        rgba(0, 0, 0, var(--scanline-opacity)) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px;
}

/* === TOP BANNER === */
.banner {
    text-align: center;
    padding: 20px 0 15px;
    position: relative;
    flex-shrink: 0;
}

.wanted-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 8vw, 7rem);
    letter-spacing: 0.3em;
    color: var(--accent-red);
    text-shadow: var(--glow-red), 0 0 60px rgba(255, 42, 42, 0.15);
    line-height: 1;
    position: relative;
    animation: titlePulse 4s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.92; }
}

.wanted-title::before {
    content: 'WANTED';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    color: var(--accent-red);
    opacity: 0.5;
    animation: glitchShift 8s infinite;
    clip-path: inset(0 0 90% 0);
}

@keyframes glitchShift {
    0%, 95%, 100% { transform: translate(0); }
    96% { transform: translate(-3px, 1px); }
    97% { transform: translate(3px, -1px); }
    98% { transform: translate(-1px, 2px); }
}

.subheading {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: clamp(0.9rem, 1.8vw, 1.3rem);
    letter-spacing: 0.4em;
    color: var(--accent-amber);
    margin-top: 8px;
    text-shadow: 0 0 10px rgba(255, 170, 0, 0.4);
}

.subject-name {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    letter-spacing: 0.15em;
    color: #fff;
    margin-top: 8px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    white-space: nowrap;
}

.subject-name .cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--accent-blue);
    margin-left: 4px;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

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

.banner-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    margin-top: 12px;
    opacity: 0.5;
}

/* === BODY SECTION === */
.body-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    flex: 1;
    min-height: 400px;
    padding: 15px 0;
}

/* --- RAP SHEET (left) --- */
.rapsheet-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.rapsheet-panel::before {
    content: 'INTELLIGENCE DOSSIER';
    position: absolute;
    top: 0; left: 0; right: 0;
    background: var(--bg-panel-alt);
    border-bottom: 1px solid var(--border-color);
    padding: 6px 14px;
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    color: var(--accent-blue);
    opacity: 0.7;
}

.rapsheet-content {
    margin-top: 28px;
    flex: 1;
    overflow: hidden;
    position: relative;
}

.rapsheet-scroller {
    position: absolute;
    top: 0; left: 0; right: 0;
}

.data-field {
    margin-bottom: 16px;
}

.data-label {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: var(--accent-blue);
    opacity: 0.8;
    margin-bottom: 3px;
}

.data-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.data-value.large {
    font-size: 1rem;
    color: var(--accent-amber);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
}

.wanted-for-text {
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

/* --- PORTRAIT (right) --- */
.portrait-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.portrait-frame {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.portrait-frame .portrait-next {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
}

/* HUD corners */
.portrait-frame::before,
.portrait-frame::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-blue);
    opacity: 0.5;
    z-index: 2;
    pointer-events: none;
}
.portrait-frame::before {
    top: 12px; left: 12px;
    border-right: none; border-bottom: none;
}
.portrait-frame::after {
    bottom: 12px; right: 12px;
    border-left: none; border-top: none;
}

.portrait-hud-tr, .portrait-hud-bl {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-blue);
    opacity: 0.5;
    z-index: 2;
    pointer-events: none;
}
.portrait-hud-tr {
    top: 12px; right: 12px;
    border-left: none; border-bottom: none;
}
.portrait-hud-bl {
    bottom: 12px; left: 12px;
    border-right: none; border-top: none;
}

.portrait-overlay-text {
    position: absolute;
    bottom: 16px;
    left: 16px;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--accent-blue);
    opacity: 0.6;
    z-index: 3;
}

.portrait-overlay-text2 {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--accent-red);
    opacity: 0.6;
    z-index: 3;
    text-align: right;
}

.no-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
}

/* Glitch transition */
.portrait-glitch {
    animation: portraitGlitch 0.4s steps(4);
}
@keyframes portraitGlitch {
    0% { filter: none; }
    25% { filter: hue-rotate(90deg) brightness(1.5); transform: translate(2px, -2px); }
    50% { filter: saturate(2) contrast(1.5); transform: translate(-3px, 1px); }
    75% { filter: hue-rotate(-45deg); transform: translate(1px, 3px); }
    100% { filter: none; transform: none; }
}

/* === CHYRON === */
.chyron-bar {
    background: linear-gradient(180deg, #1a0000 0%, #0d0000 100%);
    border-top: 2px solid var(--accent-red);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}

.chyron-bar::before {
    content: 'ALERT';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: var(--accent-red);
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    padding: 8px 14px;
    z-index: 2;
    display: flex;
    align-items: center;
}

.chyron-track {
    display: inline-block;
    white-space: nowrap;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--accent-amber);
    padding-left: 80px;
    animation: chyronScroll var(--chyron-duration, 20s) linear infinite;
}

@keyframes chyronScroll {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* === NAVIGATION === */
.nav-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 14px 0 6px;
    flex-shrink: 0;
}

.nav-btn {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--accent-blue);
    width: 44px;
    height: 44px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.nav-btn:hover {
    background: var(--accent-blue);
    color: var(--bg-dark);
    box-shadow: var(--glow-blue);
}
.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.nav-btn:disabled:hover {
    background: var(--bg-panel);
    color: var(--accent-blue);
    box-shadow: none;
}

.nav-indicator {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--text-muted);
}

/* === TRANSITIONS === */
.poster-fade-out {
    animation: fadeOut 0.25s ease forwards;
}
.poster-fade-in {
    animation: fadeIn 0.3s ease forwards;
}
@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-5px); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: none; }
}

/* === EMPTY STATE === */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-align: center;
    line-height: 2;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* === RESPONSIVE === */
@media (max-width: 800px) {
    .body-section {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 12px 16px;
    }
    .wanted-title {
        letter-spacing: 0.15em;
    }
}
