* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  text-transform: lowercase;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: #fff;
}

/* ── Loading Screen ── */
#loading-screen {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  color: #fff;
  transition: opacity 0.4s ease;
}

.loading-content {
  text-align: center;
  max-width: 400px;
  padding: 2rem;
}

.loading-content h1 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 100;
  letter-spacing: 0.05em;
}

#loading-status {
  font-size: 0.85rem;
  margin-bottom: 1rem;
  color: #aaa;
  font-weight: 300;
}

.loading-bar {
  width: 100%;
  height: 3px;
  background: #333;
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar-fill {
  width: 0%;
  height: 100%;
  background: #fff;
  transition: width 0.3s ease;
}

/* ── Info Panel ── */
#info-panel {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.info-content {
  max-width: 500px;
  padding: 2rem;
  text-align: justify;
}

.info-tags {
  font-weight: 300;
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 1.5rem;
}

.info-tags a {
  color: #aaa;
  text-decoration: none;
}

.info-tags a:hover {
  text-decoration: line-through;
  color: #fff;
}

.info-description {
  font-weight: 100;
  font-size: 1rem;
  line-height: 1.7;
  color: #fff;
}

.info-gif {
  margin-top: 1.5rem;
}

/* ── AR View ── */
#ar-view {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#zoom-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.15s ease-out;
}

#webcam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Mirror so it feels like a mirror */
  transform: scaleX(-1);
  z-index: 1;
}

/* ── Overlay Container ── */
#overlay-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* ── Browser Window Chrome ── */
.browser-window {
  position: absolute;
  top: 0;
  left: 0;
  background: #fff;
  border: 1px solid #999;
  border-radius: 6px;
  box-shadow: 1px 2px 8px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  will-change: transform;
  pointer-events: none;
}

.title-bar {
  height: 20px;
  background: linear-gradient(to bottom, #e8e8e8, #ccc);
  border-bottom: 1px solid #999;
  display: flex;
  align-items: center;
  padding: 0 6px;
  gap: 5px;
}

.window-buttons {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.window-buttons span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.window-buttons span:nth-child(1) { background: #ff5f57; border: 0.5px solid #e33e32; }
.window-buttons span:nth-child(2) { background: #febc2e; border: 0.5px solid #e09e1a; }
.window-buttons span:nth-child(3) { background: #28c840; border: 0.5px solid #1aab29; }

.title-text {
  font-size: 9px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

.window-content {
  position: relative;
  overflow: hidden;
  background: #000;
  line-height: 0;
}

.window-content img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Corner UI Icons ── */
header a, footer a {
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  background-color: transparent;
  position: fixed;
  z-index: 999;
  font-size: 3rem;
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
}

header a:hover, footer a:hover {
  overflow: visible;
}

#reload { top: 1rem; left: 1rem; }
#info   { top: 1rem; right: 1rem; }
#sign   { bottom: 1rem; left: 1rem; overflow: visible; }
#camera { bottom: 1rem; right: 1rem; }

/* ── "le" Glitch Effect ── */
#sign .glitch {
  font-family: sans-serif;
  position: relative;
  text-decoration: line-through;
}

#sign .glitch::before,
#sign .glitch::after {
  content: "le";
  color: white;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  display: none;
}

#sign:hover .glitch::before {
  display: block;
  left: 3px;
  text-shadow: -2px 0 red;
  animation: glitch-1 2s linear infinite alternate-reverse;
}

#sign:hover .glitch::after {
  display: block;
  left: -3px;
  text-shadow: -2px 0 blue;
  animation: glitch-2 2s linear infinite alternate-reverse;
}

@keyframes glitch-1 {
  0%   { clip-path: inset(92% 0 0 0); }
  10%  { clip-path: inset(80% 0 2% 0); }
  20%  { clip-path: inset(6% 0 47% 0); }
  30%  { clip-path: inset(40% 0 55% 0); }
  40%  { clip-path: inset(20% 0 82% 0); }
  50%  { clip-path: inset(58% 0 5% 0); }
  60%  { clip-path: inset(83% 0 32% 0); }
  70%  { clip-path: inset(87% 0 48% 0); }
  80%  { clip-path: inset(19% 0 14% 0); }
  90%  { clip-path: inset(20% 0 59% 0); }
  100% { clip-path: inset(54% 0 22% 0); }
}

@keyframes glitch-2 {
  0%   { clip-path: inset(47% 0 82% 0); }
  10%  { clip-path: inset(51% 0 6% 0); }
  20%  { clip-path: inset(33% 0 9% 0); }
  30%  { clip-path: inset(52% 0 80% 0); }
  40%  { clip-path: inset(96% 0 40% 0); }
  50%  { clip-path: inset(90% 0 13% 0); }
  60%  { clip-path: inset(56% 0 70% 0); }
  70%  { clip-path: inset(68% 0 49% 0); }
  80%  { clip-path: inset(92% 0 1% 0); }
  90%  { clip-path: inset(16% 0 76% 0); }
  100% { clip-path: inset(62% 0 55% 0); }
}
