/* ===== Base / Reset ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; }

html{
  cursor: url('https://cur.cursors-4u.net/holidays/hol-4/hol338.cur'), auto;
}

*{
  cursor: inherit;
}

/* ===== Variables ===== */
:root{
  --bg: #050607;
  --text: #e7e7ea;
  --muted: #a6a8b3;
  --accent: #7b2cff;
  --ryuk: #E84602;
}

/* ===== Global ===== */
body{
  background:
    radial-gradient(
      ellipse at center,
      #121318 0%,
      #07080b 50%,
      #020203 100%
    );
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Auch auf klickbaren Elementen den gleichen Cursor nutzen */
a,
button,
.enter-btn,
.sound-ui{
  cursor: url('https://cur.cursors-4u.net/holidays/hol-4/hol338.cur'), pointer;
}

/* Optional: Basics für Links */
a{ color: var(--text); }
a:hover{ color: #fff; }

/* Optional: später nützlich */
.hidden{ display:none !important; }

/* ===== Enter Page: Basic Layout ===== */

.enter-wrap{
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.enter-box{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

/* Ryuk Bild */
.enter-ryuk{
  max-width: 320px;
  width: 80vw;
  height: auto;
  user-select: none;
  pointer-events: none;
}

/* Mystischer Text */
.enter-line{
  font-family: ui-monospace, monospace;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.8px;
}

/* ===== Enter Button: 2000s Style ===== */

.enter-btn{
  margin-top: 16px;
  padding: 12px 26px;

  font-family: ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;

  color: var(--text);
  text-decoration: none;

  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;

  background:
    linear-gradient(
      to bottom,
      rgba(255,255,255,0.18),
      rgba(0,0,0,0.45)
    );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 0 0 1px rgba(0,0,0,0.6),
    0 10px 24px rgba(0,0,0,0.6);

  transition:
    box-shadow 0.15s ease,
    transform 0.12s ease,
    filter 0.15s ease;
}

.enter-btn:hover,
.enter-btn:focus-visible{
  transform: translateY(-1px);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 0 0 1px rgba(232,70,2,0.65),
    0 0 20px rgba(232,70,2,0.45),
    0 14px 30px rgba(0,0,0,0.7);

  filter: brightness(1.08);
}

.enter-btn:active{
  transform: translateY(1px);
  filter: brightness(0.95);
}

/* ===== Subtle Flicker ===== */

@keyframes flicker {
  0%   { opacity: 1; }
  2%   { opacity: 0.85; }
  4%   { opacity: 1; }
  8%   { opacity: 0.78; }
  10%  { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes micro-shift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-1px, 0.6px); }
  40%  { transform: translate(0.8px, -0.9px); }
  60%  { transform: translate(-0.7px, 0.5px); }
  80%  { transform: translate(0.6px, -0.7px); }
  100% { transform: translate(0, 0); }
}

.enter-ryuk{
  animation:
    flicker 6s infinite,
    micro-shift 8s infinite;
  filter:
    contrast(1.05)
    drop-shadow(0 10px 28px rgba(0,0,0,0.55));
}

.enter-line{
  animation:
    flicker 5s infinite;
}

/* ===== CRT Scanlines + Noise ===== */

.crt{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;

  background:
    /* Scanlines */
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.035) 0px,
      rgba(255,255,255,0.035) 1px,
      transparent 2px,
      transparent 4px
    ),
    /* Noise */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");

  mix-blend-mode: overlay;
  opacity: 0.35;
}

/* ===== Background Grain ===== */

.grain{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;

  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='1'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");

  opacity: 0.18;
}

/* ===== Slow TV Sweep ===== */

.tv-sweep{
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 300;

  background:
    linear-gradient(
      to bottom,
      transparent 0%,
      rgba(255,255,255,0.08) 45%,
      rgba(255,255,255,0.12) 50%,
      rgba(255,255,255,0.04) 55%,
      transparent 100%
    );

  animation: tv-sweep-move 26s linear infinite;
  opacity: 0.35;
}

@keyframes tv-sweep-move{
  from{
    transform: translateY(-30%);
  }
  to{
    transform: translateY(30%);
  }
}
/* ===== Enter Text: subtle signal glitch ===== */

.enter-line{
  position: relative;
  display: inline-block;
  will-change: transform, text-shadow, filter;
  animation: text-glitch 3.6s infinite;
}

/* Respektiert Systemeinstellung */
@media (prefers-reduced-motion: reduce){
  .enter-line{ animation: none; }
}

@keyframes text-glitch{
  0%, 88%, 100%{
    transform: translate(0,0);
    text-shadow: none;
    filter: none;
  }
  89%{
    transform: translate(-1px, 0);
    text-shadow: 1px 0 rgba(255,184,74,0.55), -1px 0 rgba(120,255,180,0.25);
  }
  90%{
    transform: translate(1px, 0);
    text-shadow: -1px 0 rgba(255,184,74,0.55), 1px 0 rgba(120,255,180,0.25);
    filter: contrast(1.08);
  }
  91%{
    transform: translate(0, 0);
    text-shadow: 0 0 10px rgba(255,184,74,0.18);
    filter: none;
  }
}

/* ===== Sound Placeholder ===== */

.sound-ui{
  position: fixed;
  left: 16px;
  bottom: 14px;
  z-index: 800;

  display: flex;
  align-items: center;
  gap: 8px;

  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;

  color: var(--muted);
  opacity: 0.8;
  user-select: none;
}

/* kleiner Statuspunkt */
.sound-dot{
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #444;
}

/* leichter Hover (rein visuell) */
.sound-ui:hover{
  color: var(--text);
  opacity: 1;
}

/* optional: wenn du willst, dass OFF “tot” wirkt */
.sound-ui[data-state="off"] .sound-dot{
  background: #333;
}

/* ===== Main Page Background Pattern ===== */
body.main-page{
  /* dein Pattern */
  background-image: url("Pictures/Skull.jpg");
  background-repeat: repeat;
  background-size: 400px auto;  /* Pattern-Größe: später feinjustieren */
  background-attachment: fixed;
  background-color: #050607;    /* fallback */
  position: relative;
}

/* dunkler Tint darüber, damit Content lesbar bleibt */
body.main-page::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  /* dunkelt ab + leichte Vignette */
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.78) 70%, rgba(0,0,0,0.88) 100%),
    rgba(0,0,0,0.20);
}

body.main-page > *{
  position: relative;
  z-index: 1;
}

/* ===== Main Layout (structure only) ===== */

.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
}

.site-title{
  font-family: ui-monospace, monospace;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-size: 13px;
}

.nav{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.layout{
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px 40px;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 16px;
}

.sidebar{ min-width: 0; }
.content{ min-width: 0; }

/* basic spacing for lists/posts */
.list{ margin: 0; padding-left: 18px; }
.post + .post{ margin-top: 12px; }
.footer{ margin-top: 16px; }

/* ===== Responsive ===== */
@media (max-width: 820px){
  .layout{
    grid-template-columns: 1fr;
  }
  .sidebar{ order: 2; }
  .content{ order: 1; }

  .topbar-inner{
    align-items: flex-start;
  }
}

/* ===== Panel Skin (2000s window) ===== */

.panel{
  position: relative;
  overflow: hidden;

  /* Platz für die Titlebar */
  padding: 44px 14px 14px;

  border-radius: 14px;
  border: 2px solid rgba(255,255,255,0.10);

  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.35));

  box-shadow:
    0 18px 55px rgba(0,0,0,0.65);
}

/* Titlebar oben */
.panel::before{
  content:"";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 34px;

  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

/* kleine "Fenster-Buttons" rechts */
.panel::after{
  content:"";
  position:absolute;
  top:10px;
  right:12px;
  width:52px; height:14px;

  background:
    radial-gradient(circle at 7px 7px, rgba(255,255,255,0.35) 0 4px, transparent 5px),
    radial-gradient(circle at 26px 7px, rgba(255,255,255,0.25) 0 4px, transparent 5px),
    radial-gradient(circle at 45px 7px, rgba(255,255,255,0.18) 0 4px, transparent 5px);
  opacity: .9;
}

.panel-title{
  /* sitzt “in” der Titlebar */
  position: absolute;
  top: 9px;
  left: 14px;
  margin: 0;

  font-family: ui-monospace, monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);

  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title::before{
  content:"";
  width: 14px;          /* Größe des Blinkies */
  height: 14px;

  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;

  filter:
    brightness(0.9)
    contrast(1.05)
    drop-shadow(0 0 6px rgba(0,0,0,0.6));

  opacity: 0.9;
}

.panel-title.icon-status::before{
  background-image: url("Pictures/Star Blinkie.gif");
}

.panel-title.icon-links::before{
  background-image: url("Pictures/Clip Blinkie.gif");
}

.panel-title.icon-posts::before{
  background-image: url("Pictures/Letter Blinkie.gif");
}

/* ===== Post Skin ===== */

.post{
  position: relative;
  padding: 12px;
  border-radius: 12px;

  border: 2px solid rgba(255,255,255,0.07);
  background:
    linear-gradient(180deg, rgba(0,0,0,0.22), rgba(0,0,0,0.40));

  box-shadow: 0 14px 30px rgba(0,0,0,0.55);
  overflow: hidden;
}

/* leichter “sticker” outline glow (sehr subtil) */
.post::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius: 14px;
  padding:2px;

  background: linear-gradient(
    90deg,
    rgba(232,70,2,0.22),
    rgba(255,255,255,0.06),
    rgba(232,70,2,0.16)
  );

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  opacity: .65;
  pointer-events: none;
}

.post-head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.post-title{
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.3px;
}

.post-date{
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
}

/* Text im Post etwas angenehmer */
.post p{
  margin: 8px 0 0;
  line-height: 1.5;
}

/* ===== Site Logo ===== */

.site-logo{
  height: 80px;
  width: auto;
  display: block;

  filter:
    brightness(2.0)
    contrast(1.1)
    drop-shadow(0 10px 20px rgba(0,0,0,0.55));
}

/* ===== Logo motion (same as Ryuk) ===== */
body.main-page .site-logo{
  animation:
    flicker 6s infinite,
    micro-shift 8s infinite;
  will-change: transform, opacity;
}

@keyframes logo-flicker{
  0%, 92%, 100% { opacity: 1; }
  93% { opacity: 0.92; }
  94% { opacity: 1; }
  97% { opacity: 0.88; }
  98% { opacity: 1; }
}

@keyframes logo-shift{
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-0.6px, 0.4px); }
  50%  { transform: translate(0.5px, -0.6px); }
  75%  { transform: translate(-0.4px, 0.3px); }
  100% { transform: translate(0,0); }
}

.footer{
  text-align: center;
  opacity: 0.75;
}

.footer a{
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,255,255,0.25);
}

.footer a:hover{
  color: var(--text);
  border-bottom-color: var(--ryuk);
}

/* ===== Override: Nav as ONE bar (no individual buttons) ===== */

.nav.nav-under{
  margin-left: 0;
  margin-top: 18px;          /* mehr Abstand zum Logo */
  padding: 8px 10px;
  border-radius: 10px;

  background: rgba(0,0,0,0.45);
  border: 2px solid rgba(255,255,255,0.08);
  box-shadow: 0 14px 28px rgba(0,0,0,0.55);

  display: flex;
  gap: 0;
  flex-wrap: wrap;
}

/* Links in der Bar: kein Button-Look */
.nav.nav-under a{
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;

  padding: 6px 10px;
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
}

/* Trenner wie alte Menüleisten */
.nav.nav-under a:not(:last-child){
  border-right: 1px solid rgba(255,255,255,0.10);
}

/* Hover: nur Farbe + kleiner Glow, kein “Button lift” */
.nav.nav-under a:hover,
.nav.nav-under a:focus-visible{
  color: var(--text);
  text-shadow: 0 0 10px rgba(232,70,2,0.25);
  filter: none;
  transform: none;
}

/* ===== Logo Blood Overlay ===== */

.logo-wrap{
  position: relative;
  display: inline-block;
}

/* Blut */
.logo-blood{
  position: absolute;
  left: 0;
  right: 0;
  bottom: -65px; /* minimaler Überhang, kein extra Abstand */
  width: 100%;
  height: auto;

  pointer-events: none;
  user-select: none;

  /* weicher Übergang ins Logo */
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.35) 10%,
    rgba(0,0,0,0.75) 22%,
    rgba(0,0,0,1) 40%,
    rgba(0,0,0,1) 100%
  );

  mask-image: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.35) 10%,
    rgba(0,0,0,0.75) 22%,
    rgba(0,0,0,1) 40%,
    rgba(0,0,0,1) 100%
  );

  filter:
    brightness(0.85)
    saturate(0.6)
    contrast(0.95)
    drop-shadow(0 6px 10px rgba(0,0,0,0.6));
}

/* ===== Header GRID (fix nav indent + align tools) ===== */

.topbar-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px 8px;

  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "logo tools"
    "nav  nav";
  gap: 10px 14px;
  align-items: start;
}

.logo-area{ grid-area: logo; }
.header-tools{ grid-area: tools; }
.nav.nav-under{ grid-area: nav; width: 100%; }

/* Nav full width aligned with layout */
.nav.nav-under{
  width: 100%;
  box-sizing: border-box;
}

/* mehr Abstand Logo -> Nav (ohne Layout unten zu verschieben) */
.nav.nav-under{
  margin-top: 10px;
}

/* ===== Search: NOT in a container (no box) ===== */

.search{
  display: flex;
  align-items: center;
  gap: 8px;

  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.search-input{
  width: 210px;

  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;

  padding: 8px 10px;
  color: var(--text);

  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 1px;
  outline: none;
}

.search-input:focus{
  border-color: rgba(232,70,2,0.45);
  box-shadow: 0 0 0 1px rgba(232,70,2,0.20), 0 0 14px rgba(232,70,2,0.14);
}

.search-btn{
  background: transparent;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  padding: 8px 10px;

  color: var(--muted);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.search-btn:hover{
  color: var(--text);
  border-color: rgba(232,70,2,0.35);
  box-shadow: 0 0 14px rgba(232,70,2,0.16);
}

.header-tools{
  margin-top: 18px; /* schiebt die Search nach unten */
}

/* ===== Nav separators (soft) ===== */
.nav.nav-under{
  gap: 0;              /* wir steuern Abstand pro Link */
}

.nav.nav-under a{
  font-family: "Cinzel", serif;
  font-size: 13px;          /* größer als vorher */
  font-weight: 600;

  letter-spacing: 2px;     /* mehr Luft = edler */
  line-height: 1;          /* WICHTIG: verhindert Höhenzuwachs */

  padding: 4px 14px;       /* weniger Padding gleicht größere Schrift aus */
}

/* Soft separator als kleiner Strich/Slash-Look */
.nav.nav-under a:not(:last-child){
  position: relative;
}

.nav.nav-under a:not(:last-child)::after{
  content: "│"; /* alternativ: "·" oder "/" */
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);

  color: rgba(255,255,255,0.18);
  text-shadow: 0 0 10px rgba(0,0,0,0.8);
  pointer-events: none;
}

/* ===== Nav bar with faded image pattern ===== */
.nav.nav-under{
  background:
    /* ausgebleichtes Pattern */
    linear-gradient(
      rgba(0,0,0,0.75),
      rgba(0,0,0,0.75)
    ),
    url("Pictures/Studs.jpg");

  background-repeat: repeat;
  background-size: 220px auto; /* Pattern-Größe */
  background-position: center;

  border: 2px solid rgba(255,255,255,0.08);
  box-shadow: 0 14px 28px rgba(0,0,0,0.55);
}

/* ACTIVE NAV: nur heller, keine Linien, keine Farben */
.nav.nav-under a.is-active{
  color: rgba(255,255,255,0.92) !important;
  text-shadow: none !important;
  filter: brightness(1.25) contrast(1.05);
  opacity: 1 !important;
}

/* ===== Linktr block ===== */
.linktr-block{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  margin: 6px 0 14px; /* oben/unten Luft */
}

/* Text über dem Bild */
.linktr-label{
  margin-bottom: 6px;

  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;

  color: var(--muted);
  opacity: 0.75;
}

/* Bild-Link */
#links .linktr{
  display: inline-block;
}

#links .linktr img{
  max-width: 150px;
  height: auto;
  opacity: 0.85;

  filter:
    contrast(1.28);

  transition:
    opacity 0.15s ease,
    filter 0.15s ease,
    transform 0.12s ease;
}

#links a:hover img{
  animation: hover-jitter 0.25s steps(1, end);
}

@keyframes hover-jitter {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-2px, 1px); }
  20%  { transform: translate(2px, -1px); }
  30%  { transform: translate(-1px, -2px); }
  40%  { transform: translate(1px, 2px); }
  50%  { transform: translate(-2px, 0); }
  60%  { transform: translate(2px, 1px); }
  70%  { transform: translate(-1px, 1px); }
  80%  { transform: translate(1px, -1px); }
  90%  { transform: translate(-2px, 2px); }
  100% { transform: translate(0, 0); }
}

