/* =========================================
   бебебе с бабаба
   ========================================= */

@font-face {
  font-family: 'UnifontEX';
  src: url('/fonts/Unifontexmono-lxY45.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'MadouFuto';
  src: url('/fonts/MadouFutoMaruGothic-d9Xo7.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg:        #1a1a2e;
  --bg2:       #16213e;
  --panel:     #0f3460;
  --panel2:    #1a1a3e;
  --accent1:   #e94560;
  --accent2:   #00d4ff;
  --accent3:   #ffe066;
  --text:      #e8e8f0;
  --text-dim:  #9999bb;
  --border:    #3a3a6a;
  --link:      #00d4ff;
  --link-hover:#ff6ec7;
  --box-bg:    rgba(15,30,80,0.85);
  --box-border:#3a3a9a;
  --title-bg:  linear-gradient(90deg, #e94560, #c42080, #e94560);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(100,0,180,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 10%, rgba(0,212,255,0.12) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect width='40' height='40' fill='none'/%3E%3Cpath d='M0 20h40M20 0v40' stroke='%23ffffff06' stroke-width='1'/%3E%3C/svg%3E");
  font-family: 'UnifontEX', 'Courier New', monospace;
  font-size: 14px;
  color: var(--text);
  min-height: 100vh;
  padding: 0 0 40px;
}

/* ===================== лэёт ===================== */

.site-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===================== хидер ===================== */

.site-header {
  text-align: center;
  padding: 28px 16px 10px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 18px;
  position: relative;
}
.site-header::after {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent2), var(--accent1), var(--accent2), transparent);
  margin-top: 12px;
  animation: scanline 3s linear infinite;
}
@keyframes scanline {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.site-title {
  font-family: 'MadouFuto', 'UnifontEX', monospace;
  font-size: clamp(22px, 5vw, 38px);
  color: var(--accent2);
  text-shadow: 0 0 10px var(--accent2), 0 0 30px rgba(0,212,255,0.4);
  letter-spacing: 2px;
  animation: glitchTitle 8s infinite;
}
@keyframes glitchTitle {
  0%, 92%, 100% { text-shadow: 0 0 10px var(--accent2), 0 0 30px rgba(0,212,255,0.4); transform: none; }
  93%  { transform: translate(-2px, 0); text-shadow: 2px 0 var(--accent1), -2px 0 var(--accent2); }
  94%  { transform: translate(2px, 0);  text-shadow: -2px 0 var(--accent1), 2px 0 var(--accent2); }
  95%  { transform: none; }
}

.site-subtitle {
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 4px;
  letter-spacing: 3px;
}

/* ===================== navi ===================== */

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 14px 0;
}
.site-nav a {
  display: inline-block;
  padding: 5px 14px;
  background: var(--panel);
  border: 1px solid var(--box-border);
  color: var(--accent3);
  text-decoration: none;
  font-size: 13px;
  font-family: 'MadouFuto', monospace;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  position: relative;
}
.site-nav a::before { content: '> '; color: var(--accent1); }
.site-nav a:hover {
  background: var(--accent1);
  color: #fff;
  box-shadow: 0 0 10px var(--accent1);
}
.site-nav a.active {
  background: var(--accent2);
  color: var(--bg);
  font-weight: bold;
}

/* ===================== КОРОБКИ ===================== */

.box {
  background: var(--box-bg);
  border: 1px solid var(--box-border);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.box::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--title-bg);
  background-size: 200%;
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.box-title {
  font-family: 'MadouFuto', monospace;
  font-size: 13px;
  color: var(--accent3);
  padding: 5px 10px;
  background: rgba(0,0,0,0.4);
  border-bottom: 1px solid var(--border);
  letter-spacing: 1px;
}

.box-content {
  padding: 10px 12px;
  line-height: 1.7;
}
.box-content p { margin-bottom: 6px; }
.box-content p:last-child { margin-bottom: 0; }

/* ===================== фон ===================== */

.page-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 640px) {
  .page-grid { grid-template-columns: 1fr; }
}

/* ===================== сайдбары ===================== */

.sidebar {}

.profile-pic {
  display: block;
  width: 100%;
  max-width: 180px;
  margin: 0 auto 10px;
  border: 2px solid var(--box-border);
  image-rendering: auto;
}

.sidebar-info {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.8;
}
.sidebar-info strong { color: var(--accent2); }

/* ===================== навигацЫя ссылки ===================== */

.nav-links { list-style: none; }
.nav-links li { border-bottom: 1px solid rgba(255,255,255,0.06); }
.nav-links a {
  display: block;
  padding: 7px 10px;
  color: var(--link);
  text-decoration: none;
  transition: background 0.1s, padding-left 0.1s;
}
.nav-links a:hover {
  background: rgba(255,255,255,0.05);
  color: var(--link-hover);
  padding-left: 16px;
}

/* ===================== button wall ===================== */

.button-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px 0;
}
.button-wall img { image-rendering: pixelated; }
.button-wall a { display: inline-block; line-height: 0; }
.button-wall a:hover img { outline: 1px solid var(--accent1); }

/* ===================== мэйн контен ===================== */

.main-content {}

/* ===================== updates ===================== */

.updates-entry {
  border-left: 3px solid var(--accent1);
  padding: 8px 12px;
  margin-bottom: 12px;
  background: rgba(0,0,0,0.2);
}
.updates-entry .date {
  font-size: 11px;
  color: var(--accent3);
  font-family: 'MadouFuto', monospace;
  margin-bottom: 4px;
}

/* ===================== фан ===================== */

.fun-list { list-style: none; }
.fun-list li {
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.fun-list li:last-child { border: none; }
.fun-list a {
  color: var(--link);
  text-decoration: none;
}
.fun-list a:hover { color: var(--link-hover); }

/* ===================== ссылке ===================== */

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

/* ===================== 8ball ===================== */

.eightball-wrap {
  text-align: center;
  padding: 10px;
}
.eightball-wrap img.ball-img {
  width: 180px;
  height: 180px;
  margin: 10px auto;
  display: block;
  image-rendering: pixelated;
  transition: transform 0.3s;
  filter: drop-shadow(0 0 12px var(--accent1));
}
.eightball-wrap img.ball-img.shake {
  animation: shake 0.5s ease-in-out;
}
@keyframes shake {
  0%,100%{ transform: rotate(0); }
  20%    { transform: rotate(-8deg) scale(1.05); }
  40%    { transform: rotate(8deg) scale(0.95); }
  60%    { transform: rotate(-5deg); }
  80%    { transform: rotate(5deg); }
}

.ball-answer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 60px;
  background: #000;
  border: 2px solid var(--accent2);
  color: var(--accent2);
  font-family: 'MadouFuto', monospace;
  font-size: 15px;
  margin: 10px auto;
  box-shadow: 0 0 14px rgba(0,212,255,0.4) inset;
  text-align: center;
  padding: 6px;
}

.ball-cat {
  max-width: 340px;
  width: 100%;
  margin: 10px auto;
  display: block;
}

.ask-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}
.ask-form input {
  width: 260px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--box-border);
  color: var(--text);
  font-family: 'UnifontEX', monospace;
  font-size: 13px;
  outline: none;
}
.ask-form input:focus { border-color: var(--accent2); box-shadow: 0 0 6px rgba(0,212,255,0.4); }
.ask-form button {
  padding: 6px 20px;
  background: var(--accent1);
  border: none;
  color: #fff;
  font-family: 'MadouFuto', monospace;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.ask-form button:hover { background: #c42060; box-shadow: 0 0 10px var(--accent1); }

/* ===================== about ===================== */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 540px) { .about-grid { grid-template-columns: 1fr; } }

.info-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.info-table tr { border-bottom: 1px solid rgba(255,255,255,0.07); }
.info-table td { padding: 5px 6px; }
.info-table td:first-child { color: var(--accent3); white-space: nowrap; padding-right: 12px; }

/* ===================== nahui ===================== */

.back-btn {
  display: inline-block;
  padding: 6px 16px;
  background: var(--panel);
  border: 1px solid var(--box-border);
  color: var(--accent2);
  font-family: 'MadouFuto', monospace;
  font-size: 13px;
  text-decoration: none;
  margin-top: 10px;
  transition: background 0.15s, box-shadow 0.15s;
}
.back-btn:hover {
  background: var(--accent2);
  color: var(--bg);
  box-shadow: 0 0 10px var(--accent2);
}

/* ===================== footer ===================== */

.site-footer {
  text-align: center;
  padding: 16px;
  color: var(--text-dim);
  font-size: 11px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.site-footer img { vertical-align: middle; }

/* ===================== scrollbar ===================== */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--panel); border: 1px solid var(--border); }
::-webkit-scrollbar-thumb:hover { background: var(--accent1); }

/* ===================== SELECTION!!!!!!! ===================== */

::selection { background: var(--accent1); color: #fff; }

/* ===================== gif ===================== */
.float-gif { display: block; margin: 8px auto; max-width: 100%; }
