:root {
  --bg: #0f0f0f;
  --bg2: #1a1a1a;
  --bg3: #111111;
  --text: #b78d2f;
  --border: #b78d2f;
  --shadow: #000000;
  --frame-dark: #4d3810;
  --frame-light: #d5ad57;
}

* {
  box-sizing: border-box;
  cursor: url("cursors/leaf.png"), auto;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Verdana, Arial, sans-serif;
  line-height: 1.45;
}

a {
  color: var(--text);
  text-decoration: none;
  font-weight: bold;
}

a:hover {
  text-decoration: underline;
}

.page {
  max-width: 1100px;
  margin: auto;
  padding: 20px;
  position: relative;
  z-index: 2;
}

/* box base */
.site-header,
.marquee-box,
.main-nav,
.card {
  background: var(--bg2);
  box-shadow: 6px 6px 0 var(--shadow);
}

/* cornice pixel fantasy solo CSS */
.pixel-frame {
  position: relative;
  border: 4px solid var(--frame-dark);
  outline: 2px solid var(--frame-light);
  outline-offset: -8px;
  box-shadow:
    0 0 0 2px var(--border),
    inset 0 0 0 2px #0b0b0b,
    6px 6px 0 var(--shadow);
}

.pixel-frame::before,
.pixel-frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(135deg, var(--frame-light) 0 50%, transparent 50% 100%);
  pointer-events: none;
}

.pixel-frame::before {
  top: -4px;
  left: -4px;
  transform: rotate(0deg);
}

.pixel-frame::after {
  right: -4px;
  bottom: -4px;
  transform: rotate(180deg);
}

/* header */
.site-header {
  padding: 20px;
  margin-bottom: 16px;
}

.topline {
  margin: 0 0 8px 0;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.site-header h1 {
  margin: 0;
  font-size: 2.4rem;
  letter-spacing: 3px;
  text-transform: lowercase;
}

.subtitle {
  margin: 10px 0 0 0;
}

/* marquee */
.marquee-box {
  padding: 8px 10px;
  margin-bottom: 16px;
  overflow: hidden;
}

/* nav */
.main-nav {
  display: flex;
  gap: 10px;
  padding: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.main-nav a {
  background: var(--bg3);
  padding: 8px 10px;
  border: 2px solid var(--border);
  box-shadow: inset 1px 1px 0 #2a2a2a;
}

/* layout */
.layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
}

.content-column,
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  padding: 14px;
}

.card h2 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  text-transform: lowercase;
}

.hero-image {
  width: 100%;
  display: block;
  border: 2px solid var(--border);
}

/* player pixel cute */
.music-box .custom-player {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.music-box button {
  background: #232323;
  color: #f0c96b;
  border: 2px solid var(--border);
  box-shadow:
    inset 1px 1px 0 #3a2b0a,
    inset -1px -1px 0 #000000,
    3px 3px 0 var(--shadow);
  font-family: "Courier New", monospace;
  padding: 8px 10px;
  line-height: 1;
  font-weight: bold;
}

#prev-btn,
#play-pause-btn,
#next-btn {
  width: calc(33.333% - 6px);
  min-height: 42px;
}

#mute-btn {
  width: 100%;
}

.custom-player input[type="range"] {
  width: 100%;
  accent-color: var(--text);
}

.time-row,
.volume-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}

.volume-row {
  justify-content: center;
}

.track-title-wrap {
  overflow: hidden;
  border: 2px solid var(--border);
  background: #0c0c0c;
  padding: 6px;
}

#track-title {
  white-space: nowrap;
  display: inline-block;
  padding-left: 100%;
  animation: trackScroll 14s linear infinite;
  font-family: "Courier New", monospace;
}

.equalizer {
  display: flex;
  justify-content: center;
  gap: 4px;
  height: 22px;
  align-items: flex-end;
}

.eq-bar {
  width: 6px;
  height: 8px;
  background: var(--text);
}

.equalizer.playing .eq-bar:nth-child(1) { animation: eqMove 0.8s infinite; }
.equalizer.playing .eq-bar:nth-child(2) { animation: eqMove 0.6s infinite; }
.equalizer.playing .eq-bar:nth-child(3) { animation: eqMove 0.9s infinite; }
.equalizer.playing .eq-bar:nth-child(4) { animation: eqMove 0.7s infinite; }
.equalizer.playing .eq-bar:nth-child(5) { animation: eqMove 1s infinite; }

#youtube-player {
  width: 0;
  height: 0;
  overflow: hidden;
}

.clock {
  font-size: 1.1rem;
}

.blink-soft {
  animation: blinkSoft 1.4s steps(2, start) infinite;
}

/* gif laterali */
.side-gifs {
  position: fixed;
  top: 20px;
  bottom: 20px;
  width: 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  pointer-events: none;
  z-index: 1;
}

.left-gifs { left: 6px; }
.right-gifs { right: 6px; }

.side-gifs img {
  max-width: 60px;
  height: auto;
  animation: floatGif 3.5s ease-in-out infinite;
}

.side-gifs img:nth-child(2) {
  animation-delay: 0.8s;
}

.side-gifs img:nth-child(3) {
  animation-delay: 1.6s;
}

/* animazioni */
@keyframes blinkSoft {
  50% { opacity: 0.4; }
}

@keyframes eqMove {
  0% { height: 6px; }
  50% { height: 18px; }
  100% { height: 7px; }
}

@keyframes trackScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@keyframes floatGif {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .side-gifs {
    display: none;
  }
}