@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Bebas+Neue&display=swap');

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

:root {
  --bg: #0e0e0f;
  --surface: #1a1a1d;
  --border: #2e2e35;
  --text: #e8e8ec;
  --muted: #6b6b7a;
  --accent: #f0f0f0;
}

html, body {
  width: 100%; height: 100%;
  background: url('bk1-min.jpg') center/cover no-repeat;
  color: var(--text);
  font-family: 'DM Mono', monospace;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  width: 100%;
  padding: 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  z-index: 10;
  flex-shrink: 0;
}

#header-logo {
  height: 40px;
  width: 40px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.hint {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 8px;
}

#rotate-icon {
  height: 24px;
  width: 24px;
  object-fit: contain;
}


#brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

#brand img {
  height: 40px;
  width: 40px;
  border-radius: 8px;
  object-fit: cover;
}

#brand-name {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: bold;
  font-style: oblique;
  font-size: 1.4rem;
  color: black;
  letter-spacing: 0.02em;
}




#canvas-container {
  flex: 1;
  width: 100%;
  position: relative;
  overflow: hidden;
}

#three-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

#loading-screen {
  position: absolute;
  inset: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 20;
  transition: opacity 0.5s;
}

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

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

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

.loader-text {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}

#bottom-panel {
  width: 100%;
  padding: 20px 10px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  background: var(--surface);
}

.panel-label {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
  font-family: Helvetica, Arial, sans-serif;
}

#palette-wrapper {
  position: relative;
  flex: 1;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  cursor: crosshair;
  box-shadow: 0 0 0 1px var(--border);
  user-select: none;
}

#palette-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#picker-dot {
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.5);
  transform: translate(-50%, -50%);
  pointer-events: none;
  top: 50%; left: 10%;
  transition: box-shadow 0.1s;
}

#error-msg {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg);
  z-index: 25;
  text-align: center;
  padding: 32px;
}

#error-msg .err-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  color: #ff6b6b;
  letter-spacing: 0.1em;
}

#error-msg .err-body {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 420px;
}

#error-msg code {
  color: var(--accent);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 3px;
}

#model-buttons {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  display: flex;
  gap: 5px;
  z-index: 10;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px;
  scrollbar-width: none;
  justify-content: center;
}

@media (max-width: 768px) {
  #model-buttons {
    justify-content: flex-start;
  }
}

#model-buttons::-webkit-scrollbar {
  display: none;
}

.model-btn {
  scroll-snap-align: start;
  flex-shrink: 0;
}

.model-btn {
  padding: 10px 28px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  border-radius: 8px;
  border: 1.5px solid #222;
  background: #fff;
  color: #000;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.model-btn.active {
  background: #000;
  color: #fff;
}