/* ============================================================
   HABER BİLDİRİM SİSTEMİ — CYBER OPS THEME v2.3
   ============================================================ */

:root {
    --bg-0: #0a0e1a;
    --bg-1: #0d1424;
    --cy: #22d3ee;
    --vi: #a78bfa;
    --pk: #f472b6;
    --em: #10b981;
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100vw; }
img, canvas, video { max-width: 100%; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-0);
    color: #e2e8f0;
    min-height: 100vh;
    position: relative;
}

/* ---------- Background FX ---------- */
.bg-grid {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(34,211,238,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(167,139,250,0.04) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at 50% 30%, black 20%, transparent 85%);
    -webkit-mask-image: radial-gradient(circle at 50% 30%, black 20%, transparent 85%);
}
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
    animation: float 16s ease-in-out infinite;
}
.orb-1 { width: 560px; height: 560px; background: radial-gradient(circle, #06b6d4 0%, transparent 70%); top: -180px; left: -180px; }
.orb-2 { width: 520px; height: 520px; background: radial-gradient(circle, #8b5cf6 0%, transparent 70%); bottom: -160px; right: -160px; animation-delay: -6s; }
.orb-3 { width: 400px; height: 400px; background: radial-gradient(circle, #ec4899 0%, transparent 70%); top: 50%; left: 40%; opacity: 0.22; animation-delay: -12s; }
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -40px) scale(1.08); }
}
.matrix-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0; opacity: 0.08;
}

/* ---------- Glass Card ---------- */
.glass {
    background: linear-gradient(160deg, rgba(22,30,48,0.85) 0%, rgba(12,18,32,0.92) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(148,163,184,0.12);
    box-shadow:
        0 20px 50px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(255,255,255,0.05);
    border-radius: 20px;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    max-width: 100%;
    overflow: hidden;
}
.glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(34,211,238,0.25), transparent 45%, transparent 55%, rgba(167,139,250,0.25));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 3;
}
.glass:hover {
    border-color: rgba(34,211,238,0.28);
    box-shadow:
        0 26px 60px rgba(0,0,0,0.55),
        0 0 40px rgba(34,211,238,0.08),
        inset 0 1px 0 rgba(255,255,255,0.07);
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
body.login-body { min-height: 100vh; overflow-x: hidden; }
.login-body .brand-logo {
    width: 92px; height: 92px;
    margin: 0 auto;
    border-radius: 26px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0891b2 0%, #7c3aed 100%);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.1),
        0 20px 40px rgba(124,58,237,0.4),
        0 0 60px rgba(34,211,238,0.35);
    position: relative;
}
.login-body .brand-logo::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 32px;
    background: conic-gradient(from 0deg, #22d3ee, #a78bfa, #f472b6, #22d3ee);
    opacity: 0.35;
    filter: blur(14px);
    z-index: -1;
    animation: spin 8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.login-body .brand-logo i { font-size: 44px; color: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); }

.title-grad {
    background: linear-gradient(90deg, #22d3ee 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.input-modern {
    width: 100%;
    padding: 14px 44px 14px 16px;
    background: rgba(8,12,22,0.85);
    border: 1px solid rgba(148,163,184,0.18);
    border-radius: 12px;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    transition: all 0.25s;
}
.input-modern::placeholder { color: rgba(148,163,184,0.4); }
.input-modern:focus {
    outline: none;
    border-color: rgba(34,211,238,0.6);
    box-shadow: 0 0 0 4px rgba(34,211,238,0.12), 0 0 24px rgba(34,211,238,0.25);
    background: rgba(8,12,22,0.95);
}
.btn-primary {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    color: #fff;
    background: linear-gradient(135deg, #0891b2 0%, #7c3aed 100%);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow:
        0 10px 30px rgba(124,58,237,0.35),
        0 0 0 1px rgba(34,211,238,0.15),
        inset 0 1px 0 rgba(255,255,255,0.15);
    transition: all 0.25s;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    position: relative;
    overflow: hidden;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 15px 40px rgba(124,58,237,0.5),
        0 0 0 1px rgba(34,211,238,0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}
.btn-primary:hover::after { transform: translateX(100%); }
.error-box {
    background: linear-gradient(135deg, rgba(244,63,94,0.12), rgba(244,63,94,0.05));
    border: 1px solid rgba(244,63,94,0.35);
    border-left: 3px solid #f43f5e;
    color: #fda4af;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    display: flex; align-items: center; gap: 8px;
}
.status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    color: #6ee7b7;
    font-size: 10px;
    letter-spacing: 0.1em;
    font-weight: 600;
}
.status-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}
.eye-toggle {
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    color: rgba(148,163,184,0.6);
    cursor: pointer;
    transition: color 0.2s;
    background: none; border: none; padding: 4px;
    font-size: 18px;
    display: flex;
}
.eye-toggle:hover { color: #22d3ee; }
.time-badge {
    position: fixed; top: 16px; left: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: rgba(34,211,238,0.6);
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(8,12,22,0.6);
    border: 1px solid rgba(34,211,238,0.15);
    backdrop-filter: blur(8px);
    z-index: 10;
}
.tag-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgba(148,163,184,0.4);
    letter-spacing: 0.08em;
    margin-top: 16px;
}

/* ============================================================
   PANEL PAGE
   ============================================================ */
.header-glass {
    background: linear-gradient(180deg, rgba(10,14,26,0.92) 0%, rgba(10,14,26,0.72) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148,163,184,0.12);
}
.logo-badge {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0891b2 0%, #7c3aed 100%);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.08),
        0 8px 20px rgba(124,58,237,0.4),
        0 0 24px rgba(34,211,238,0.3);
}
.logo-badge i { color: #fff; font-size: 20px; }
.header-title {
    background: linear-gradient(90deg, #22d3ee 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.btn-glass {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    border: 1px solid rgba(148,163,184,0.18);
    background: rgba(22,30,48,0.6);
    color: #cbd5e1;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}
.btn-glass:hover {
    border-color: rgba(34,211,238,0.5);
    background: rgba(34,211,238,0.1);
    color: #67e8f9;
    transform: translateY(-1px);
}
.btn-cyan   { background: linear-gradient(135deg, rgba(34,211,238,0.15), rgba(34,211,238,0.05));  border-color: rgba(34,211,238,0.4);  color: #67e8f9; }
.btn-cyan:hover   { background: linear-gradient(135deg, rgba(34,211,238,0.28), rgba(34,211,238,0.12)); color: #a5f3fc; }
.btn-amber  { background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.05));  border-color: rgba(245,158,11,0.4);  color: #fcd34d; }
.btn-amber:hover  { background: linear-gradient(135deg, rgba(245,158,11,0.28), rgba(245,158,11,0.12)); color: #fde68a; }
.btn-rose   { background: linear-gradient(135deg, rgba(244,63,94,0.15), rgba(244,63,94,0.05));    border-color: rgba(244,63,94,0.4);    color: #fda4af; }
.btn-rose:hover   { background: linear-gradient(135deg, rgba(244,63,94,0.28), rgba(244,63,94,0.12)); color: #fecdd3; }
.btn-violet { background: linear-gradient(135deg, rgba(167,139,250,0.15), rgba(167,139,250,0.05)); border-color: rgba(167,139,250,0.4); color: #c4b5fd; }
.btn-violet:hover { background: linear-gradient(135deg, rgba(167,139,250,0.28), rgba(167,139,250,0.12)); color: #ddd6fe; }
.btn-pink   { background: linear-gradient(135deg, rgba(244,114,182,0.15), rgba(244,114,182,0.05)); border-color: rgba(244,114,182,0.4); color: #f9a8d4; }
.btn-pink:hover   { background: linear-gradient(135deg, rgba(244,114,182,0.28), rgba(244,114,182,0.12)); color: #fbcfe8; }

.status-live {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.35);
    color: #6ee7b7;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 700;
    letter-spacing: 0.06em;
    color: #e2e8f0;
    text-transform: uppercase;
}
.section-title i { color: #22d3ee; font-size: 18px; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(15,22,38,0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0891b2, #7c3aed);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #22d3ee, #a78bfa); }

pre, code, .mono { font-family: 'JetBrains Mono', monospace; }

.scan-line-fast {
    position: absolute; top: 0; left: -100%;
    width: 200%; height: 2px;
    background: linear-gradient(90deg, transparent, #22d3ee, #a78bfa, transparent);
    animation: scanFast 4s linear infinite;
    pointer-events: none; z-index: 2;
    opacity: 0.6;
}
@keyframes scanFast {
    0% { top: 0%; left: -100%; }
    100% { top: 100%; left: 100%; }
}

.form-input, .form-textarea {
    width: 100%;
    background: rgba(8,12,22,0.8);
    border: 1px solid rgba(148,163,184,0.18);
    border-radius: 10px;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    transition: all 0.2s;
    padding: 10px 12px;
    resize: none;
}
.form-textarea { line-height: 1.5; }
.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: rgba(34,211,238,0.55);
    box-shadow: 0 0 0 3px rgba(34,211,238,0.1), 0 0 20px rgba(34,211,238,0.15);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.04));
    border: 1px solid rgba(16,185,129,0.35);
    border-left: 3px solid #10b981;
    color: #6ee7b7;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    display: flex; align-items: center; gap: 10px;
}
.alert-warn {
    background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(245,158,11,0.04));
    border: 1px solid rgba(245,158,11,0.35);
    border-left: 3px solid #f59e0b;
    color: #fcd34d;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    display: flex; align-items: center; gap: 10px;
}

/* ============================================================
   PANEL CARDS — FIXED HEIGHT + INTERNAL SCROLL
   ============================================================ */
.panel-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    height: 560px;
    overflow: hidden;
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
    gap: 10px;
    flex-wrap: wrap;
}
.panel-scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    border-radius: 12px;
    background: rgba(0,0,0,0.32);
    border: 1px solid rgba(148,163,184,0.1);
}
.log-stream {
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* ---------- Form Cards (Riskli Kelime / Instagram / RSS / Facebook) ---------- */
.form-card {
    display: flex;
    flex-direction: column;
    height: 460px;
    padding: 1.25rem;
    overflow: hidden;
}
.form-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 0;
    min-height: 0;
}
.form-stack .form-textarea {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
}

/* ---------- Telegram Panel ---------- */
.telegram-card {
    display: flex;
    flex-direction: column;
    height: 460px;
    padding: 1.25rem;
    overflow: hidden;
}
.telegram-scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ---------- Scoring Table ---------- */
.score-two-columns {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 1rem;
    min-height: 100%;
}
.score-three-columns {
    display: grid;
    grid-template-columns: 1fr 1px 1fr 1px 1fr;
    gap: 1rem;
    min-height: 100%;
}
.vertical-divider {
    background: linear-gradient(180deg, transparent, rgba(34,211,238,0.3), rgba(167,139,250,0.3), transparent);
    width: 1px;
}
.score-item {
    background: rgba(8,12,22,0.6);
    border: 1px solid rgba(148,163,184,0.12);
    border-radius: 10px;
    padding: 10px 12px;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.score-item:hover {
    border-color: rgba(34,211,238,0.3);
    background: rgba(34,211,238,0.05);
    transform: translateX(2px);
}
.score-badge {
    background: linear-gradient(135deg, #0891b2, #7c3aed);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    padding: 3px 9px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(124,58,237,0.35);
    white-space: nowrap;
}
.risk-badge {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(245,158,11,0.15);
    border: 1px solid rgba(245,158,11,0.3);
    color: #fcd34d;
    font-size: 10.5px;
    font-weight: 600;
}

/* ---------- Stat rows ---------- */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(148,163,184,0.1);
    font-size: 13px;
    gap: 12px;
    flex-wrap: wrap;
}
.stat-row:last-child { border-bottom: none; }
.stat-label {
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: 0.03em;
}
.stat-value {
    color: #e2e8f0;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    word-break: break-word;
    text-align: right;
}

/* ---------- Radar ---------- */
.radar-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    max-width: 400px;
    margin: 0 auto;
    background: radial-gradient(circle, rgba(8,20,32,0.8), rgba(5,10,20,0.9));
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(34,211,238,0.4);
    box-shadow:
        0 0 40px rgba(34,211,238,0.15),
        inset 0 0 40px rgba(34,211,238,0.06);
}
canvas#radarCanvas {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
}

/* ---------- World Map (taşma fix) ---------- */
.map-card {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#worldMapContainer {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 380px;
    background: radial-gradient(circle at 50% 50%, rgba(10,30,20,0.6), rgba(5,15,10,0.9));
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(34,211,238,0.15);
}
#flatWorldCanvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: block;
    max-width: 100%;
}

/* ---------- Chart (genişlik fix) ---------- */
.chart-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    background: rgba(8,12,22,0.4);
    border-radius: 12px;
    padding: 12px;
}
.chart-wrap canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

/* ---------- Misc ---------- */
.pill-mini {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .panel-card { height: 500px; }
    .form-card, .telegram-card { height: 420px; }
}

@media (max-width: 768px) {
    .score-two-columns,
    .score-three-columns {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        min-height: auto;
    }
    .vertical-divider { display: none; }
    #worldMapContainer { height: 300px; }
    .panel-card { height: 420px; padding: 0.85rem; }
    .panel-scroll { padding: 8px; }
    .form-card, .telegram-card { height: auto; min-height: 320px; padding: 1rem; }
    .form-stack .form-textarea { min-height: 180px; }
    .chart-wrap { height: 220px; }
}

@media (max-width: 480px) {
    .login-body .brand-logo { width: 76px; height: 76px; border-radius: 22px; }
    .login-body .brand-logo i { font-size: 36px; }
    .glass { border-radius: 18px; }
    .time-badge { font-size: 10px; padding: 5px 9px; }
    .panel-card { height: 380px; }
    #worldMapContainer { height: 240px; }
    .chart-wrap { height: 200px; }
}