@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

/* GENEL AYARLAR */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background-color: #0b0f19; color: #e2e8f0;
    font-family: 'Inter', sans-serif; height: 100vh; overflow: hidden;
}

/* MODERN SCROLLBAR */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb {
    background: #334155; border-radius: 10px; border: 2px solid #0f172a;
}
::-webkit-scrollbar-thumb:hover { background: #38bdf8; }

/* --- MODERN GİRİŞ EKRANI STİLLERİ --- */

#login-screen {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #05070a;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    font-family: 'Orbitron', sans-serif; /* Daha fütüristik bir hava için */
}

/* Çakar Efektleri */
.siren-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.siren {
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: sirenPulse 4s infinite alternate;
}

.siren.red {
    background: #ff0000;
    top: -20%;
    left: -10%;
}

.siren.blue {
    background: #0044ff;
    bottom: -20%;
    right: -10%;
    animation-delay: 2s;
}

@keyframes sirenPulse {
    0% { opacity: 0.05; transform: scale(1); }
    50% { opacity: 0.25; transform: scale(1.1); }
    100% { opacity: 0.05; transform: scale(1); }
}

/* Giriş Kartı (Glassmorphism) */
.login-card {
    position: relative;
    z-index: 10;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 50px;
    width: 420px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.logo-wrapper {
    margin-bottom: 30px;
}

.floating-logo {
    width: 130px;
    filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.4));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-card h1 {
    color: #f8fafc;
    font-size: 26px;
    letter-spacing: 4px;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.login-card p {
    color: #94a3b8;
    font-size: 13px;
    letter-spacing: 1px;
    margin-bottom: 30px;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.5), transparent);
    margin-bottom: 35px;
}

/* Modern Discord Butonu */
.modern-dc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #5865F2;
    color: white;
    text-decoration: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 15px -3px rgba(88, 101, 242, 0.4);
}

.modern-dc-btn:hover {
    transform: translateY(-3px) scale(1.02);
    background: #4752C4;
    box-shadow: 0 20px 25px -5px rgba(88, 101, 242, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.modern-dc-btn i {
    font-size: 20px;
}

/* LAYOUT */
#app-container { display: flex; width: 100%; height: 100%; }

/* SIDEBAR SOL */
.sidebar-left {
    width: 280px; background: #111827; border-right: 1px solid #1f2937;
    display: flex; flex-direction: column; justify-content: space-between;
}
.logo-area { padding: 25px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid #1f2937; }
.logo-area img { width: 40px; }

.nav-menu { list-style: none; padding: 20px 0; }
.nav-item {
    padding: 15px 25px; color: #94a3b8; cursor: pointer; transition: 0.2s;
    display: flex; align-items: center; gap: 15px; font-weight: 600;
}
.nav-item:hover, .nav-item.active { background: #1f2937; color: #38bdf8; border-right: 4px solid #38bdf8; }
.admin-nav-item { color: #fbbf24 !important; border-top: 1px dashed rgba(251, 191, 36, 0.2); margin-top: 15px !important; }

.sidebar-bottom { border-top: 1px solid #1f2937; background: #0f172a; }
.profile-area { padding: 15px; display: flex; align-items: center; gap: 12px; }
#profil-avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #38bdf8; }
.profile-info #sol-alt-isim { font-size: 14px; font-weight: bold; }
.profile-info #sol-alt-sicil { font-size: 11px; color: #94a3b8; }

/* MESAI HUD */
.duty-hud { padding: 15px; text-align: center; }
#duty-timer { font-size: 24px; color: #38bdf8; font-weight: bold; margin-bottom: 8px; text-shadow: 0 0 10px rgba(56, 189, 248, 0.4); }
#duty-btn {
    padding: 8px; border-radius: 20px; font-size: 12px; font-weight: 800; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent;
}
.duty-btn-off { background: rgba(255, 255, 255, 0.05); color: #94a3b8; }
.duty-btn-on { background: rgba(239, 68, 68, 0.2); color: #ef4444; border-color: #ef4444; animation: pulse 2s infinite; }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ANA İÇERİK ALANI */
.main-content { flex-grow: 1; padding: 40px; overflow-y: auto; background: #0b0f19; }
.header-top { display: flex; justify-content: space-between; margin-bottom: 30px; }

.card { background: #1e293b; padding: 30px; border-radius: 12px; border: 1px solid #334155; }
.golden-border { border-left: 5px solid #fbbf24; }
.red-border { border-left: 5px solid #ef4444; }

#main-announcement-area {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 30px; border-radius: 12px; border-left: 5px solid #38bdf8; margin-bottom: 25px;
}

/* FORM ELEMENTLERİ */
.form-group { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
input, select, textarea {
    padding: 12px; background: #0f172a; border: 1px solid #334155; color: white; border-radius: 8px; outline: none;
}
.btn-primary { background: #fbbf24; color: #0f172a; border: none; padding: 15px; font-weight: 800; border-radius: 8px; cursor: pointer; }
.btn-danger { background: #ef4444; color: white; border: none; padding: 15px; font-weight: 800; border-radius: 8px; cursor: pointer; }

/* TELSİZ (CHAT) */
.chat-card { background: #1e293b; border-radius: 12px; height: 400px; display: flex; flex-direction: column; margin-top: 30px; }
.chat-header { padding: 15px; background: #0f172a; font-weight: bold; color: #38bdf8; border-radius: 12px 12px 0 0; }
.chat-messages { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.message { max-width: 80%; padding: 10px; border-radius: 8px; font-size: 14px; }
.message.me { align-self: flex-end; background: #0284c7; color: white; }
.message.other { align-self: flex-start; background: #334155; color: white; }
.sender { font-size: 10px; opacity: 0.7; display: block; margin-bottom: 4px; }

.chat-input-area { padding: 15px; display: flex; gap: 10px; background: #0f172a; border-radius: 0 0 12px 12px; }
#chat-input { flex: 1; }
#send-btn { background: #38bdf8; border: none; padding: 0 20px; border-radius: 8px; cursor: pointer; }

/* AKTIF PERSONEL LİSTESİ */
.sidebar-right { width: 300px; background: #111827; border-left: 1px solid #1f2937; }
.sidebar-header { padding: 25px; border-bottom: 1px solid #1f2937; display: flex; justify-content: space-between; }
#online-count { background: #22c55e; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.personnel-list { list-style: none; padding: 15px; }
.person { display: flex; align-items: center; gap: 10px; padding: 12px; background: #1e293b; margin-bottom: 8px; border-radius: 8px; }
.status-dot { width: 10px; height: 10px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 8px #22c55e; }
/* --- SİBER POLİS LED EFEKTLERİ --- */
@keyframes led-pulse-blue {
    0% { box-shadow: 0 0 5px #38bdf8, inset 0 0 5px #38bdf8; }
    50% { box-shadow: 0 0 20px #0284c7, inset 0 0 10px #0284c7; }
    100% { box-shadow: 0 0 5px #38bdf8, inset 0 0 5px #38bdf8; }
}

@keyframes led-pulse-red {
    0% { border-color: #ef4444; box-shadow: 0 0 5px #ef4444; }
    50% { border-color: #ff0000; box-shadow: 0 0 20px #dc2626; }
    100% { border-color: #ef4444; box-shadow: 0 0 5px #ef4444; }
}

/* Duyuru Paneli Modernizasyon */
#main-announcement-area {
    display: none; /* JS ile açılana kadar kapalı */
    flex-direction: column; /* Elemanları alt alta diz */
    justify-content: center; /* Dikeyde ortala */
    align-items: flex-start; /* Yatayda sola yasla */
    gap: 8px; /* Yazıların arasındaki boşluk */
    padding: 25px;
    min-height: 130px; /* Kutunun boyutu sabit kalsın ki kaymasın */
    
    /* Eski LED ve border kodların burada kalmaya devam etsin */
    position: relative;
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid #38bdf8 !important;
    animation: led-pulse-blue 3s infinite ease-in-out;
}

/* Aktif olduğunda Flex olarak açılmasını garanti ediyoruz */
#main-announcement-area.active {
    display: flex !important;
}

/* Başlık ve alt metin çakışmasın diye */
#announcement-title {
    margin: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 10px;
}

#announcement-text {
    margin: 5px 0 0 0;
    display: block; /* Yanına bir şey gelmesine izin verme */
}
#main-announcement-area {
    position: relative;
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid #38bdf8 !important;
    animation: led-pulse-blue 3s infinite ease-in-out;
    overflow: hidden;
}

#main-announcement-area::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, #38bdf8, transparent);
    animation: scanline 2s linear infinite;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Telsiz (Chat) Alanı Yeni Stil */
.chat-card {
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.chat-header {
    background: #1e293b !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    border-bottom: 2px solid #38bdf8 !important;
}

.message {
    border-left: 3px solid #38bdf8;
    background: rgba(30, 41, 59, 0.5) !important;
    margin-bottom: 10px;
    backdrop-filter: blur(5px);
}

.message.me {
    border-left: none;
    border-right: 3px solid #38bdf8;
    background: rgba(2, 132, 199, 0.2) !important;
}

/* Profil ve Mesai HUD Işıltısı */
#profil-avatar {
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
    border: 2px solid #38bdf8 !important;
}

#duty-timer {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
}

/* Acil Durum LED'i (Kırmızı Duyuru İçin) */
.emergency-led {
    animation: led-pulse-red 0.8s infinite !important;
}
/* --- MODERN AKTİF PERSONEL KARTI --- */
#online-users-list {
    list-style: none;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.person {
    background: rgba(15, 23, 42, 0.4) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.1) !important;
    border-radius: 10px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.3s all ease;
    position: relative;
    overflow: hidden;
}

.person:hover {
    background: rgba(56, 189, 248, 0.1) !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
    transform: translateX(-5px);
}

/* Aktiflik Işığı (Glow Efekti) */
.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 10px #22c55e;
}

.person-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* İsim ve Sicil Satırı */
.person-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.p-name {
    color: #f8fafc;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.p-sicil {
    color: #38bdf8;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    background: rgba(56, 189, 248, 0.1);
    padding: 1px 5px;
    border-radius: 4px;
}

/* Rütbe (Küçük ve Zarif) */
.p-rank {
    color: #94a3b8;
    font-size: 11px;
    text-transform: capitalize; /* Sadece baş harfler büyük */
    letter-spacing: 1px;
}
.message { margin-bottom: 15px; display: flex; flex-direction: column; }
.message.me { align-items: flex-end; }
.message.other { align-items: flex-start; }

.msg-content {
    background: rgba(30, 41, 59, 0.6);
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    max-width: 80%;
}

.message.me .msg-content {
    background: rgba(2, 132, 199, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
}

.msg-header { font-size: 10px; margin-bottom: 5px; display: flex; gap: 5px; }
.msg-sicil { color: #38bdf8; font-weight: bold; }
.msg-rank { color: #94a3b8; font-style: italic; }
.msg-text { color: #f1f5f9; font-size: 13px; margin: 0; }
.msg-time { font-size: 9px; color: #64748b; margin-top: 5px; display: block; text-align: right; }
/* --- SİBER ŞİFRE PANELİ STİLLERİ --- */
.auth-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(5, 7, 10, 0.85);
    backdrop-filter: blur(10px);
    display: none; /* JS ile açılacak */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.auth-card {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 20px;
    padding: 35px;
    width: 350px;
    text-align: center;
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.1);
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.auth-header i { font-size: 40px; color: #38bdf8; margin-bottom: 15px; }
.auth-header h3 { color: #f8fafc; font-size: 18px; letter-spacing: 2px; margin: 10px 0; }
.auth-header p { color: #94a3b8; font-size: 12px; }

#admin-pass-input {
    width: 100%;
    background: rgba(5, 7, 10, 0.5);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 15px;
    border-radius: 10px;
    color: #38bdf8;
    text-align: center;
    font-size: 24px;
    letter-spacing: 10px;
    margin-top: 20px;
}

.auth-btn {
    padding: 12px 25px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    margin-top: 25px;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
}

.auth-btn.cancel { background: rgba(244, 63, 94, 0.1); color: #f43f5e; margin-right: 10px; }
.auth-btn.confirm { background: #0284c7; color: white; }
.auth-btn:hover { transform: translateY(-2px); opacity: 0.8; }

.auth-error-text { color: #f43f5e; font-size: 11px; margin-top: 10px; display: none; }