@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  background: #000;
  min-width: 1200px;
}

.noise {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.06;
}

/* ── BACKGROUND ── */
.bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.5) contrast(0.9);
}

/* ── CAMERA FRAMES ── */
.camera-frame-left,
.camera-frame-right {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  height: 90%;
  width: auto;
  pointer-events: none;
  z-index: 2;
}

.camera-frame-left { left: 4%; }
.camera-frame-right { right: 4%; }

.camera-frame-left img,
.camera-frame-right img {
  height: 100%;
  width: auto;
  filter: brightness(0.6);
}

/* ── CONTENT ── */
.content {
  position: fixed;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
  height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  overflow: visible;
  opacity: 0;
  transition: opacity 7s ease;
}

.content.visible {
  opacity: 1;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  width: 12%;
  aspect-ratio: 1/1;
  pointer-events: none;
}

.logo img {
  width: 105%;
  filter: contrast(2.3) grayscale(100%) brightness(0.9);
}

/* ── NAV ── */
nav {
  display: flex;
  gap: 40px;
  width: 100vw;
  justify-content: center;
  margin-top: -10px;
  position: relative;
  z-index: 10;
}

nav a {
  font-family: 'VT323', monospace;
  font-size: 1.5vw;
  color: #fff;
  min-width: 80px;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding-bottom: 10px;
  background-image: none;
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% 8px;
  transition: background-image 0.2s;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

nav a:hover { opacity: 0.6; }

nav a.active {
  background-image: url('../images/underline.png');
  opacity: 0.6;
}

/* ── GALLERY ── */
.gallery {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
  width: 90vw;
  max-width: 1100px;
  flex: 1;
  min-height: 0;
}

.gallery-viewport {
  overflow: hidden;
  width: 100%;
}

.gallery-track {
  display: flex;
  transition: transform 0.4s ease;
}

.gallery-page {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px 20px;
  min-width: 100%;
  padding: 0 10px;
}

.gallery-item {
  width: 100%;
  margin: 0 auto;
  aspect-ratio: 4/5;
  overflow: hidden;
  opacity: 0.9;
  filter: grayscale(60%) contrast(1.1) brightness(0.7);
  box-shadow: 0 4px 15px rgba(0,0,0,0.9), 0 0 30px rgba(0,0,0,0.5);
  animation: vhs-flicker 8s infinite;
}

@keyframes vhs-flicker {
  0%, 89%, 100% { opacity: 0.9; filter: grayscale(70%) contrast(1.1) brightness(0.7); }
  90% { opacity: 0.6; filter: grayscale(90%) contrast(1.5) brightness(1.3); }
  91% { opacity: 0.9; filter: grayscale(70%) contrast(1.1) brightness(0.7); }
  92% { opacity: 0.4; filter: grayscale(100%) contrast(2) brightness(0.5); }
  93% { opacity: 0.9; filter: grayscale(70%) contrast(1.1) brightness(0.7); }
}

.gallery-item:hover { transform: scale(1.03); }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item img:hover {
  filter: grayscale(0%) contrast(1.1) brightness(1.1);
}

.arrow {
  background: none;
  border: none;
  color: #fff;
  font-size: 2vw;
  cursor: pointer;
  padding: 10px;
  opacity: 0.7;
  flex-shrink: 0;
}

.arrow:hover { opacity: 1; }

/* ── HUD ELEMENTS ── */
.rec {
  position: fixed;
  top: 8%;
  left: 5.5%;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  z-index: 2;
}

.rec-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: red;
}

.rec-text {
  font-family: 'VT323', monospace;
  font-size: 1.8em;
  color: red;
  letter-spacing: 0.1em;
}

.timestamp {
  position: fixed;
  bottom: 8.5%;
  right: 5%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: 'VT323', monospace;
  font-size: 1.5vw;
  color: #fff;
  pointer-events: none;
  opacity: 0.85;
  letter-spacing: 0.1em;
  z-index: 2;
}

.battery {
  position: fixed;
  bottom: 8%;
  left: 5.5%;
  width: 2%;
  pointer-events: none;
  animation: blink 1.2s step-start infinite;
  z-index: 2;
}

.battery img { width: 150%; }

.social-links {
  position: fixed;
  top: 8%;
  right: 5.5%;
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 2;
}

.social-links img {
  width: 20px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.social-links a:hover img { opacity: 1; }

/* ── SECTIONS ── */
.about-section {
  display: none;
  color: #fff;
  font-family: 'VT323', monospace;
  font-size: 1.6vw;
  letter-spacing: 0.1em;
  line-height: 1.8;
  max-width: 600px;
  text-align: center;
  margin-top: 70px;
}

/* ── SHOP ── */
.shop-section {
  display: none;
  padding: 20px;
  overflow-y: auto;
  max-height: 70vh;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 20px;
}
.shop-section.active { display: flex; }

.shop-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.shop-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 200px;
}

.shop-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  filter: grayscale(30%) contrast(1.1) brightness(0.9);
  transition: filter 0.3s, transform 0.3s;
}

.shop-card:hover img {
  filter: grayscale(0%) contrast(1.1) brightness(1);
  transform: scale(1.02);
}

.shop-card-title {
  font-family: 'VT323', monospace;
  font-size: 1.2vw;
  color: #fff;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.shop-card-price {
  font-family: 'VT323', monospace;
  font-size: 1vw;
  color: #fff;
  opacity: 0.7;
}

.shop-empty {
  font-family: 'VT323', monospace;
  font-size: 3vw;
  color: #fff;
  letter-spacing: 0.15em;
  text-align: center;
  margin-top: 100px;
  grid-column: 1 / -1;
  width: 100%;
}

/* ── MODALS ── */
.modal,
.shop-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active,
.shop-modal.active { display: flex; }

.modal-img {
  max-width: 70%;
  max-height: 80vh;
  object-fit: contain;
}

.modal-close {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  opacity: 0.7;
}

.modal-close:hover { opacity: 1; }

.modal-arrow {
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5vw;
  cursor: pointer;
  opacity: 0.7;
  padding: 20px;
  flex-shrink: 0;
}

.modal-arrow:hover { opacity: 1; }

.shop-modal-inner {
  display: flex;
  gap: 30px;
  max-width: 800px;
  width: 80%;
}

.shop-modal-img {
  width: 45%;
  object-fit: cover;
  aspect-ratio: 1/1;
}

.shop-modal-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.shop-modal-title {
  font-family: 'VT323', monospace;
  font-size: 2vw;
  color: #fff;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.shop-modal-price {
  font-family: 'VT323', monospace;
  font-size: 1.5vw;
  color: #fff;
  opacity: 0.7;
}

.shop-modal-desc {
  font-family: 'VT323', monospace;
  font-size: 1.2vw;
  color: #fff;
  opacity: 0.6;
  line-height: 1.6;
}

.shop-modal-select {
  background: #000;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 10px;
  font-family: 'VT323', monospace;
  font-size: 1.2vw;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.shop-modal-btn {
  display: inline-block;
  font-family: 'VT323', monospace;
  font-size: 1.2vw;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.5);
  padding: 8px 20px;
  text-align: center;
  transition: opacity 0.2s;
}

.shop-modal-btn:hover { opacity: 0.6; }

/* ── SPLASH ── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.splash-inner img {
  width: 20vw;
  mix-blend-mode: screen;
  filter: grayscale(100%) contrast(2);
}

.splash-text {
  font-family: 'VT323', monospace;
  font-size: 2vw;
  color: #fff;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255,255,255,0.8), 0 0 20px rgba(255,255,255,0.4);
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 10px rgba(255,255,255,0.8), 0 0 20px rgba(255,255,255,0.4); }
  50% { opacity: 0.4; text-shadow: 0 0 4px rgba(255,255,255,0.2); }
}

/* ── ANIMATIONS ── */
@keyframes splashShrink {
  from { width: 25%; }
  to { width: 0%; opacity: 0; }
}

@keyframes splashFade {
  to { display: none; pointer-events: none; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── HAMBURGER ── */
.hamburger { display: none; }

/* ── MOBILE ── */
@media (max-width: 768px) {

  html, body {
    overflow: hidden;
    min-width: unset;
  }

  .camera-frame-left,
  .camera-frame-right,
  .timestamp,
  .battery,
  .rec { display: none; }

  .splash img { width: 70%; }

  .content {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    height: auto;
    padding: 16px 16px 0;
  }

  .header {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 16px;
    width: 100%;
  }

  .logo { width: 40%; }

  nav {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    height: 100vh;
    z-index: 200;
    width: 100vw;
    margin: 0;
  }

  nav.open { display: flex; }

  nav a { font-size: 8vw; }

  .hamburger {
    display: flex;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 300;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
  }

  .hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
  }

  .gallery {
    width: 100%;
    flex-direction: column;
    margin-top: 20px;
    overflow-y: auto;
    max-height: 62vh;
    flex: none;
  }

  .gallery-viewport { overflow: visible; width: 100%; }

  .gallery-track {
    flex-direction: column;
    transform: none !important;
  }

  .gallery-page {
    grid-template-columns: repeat(2, 1fr);
    min-width: 100%;
    gap: 8px;
    padding: 0;
    overflow: hidden;
  }

  .gallery-item { width: 100%; margin: 0; }

  .arrow { display: none; }

  .about-section {
    font-size: 5vw;
    padding: 0 16px;
  }

  .shop-card-title {
    font-size: 4vw;
  }

  .shop-card-price {
    font-size: 3.5vw;
  }

  .splash-text {
    font-size: 5vw;
  }

  .splash-inner img {
    width: 50vw;
  }

}
