:root {
  --green-bright: #6db96e;
  --text-main:    #f0ece0;
  --text-muted:   rgba(240,236,224,0.55);
  --top-h:        150px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: #000;
  color: var(--text-main);
  font-family: 'Myriad Pro', 'Source Sans 3', 'Segoe UI', sans-serif;
  overflow: hidden;
}

#viewer {
  position: fixed;
  inset: 0;
  background: #000;
}

#top-overlay {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--top-h);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 0 32px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0) 100%);
}

#top-overlay img {
  height: 92px;
  max-width: 90%;
  display: block;
  pointer-events: auto;
}

#controls {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 100;
}

#mini-nav {
  width: 88px;
  height: 122px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
}

#zoom-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zc-btn {
  width: 34px;
  height: 34px;
  background: rgba(0,0,0,0.65);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--green-bright);
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  font-family: 'Myriad Pro', 'Source Sans 3', 'Segoe UI', sans-serif;
  font-weight: 300;
  backdrop-filter: blur(6px);
}

.zc-btn:hover {
  background: rgba(74,140,80,0.25);
  border-color: rgba(74,140,80,0.6);
}

.zc-btn:active {
  transform: scale(0.94);
}

#loading {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  z-index: 300;
  transition: opacity 0.5s;
}

#loading.done { opacity: 0; pointer-events: none; }

.loader-ring {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255,255,255,0.12);
  border-top-color: var(--green-bright);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loader-text {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.loader-logo {
  height: 64px;
  display: block;
}

#welcome {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 250;
  padding: 24px;
  transition: opacity 0.3s;
}

#welcome.hidden { opacity: 0; pointer-events: none; }

.welcome-card {
  position: relative;
  max-width: 460px;
  width: 100%;
  background: rgba(15,15,15,0.96);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 36px 32px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  text-align: center;
}

.welcome-logo {
  height: 54px;
  display: block;
  margin: 0 auto 16px;
}

.welcome-card h2 {
  font-family: 'Myriad Pro', 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.welcome-card p {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(240,236,224,0.78);
  margin-bottom: 18px;
}

.welcome-tips {
  list-style: none;
  text-align: left;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 22px;
}

.welcome-tips li {
  font-size: 13px;
  font-weight: 300;
  color: rgba(240,236,224,0.7);
  padding: 4px 0;
  display: flex;
  gap: 10px;
}

.welcome-tips li::before {
  content: "›";
  color: var(--green-bright);
  font-weight: 600;
}

.welcome-btn {
  background: rgba(74,140,80,0.18);
  border: 1px solid rgba(109,185,110,0.5);
  color: var(--green-bright);
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.welcome-btn:hover {
  background: rgba(74,140,80,0.32);
  border-color: rgba(109,185,110,0.8);
}

.welcome-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s;
}

.welcome-close:hover { color: var(--text-main); }

@media (max-width: 1100px) {
  :root { --top-h: 120px; }
  #top-overlay img { height: 72px; }
  #mini-nav { width: 76px; height: 104px; }
}

@media (max-width: 720px) {
  :root { --top-h: 96px; }
  #top-overlay img { height: 52px; }
  #mini-nav { width: 60px; height: 80px; }
  .zc-btn { width: 30px; height: 30px; font-size: 14px; border-radius: 6px; }
  #controls { gap: 10px; right: 14px; bottom: 14px; }
}

@media (max-width: 480px) {
  #mini-nav { display: none; }
}