/* ============================================
    POLARIS SCAN V5 - COMPLETE STYLES
    ============================================ */

:root {
    --bg: #0a0a0a;
    --bg2: #0f0f0f;
    --bg3: #151515;
    --bg4: #1a1a1a;
    --border: #252525;
    --border2: #353535;
    --gold: #d4af37;
    --gold2: #e8c547;
    --gold-bg: rgba(212,175,55,0.15);
    --red: #ef4444;
    --red2: #f87171;
    --red-bg: rgba(239,68,68,0.15);
    --green: #22c55e;
    --green-bg: rgba(34,197,94,0.15);
    --purple: #a855f7;
    --purple-bg: rgba(168,85,247,0.15);
    --blue: #3b82f6;
    --text: #ffffff;
    --text2: #a0a0a0;
    --text3: #606060;
    --font: 'Instrument Sans', -apple-system, sans-serif;
    --mono: 'IBM Plex Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; }

/* ============================================
   BREAKING BANNER
   ============================================ */
.breaking-banner {
    background: linear-gradient(90deg, rgba(239,68,68,0.15), rgba(168,85,247,0.1));
    border-bottom: 1px solid rgba(239,68,68,0.3);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.breaking-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.breaking-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--red);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.breaking-text {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    min-width: 200px;
}

.breaking-source {
    color: var(--gold);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border: 1px solid var(--gold);
    border-radius: 4px;
    transition: all 0.2s;
}

.breaking-source:hover {
    background: var(--gold);
    color: var(--bg);
}

.auto-update-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--purple-bg);
    color: var(--purple);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.breaking-close {
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.breaking-close:hover { color: var(--text); }

/* ============================================
   HEADER
   ============================================ */
.header {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-shield {
    width: 44px;
    height: 53px;
    filter: drop-shadow(0 0 10px rgba(212,175,55,0.4));
}

.logo-text h1 {
    font-size: 1.25rem;
    color: var(--gold);
    line-height: 1.2;
    font-weight: 700;
}

.tagline {
    font-size: 11px;
    color: var(--text2);
    font-weight: 400;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-report {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--red-bg);
    border: 1px solid var(--red);
    color: var(--red2);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-report:hover {
    background: var(--red);
    color: white;
}

.header-badges {
    display: none;
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-free {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green);
}

.badge-live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--red-bg);
    color: var(--red2);
    border: 1px solid var(--red);
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--red);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
    padding: 50px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-badge svg {
    opacity: 0.7;
}

.hero-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-title .highlight {
    color: var(--red);
}

.hero-subtitle {
    color: var(--text2);
    font-size: 15px;
    margin-bottom: 28px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle strong {
    color: var(--gold);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.stat {
    padding: 14px 24px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 100px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    font-family: var(--mono);
}

.stat-label {
    font-size: 11px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.last-updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text3);
    font-size: 12px;
}

/* ============================================
   AI BRIEFING BUTTON & MODAL
   ============================================ */
.btn-briefing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--purple-bg);
    border: 1px solid var(--purple);
    color: var(--purple);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-briefing:hover {
    background: var(--purple);
    color: white;
}

.briefing-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.briefing-modal.active {
    display: flex;
}

.briefing-modal-content {
    background: var(--bg2);
    border: 1px solid var(--purple);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlide 0.3s ease;
}

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

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

.briefing-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--purple);
}

.briefing-modal-close {
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.briefing-modal-close:hover {
    color: var(--text);
}

.briefing-modal-time {
    padding: 12px 20px 0;
    font-size: 11px;
    color: var(--text3);
    font-family: var(--mono);
}

.briefing-modal-body {
    padding: 16px 20px 24px;
    color: var(--text2);
    font-size: 14px;
    line-height: 1.7;
    overflow-y: auto;
    max-height: 50vh;
}

/* ============================================
   SEARCH
   ============================================ */
.search-section {
    padding: 24px 20px;
    background: var(--bg);
    position: sticky;
    top: 77px;
    z-index: 90;
    border-bottom: 1px solid var(--border);
}

.search-container {
    max-width: 700px;
    margin: 0 auto;
}

.search-wrapper {
    display: flex;
    background: var(--bg3);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 4px;
    transition: border-color 0.2s;
}

.search-wrapper:focus-within {
    border-color: var(--gold);
}

.search-icon {
    padding: 0 12px;
    color: var(--text3);
    align-self: center;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    font-size: 15px;
    padding: 12px 0;
    outline: none;
}

.search-input::placeholder {
    color: var(--text3);
}

.search-btn {
    background: var(--gold);
    color: var(--bg);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--gold2);
}

.quick-searches {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.quick-label {
    color: var(--text3);
    font-size: 12px;
}

.quick-tag, .search-tag {
    padding: 4px 10px;
    background: var(--bg4);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text2);
    cursor: pointer;
    transition: all 0.2s;
}

.quick-tag:hover, .search-tag:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ============================================
   RESULTS SECTION
   ============================================ */
.results-section {
    max-width: 1100px;
    margin: 24px auto;
    padding: 24px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: none;
}

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

.results-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.results-header span {
    color: var(--gold);
}

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

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text);
    transition: all 0.2s;
}

.action-btn:hover {
    border-color: var(--gold);
}

.btn-close:hover {
    border-color: var(--red);
    color: var(--red);
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.summary-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
}

.summary-card .count {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
    font-family: var(--mono);
}

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

.loading-state {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: spin 1s linear infinite;
}

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

.loading-state p {
    color: var(--text2);
    font-size: 13px;
}

/* Result Groups */
.result-group {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 14px;
    overflow: hidden;
}

.flagged-group {
    border-color: var(--red);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg4);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 13px;
}

.group-count {
    background: var(--gold);
    color: var(--bg);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 11px;
}

.group-items {
    max-height: 300px;
    overflow-y: auto;
}

.result-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.flagged {
    border-left: 3px solid var(--red);
    background: var(--red-bg);
}

.item-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

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

.item-amount {
    color: var(--gold);
    font-family: var(--mono);
    font-size: 12px;
}

.item-status {
    display: inline-block;
    padding: 2px 8px;
    background: var(--red-bg);
    color: var(--red);
    border-radius: 4px;
    font-size: 10px;
    margin-bottom: 4px;
}

.item-desc {
    color: var(--text2);
    font-size: 12px;
    margin-bottom: 6px;
}

.item-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text3);
}

.item-meta a {
    color: var(--blue);
    text-decoration: none;
}

.item-meta a:hover {
    text-decoration: underline;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: var(--text3);
}

/* ============================================
   DEEP RESEARCH
   ============================================ */
.deep-research {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--gold);
    display: none;
}

.deep-research-header {
    margin-bottom: 20px;
}

.deep-research-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 6px;
}

.deep-research-header p {
    color: var(--text2);
    font-size: 13px;
}

.research-category {
    margin-bottom: 24px;
}

.research-category h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text);
}

.research-category h4 svg {
    color: var(--gold);
}

.research-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.research-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s;
}

.research-link:hover {
    border-color: var(--gold);
    background: var(--bg4);
}

.research-link svg {
    color: var(--gold);
}

/* News Results in Deep Research */
.news-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}

.news-result-card {
    display: block;
    padding: 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.news-result-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.news-result-source {
    font-size: 10px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.news-result-title {
    font-size: 13px;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 6px;
}

.news-result-date {
    font-size: 10px;
    color: var(--text3);
    font-family: var(--mono);
}

/* AI Section */
.ai-section {
    background: linear-gradient(135deg, var(--purple-bg), rgba(59,130,246,0.1));
    border: 1px solid var(--purple);
    border-radius: 12px;
    padding: 20px;
}

.ai-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--purple);
    margin-bottom: 8px;
}

.ai-desc {
    color: var(--text2);
    font-size: 12px;
    margin-bottom: 14px;
}

.ai-prompt-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg3);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: var(--text2);
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--gold);
    color: var(--bg);
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: var(--gold2);
}

.ai-prompt-box textarea {
    width: 100%;
    background: var(--bg);
    border: none;
    color: var(--text);
    font-family: var(--mono);
    font-size: 11px;
    padding: 14px;
    resize: none;
    outline: none;
}

.ai-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ai-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg3);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.ai-link:hover {
    border-color: var(--purple);
    background: var(--purple-bg);
    transform: translateY(-2px);
}

/* Deep Research Trigger */
.deep-research-trigger {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(135deg, var(--purple-bg), rgba(59,130,246,0.1));
    border: 2px dashed var(--purple);
    border-radius: 12px;
    text-align: center;
}

.btn-deep-research {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--purple);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.btn-deep-research:hover {
    background: #9333ea;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(168,85,247,0.4);
}

.deep-research-trigger p {
    color: var(--text2);
    font-size: 13px;
}

/* AI Analysis Result */
.ai-analysis-result {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.ai-analysis-result h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gold);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.analysis-content {
    color: var(--text2);
    font-size: 13px;
    line-height: 1.7;
}

.analysis-content strong {
    color: var(--text);
}

.analysis-content h5, .analysis-content h6 {
    color: var(--gold);
    margin: 16px 0 8px;
    font-size: 13px;
}

.analysis-content p {
    margin-bottom: 8px;
}

.ai-error {
    padding: 16px;
    background: var(--red-bg);
    border: 1px solid var(--red);
    border-radius: 8px;
    color: var(--text2);
    font-size: 13px;
}

.research-loading {
    text-align: center;
    padding: 30px;
}

.research-loading p {
    color: var(--text2);
    font-size: 13px;
    margin-top: 10px;
}

.no-news {
    color: var(--text3);
    font-size: 13px;
    padding: 20px;
    text-align: center;
}

/* ============================================
   MAIN CONTENT SECTIONS
   ============================================ */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
}

.section {
    margin-bottom: 48px;
}

.section-header {
    margin-bottom: 20px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    margin-bottom: 6px;
}

.section-header h2 svg {
    color: var(--gold);
}

.auto-badge {
    font-size: 10px;
    background: var(--green-bg);
    color: var(--green);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
}

.section-sub {
    color: var(--text3);
    font-size: 13px;
}

.loading-text, .empty {
    color: var(--text3);
    text-align: center;
    padding: 40px;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.news-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    transition: all 0.2s;
}

.news-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.news-source {
    font-size: 10px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.news-title {
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-title a {
    color: var(--text);
    text-decoration: none;
}

.news-title a:hover {
    color: var(--gold);
}

.news-date {
    font-size: 11px;
    color: var(--text3);
    font-family: var(--mono);
}

/* Trending Grid */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.trending-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    transition: all 0.2s;
}

.trending-card:hover {
    border-color: var(--gold);
}

.trending-topic {
    font-size: 16px;
    margin-bottom: 6px;
}

.trending-reason {
    color: var(--gold);
    font-size: 12px;
    margin-bottom: 12px;
}

.trending-searches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Stories Grid */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.story-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    position: relative;
    transition: all 0.2s;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--purple), var(--gold));
    border-radius: 12px 12px 0 0;
}

.story-card:hover {
    border-color: var(--gold);
}

.story-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--purple-bg);
    color: var(--purple);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 10px;
}

.story-title {
    font-size: 14px;
    margin-bottom: 8px;
}

.story-desc {
    color: var(--text2);
    font-size: 12px;
    margin-bottom: 12px;
}

.story-searches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Investigations Grid */
.investigations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.investigation-card {
    background: var(--bg3);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.investigation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--red);
    border-radius: 12px 12px 0 0;
}

.investigation-card:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
}

.investigation-card h3 {
    font-size: 16px;
    margin-bottom: 6px;
    margin-top: 4px;
}

.inv-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--red);
    font-family: var(--mono);
    margin-bottom: 8px;
}

.inv-status {
    display: inline-block;
    padding: 4px 12px;
    background: var(--red-bg);
    color: var(--red2);
    border-radius: 4px;
    font-size: 11px;
    margin-bottom: 10px;
}

.inv-update {
    color: var(--text2);
    font-size: 12px;
}

/* Figures Grid */
.figures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.figure-card {
    background: var(--bg3);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    position: relative;
    transition: all 0.2s;
}

.figure-card:hover {
    border-color: var(--gold);
}

.figure-card-new {
    border-color: var(--green) !important;
    box-shadow: 0 0 20px rgba(34,197,94,0.2);
}

.new-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--green);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    z-index: 10;
}

.figure-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.figure-header h3 {
    font-size: 16px;
}

.figure-role {
    color: var(--text2);
    font-size: 12px;
}

.figure-status {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.status-investigating {
    background: rgba(249,115,22,0.15);
    color: #f97316;
}

.status-convicted {
    background: var(--red-bg);
    color: var(--red);
}

.status-charged {
    background: var(--red-bg);
    color: var(--red2);
}

.figure-allegations {
    list-style: none;
    margin-bottom: 12px;
}

.figure-allegations li {
    font-size: 12px;
    color: var(--text2);
    padding-left: 14px;
    position: relative;
    margin-bottom: 6px;
}

.figure-allegations li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 5px;
    height: 5px;
    background: var(--red);
    border-radius: 50%;
}

.figure-update {
    font-size: 11px;
    color: var(--gold);
    margin-bottom: 12px;
}

.btn-search-figure {
    width: 100%;
    padding: 10px;
    background: var(--bg4);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.btn-search-figure:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ============================================
   REPORT SECTION
   ============================================ */
.report-section {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
    padding: 50px 20px;
    border-top: 1px solid var(--border);
}

.report-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.report-content h2 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    color: var(--red);
    margin-bottom: 12px;
}

.report-desc {
    color: var(--text2);
    font-size: 14px;
    margin-bottom: 24px;
}

.report-agencies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.agency-card {
    padding: 20px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.agency-card:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
}

.agency-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

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

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 50px 20px 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.footer-logo strong {
    display: block;
    font-size: 16px;
    color: var(--gold);
}

.footer-logo span {
    display: block;
    font-size: 12px;
    color: var(--text2);
}

.footer-tagline {
    color: var(--text3);
    font-size: 12px;
    margin-bottom: 16px;
}

.footer-ai-notice {
    padding: 14px;
    background: var(--bg4);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.ai-disclaimer-inline {
    color: var(--text2);
    font-size: 11px;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.ai-disclaimer-inline strong {
    color: var(--purple);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-col h4 {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 14px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text2);
    margin-bottom: 10px;
}

.footer-col li svg {
    color: var(--gold);
    flex-shrink: 0;
}

.footer-col a {
    color: var(--text2);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--gold);
}

.footer-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.social-link:hover {
    border-color: var(--gold);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.legal-line {
    color: var(--text3);
    font-size: 11px;
    margin-bottom: 8px;
}

.copyright {
    color: var(--text3);
    font-size: 11px;
}

.copyright a {
    color: var(--gold);
    text-decoration: none;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 44px;
    height: 44px;
    background: var(--gold);
    color: var(--bg);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--gold2);
    transform: translateY(-3px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .header-actions {
        width: auto;
    }
    
    .btn-briefing {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    /* Breaking news mobile */
    .breaking-banner {
        padding: 10px 12px;
    }
    
    .breaking-content {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }
    
    .breaking-badge {
        font-size: 9px;
        padding: 3px 8px;
    }
    
    .breaking-text {
        font-size: 12px;
        flex: 1 1 100%;
        order: 2;
        min-width: unset;
    }
    
    .breaking-source {
        font-size: 11px;
        padding: 4px 8px;
        order: 3;
    }
    
    .hero {
        padding: 30px 16px;
    }
    
    .hero-badge {
        padding: 6px 12px;
        font-size: 11px;
        gap: 6px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .hero-stats {
        gap: 10px;
    }
    
    .stat {
        padding: 12px 16px;
        min-width: 70px;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 9px;
    }
    
    .search-section {
        padding: 16px;
        position: sticky;
        top: 60px;
    }
    
    .search-wrapper {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }
    
    .search-input {
        text-align: center;
        padding: 12px;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .quick-searches {
        gap: 6px;
    }
    
    .quick-tag {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .results-section {
        margin: 12px;
        padding: 16px;
        border-radius: 12px;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .results-actions {
        width: 100%;
    }
    
    .action-btn {
        flex: 1;
        justify-content: center;
        font-size: 11px;
        padding: 8px 10px;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .section {
        margin-bottom: 32px;
    }
    
    .section-header h2 {
        font-size: 1.1rem;
    }
    
    /* Footer mobile - compact side by side */
    .footer {
        padding: 24px 16px 16px;
    }
    
    .footer-main {
        gap: 20px;
    }
    
    .footer-brand {
        text-align: left;
    }
    
    .footer-logo {
        justify-content: flex-start;
        margin-bottom: 8px;
    }
    
    .footer-logo svg {
        width: 32px;
        height: 38px;
    }
    
    .footer-logo strong {
        font-size: 14px;
    }
    
    .footer-logo span {
        font-size: 10px;
    }
    
    .footer-tagline {
        font-size: 10px;
        margin-bottom: 10px;
    }
    
    .footer-ai-notice {
        padding: 10px;
    }
    
    .ai-disclaimer-inline {
        font-size: 10px;
    }
    
    .suggest-state-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .footer-links {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        text-align: left;
    }
    
    .footer-col h4 {
        font-size: 11px;
        margin-bottom: 8px;
    }
    
    .footer-col ul {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-col li {
        font-size: 10px;
        margin-bottom: 6px;
        gap: 4px;
    }
    
    .footer-col li svg {
        width: 10px;
        height: 10px;
    }
    
    .footer-col a {
        font-size: 10px;
    }
    
    .footer-social {
        flex-direction: row;
        gap: 8px;
        align-items: flex-start;
    }
    
    .social-link {
        padding: 6px 10px;
        font-size: 11px;
        gap: 6px;
    }
    
    .social-link svg {
        width: 14px;
        height: 14px;
    }
    
    .footer-bottom {
        padding-top: 12px;
    }
    
    .legal-line {
        font-size: 9px;
        line-height: 1.4;
    }
    
    .copyright {
        font-size: 9px;
    }
    
    .ai-links {
        flex-direction: column;
    }
    
    .ai-link {
        width: 100%;
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
    }
    
    /* Briefing modal mobile */
    .briefing-modal-content {
        margin: 10px;
        max-height: 90vh;
    }
    
    .briefing-modal-body {
        max-height: 60vh;
    }
}

/* Suggest State Button */
.suggest-state-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--gold);
    border-radius: 6px;
    color: var(--gold);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.suggest-state-btn:hover {
    background: var(--gold);
    color: var(--bg);
}
/* ============================================
    POLARIS SCAN - ADDITIONAL STYLES
    Append these to styles.css
    ============================================ */

/* ============================================
   STAT SOURCE MODAL
   ============================================ */

.stat-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.stat-modal-content {
    background: var(--bg2);
    border: 2px solid var(--gold);
    border-radius: 12px;
    padding: 28px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(-20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.stat-modal-content h3 {
    font-size: 14px;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text3);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.stat-modal-close:hover {
    color: var(--text);
}

.stat-modal-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    margin: 12px 0;
    font-family: var(--mono);
}

.stat-modal-source {
    color: var(--text2);
    font-size: 13px;
    margin-bottom: 20px;
}

.stat-modal-link {
    display: inline-block;
    padding: 12px 24px;
    background: var(--gold);
    color: var(--bg);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.stat-modal-link:hover {
    background: var(--gold2);
    transform: translateY(-2px);
}

/* ============================================
   SOURCE BADGE IN HERO
   ============================================ */

.hero-source-note {
    margin: -10px 0 20px;
}

.source-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg3);
    border: 1px solid var(--gold);
    border-radius: 4px;
    color: var(--gold);
    font-size: 11px;
    text-decoration: none;
    transition: all 0.2s;
}

.source-badge:hover {
    background: var(--gold);
    color: var(--bg);
}

/* ============================================
   CLICKABLE STATUS BADGES
   ============================================ */

a.figure-status {
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

a.figure-status:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

/* ============================================
   INVESTIGATION SOURCE LINK
   ============================================ */

.inv-source {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--gold);
    text-decoration: none;
    border: 1px solid var(--gold);
    border-radius: 4px;
    transition: all 0.2s;
}

.inv-source:hover {
    background: var(--gold);
    color: var(--bg);
}

/* ============================================
   HOT/NEW BADGES FOR TRENDING & STORIES
   ============================================ */

.trending-hot,
.story-hot {
    border-color: var(--green) !important;
    box-shadow: 0 0 20px rgba(34,197,94,0.2);
    position: relative;
}

.trending-card .new-badge,
.story-card .new-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--green);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    z-index: 10;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

/* ============================================
   CLICKABLE STATS HOVER EFFECT
   ============================================ */

.stat {
    transition: all 0.2s;
}

.stat[style*="cursor: pointer"]:hover,
.stat:has([onclick]):hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

/* ============================================
   HOURLY UPDATE BADGE
   ============================================ */

.hourly-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--purple-bg);
    color: var(--purple);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.hourly-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--purple);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

/* ============================================
   IMPROVED MOBILE STYLES FOR NEW ELEMENTS
   ============================================ */

@media (max-width: 768px) {
    .stat-modal-content {
        padding: 20px;
        margin: 16px;
    }
    
    .stat-modal-value {
        font-size: 2rem;
    }
    
    .stat-modal-link {
        padding: 10px 20px;
        font-size: 13px;
        width: 100%;
        display: block;
    }
    
    .hero-source-note {
        margin: -5px 0 16px;
    }
    
    .source-badge {
        font-size: 10px;
        padding: 4px 10px;
    }
    
    .trending-card .new-badge,
    .story-card .new-badge {
        top: -8px;
        right: 12px;
        padding: 3px 8px;
        font-size: 9px;
    }
}
/* ============================================
    POLARIS SCAN - ADDITIONAL STYLES
    Append these to styles.css
    ============================================ */

/* ============================================
   STAT SOURCE MODAL
   ============================================ */

.stat-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.stat-modal-content {
    background: var(--bg2);
    border: 2px solid var(--gold);
    border-radius: 12px;
    padding: 28px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(-20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.stat-modal-content h3 {
    font-size: 14px;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text3);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.stat-modal-close:hover {
    color: var(--text);
}

.stat-modal-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    margin: 12px 0;
    font-family: var(--mono);
}

.stat-modal-source {
    color: var(--text2);
    font-size: 13px;
    margin-bottom: 20px;
}

.stat-modal-link {
    display: inline-block;
    padding: 12px 24px;
    background: var(--gold);
    color: var(--bg);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.stat-modal-link:hover {
    background: var(--gold2);
    transform: translateY(-2px);
}

/* ============================================
   SOURCE BADGE IN HERO
   ============================================ */

.hero-source-note {
    margin: -10px 0 20px;
}

.source-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg3);
    border: 1px solid var(--gold);
    border-radius: 4px;
    color: var(--gold);
    font-size: 11px;
    text-decoration: none;
    transition: all 0.2s;
}

.source-badge:hover {
    background: var(--gold);
    color: var(--bg);
}

/* ============================================
   CLICKABLE STATUS BADGES
   ============================================ */

a.figure-status {
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

a.figure-status:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

/* ============================================
   INVESTIGATION SOURCE LINK
   ============================================ */

.inv-source {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--gold);
    text-decoration: none;
    border: 1px solid var(--gold);
    border-radius: 4px;
    transition: all 0.2s;
}

.inv-source:hover {
    background: var(--gold);
    color: var(--bg);
}

/* ============================================
   HOT/NEW BADGES FOR TRENDING & STORIES
   ============================================ */

.trending-hot,
.story-hot {
    border-color: var(--green) !important;
    box-shadow: 0 0 20px rgba(34,197,94,0.2);
    position: relative;
}

.trending-card .new-badge,
.story-card .new-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--green);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    z-index: 10;
    width: fit-content;
    display: inline-block;
    animation: pulse-badge 2s infinite;
}

.trending-card,
.story-card {
    position: relative;
}

.trending-card .new-badge,
.story-card .new-badge,
.figure-card .new-badge,
.investigation-card .new-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    background: var(--green);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    z-index: 10;
    white-space: nowrap;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

/* ============================================
   CLICKABLE STATS HOVER EFFECT
   ============================================ */

.stat {
    transition: all 0.2s;
}

.stat[style*="cursor: pointer"]:hover,
.stat:has([onclick]):hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

/* ============================================
   HOURLY UPDATE BADGE
   ============================================ */

.hourly-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--purple-bg);
    color: var(--purple);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.hourly-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--purple);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

/* ============================================
   IMPROVED MOBILE STYLES FOR NEW ELEMENTS
   ============================================ */

/* Summary card with actual results */
.summary-card.has-results {
    border-color: var(--green);
    background: var(--green-bg);
}

.summary-card.has-results .count {
    color: var(--green);
}

@media (max-width: 768px) {
    .stat-modal-content {
        padding: 20px;
        margin: 16px;
    }
    
    .stat-modal-value {
        font-size: 2rem;
    }
    
    .stat-modal-link {
        padding: 10px 20px;
        font-size: 13px;
        width: 100%;
        display: block;
    }
    
    .hero-source-note {
        margin: -5px 0 16px;
    }
    
    .source-badge {
        font-size: 10px;
        padding: 4px 10px;
    }
    
    .trending-card .new-badge,
    .story-card .new-badge {
        top: -8px;
        right: 12px;
        padding: 3px 8px;
        font-size: 9px;
    }
}
/* ============================================
    POLARIS SCAN - ADDITIONAL STYLES
    Append these to styles.css
    ============================================ */

/* ============================================
   STAT SOURCE MODAL
   ============================================ */

.stat-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.stat-modal-content {
    background: var(--bg2);
    border: 2px solid var(--gold);
    border-radius: 12px;
    padding: 28px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(-20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.stat-modal-content h3 {
    font-size: 14px;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text3);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.stat-modal-close:hover {
    color: var(--text);
}

.stat-modal-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    margin: 12px 0;
    font-family: var(--mono);
}

.stat-modal-source {
    color: var(--text2);
    font-size: 13px;
    margin-bottom: 20px;
}

.stat-modal-link {
    display: inline-block;
    padding: 12px 24px;
    background: var(--gold);
    color: var(--bg);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.stat-modal-link:hover {
    background: var(--gold2);
    transform: translateY(-2px);
}

/* ============================================
   SOURCE BADGE IN HERO
   ============================================ */

.hero-source-note {
    margin: -10px 0 20px;
}

.source-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg3);
    border: 1px solid var(--gold);
    border-radius: 4px;
    color: var(--gold);
    font-size: 11px;
    text-decoration: none;
    transition: all 0.2s;
}

.source-badge:hover {
    background: var(--gold);
    color: var(--bg);
}

/* ============================================
   CLICKABLE STATUS BADGES
   ============================================ */

a.figure-status {
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

a.figure-status:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

/* ============================================
   INVESTIGATION SOURCE LINK
   ============================================ */

.inv-source {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--gold);
    text-decoration: none;
    border: 1px solid var(--gold);
    border-radius: 4px;
    transition: all 0.2s;
}

.inv-source:hover {
    background: var(--gold);
    color: var(--bg);
}

/* ============================================
   HOT/NEW BADGES FOR TRENDING & STORIES
   ============================================ */

.trending-hot,
.story-hot {
    border-color: var(--green) !important;
    box-shadow: 0 0 20px rgba(34,197,94,0.2);
    position: relative;
}

.trending-card .new-badge,
.story-card .new-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--green);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    z-index: 10;
    width: fit-content;
    display: inline-block;
    animation: pulse-badge 2s infinite;
}

.trending-card,
.story-card {
    position: relative;
}

.trending-card .new-badge,
.story-card .new-badge,
.figure-card .new-badge,
.investigation-card .new-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    background: var(--green);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    z-index: 10;
    white-space: nowrap;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

/* ============================================
   CLICKABLE STATS HOVER EFFECT
   ============================================ */

.stat {
    transition: all 0.2s;
}

.stat[style*="cursor: pointer"]:hover,
.stat:has([onclick]):hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

/* ============================================
   HOURLY UPDATE BADGE
   ============================================ */

.hourly-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--purple-bg);
    color: var(--purple);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.hourly-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--purple);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

/* ============================================
   AI DETECTIVE SECTION STYLES
   ============================================ */

.detective-section {
    background: #0a0a0a;
    position: relative;
}

.detective-badge {
    background: #22c55e !important;
    color: #000 !important;
    font-size: 11px !important;
    padding: 4px 10px !important;
}

.detective-disclaimer {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(100, 100, 100, 0.1);
    border: 1px solid rgba(100, 100, 100, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #a0a0a0;
    line-height: 1.5;
}

.detective-disclaimer svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #888;
}

.detective-disclaimer strong {
    color: #d4af37;
}

.detective-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.detective-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.detective-card:hover {
    border-color: #444;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.detective-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.detective-card-type {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detective-card-type svg {
    width: 14px;
    height: 14px;
}

.detective-card-type.red-flag-type {
    color: #ef4444;
}

.detective-card-type.pattern-type {
    color: #f59e0b;
}

.detective-card-type.connection-type {
    color: #3b82f6;
}

.confidence-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.3);
}

.confidence-high {
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.confidence-medium {
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.5);
}

.confidence-low {
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.5);
}

.detective-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.detective-card-description {
    font-size: 14px;
    color: #a0a0a0;
    margin-bottom: 12px;
    line-height: 1.5;
}

.detective-entities {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.entity-tag {
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    color: #d4af37;
    cursor: pointer;
    transition: all 0.2s ease;
}

.entity-tag:hover {
    background: rgba(212, 175, 55, 0.25);
    border-color: #d4af37;
}

.detective-card-sources {
    font-size: 11px;
    color: #666;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #2a2a2a;
}

.sources-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #888;
}

.sources-header svg {
    width: 12px;
    height: 12px;
}

.sources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.api-tag {
    font-size: 9px;
    padding: 2px 6px;
    background: rgba(100, 100, 100, 0.2);
    border: 1px solid rgba(100, 100, 100, 0.3);
    border-radius: 3px;
    color: #888;
}

/* Circular Confidence Gauge */
.confidence-gauge {
    position: relative;
    width: 60px;
    height: 60px;
}

.confidence-gauge svg {
    transform: rotate(0deg);
}

.confidence-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.confidence-percent {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.detective-card-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #d4af37;
    text-decoration: none;
    margin-top: 8px;
}

.detective-card-action:hover {
    text-decoration: underline;
}

.detective-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #2a2a2a;
}

.detective-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    transition: color 0.2s ease;
}

.detective-link:hover {
    color: #d4af37;
}

.detective-timestamp {
    font-size: 12px;
    color: #666;
}

/* Card variants */
.detective-card.red-flag {
    border-left: 3px solid #ef4444;
}

.detective-card.pattern {
    border-left: 3px solid #f59e0b;
}

.detective-card.connection {
    border-left: 3px solid #3b82f6;
}

/* ============================================
   IMPROVED MOBILE STYLES FOR NEW ELEMENTS
   ============================================ */

/* Summary card with actual results */
.summary-card.has-results {
    border-color: var(--green);
    background: var(--green-bg);
}

.summary-card.has-results .count {
    color: var(--green);
}

/* Flagged card is RED not green */
.summary-card.has-flagged {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.summary-card.has-flagged .count {
    color: #ef4444;
}

@media (max-width: 768px) {
    .stat-modal-content {
        padding: 20px;
        margin: 16px;
    }
    
    .stat-modal-value {
        font-size: 2rem;
    }
    
    .stat-modal-link {
        padding: 10px 20px;
        font-size: 13px;
        width: 100%;
        display: block;
    }
    
    .hero-source-note {
        margin: -5px 0 16px;
    }
    
    .source-badge {
        font-size: 10px;
        padding: 4px 10px;
    }
    
    .trending-card .new-badge,
    .story-card .new-badge {
        top: -8px;
        right: 12px;
        padding: 3px 8px;
        font-size: 9px;
    }
}
/* ============================================
   DETECTIVE INSIGHT BOX (Purple AI Analysis)
   ============================================ */

.detective-insight-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    padding: 12px 14px;
    margin: 12px 0;
}

.detective-insight-header {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #a78bfa;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.detective-insight-header svg {
    stroke: #a78bfa;
}

.detective-insight-text {
    color: #e9d5ff;
    font-size: 13px;
    line-height: 1.5;
    font-style: italic;
    margin: 0 0 8px 0;
}

.detective-insight-sig {
    display: block;
    text-align: right;
    color: #7c3aed;
    font-size: 11px;
    font-weight: 500;
}

/* Field Report in AI Briefing */
.briefing-modal-body {
    white-space: pre-wrap;
}

.field-report-label {
    color: #a78bfa;
    font-weight: 600;
}
/* ============================================
    POLARIS SCAN - REMAINING STYLES
    Add these to the bottom of your styles.css
    ============================================ */

/* Detective Capabilities */
.detective-capabilities {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0 24px 0;
}

.capability {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 20px;
    font-size: 12px;
    color: #d4af37;
    transition: all 0.2s ease;
}

.capability:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: #d4af37;
}

.capability svg {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

/* Footer Agent Links */
.footer-agent-links {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.agent-link-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.agent-link-btn:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.agent-link-btn.diagnostic-link {
    border-color: #4a9eff;
    color: #4a9eff;
}

.agent-link-btn.diagnostic-link:hover {
    background: rgba(74, 158, 255, 0.1);
}

/* Detective Footer Links */
.detective-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #222;
}

.detective-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #888;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.detective-link:hover {
    color: #d4af37;
}

.detective-timestamp {
    margin-left: auto;
    font-size: 12px;
    color: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .detective-capabilities {
        justify-content: center;
    }
    
    .detective-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detective-timestamp {
        margin-left: 0;
    }
    
    .footer-agent-links {
        flex-direction: column;
    }
    
    .agent-link-btn {
        width: 100%;
        justify-content: center;
    }
}
