/* Optional font import – remove if you want zero external resources */
@import url('https://fonts.googleapis.com/css2?family=VT323&family=IBM+Plex+Mono:wght@400;600&display=swap');

:root{
  /* Base */
  --bg: #05040a;
  --panel: rgba(12, 8, 18, 0.78);
  --border: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.88);
  --muted: rgba(255,255,255,.60);

  /* Theme colors */
  --violet: #b58cff;
  --violet-deep: #7a5cff;
  --blood: #ff3d6e;
  --blood-dark: #b3113a;

  --shadow: rgba(0,0,0,.60);
  --radius: 12px;
  --px: 2px;
}

/* Pixel aesthetic */
*{
  box-sizing: border-box;
  image-rendering: pixelated;
}

html, body{
  height: 100%;
}

body{
  margin: 0;

  /* Deep layered, no “scroll cut” */
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 800px at 20% 10%, rgba(122,92,255,.12), transparent 70%),
    radial-gradient(1000px 700px at 80% 15%, rgba(255,61,110,.08), transparent 70%),
    radial-gradient(1400px 1000px at 50% 120%, rgba(181,140,255,.06), transparent 75%),
    linear-gradient(180deg,
      #05040a 0%,
      #06030c 40%,
      #07020e 70%,
      #05040a 100%
    );
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;

  color: var(--text);

  font-family:
    "IBM Plex Mono",
    ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Courier New", monospace;

  letter-spacing: .2px;

/* === Cursor FX (buddy + falling glitter) === */
#cursorBuddy{
  position: fixed;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-9999px, -9999px);
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.95;
  filter: drop-shadow(0 0 10px rgba(181,140,255,.22));
}

.cursor-spark{
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.9;
  will-change: transform, opacity;
  filter: drop-shadow(0 0 8px rgba(255,255,255,.12));
  animation:
    sparkFall var(--fallMs, 2200ms) linear forwards,
    sparkTwinkle var(--twMs, 650ms) ease-in-out infinite;
}

/* Shapes */
.cursor-spark.star{
  clip-path: polygon(
    50% 0%, 61% 35%, 98% 35%, 68% 57%,
    79% 91%, 50% 70%, 21% 91%, 32% 57%,
    2% 35%, 39% 35%
  );
}
.cursor-spark.diamond{
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
.cursor-spark.cross{
  clip-path: polygon(
    40% 0%, 60% 0%, 60% 40%, 100% 40%,
    100% 60%, 60% 60%, 60% 100%, 40% 100%,
    40% 60%, 0% 60%, 0% 40%, 40% 40%
  );
}
.cursor-spark.dot{
  border-radius: 999px;
  clip-path: none;
}

@keyframes sparkFall{
  0%{
    transform: translate3d(var(--dx, 0px), var(--dy, 0px), 0) rotate(var(--rot, 0deg)) scale(1);
    opacity: 0.95;
  }
  100%{
    transform: translate3d(calc(var(--dx, 0px) + var(--drift, 0px)),
                           calc(var(--dy, 0px) + 140px), 0)
              rotate(calc(var(--rot, 0deg) + 140deg)) scale(0.75);
    opacity: 0;
  }
}

@keyframes sparkTwinkle{
  0%{ filter: drop-shadow(0 0 6px rgba(255,255,255,.08)); }
  50%{ filter: drop-shadow(0 0 12px rgba(255,255,255,.18)); }
  100%{ filter: drop-shadow(0 0 6px rgba(255,255,255,.08)); }
}

@media (prefers-reduced-motion: reduce){
  #cursorBuddy, .cursor-spark{ display: none !important; }
}

/* Effects layers (behind content) */
#snow,
#sparkle{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Subtle grain */
.noise{
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .08;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.05), rgba(255,255,255,.05) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.03) 1px, transparent 1px, transparent 4px);
  mix-blend-mode: overlay;
}

.wrap{
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 18px 46px;
}

.panel{
  background: var(--panel);
  border: var(--px) solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 40px var(--shadow);
  backdrop-filter: blur(6px);
  outline: 1px solid rgba(181,140,255,.08);
}

/* Header */
.top{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.badge{
  padding: 6px 10px;
  border: var(--px) solid rgba(255,255,255,.12);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(0,0,0,.18);
}

.status{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.dot{
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--blood), var(--violet));
  box-shadow:
    0 0 12px rgba(181,140,255,.35),
    0 0 10px rgba(255,61,110,.25);
}

/* Hero */
.hero{
  padding: 22px 18px;
  margin-bottom: 20px;
  position: relative;
}

.hero::after{
  content: "🐇 †";
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 12px;
  opacity: .6;
}

h1{
  margin: 0 0 8px;
  font-family: "VT323", monospace;
  font-size: 44px;
  letter-spacing: 1px;
  text-transform: lowercase;
  text-shadow:
    0 0 16px rgba(181,140,255,.15),
    0 0 20px rgba(255,61,110,.10);
}

.sub{
  margin: 0 0 16px;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.5;
}

/* Buttons */
.ctaRow{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn{
  display: inline-block;
  padding: 10px 14px;
  border: var(--px) solid rgba(181,140,255,.35);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(180deg, rgba(181,140,255,.15), rgba(0,0,0,.15));
  transition: .12s ease;
}

.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,61,110,.45);
  background: linear-gradient(180deg, rgba(255,61,110,.15), rgba(181,140,255,.18));
}

.btn.ghost{
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.14);
}

/* Grid layout */
/* Rooms layout – single column centered */
.grid{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Make room panels narrower and centered */
#rooms .card{
  width: 100%;
  max-width: 720px;
}

@media (max-width: 760px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  padding: 16px;
}

h2{
  margin: 0 0 10px;
  font-size: 15px;
}

h2::before{
  content: "🦇 ";
}

.small{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Links */
.links{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.links a{
  color: var(--blood);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,61,110,.45);
  transition: .15s ease;
}

.links a:hover{
  color: #ff6b8f;
  border-bottom-color: #ff6b8f;
}

.links a:hover{
  border-bottom-color: rgba(255,61,110,.60);
}

/* 88x31 placeholders */
.buttons{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.miniBtn{
  width: 88px;
  height: 31px;
  border: var(--px) solid rgba(255,255,255,.14);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 11px;
  background: linear-gradient(180deg, rgba(255,61,110,.08), rgba(0,0,0,.20));
  color: rgba(255,255,255,.55);
}

/* Footer */
.foot{
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(255,255,255,.50);
}

.sep{
  opacity: .4;
}

/* Selection */
::selection{
  background: rgba(255,61,110,.25);
}

/* === Gallery Tiles (used in gallery.html) === */
.galleryGrid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.galleryTile{
  text-decoration: none;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
  box-shadow: 0 14px 28px rgba(0,0,0,.45);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.galleryTile:hover{
  transform: translateY(-2px);
  border-color: rgba(181,140,255,.35);
  box-shadow:
    0 18px 35px rgba(0,0,0,.55),
    0 0 18px rgba(181,140,255,.15);
}

.thumb{
  width: 100%;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(1.05) contrast(1.05) brightness(0.95);
  transition: filter .2s ease, transform .2s ease;
}

.galleryTile:hover .thumb{
  filter: saturate(1.15) contrast(1.1) brightness(1);
  transform: scale(1.03);
}

.tileCaption{
  display: block;
  padding: 10px;
  font-size: 12px;
  text-align: center;
  color: rgba(255,255,255,.70);
  border-top: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.25));
}
/* === Shrine (Archive layout) === */

.shrineIndex{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.shrineIndex a{
  color: rgba(255,255,255,.78);
  text-decoration: none;
  border-bottom: 1px dotted rgba(181,140,255,.35);
}

.shrineIndex a:hover{
  border-bottom-color: rgba(255,61,110,.55);
}

.tileGrid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

/* Tiles reuse your gallery look, just alias names */
.tile{
  text-decoration: none;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
  box-shadow: 0 14px 28px rgba(0,0,0,.45);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.tile:hover{
  transform: translateY(-2px);
  border-color: rgba(181,140,255,.35);
  box-shadow:
    0 18px 35px rgba(0,0,0,.55),
    0 0 18px rgba(181,140,255,.12);
}

.quoteBox{
  margin-top: 10px;
}

.sepLine{
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  margin: 10px 0;
}
#rooms h2{
  color: var(--violet);
  text-shadow: 0 0 12px rgba(181,140,255,.25);
}
/* Room headings in violet */
#rooms h2{
  color: var(--violet);
  text-shadow: 0 0 12px rgba(181,140,255,.18);
}

/* Links default: red theme */
.links a{
  color: var(--blood);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,61,110,.45);
  transition: .15s ease;
}

.links a:hover{
  color: #ff6b8f;
  border-bottom-color: #ff6b8f;
}

/* Random violet glow class (JS toggles this) */
.links a.glowPulse{
  color: var(--violet) !important;
  border-bottom-color: rgba(181,140,255,.55) !important;
  text-shadow:
    0 0 10px rgba(181,140,255,.35),
    0 0 18px rgba(181,140,255,.18);
}
.aboutFacts{
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  line-height: 1.6;
  color: var(--text);
}

.aboutLink{
  color: var(--blood);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,61,110,.45);
  transition: .15s ease;
}

.aboutLink:hover{
  color: var(--violet);
  border-bottom-color: rgba(181,140,255,.5);
}

/* Discord status box */
.discordBox{
  margin-top: 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.7);
}

.discordDot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #777;
  box-shadow: 0 0 6px rgba(255,255,255,.1);
}

/* Status colors */
.discordDot.online{
  background: #43b581;
  box-shadow: 0 0 8px rgba(67,181,129,.5);
}

.discordDot.idle{
  background: #faa61a;
  box-shadow: 0 0 8px rgba(250,166,26,.5);
}

.discordDot.dnd{
  background: #f04747;
  box-shadow: 0 0 8px rgba(240,71,71,.5);
}

.discordDot.offline{
  background: #555;
  box-shadow: none;
}

/* === Blog page === */

.blogEntry{
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  box-shadow: 0 14px 26px rgba(0,0,0,.35);
}

.entryHead{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

.entryTitle{
  color: var(--violet);
  font-size: 15px;
  letter-spacing: .2px;
  text-shadow: 0 0 12px rgba(181,140,255,.18);
}

.entryDate{
  color: rgba(255,255,255,.55);
  font-size: 12px;
}

.entryText{
  color: rgba(255,255,255,.83);
  line-height: 1.65;
  margin: 0 0 10px 0;
}

.entryMore{
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 10px;
}

.entryMore summary{
  cursor: pointer;
  color: var(--blood);
  user-select: none;
  width: fit-content;
  border-bottom: 1px dotted rgba(255,61,110,.45);
}

.entryMore summary:hover{
  color: #ff6b8f;
  border-bottom-color: #ff6b8f;
}

.entryMoreBody{
  margin-top: 10px;
}

.entryFoot{
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.entryLink{
  color: rgba(255,255,255,.6);
  text-decoration: none;
  border-bottom: 1px dotted rgba(181,140,255,.25);
  font-size: 12px;
}

.entryLink:hover{
  color: var(--violet);
  border-bottom-color: rgba(181,140,255,.5);
}

/* === Blog entry frame: ornate, archival === */
.blogEntry{
  position: relative;
  margin-top: 18px;
  padding: 16px 16px 14px;
  border-radius: 14px;

  /* double frame feel */
  border: 1px solid rgba(181,140,255,.22);
  outline: 1px solid rgba(255,61,110,.14);
  outline-offset: -6px;

  background:
    linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.18));
  box-shadow:
    0 16px 30px rgba(0,0,0,.45),
    0 0 18px rgba(181,140,255,.06);
}

/* corner sigils */
.blogEntry::before,
.blogEntry::after{
  position: absolute;
  font-size: 12px;
  letter-spacing: 2px;
  opacity: .75;
  color: rgba(181,140,255,.75);
  text-shadow: 0 0 10px rgba(181,140,255,.18);
  pointer-events: none;
}

.blogEntry::before{
  content: "✦ † ✦";
  top: 10px;
  left: 12px;
}

.blogEntry::after{
  content: "✦ † ✦";
  bottom: 10px;
  right: 12px;
}

/* subtle divider under the header */
.entryHead{
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px dashed rgba(255,255,255,.10);
}