/* ═══════════════════════════════════════════════════════════════════════════
   THREAT HUNTER AI - TACTICAL ENHANCEMENTS
   Additive styles - works WITH tactical.css, does not replace it
   ═══════════════════════════════════════════════════════════════════════════ */

/* === CUSTOM FONTS === */
@font-face {
    font-family: 'Hexagon';
    src: url('/static/fonts/hexagon.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* === HEX GRID BACKGROUND WITH BREATHING GLOW === */
.hex-bg,
.panel.hex-bg,
.tactical-panel.hex-bg {
    position: relative;
    background-image: url('/static/svg/hex-grid.svg');
    background-repeat: repeat;
    background-size: 50px 43.4px;
    animation: hex-breathe 4s ease-in-out infinite;
}

@keyframes hex-breathe {
    0%, 100% {
        opacity: 0.6;
        filter: drop-shadow(0 0 0px rgba(0, 240, 255, 0));
    }
    50% {
        opacity: 0.9;
        filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.5));
    }
}

/* === NOISE TEXTURE OVERLAY === */
.noise-overlay {
    position: relative;
}

.noise-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/static/svg/noise-texture.svg');
    background-repeat: repeat;
    opacity: 0.4;
    pointer-events: none;
    mix-blend-mode: overlay;
    z-index: 1;
}

/* === TARGETING RETICLE OVERLAY === */
.targeting-overlay {
    position: relative;
}

/* === NEON BLOOM TEXT === */
.neon-text,
.glow-intense {
    text-shadow:
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 40px currentColor;
}

/* === CHROMATIC ABERRATION HOVER === */
.chromatic-hover {
    transition: all 0.2s ease;
}

.chromatic-hover:hover {
    text-shadow:
        -2px 0 rgba(255, 0, 255, 0.7),
        2px 0 rgba(0, 240, 255, 0.7);
}

/* === GOTHIC 40K DOUBLE BORDER === */
.gothic-border {
    border: 2px solid var(--cyan);
    box-shadow:
        inset 0 0 0 3px var(--bg-panel),
        inset 0 0 0 4px rgba(0, 240, 255, 0.3);
}

/* === CRITICAL PULSE === */
.critical-pulse {
    animation: critical-glow 1s ease-in-out infinite;
}

@keyframes critical-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 51, 68, 0.5); }
    50% { box-shadow: 0 0 25px rgba(255, 51, 68, 0.8), 0 0 50px rgba(255, 51, 68, 0.4); }
}

/* === DATA STREAM ANIMATION === */
.data-stream {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 240, 255, 0.1) 50%,
        transparent 100%);
    background-size: 200% 100%;
    animation: stream-flow 2s linear infinite;
}

@keyframes stream-flow {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* === ENHANCED CORNER BRACKETS (SVG VERSION) === */
.tactical-panel.svg-brackets::before,
.panel.svg-brackets::before,
.sidebar-section.svg-brackets::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 40px;
    height: 40px;
    background: url('/static/svg/corner-bracket-tl.svg') no-repeat;
    background-size: contain;
    border: none;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.tactical-panel.svg-brackets::after,
.panel.svg-brackets::after,
.sidebar-section.svg-brackets::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 40px;
    height: 40px;
    background: url('/static/svg/corner-bracket-br.svg') no-repeat;
    background-size: contain;
    border: none;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.tactical-panel.svg-brackets:hover::before,
.tactical-panel.svg-brackets:hover::after,
.panel.svg-brackets:hover::before,
.panel.svg-brackets:hover::after,
.sidebar-section.svg-brackets:hover::before,
.sidebar-section.svg-brackets:hover::after {
    width: 50px;
    height: 50px;
    opacity: 1;
    filter: drop-shadow(0 0 8px currentColor);
}

/* === RACING PULSE BORDER === */
.pulse-border {
    position: relative;
    border: 1px solid transparent;
    background: linear-gradient(var(--bg-panel), var(--bg-panel)) padding-box,
                linear-gradient(90deg, var(--cyan), var(--magenta), var(--cyan)) border-box;
}

.pulse-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(90deg,
        transparent 0%,
        transparent 40%,
        #00f0ff 45%,
        #ff00ff 50%,
        #00f0ff 55%,
        transparent 60%,
        transparent 100%);
    background-size: 300% 300%;
    animation: pulse-race 4s linear infinite;
    z-index: -1;
    opacity: 0.8;
}

.pulse-border::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-panel);
    z-index: -1;
}

@keyframes pulse-race {
    0% { background-position: 200% 0; }
    100% { background-position: -100% 0; }
}

/* Override styles when pulse-border is applied to upload zone */
.upload-zone.pulse-border {
    border: 4px solid transparent;
    background:
        linear-gradient(var(--bg-panel), var(--bg-panel)) padding-box,
        linear-gradient(90deg, var(--cyan), var(--magenta), var(--cyan)) border-box;
    transition: none;
    position: relative;
    overflow: hidden;
}

.upload-zone.pulse-border .hex-glow-layer {
    position: absolute;
    inset: 0;
    background-image: url('/static/svg/hex-grid.svg');
    background-repeat: repeat;
    background-size: 50px 43.4px;
    animation: hex-breathe 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.upload-zone.pulse-border:hover,
.upload-zone.pulse-border.dragover {
    border-color: transparent;
    background:
        url('/static/svg/hex-grid.svg'),
        linear-gradient(var(--bg-panel), var(--bg-panel)) padding-box,
        linear-gradient(90deg, var(--cyan), var(--magenta), var(--cyan)) border-box;
    background-repeat: repeat, no-repeat, no-repeat;
    background-size: 50px 43.4px, 100% 100%, 100% 100%;
}

/* Disable the racing pulse animation on upload zone - just use static gradient border */
.upload-zone.pulse-border::before {
    display: none;
}

/* Upload zone text container with black background */
.upload-zone .upload-text-container {
    position: relative;
    z-index: 2;
    background: var(--bg-deep);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: inline-block;
}

.upload-zone .upload-text {
    font-size: 1.8rem;
    text-shadow: 0 0 10px var(--cyan), 0 0 20px var(--cyan-glow);
    margin-bottom: 0.25rem;
}

.upload-zone .upload-subtext {
    font-size: 1.2rem;
    color: var(--cyan);
    text-shadow: 0 0 8px var(--cyan-glow);
}

.upload-zone.pulse-border::after {
    display: none;
}

/* Capture info panel - matching upload zone theme */
.capture-info.pulse-border {
    border: 4px solid transparent;
    background:
        linear-gradient(var(--bg-panel), var(--bg-panel)) padding-box,
        linear-gradient(90deg, var(--cyan), var(--magenta), var(--cyan)) border-box;
    transition: none;
    position: relative;
    overflow: hidden;
}

.capture-info.pulse-border .hex-glow-layer {
    position: absolute;
    inset: 0;
    background-image: url('/static/svg/hex-grid.svg');
    background-repeat: repeat;
    background-size: 50px 43.4px;
    animation: hex-breathe 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.capture-info.pulse-border .info-item {
    position: relative;
    z-index: 2;
}

.capture-info.pulse-border .capture-info-text {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--bg-deep);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    white-space: nowrap;
}

.capture-info.pulse-border .capture-info-text .info-label {
    color: var(--cyan);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-shadow: 0 0 8px var(--cyan-glow);
}

.capture-info.pulse-border .capture-info-text .info-value {
    color: var(--text-primary);
    font-weight: 600;
    margin-right: 1rem;
}

.capture-info.pulse-border .capture-info-text .info-value:last-child {
    margin-right: 0;
}

.capture-info.pulse-border {
    display: flex;
    align-items: center;
    justify-content: center;
}

.capture-info.pulse-border::before,
.capture-info.pulse-border::after {
    display: none;
}

/* Initiate Analysis button - matching drop zone theme */
.action-btn.hex-bg.pulse-border {
    border: 4px solid transparent;
    background:
        linear-gradient(var(--bg-panel), var(--bg-panel)) padding-box,
        linear-gradient(90deg, var(--cyan), var(--magenta), var(--cyan)) border-box;
    position: relative;
    overflow: hidden;
}

.action-btn.hex-bg.pulse-border .hex-glow-layer {
    position: absolute;
    inset: 0;
    background-image: url('/static/svg/hex-grid.svg');
    background-repeat: repeat;
    background-size: 50px 43.4px;
    animation: hex-breathe 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
    border-radius: inherit;
}

.action-btn.hex-bg.pulse-border .btn-text-container {
    position: relative;
    z-index: 2;
    background: var(--bg-deep);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.action-btn.hex-bg.pulse-border .btn-text-container .btn-icon,
.action-btn.hex-bg.pulse-border .btn-text-container .btn-label {
    font-size: 1.4rem;
    text-shadow: 0 0 10px var(--cyan), 0 0 20px var(--cyan-glow);
}

/* Upload zone needs visible overflow for pulse-border effect */
.upload-zone.hex-bg {
    overflow: visible;
}

/* Clip hex glow layer inside upload zone */
.upload-zone.hex-bg .hex-glow-layer {
    overflow: hidden;
    border-radius: inherit;
}

/* Ensure button content stays above hex layer */
.action-btn.hex-bg .btn-icon,
.action-btn.hex-bg span:not(.btn-icon) {
    position: relative;
    z-index: 1;
}

/* === COLLAPSIBLE SIDEBAR SECTIONS === */
.sidebar-section .section-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    opacity: 1;
}

.sidebar-section.collapsed .section-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.sidebar-section .section-header {
    cursor: pointer;
    user-select: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-left: 2rem;
    padding-right: 2rem;
    background: linear-gradient(135deg,
        #2a2d32 0%,
        #3d4148 25%,
        #5a5f66 50%,
        #3d4148 75%,
        #2a2d32 100%
    );
    background-size: 200% 200%;
    animation: gunmetal-shine 5s ease-in-out infinite;
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Standardized gradient outline for sidebar section headers */
.sidebar-section .section-header.pulse-border {
    border: 2px solid transparent;
    background:
        linear-gradient(135deg, #2a2d32 0%, #3d4148 25%, #5a5f66 50%, #3d4148 75%, #2a2d32 100%) padding-box,
        linear-gradient(90deg, var(--cyan), var(--magenta), var(--cyan)) border-box;
    background-size: 200% 200%, 100% 100%;
    animation: gunmetal-shine 5s ease-in-out infinite;
}

@keyframes gunmetal-shine {
    0%, 80% {
        background-position: 0% 50%, 0 0;
    }
    90% {
        background-position: 100% 50%, 0 0;
    }
    100% {
        background-position: 0% 50%, 0 0;
    }
}

.sidebar-section .section-header::after {
    content: '▼';
    position: absolute;
    right: 0.8rem;
    font-size: 0.6rem;
    color: var(--cyan);
    transition: transform 0.3s ease;
}

.sidebar-section.collapsed .section-header::after {
    transform: rotate(-90deg);
}

/* Nested sidebar sections */
.sidebar-section.nested {
    margin-top: 0.5rem;
}

.sidebar-section.nested .section-header {
    font-size: 0.75rem;
}

/* === MODE BUTTONS WITH HEX BACKGROUND === */
.mode-btn.pulse-border {
    border: 1px solid transparent;
    background:
        linear-gradient(var(--bg-panel), var(--bg-panel)) padding-box,
        linear-gradient(90deg, var(--cyan), var(--magenta), var(--cyan)) border-box;
    position: relative;
    overflow: hidden;
    color: var(--cyan) !important;
}

.mode-btn.pulse-border::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--bg-panel);
    z-index: 0;
    border-radius: inherit;
}

.mode-btn.pulse-border::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/static/svg/hex-grid-glow.svg');
    background-repeat: repeat;
    background-size: 60px 52px;
    pointer-events: none;
    animation: hex-breathe-subtle 4s ease-in-out infinite;
    z-index: 1;
    border-radius: inherit;
}

@keyframes hex-breathe-subtle {
    0%, 100% {
        opacity: 0.05;
    }
    50% {
        opacity: 0.3;
    }
}

.mode-btn.pulse-border > * {
    position: relative;
    z-index: 2;
    opacity: 1 !important;
}

.mode-btn.pulse-border:hover {
    border: 1px solid transparent;
    background:
        linear-gradient(var(--bg-panel), var(--bg-panel)) padding-box,
        linear-gradient(90deg, var(--cyan), var(--magenta), var(--cyan)) border-box;
}

.mode-btn.pulse-border.active {
    border: 1px solid transparent;
    background:
        linear-gradient(var(--bg-panel), var(--bg-panel)) padding-box,
        linear-gradient(90deg, var(--cyan), var(--magenta), var(--cyan)) border-box;
    box-shadow: 0 0 15px var(--cyan-glow), inset 0 0 20px var(--cyan-glow);
}

/* === SIDEBAR TEXT STANDARDIZATION === */
/* Match EXACTLY the section-header style */
.sidebar .param-label,
.sidebar .param-input,
.sidebar .param-input::placeholder,
.sidebar .param-select,
.sidebar .api-status,
.sidebar .status-text,
.sidebar .mode-btn,
.sidebar .slider-value,
.sidebar .sessions-toggle-btn,
.sidebar .env-intel-link,
.sidebar .param-value,
.sidebar .api-btn-group .action-btn {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--cyan);
    text-transform: uppercase;
}

.sidebar .param-input::placeholder {
    color: var(--cyan-dim);
}

.sidebar .action-btn.danger {
    color: var(--red);
}

/* === CENTER ALL SIDEBAR CONTENT === */
.sidebar .param-label {
    display: block;
    text-align: center;
    margin-bottom: 0.5rem;
}

.sidebar .param-input,
.sidebar .param-select {
    text-align: center;
}

.sidebar .mode-btn {
    justify-content: center;
}

/* Hide collapse arrow on non-collapsible section headers */
.sidebar-section:not(:has(.section-content)) .section-header::after {
    display: none;
}

/* Ensure link section headers inherit proper color */
a.section-header {
    color: var(--cyan);
}

.sidebar .api-btn-group {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.sidebar .param-group {
    text-align: center;
}

/* === SIDEBAR BUTTON CONTAINERS SYMMETRY === */
.sidebar {
    padding: 1rem;
}

/* Adjust main container position for expanded header and threat bar */
.main-container {
    top: calc(var(--header-height) * 1.1 + var(--threat-bar-height) * 1.7 + 16px);
}

.main-content {
    padding-top: 1rem;
}

/* Panel header with title bar theme */
.tactical-panel .panel-header {
    background: linear-gradient(180deg,
        var(--bg-panel) 0%,
        rgba(0, 240, 255, 0.05) 50%,
        var(--bg-deep) 100%
    );
    border: 2px solid transparent;
    border-radius: 4px 4px 0 0;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
}

.tactical-panel .panel-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 240, 255, 0.15) 25%,
        rgba(255, 0, 255, 0.15) 50%,
        transparent 75%
    );
    animation: sweep 4s linear infinite;
    pointer-events: none;
    z-index: 0;
}

.tactical-panel .panel-header::after {
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px solid transparent;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.8), rgba(255, 0, 255, 0.8), rgba(0, 240, 255, 0.8)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

.tactical-panel .panel-header > * {
    position: relative;
    z-index: 2;
}

.sidebar .mode-buttons {
    gap: 0.25rem;
}

.sidebar-section {
    margin-bottom: 0.25rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Standardize all sidebar section headers to same dimensions */
.sidebar-section > .section-header,
.sidebar-section > a.section-header {
    width: 100%;
    min-height: 2.5rem;
    height: 2.5rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Drag handle styling */
.sidebar-section .drag-handle {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: grab;
    opacity: 0.5;
    margin-right: 0;
    font-size: 1rem;
    transition: opacity 0.2s ease, color 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    display: inline-block;
    padding: 2px 4px;
}

.sidebar-section .drag-handle:hover {
    opacity: 1;
    color: var(--cyan);
}

.sidebar-section .drag-handle:active {
    cursor: grabbing;
}

/* Dragging states */
.sidebar-section.dragging {
    opacity: 0.4;
    transform: scale(0.98);
    pointer-events: none;
    cursor: grabbing !important;
    caret-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

/* Hide text cursor/caret during any drag operation */
.sidebar.is-dragging,
.sidebar.is-dragging * {
    cursor: grabbing !important;
    caret-color: transparent !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* Disable pulse animation on dragged element */
.sidebar-section.dragging .section-header.pulse-border::before,
.sidebar-section.dragging.pulse-border::before {
    display: none !important;
    animation: none !important;
}

.sidebar-section.dragging .section-header.pulse-border::after,
.sidebar-section.dragging.pulse-border::after {
    display: none !important;
}

/* Placeholder styling */
.sidebar-section-placeholder {
    cursor: grabbing;
    caret-color: transparent;
}

.sidebar-section.drag-over {
    border-top: 3px solid var(--cyan) !important;
    padding-top: 2px;
}

.sidebar-section.drag-over-bottom {
    border-bottom: 3px solid var(--cyan) !important;
    padding-bottom: 2px;
}

/* Prevent text selection while dragging */
.sidebar.dragging-active {
    user-select: none;
    -webkit-user-select: none;
}

.sidebar .section-content {
    padding-top: 0.25rem;
}

.sidebar .param-group {
    margin-bottom: 0.25rem;
}

.sidebar .param-group:last-child {
    margin-bottom: 0;
}

/* Align sidebar bottom with main content panel */
.sidebar .sidebar-section:last-of-type {
    margin-bottom: 0;
}

/* === API STATUS CONTAINER === */
.api-status.pulse-border {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    margin-top: 0.5rem;
    background: var(--bg-input);
    border: 1px solid transparent;
    border-radius: 4px;
    background: linear-gradient(var(--bg-input), var(--bg-input)) padding-box,
                linear-gradient(90deg, var(--cyan), var(--magenta), var(--cyan)) border-box;
    text-align: center;
}

/* === SLIDER CONTAINER THEMING === */
.slider-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    background: var(--bg-input);
    border: 1px solid transparent;
    border-radius: 4px;
    background: linear-gradient(var(--bg-input), var(--bg-input)) padding-box,
                linear-gradient(90deg, var(--cyan), var(--magenta), var(--cyan)) border-box;
}

.slider-container .param-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    cursor: pointer;
}

.slider-container .param-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--cyan);
    cursor: pointer;
    box-shadow: 0 0 6px var(--cyan);
}

.slider-container .param-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--cyan);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 6px var(--cyan);
}

.slider-container .slider-value {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--cyan);
    min-width: 2.5rem;
    text-align: right;
}

/* === THREAT BAR THEMING === */
.threat-bar.pulse-border {
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-panel), var(--bg-panel)) padding-box,
                linear-gradient(90deg, var(--cyan), var(--magenta), var(--cyan)) border-box;
    border-radius: 8px;
    top: calc(var(--header-height) * 1.1 + 8px);
    left: 4px;
    right: 4px;
    margin: 0;
    width: calc(100% - 8px);
    height: calc(var(--threat-bar-height) * 1.7);
    padding: 4px;
    padding-left: calc(1rem - 4px);
    gap: 8px;
}

/* Standby indicator container */
.threat-bar .threat-indicator {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid transparent;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)) padding-box,
                linear-gradient(90deg, var(--cyan), var(--magenta), var(--cyan)) border-box;
    border-radius: 6px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(var(--sidebar-width) - 2rem) !important;
    min-width: calc(var(--sidebar-width) - 2rem) !important;
    max-width: calc(var(--sidebar-width) - 2rem) !important;
    flex: 0 0 calc(var(--sidebar-width) - 2rem) !important;
    overflow: hidden;
    box-sizing: border-box !important;
}

.threat-bar .threat-level {
    font-size: 0.85rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Marquee scrolling container */
.threat-marquee {
    flex: 1;
    overflow: hidden;
    position: relative;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    padding: 4px 0;
}

.threat-marquee::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/static/svg/hex-grid.svg');
    background-repeat: repeat;
    background-size: 50px 43.4px;
    pointer-events: none;
    animation: hex-breathe 4s ease-in-out infinite;
    z-index: 0;
    border-radius: 6px;
}

.marquee-content {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: marquee-scroll 20s linear infinite;
    position: relative;
    z-index: 1;
}

.marquee-text-container {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--bg-deep);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.threat-bar .threat-status,
.threat-bar .threat-time {
    font-size: 1.5rem;
}

.threat-separator {
    font-size: 1.5rem;
    color: var(--magenta);
    opacity: 0.6;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* === MAIN HEADER STYLING === */
.main-header {
    border-radius: 8px;
    border: 2px solid transparent;
    background: linear-gradient(180deg, var(--bg-panel) 0%, rgba(0, 240, 255, 0.04) 50%, var(--bg-deep) 100%) padding-box,
                linear-gradient(90deg, rgba(0, 240, 255, 0.8), rgba(255, 0, 255, 0.8), rgba(0, 240, 255, 0.8)) border-box;
    margin: 4px;
    width: calc(100% - 8px);
    height: calc(var(--header-height) * 1.1);
    padding: 4px;
    opacity: 0.85;
}

.main-header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    height: 100%;
}

.main-header .header-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 480px;
    width: 480px;
}

.main-header .header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 480px;
    width: 480px;
}

.main-header .main-title {
    flex: 1;
    text-align: center;
}

/* THREAT HUNTER AI title styling */
/* Title container - gunmetal gradient with shine animation */
.title-container {
    border: 4px solid transparent;
    background:
        linear-gradient(135deg, #2a2d32 0%, #3d4148 25%, #5a5f66 50%, #3d4148 75%, #2a2d32 100%) padding-box,
        linear-gradient(90deg, var(--cyan), var(--magenta), var(--cyan)) border-box;
    background-size: 200% 200%, 100% 100%;
    animation: gunmetal-shine 5s ease-in-out infinite;
    border-radius: 6px;
    padding: 3px 12px;
    min-height: 52px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.title-container .main-title.neon-text {
    font-family: 'Hexagon', sans-serif;
    font-size: 2.457rem;
    white-space: nowrap;
    color: #FF6700;
    -webkit-text-stroke: 9px #000;
    text-stroke: 9px #000;
    paint-order: stroke fill;
    text-shadow:
        0 0 2.7px currentColor,
        0 0 5.4px currentColor,
        0 0 10.8px currentColor,
        0 0 21.6px currentColor;
    opacity: 0.8;
    margin: 0;
}

.main-title.neon-text {
    font-family: 'Hexagon', sans-serif;
    font-size: 2.457rem;
    white-space: nowrap;
    color: #FF6700;
    -webkit-text-stroke: 9px #000;
    text-stroke: 9px #000;
    paint-order: stroke fill;
    text-shadow:
        0 0 2.7px currentColor,
        0 0 5.4px currentColor,
        0 0 10.8px currentColor,
        0 0 21.6px currentColor;
    opacity: 0.8;
}

/* === PAGE-WIDE TEXT STANDARDIZATION === */
body,
.panel-header,
.panel-desc,
.panel-body,
.metric-label,
.metric-value,
.upload-text,
.upload-subtext,
.selected-file,
.threat-level,
.threat-status,
.threat-time,
.version-info,
.chat-bubble,
.chat-input,
.export-header,
.sessions-panel-header,
.sessions-section-header,
.session-card,
.analysis-item,
.modal-title,
.modal-body,
button,
input,
select,
textarea,
a {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* === TACTICAL CLOCK === */
.tactical-clock {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    font-family: 'Orbitron', 'JetBrains Mono', monospace;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 3px 12px;
    position: relative;
    border-radius: 0;
    min-width: 480px;
    min-height: 54px;
}

.tactical-clock::before {
    display: none;
}

.tactical-clock::after {
    display: none;
}

.clock-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    line-height: 1.1;
}

.clock-label {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    -webkit-text-stroke: 1px #000;
    text-stroke: 1px #000;
    paint-order: stroke fill;
}

/* LOCAL row - all cyan/blue */
.clock-row.local .clock-label {
    color: rgba(0, 240, 255, 0.8);
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.8);
}

.clock-row.local .clock-value,
.clock-row.local .clock-date {
    color: rgba(0, 240, 255, 0.8);
    text-shadow:
        0 0 4px rgba(0, 240, 255, 0.8),
        0 0 8px rgba(0, 240, 255, 0.6),
        0 0 16px rgba(0, 240, 255, 0.4);
    -webkit-text-stroke: 1px #000;
    text-stroke: 1px #000;
    paint-order: stroke fill;
}

/* ZULU row - all green */
.clock-row.zulu .clock-label {
    color: rgba(0, 255, 136, 0.8);
    text-shadow: 0 0 6px rgba(0, 255, 136, 0.8);
}

.clock-row.zulu .clock-value,
.clock-row.zulu .clock-date {
    color: rgba(0, 255, 136, 0.8);
    text-shadow:
        0 0 4px rgba(0, 255, 136, 0.8),
        0 0 8px rgba(0, 255, 136, 0.6),
        0 0 16px rgba(0, 255, 136, 0.4);
    -webkit-text-stroke: 1px #000;
    text-stroke: 1px #000;
    paint-order: stroke fill;
}

.clock-value {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    animation: digit-pulse 1s ease-in-out infinite;
}

.clock-date {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

@keyframes digit-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* === NTP STATUS PANEL === */
.ntp-status-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    font-family: 'Orbitron', 'JetBrains Mono', monospace;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 3px 12px;
    position: relative;
    border-radius: 0;
    min-width: 480px;
    min-height: 52px;
}

.ntp-status-panel::before {
    display: none;
}

.ntp-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    line-height: 1.1;
}

.ntp-label {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(0, 240, 255, 0.8);
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.8);
    flex: 1;
}

.ntp-sync-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
}

.ntp-sync-indicator.synced {
    background: #00ff88;
    box-shadow: 0 0 6px #00ff88, 0 0 12px #00ff88;
    animation: sync-pulse 2s ease-in-out infinite;
}

.ntp-sync-indicator.not-synced {
    background: #ffaa00;
    box-shadow: 0 0 6px #ffaa00;
    animation: sync-pulse 1s ease-in-out infinite;
}

.ntp-sync-indicator.error {
    background: #ff3344;
    box-shadow: 0 0 6px #ff3344;
}

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

.ntp-servers {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    line-height: 1.1;
}

.ntp-server-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Orbitron', 'JetBrains Mono', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.1;
    color: rgba(0, 240, 255, 0.8);
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.8);
}

.ntp-server-line.primary {
    color: rgba(0, 255, 136, 0.8);
    text-shadow: 0 0 6px rgba(0, 255, 136, 0.8);
}

.ntp-server-line.primary .ntp-server-label,
.ntp-server-line.primary .ntp-server-ip,
.ntp-server-line.primary .ntp-server-dns {
    color: rgba(0, 255, 136, 0.8);
    text-shadow: 0 0 6px rgba(0, 255, 136, 0.8);
}

.ntp-server-line.backup .ntp-server-label,
.ntp-server-line.backup .ntp-server-ip,
.ntp-server-line.backup .ntp-server-dns {
    color: rgba(0, 240, 255, 0.8);
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.8);
}

.ntp-server-label {
    font-size: 1.05rem;
    font-weight: 700;
}

.ntp-server-ip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.05rem;
    font-weight: 700;
}

.ntp-server-dns {
    font-size: 1.05rem;
    font-weight: 700;
}
