:root{
  --bg:#050708;
  --panel:#101416;
  --panel2:#151b1f;
  --cyan:#00ffd0;
  --gold:#ffb000;
  --red:#ff4444;
  --text:#e8e8e8;
  --muted:#8b949e;
  --line:#30363d;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  background:
    radial-gradient(circle at top,rgba(0,255,208,.12),transparent 32%),
    linear-gradient(180deg,#071013,#020303 70%);
  color:var(--text);
}

.hidden{display:none!important}

#boot-screen{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.boot-box{
  width:100%;
  max-width:560px;
  background:#050707;
  border:1px solid var(--cyan);
  border-radius:18px;
  padding:24px;
  box-shadow:0 0 24px rgba(0,255,208,.28);
  font-family:monospace;
}

.boot-title{
  color:var(--cyan);
  letter-spacing:4px;
  font-size:28px;
  margin-bottom:18px;
  text-align:center;
}

#boot-text{
  color:#b8fff3;
  line-height:1.7;
  min-height:190px;
}

#app{
  min-height:100vh;
  max-width:1150px;
  margin:auto;
  padding:12px;
}

.topbar{
  border:1px solid rgba(0,255,208,.35);
  border-radius:18px;
  padding:18px;
  background:rgba(5,7,8,.88);
  box-shadow:0 0 22px rgba(0,255,208,.12);
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
}

.system-label{
  color:var(--cyan);
  font-size:12px;
  letter-spacing:3px;
}

h1{
  margin:5px 0 0;
  font-size:34px;
  letter-spacing:3px;
}

.access-badge{
  border:1px solid var(--gold);
  color:var(--gold);
  border-radius:999px;
  padding:9px 12px;
  font-family:monospace;
  white-space:nowrap;
}

.layout{
  display:grid;
  grid-template-columns:230px 1fr;
  gap:14px;
  margin-top:14px;
}

.sidebar{
  background:rgba(5,7,8,.88);
  border:1px solid rgba(0,255,208,.3);
  border-radius:16px;
  padding:10px;
}

.nav-btn{
  width:100%;
  margin-bottom:8px;
  padding:13px;
  border-radius:12px;
  border:1px solid transparent;
  background:transparent;
  color:#d8d8d8;
  text-align:left;
  font-size:15px;
}

.nav-btn.active,
.nav-btn:hover{
  border-color:var(--cyan);
  color:var(--cyan);
  background:rgba(0,255,208,.07);
}

.window{
  background:rgba(5,7,8,.88);
  border:1px solid rgba(0,255,208,.3);
  border-radius:16px;
  overflow:hidden;
}

.window-header{
  border-bottom:1px solid rgba(0,255,208,.22);
  padding:13px 15px;
  display:flex;
  justify-content:space-between;
  color:var(--cyan);
  font-family:monospace;
  letter-spacing:2px;
}

.window-status{
  color:var(--gold);
}

.window-content{
  padding:15px;
}

.view{display:none}
.active-view{display:block}

.case-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}

.case-card,
.station,
.document-card,
.classified-card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
}

.case-image{
  background:#000;
  border-bottom:1px solid #333;
}

.case-image img{
  width:100%;
  height:auto;
  display:block;
}

.placeholder-lock{
  height:170px;
  background:
    radial-gradient(circle at center,rgba(255,68,68,.18),transparent 42%),
    linear-gradient(135deg,#111,#050505);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:58px;
  border-bottom:1px solid #333;
}

.case-body,
.station,
.document-card,
.classified-card{
  padding:15px;
}

.badge{
  display:inline-block;
  border:1px solid #555;
  color:#aaa;
  border-radius:999px;
  padding:5px 9px;
  font-family:monospace;
  font-size:12px;
  margin-bottom:10px;
}

.badge.active{
  border-color:var(--cyan);
  color:var(--cyan);
}

.badge.danger{
  border-color:var(--red);
  color:var(--red);
}

h2{
  margin:0 0 9px;
  color:var(--cyan);
  font-size:20px;
}

p{
  color:#d8d8d8;
  line-height:1.55;
}

.meta{
  color:var(--gold);
  font-family:monospace;
  font-size:13px;
}

.primary-btn{
  width:100%;
  border:1px solid var(--cyan);
  background:#06110f;
  color:var(--cyan);
  border-radius:11px;
  padding:12px;
  font-weight:bold;
  font-size:15px;
}

.primary-btn:hover{
  box-shadow:0 0 14px rgba(0,255,208,.32);
}

.locked{
  opacity:.68;
}

.terminal-note{
  border:1px solid rgba(0,255,208,.35);
  background:#050707;
  border-radius:14px;
  padding:14px;
  color:#b8fff3;
  font-family:monospace;
  line-height:1.6;
  margin-bottom:14px;
}

.station{
  margin-bottom:14px;
}

.player{
  margin-top:10px;
}

audio{
  width:100%;
  margin-top:10px;
}

input{
  width:100%;
  margin:8px 0 10px;
  padding:12px;
  border-radius:10px;
  border:1px solid #333;
  background:#050505;
  color:var(--cyan);
  font-family:monospace;
  font-size:16px;
}

.message{
  color:var(--gold);
  min-height:20px;
  margin-top:8px;
  font-size:14px;
}

.classified-card h2{
  color:var(--red);
}

footer{
  text-align:center;
  color:#777;
  padding:18px;
  font-size:13px;
}

@media(max-width:800px){
  #app{padding:8px}

  .topbar{
    display:block;
  }

  .access-badge{
    margin-top:12px;
    display:inline-block;
  }

  h1{
    font-size:28px;
  }

  .layout{
    grid-template-columns:1fr;
  }

  .sidebar{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }

  .nav-btn{
    margin:0;
    text-align:center;
    font-size:14px;
    padding:12px 8px;
  }

  .case-grid{
    grid-template-columns:1fr;
  }

  .boot-title{
    font-size:24px;
  }
}
#decrypt-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.86);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
  padding:18px;
}

#decrypt-overlay.active{
  display:flex;
}

.decrypt-box{
  width:100%;
  max-width:520px;
  background:#050707;
  border:1px solid var(--cyan);
  border-radius:18px;
  padding:22px;
  box-shadow:0 0 35px rgba(0,255,208,.35);
  font-family:monospace;
}

.decrypt-box h2{
  color:var(--cyan);
  margin-bottom:16px;
  letter-spacing:2px;
}

#decrypt-lines{
  color:#b8fff3;
  line-height:1.7;
  min-height:120px;
}

.decrypt-bar{
  margin-top:18px;
  height:9px;
  background:#111;
  border-radius:20px;
  overflow:hidden;
}

.decrypt-bar span{
  display:block;
  height:100%;
  width:100%;
  background:var(--cyan);
  box-shadow:0 0 12px var(--cyan);
  animation:decryptload 2.2s ease-in-out infinite;
}

@keyframes decryptload{
  0%{transform:translateX(-100%)}
  100%{transform:translateX(100%)}
}

.transcript-btn{
  margin-top:10px;
}

.transcript{
  margin-top:12px;
}

.transcript-text{
  background:#0b1113;
  border:1px solid var(--line);
  border-radius:14px;
  padding:15px;
  color:#e8e8e8;
  line-height:1.65;
}

.transcript-text p{
  margin-top:0;
}

.transcript-text code{
  color:var(--gold);
}
#profile-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.88);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:10000;
  padding:18px;
}

#profile-overlay.active{
  display:flex;
}

.profile-box{
  width:100%;
  max-width:520px;
  background:#050707;
  border:1px solid var(--cyan);
  border-radius:18px;
  padding:22px;
  box-shadow:0 0 35px rgba(0,255,208,.35);
}

.profile-title{
  color:var(--cyan);
  font-family:monospace;
  letter-spacing:3px;
  font-size:24px;
  margin-bottom:16px;
  text-align:center;
}

.progress-wrap{
  margin:12px 0;
}

.progress-label{
  color:var(--gold);
  font-family:monospace;
  font-size:12px;
  margin-bottom:6px;
}

.progress-bar{
  height:8px;
  background:#111;
  border-radius:999px;
  overflow:hidden;
  border:1px solid #333;
}

.progress-bar span{
  display:block;
  height:100%;
  background:var(--cyan);
  box-shadow:0 0 12px var(--cyan);
}
/* ===========================
   SYSTEMPROTOKOLL / CHRONIK
=========================== */

.logbook{
    list-style:none;
    padding:0;
    margin:18px 0 0;
    font-family:monospace;
}

.logbook li{
    padding:10px 0;
    border-bottom:1px solid rgba(255,255,255,.08);
    color:#d8d8d8;
    line-height:1.5;
}

.logbook li:last-child{
    border-bottom:none;
}

.logbook span{
    display:inline-block;
    width:95px;
    color:var(--cyan);
    font-weight:bold;
}

.document-card{
    margin-bottom:22px;
}

.document-card h2{
    margin-bottom:10px;
}

.document-card .meta{
    color:#9fa8b2;
    margin-bottom:8px;
}

.document-card p{
    line-height:1.6;
}

.document-card .progress-wrap{
    margin-top:18px;
}
/* ===========================
   ERMITTLERAKTE
=========================== */

.investigator-card{
  background:linear-gradient(180deg,#101416,#070b0d);
  border:1px solid rgba(0,255,208,.35);
  border-radius:16px;
  padding:16px;
  margin-bottom:22px;
  box-shadow:0 0 18px rgba(0,255,208,.10);
}

.investigator-card h2{
  color:var(--cyan);
  margin:0 0 16px;
  letter-spacing:2px;
}

.profile-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
  margin-top:12px;
}

.profile-field{
  background:#0b1113;
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
}

.profile-field span{
  display:block;
  color:var(--muted);
  font-size:12px;
  font-family:monospace;
  margin-bottom:5px;
}

.profile-field strong{
  color:var(--text);
  font-size:15px;
}

.mission-list{
  list-style:none;
  padding:0;
  margin:14px 0 0;
}

.mission-list li{
  padding:10px 0;
  border-bottom:1px solid rgba(255,255,255,.08);
  color:#d8d8d8;
}

.mission-list li span{
  display:inline-block;
  width:28px;
}

.mission-list li.done{
  color:var(--cyan);
}

.mission-list li.locked{
  color:#777;
}

@media(max-width:800px){
  .profile-grid{
    grid-template-columns:1fr;
  }
}
/* ===========================
   DEV CONSOLE
=========================== */

#dev-button{
    position:fixed;
    bottom:20px;
    right:20px;
    z-index:9999;

    background:#00ffe0;
    color:#000;
    border:none;
    border-radius:12px;
    padding:10px 16px;

    font-family:monospace;
    font-weight:bold;
    cursor:pointer;

    box-shadow:0 0 18px rgba(0,255,220,.45);
}

#dev-overlay{
    position:fixed;
    inset:0;

    background:rgba(0,0,0,.85);

    display:none;
    justify-content:center;
    align-items:flex-start;

    overflow:auto;

    padding:40px 20px;

    z-index:10000;
}

#dev-overlay.active{
    display:flex;
}

.dev-box{
    width:min(950px,100%);
    background:#081010;
    border:2px solid #00ffe0;
    border-radius:18px;
    padding:30px;
    position:relative;
}

.dev-close{
    position:absolute;
    top:15px;
    right:15px;

    width:40px;
    height:40px;

    border:none;
    border-radius:10px;

    cursor:pointer;

    background:#111;
    color:#00ffe0;
    font-size:22px;
}

.dev-case{
    margin-top:25px;
    padding:20px;

    border:1px solid rgba(0,255,220,.3);
    border-radius:12px;

    background:#0d1515;
}

.dev-case h3{
    color:#00ffe0;
}

.dev-code-list{
    list-style:none;
    padding:0;
    margin-top:15px;
}

.dev-code-list li{
    display:flex;
    justify-content:space-between;

    padding:8px 0;

    border-bottom:1px solid rgba(255,255,255,.08);

    font-family:monospace;
}

.dev-code-list code{
    color:#ffd34d;
    font-weight:bold;
    font-size:15px;
}
/* ===========================
   PROFIL BEARBEITEN
=========================== */

.secondary-btn{
  background:transparent;
  color:var(--cyan);
  border:1px solid rgba(0,255,208,.45);
  margin-top:8px;
}

.secondary-btn:hover{
  background:rgba(0,255,208,.08);
}

#profile-edit-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.88);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:10000;
  padding:18px;
}

#profile-edit-overlay.active{
  display:flex;
}
#leaflet-map{
  width:100%;
  height:360px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(0,255,208,.35);
  margin:16px 0;
  background:#050707;
}

.leaflet-container{
  background:#050707;
  font-family:inherit;
}

.map-station-list{
  margin-top:18px;
}
.arkanus-marker{
  width:28px;
  height:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  background:transparent !important;
  box-shadow:none !important;
  animation:none !important;
}

@keyframes arkanusPulse{

0%{
transform:scale(1);
box-shadow:0 0 8px #00ffd0;
}

50%{
transform:scale(1.15);
box-shadow:0 0 25px #00ffd0;
}

100%{
transform:scale(1);
box-shadow:0 0 8px #00ffd0;
}

}
.gps-panel{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  margin:14px 0 10px;
}

.gps-status{
  color:#9aa;
  font-size:14px;
  letter-spacing:.08em;
}
.gps-panel{
    position: relative;
    z-index: 1001;
}

#gps-start-btn{
    position: relative;
    z-index: 1002;
    pointer-events: auto;
}

#leaflet-map{
    position: relative;
    z-index: 1;
}
.gps-panel{
  position: relative !important;
  z-index: 99999 !important;
  pointer-events: auto !important;
}

#gps-start-btn{
  position: relative !important;
  z-index: 100000 !important;
  pointer-events: auto !important;
  touch-action: manipulation;
}

#leaflet-map{
  position: relative !important;
  z-index: 1 !important;
}
.player-location-dot{
  width:18px;
  height:18px;
  border-radius:50%;
  background:#00aaff;
  border:3px solid #ffffff;
  box-shadow:0 0 10px rgba(0,170,255,.9);
}
#install-banner{
  position:fixed;
  left:12px;
  right:12px;
  bottom:14px;
  z-index:9998;

  background:#050707;
  border:1px solid var(--cyan);
  border-radius:14px;
  padding:12px;

  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;

  box-shadow:0 0 22px rgba(0,255,208,.22);
}

#install-banner span{
  color:var(--text);
  font-size:14px;
}

#install-banner button{
  border:1px solid var(--cyan);
  background:transparent;
  color:var(--cyan);
  border-radius:10px;
  padding:8px 10px;
}
#install-banner{
  position:fixed;
  left:12px;
  right:12px;
  bottom:14px;
  z-index:9998;

  background:#050707;
  border:1px solid var(--cyan);
  border-radius:14px;
  padding:12px;

  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;

  box-shadow:0 0 22px rgba(0,255,208,.22);
}

#install-banner.hidden{
  display:none;
}

#install-banner span{
  color:var(--text);
  font-size:14px;
}

#install-banner button{
  border:1px solid var(--cyan);
  background:transparent;
  color:var(--cyan);
  border-radius:10px;
  padding:8px 10px;
}