@font-face {
  font-family: "ArchiveFont";
  src: url("fonts/GameCube.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* =========================
   GLOBAL VARIABLES
   ========================= */
:root {
  --bg: #050806;
  --panel: #0b120d;
  --text: #cfe8d8;
  --accent: #6dffb3;
  --border: rgba(76, 255, 154, 0.25);
}

/* =========================
   BASE RESET
   ========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "ArchiveFont", monospace;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.35s ease;
  font-size: 14px;
}

body.page-visible {
  opacity: 1;
}

/* =========================
   BACKGROUND PATTERN
   ========================= */
.bg-pattern {
  position: fixed;
  inset: -50%;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(76,255,154,0.12) 0px,
      rgba(76,255,154,0.12) 2px,
      transparent 2px,
      transparent 18px
    );
  animation: drift 90s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(-400px, -400px); }
}

/* =========================
   LETTERBOX
   ========================= */
.letterbox {
  position: relative;
  width: 100%;
  background: black;
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 6px;
  z-index: 2;
}

/* =========================
   LAYOUT
   ========================= */
.layout {
  display: flex;
  margin-top: 40px;
  position: relative;
  z-index: 2;
}

/* =========================
   SIDEBAR
   ========================= */
.sidebar {
  width: 180px;
  padding: 20px;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(
      to bottom,
      rgba(255,255,255,0.04),
      rgba(0,0,0,0.6)
    );
  box-shadow:
    inset -1px 0 0 rgba(255,255,255,0.06),
    4px 0 20px rgba(0,0,0,0.5);
}

.logo {
  color: var(--accent);
  letter-spacing: 4px;
  text-shadow: 0 0 10px var(--accent);
  font-size: 16px;
}

.sidebar a {
  display: block;
  color: var(--text);
  text-decoration: none;
  margin: 10px 0;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 14px;
}

.sidebar a:hover {
  color: var(--accent);
  background: rgba(76, 255, 154, 0.1);
  box-shadow: 0 0 15px rgba(76, 255, 154, 0.3);
  text-shadow: 0 0 8px var(--accent);
}

.sidebar a.active {
  color: var(--accent);
  background: rgba(76, 255, 154, 0.15);
  box-shadow: 0 0 20px rgba(76, 255, 154, 0.4);
}

/* =========================
   CONTENT
   ========================= */
.content {
  flex: 1;
  padding: 20px;
}

.panel {
  background:
    linear-gradient(
      to bottom,
      rgba(255,255,255,0.08),
      rgba(0,0,0,0.65)
    ),
    rgba(8,14,10,0.85);

  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 8px 30px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.12);

  backdrop-filter: blur(6px);
  padding: 15px;
  margin-bottom: 20px;
}

/* =========================
   LINK COLORS
   ========================= */

a {
  color: #8fffd1;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
  text-shadow: 0 0 6px rgba(109,255,179,0.6);
}

.panel a {
  font-weight: bold;
}

/* =========================
   CATEGORY HEADERS
   ========================= */
.category-title {
  margin: 16px 0 8px;
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.category-title:hover {
  background: rgba(76, 255, 154, 0.1);
  box-shadow: 0 0 15px rgba(76, 255, 154, 0.2);
  text-shadow: 0 0 8px var(--accent);
}

.category-title::before {
  content: "▶";
  transition: transform 0.25s ease;
  display: inline-block;
}

.category-title.open::before {
  transform: rotate(90deg);
}

/* =========================
   GALLERY
   ========================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.art-card {
  background: var(--panel);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.art-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(76, 255, 154, 0.4);
  transform: translateY(-4px);
}

.art-card img {
  width: 100%;
  display: block;
  filter: brightness(0.9);
  transition: filter 0.3s ease;
}

.art-card:hover img {
  filter: brightness(1.1);
}

.art-info {
  padding: 8px;
}

.art-info h3 {
  margin: 0;
  font-size: 14px;
  color: var(--accent);
}

.art-info p {
  margin: 4px 0 0;
  font-size: 12px;
  opacity: 0.8;
}

/* =========================
   MUSIC
   ========================= */
.music-list {
  margin-top: 12px;
}

.music-list button {
  display: block;
  width: 100%;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px;
  margin-bottom: 6px;
  text-align: left;
  cursor: pointer;
  font-family: "ArchiveFont", monospace;
  transition: all 0.3s ease;
}

.music-list button:hover {
  background: rgba(76, 255, 154, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 15px rgba(76, 255, 154, 0.3);
  text-shadow: 0 0 8px var(--accent);
}

.music-player {
  position: fixed;
  inset: auto 0 0 0;
  background: black;
  padding: 6px;
  border-top: 1px solid var(--border);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
}

#track-name {
  color: var(--accent);
  font-size: 14px;
}

/* =========================
   FULLSCREEN
   ========================= */
#fullscreen {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  align-items: center;
  justify-content: center;
  z-index: 999;
  cursor: pointer;
}

#fullscreen img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 50px rgba(76, 255, 154, 0.5);
}