:root{
  --bg: #0a0a0a;
  --panel: #131313;
  --panel-2: #1a1a1a;
  --line: #2a2222;
  --text: #d6d0cc;
  --text-dim: #7a7270;
  --blood: #a3131d;
  --blood-bright: #d81f2a;
  --blood-glow: rgba(163,19,29,0.35);
}

*{box-sizing:border-box; margin:0; padding:0;}
html,body{height:100%;}
body{
  background:var(--bg);
  color:var(--text);
  font-family:'JetBrains Mono','Courier New',monospace;
  font-size:14px;
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed; inset:0;
  background:repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 1px, transparent 1px, transparent 3px);
  pointer-events:none;
  z-index:999;
}

/* ---------- ЭКРАН ЗАГРУЗКИ ---------- */
#boot{
  position:fixed; inset:0;
  background:#000;
  display:flex; flex-direction:column;
  align-items:flex-start; justify-content:center;
  padding:8vw;
  z-index:1000;
  transition:opacity .6s ease;
}
#boot.hidden{opacity:0; pointer-events:none;}
#bootLog{
  color:#8a8480;
  font-size:13px;
  line-height:1.9;
  white-space:pre-wrap;
  min-height:180px;
}
#bootLog .ok{color:var(--blood-bright);}
#continueBtn{
  margin-top:28px;
  background:none;
  border:1px solid var(--blood);
  color:var(--blood-bright);
  font-family:inherit;
  font-size:13px;
  padding:10px 22px;
  letter-spacing:1px;
  cursor:pointer;
  opacity:0;
  transition:opacity .4s ease, background .2s ease;
}
#continueBtn.show{opacity:1;}
#continueBtn:hover{background:var(--blood-glow);}

/* ---------- ОСНОВНОЙ ЭКРАН ---------- */
#main{
  max-width:1200px;
  margin:0 auto;
  padding:0 0 60px;
  opacity:0;
  transition:opacity .8s ease;
}
#main.show{opacity:1;}

.topnav{
  display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid var(--line);
  background:var(--panel-2);
  padding:0 16px;
}
.topnav .links{display:flex; flex-wrap:wrap; min-width:0;}
.topnav a{
  color:var(--text-dim);
  text-decoration:none;
  font-size:12px;
  padding:12px 14px;
  border-right:1px solid var(--line);
  transition:color .15s, background .15s;
}
.topnav a.home{color:var(--blood-bright);}
.topnav a:hover{color:var(--blood-bright); background:rgba(163,19,29,0.08);}
#clock{color:var(--text-dim); font-size:12px; letter-spacing:1px;}

.layout{
  display:grid;
  grid-template-columns:340px 1fr;
  gap:16px;
  padding:16px;
  min-width:0;
}
@media (max-width:820px){
  .layout{grid-template-columns:1fr;}
}

.col{display:flex; flex-direction:column; gap:16px;}

.box{
  border:1px solid var(--line);
  background:var(--panel);
}
.box-title{
  font-size:11px; color:var(--text-dim);
  text-transform:uppercase; letter-spacing:1.5px;
  padding:8px 14px;
  border-bottom:1px solid var(--line);
  background:var(--panel-2);
}
.box-body{padding:14px;}

.hero-video{
  position:relative;
  aspect-ratio:16/10;
  background:#000;
  overflow:hidden;
}
.hero-video video{
  width:100%; height:100%;
  object-fit:cover;
  pointer-events:none;
}

.ascii-container{
  padding:16px;
  display:flex;
  justify-content:center;
  align-items:center;
  background:#050505;
  overflow-x:auto;
}
#asciiArt{
  font-family: monospace;
  font-size: 11px;
  line-height: 11px;
  letter-spacing: 0px;
  color: var(--text);
  white-space: pre;
  text-align: center;
  user-select: none;
  text-shadow: 0 0 2px rgba(214, 208, 204, 0.25);
}

.player-info{
  font-size:12px;
  line-height:1.6;
  margin-bottom:12px;
}
.player-info .row{
  display:flex;
  gap:6px;
}
.player-info .label{color:var(--text-dim);}
.player-info .val{color:var(--text); font-weight:bold;}

.player-timer{
  font-size:13px;
  color:var(--blood-bright);
  margin:10px 0 6px 0;
  letter-spacing:1px;
  display:flex;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
}

.progress-bar-bg{
  width:100%;
  height:6px;
  background:var(--panel-2);
  border:1px solid var(--line);
  margin-bottom:12px;
  overflow:hidden;
}
.progress-bar-fill{
  width:0%;
  height:100%;
  background:var(--blood-bright);
  transition:width 0.2s linear;
}

.player-controls{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.player-btn{
  background:var(--panel-2);
  border:1px solid var(--line);
  color:var(--text);
  font-family:inherit;
  font-size:11px;
  padding:6px 10px;
  cursor:pointer;
  transition:all .15s ease;
  box-shadow:2px 2px 0px #000;
}
.player-btn:hover{
  border-color:var(--blood);
  color:var(--blood-bright);
  background:rgba(163,19,29,0.15);
}
.player-btn:active{
  transform:translate(1px, 1px);
  box-shadow:1px 1px 0px #000;
}
.player-btn span.red{color:var(--blood-bright);}

.id-bar{
  font-size:11px; color:var(--text-dim);
  padding:10px 14px; border:1px solid var(--line); background:var(--panel);
}
.id-bar b{color:var(--text);}

.profile-announce{
  display:grid; grid-template-columns:1fr 1fr; gap:16px;
}
@media (max-width:640px){ .profile-announce{grid-template-columns:1fr;} }

.field{display:flex; font-size:12px; padding:6px 0; border-bottom:1px solid var(--line);}
.field:last-child{border-bottom:none;}
.field .k{width:100px; color:var(--text-dim); flex-shrink:0;}
.field .v a{color:var(--text); text-decoration:none;}
.field .v a:hover{color:var(--blood-bright);}
.field .v.copyable{cursor:pointer; transition:color .15s ease;}
.field .v.copyable:hover{color:var(--blood-bright);}

.quote-box{
  display:flex;
  flex-direction:column;
  justify-content:center;
  height:100%;
  gap:6px;
}
.quote-ru{
  color:var(--blood-bright);
  font-size:13px;
  font-weight:bold;
  letter-spacing:0.5px;
}
.quote-sub{
  color:var(--text-dim);
  font-size:11px;
  font-style:italic;
}
.quote-ascii{
  color:var(--blood-bright);
  font-family:monospace;
  font-size:11px;
  line-height:1.25;
  white-space:pre;
  overflow-x:auto;
  margin:0;
}

.about-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:4px 20px;
  font-size:12px;
}
@media (max-width:640px){ .about-grid{grid-template-columns:1fr;} }
.about-grid .row{display:flex; justify-content:space-between; border-bottom:1px solid var(--line); padding:5px 0;}
.about-grid .row .k{color:var(--text-dim);}
.about-grid .row .v{color:var(--text); text-align:right;}

footer{
  border-top:1px solid var(--line);
  padding:14px 16px;
  font-size:11px; color:var(--text-dim);
  text-align:center;
}

@media (max-width:480px){
  .topnav{
    align-items:stretch;
    flex-direction:column;
    padding:0;
  }
  .topnav .links{
    width:100%;
  }
  .topnav a{
    flex:1 1 25%;
    padding:11px 7px;
    text-align:center;
  }
  #clock{
    padding:8px 10px;
    border-top:1px solid var(--line);
    text-align:right;
  }
  .layout{
    gap:10px;
    padding:10px;
  }
  .col{
    gap:10px;
    min-width:0;
  }
  .ascii-container{
    justify-content:flex-start;
    padding:10px;
  }
  #asciiArt{
    font-size:8px;
    line-height:8px;
  }
  .box-body{
    padding:10px;
  }
  .field .k{
    width:90px;
  }
}