* { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #020611;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.toggle-panel, .icon-btn, .panel button, .panel select, .panel input {
  font: inherit;
}
.toggle-panel {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(10, 16, 32, 0.64);
  color: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0,0,0,0.28);
}
.panel {
  position: fixed;
  top: 12px;
  right: 12px;
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  z-index: 25;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(10, 15, 30, 0.72);
  color: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.36);
  transform-origin: top right;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.panel.collapsed {
  transform: scale(0.88) translateY(-8px);
  opacity: 0;
  pointer-events: none;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.panel-header h2 {
  margin: 0;
  font-size: 18px;
}
.icon-btn, .panel button {
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: white;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}
.section {
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.section:first-of-type { border-top: none; }
.section label, .section .subheading {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 10px;
}
.section input[type="range"], .section select {
  width: 100%;
  margin-top: 6px;
}
.section select {
  padding: 9px 10px;
  border-radius: 10px;
  color: white;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}
.check-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
}
.buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.help {
  font-size: 12px;
  color: rgba(255,255,255,0.64);
  line-height: 1.55;
}
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}
.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}
.quote-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: grid;
  place-items: center;
  padding: 10vw;
}
.quote {
  max-width: min(980px, 90vw);
  text-align: center;
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  filter: blur(8px);
  transition: opacity 1.6s ease, transform 1.6s ease, filter 1.6s ease;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 0 18px rgba(255,255,255,0.08), 0 0 55px rgba(86,165,255,0.1);
}
.quote.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.quote.mode-ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8vh;
  width: 100%;
  max-width: none;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  padding-left: 100%;
  animation: ticker 22s linear infinite;
}
.quote.mode-typewriter .quote-text {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid rgba(255,255,255,0.75);
  animation: typing 5s steps(45, end), caret 0.9s step-end infinite;
}
.quote.mode-pulse .quote-text { animation: pulse 4.5s ease-in-out infinite; }
.quote.mode-shimmer .quote-text {
  background: linear-gradient(90deg, rgba(255,255,255,0.35), rgba(255,255,255,1), rgba(255,255,255,0.35));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s linear infinite;
}
.quote-text {
  font-size: clamp(24px, 3.2vw, 54px);
  font-weight: 300;
  line-height: 1.25;
}
.quote-author {
  margin-top: 16px;
  font-size: clamp(12px, 1.1vw, 17px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.58);
}
.status-bar {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 10;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.78);
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: 0.02em;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-180%); }
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -40% 0; }
}
@keyframes pulse {
  0%,100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.035); opacity: 1; }
}
@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes caret {
  50% { border-color: transparent; }
}
@media (max-width: 720px) {
  .panel { width: calc(100vw - 16px); top: 8px; right: 8px; }
  .checkbox-grid, .buttons { grid-template-columns: 1fr; }
}
