* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  background: #000000;
  min-height: 100vh;
  font-family: 'Courier New', 'VT323', monospace;
  overflow-x: hidden;
}

.crt-scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.12) 0px,
    rgba(0, 0, 0, 0.12) 2px,
    transparent 2px,
    transparent 6px
  );
  opacity: 0.65;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #000000;
  position: relative;
  z-index: 1;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 2px solid #00fab3;
  background: #050505;
}

.hamburger {
  background: none;
  border: 1px solid #00fab3;
  width: 46px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: 0.2s;
  background: #000000;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background-color: #00fab3;
  transition: 0.2s;
}

.hamburger:hover {
  background: #00fab322;
  box-shadow: 0 0 6px #00fab3;
}

.title {
  font-size: 1.4rem;
  letter-spacing: 3px;
  font-weight: bold;
  color: #00fab3;
  text-shadow: 0 0 3px #00fab3;
  text-transform: uppercase;
}

.spacer {
  width: 46px;
}

.screen-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1.5rem;
}

.crt-tube {
  position: relative;
  max-width: 90vw;
  max-height: 70vh;
  width: auto;
  background: #000;
  border: 3px solid #00fab3;
  box-shadow: 0 0 15px rgba(0, 250, 179, 0.3), inset 0 0 20px rgba(0,0,0,0.8);
  border-radius: 12px;
  overflow: hidden;
}

.main-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  cursor: pointer;
  transition: opacity 0.2s ease;
  background: #010101;
  opacity: 1;
}

.main-img.fade-transition {
  opacity: 0.7;
}

.glare {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,240,0.08) 0%, rgba(0,0,0,0) 80%);
  pointer-events: none;
}

.status {
  margin-top: 1.2rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.accent {
  color: #00fab3;
  font-size: 0.75rem;
  letter-spacing: 1px;
  border-left: 2px solid #00fab3;
  padding-left: 8px;
  font-weight: bold;
}

.drawer {
  position: fixed;
  top: 0;
  left: -100%;
  width: 85%;
  max-width: 380px;
  height: 100%;
  background: #030303;
  border-right: 2px solid #00fab3;
  z-index: 2000;
  transition: left 0.28s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  display: flex;
  flex-direction: column;
  box-shadow: 8px 0 20px rgba(0,250,179,0.2);
}

.drawer.open {
  left: 0;
}

.drawer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1rem;
  border-bottom: 1px solid #00fab3;
  background: #000000;
}

.drawer-label {
  color: #00fab3;
  font-weight: bold;
  font-size: 1rem;
  letter-spacing: 2px;
}

.drawer-close {
  background: none;
  border: 1px solid #00fab3;
  color: #00fab3;
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}

.drawer-close:hover {
  background: #00fab3;
  color: black;
}

.thumb-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  -webkit-overflow-scrolling: touch;
}

.thumb-item {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 2px solid #2a2a2a;
  cursor: pointer;
  transition: 0.2s;
  background: #000;
}

.thumb-item:hover {
  border-color: #00fab3;
  transform: scale(0.98);
  filter: brightness(1.2);
  box-shadow: 0 0 8px #00fab3;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.96);
  z-index: 3000;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border: 3px solid #00fab3;
  box-shadow: 0 0 40px rgba(0,250,179,0.3);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 32px;
  color: #00fab3;
  font-size: 48px;
  font-weight: bold;
  cursor: pointer;
  background: transparent;
  text-shadow: 0 0 5px black;
  z-index: 3001;
  transition: 0.2s;
}
.modal-close:hover {
  color: white;
  text-shadow: 0 0 8px #00fab3;
}

body.modal-open, body.drawer-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .app {
    flex-direction: column;
  }
  .crt-tube {
    max-width: 95vw;
    max-height: 55vh;
  }
  .main-img {
    max-height: 52vh;
  }
  .title {
    font-size: 1rem;
  }
  .status {
    gap: 1rem;
  }
  .drawer {
    width: 82%;
  }
}

@media (min-width: 769px) and (orientation: landscape) {
  .app {
    flex-direction: column;
  }
  .screen-container {
    padding: 1.8rem;
  }
  .crt-tube {
    max-width: 85vw;
  }
  .thumb-scroll {
    flex-direction: column;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .crt-tube {
    max-height: 60vh;
  }
  .main-img {
    max-height: 55vh;
  }
  .drawer {
    width: 70%;
  }
}

.thumb-scroll::-webkit-scrollbar {
  width: 5px;
}
.thumb-scroll::-webkit-scrollbar-track {
  background: #111;
}
.thumb-scroll::-webkit-scrollbar-thumb {
  background: #00fab3;
  border-radius: 6px;
}