/* === Layout Containers === */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  /* ✅ prevent scrollbars */
}

#container {
  display: flex;
  width: 100vw;
  height: 100vh;
}

#canvasArea {
  width: 90%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* === Sound Toggle === */
#fp-sound {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  background: rgba(30, 30, 40, 0.85);
  color: #ddd;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: 'Orbitron', 'Exo 2', sans-serif;
  font-size: 12px;
  letter-spacing: 0.6px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

#fp-sound:hover {
  background: rgba(50, 50, 70, 0.9);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 180, 255, 0.4);
}

/* === Feedback Panel (Beam Log) === */
.feedback-panel {
  position: fixed;
  right: 24px;
  /* ✅ moved slightly inward */
  top: 24px;
  /* ✅ moved slightly downward */
  width: 240px;
  max-height: calc(100vh - 48px);
  /* ✅ adjusted so it fits cleanly */
  display: flex;
  flex-direction: column;
  background: rgba(15, 15, 20, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  font-family: 'Roboto Condensed', system-ui, sans-serif;
  color: #ddd;
  overflow: hidden;
  z-index: 999;
}

.feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

.feedback-header h4 {
  margin: 0;
  font-size: 13px;
  color: #fff;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* === Panel Buttons (Pause / Clear) === */
.fp-btn {
  background: rgba(40, 40, 45, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ccc;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.5px;
  transition: all 160ms ease;
}

.fp-btn:hover {
  background: rgba(60, 60, 70, 0.9);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 6px rgba(0, 180, 255, 0.3);
}

/* === Beam Log Entries === */
#beamLog {
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid rgba(0, 180, 255, 0.25);
  font-size: 13px;
  color: #ccc;
  transition: all 0.2s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset;
}

.log-entry:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: rgba(0, 180, 255, 0.4);
  transform: translateX(2px);
}

.log-swatch {
  width: 22px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.1);
}

.log-text {
  flex: 1 1 auto;
  font-size: 12px;
  color: #ddd;
  line-height: 1.2;
}

.log-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 11px;
  color: #aaa;
}

.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 180, 255, 0.12);
  color: #9ee;
}

.log-entry.fade-in {
  animation: fadeInUp 260ms ease;
}

@keyframes fadeInUp {
  from {
    transform: translateY(6px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* === General Buttons (Left Controls) === */
.custom-button,
.custom-checkbox-label {
  font-family: 'Orbitron', 'Exo 2', sans-serif;
  background: linear-gradient(180deg, rgba(40, 40, 45, 0.95), rgba(20, 20, 25, 0.95));
  color: #ddd;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  width: 150px;
  height: 36px;
  line-height: 36px;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
  padding: 0 10px;
}

.custom-button:hover,
.custom-checkbox-label:hover {
  background: linear-gradient(180deg, rgba(70, 70, 80, 0.95), rgba(30, 30, 40, 0.95));
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(0, 180, 255, 0.3);
}

/* === Checkbox Label Styling === */
.custom-checkbox-label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin: 5px 0;
  user-select: none;
}

.custom-checkbox-label input[type="checkbox"] {
  margin-right: 10px;
  transform: scale(1.2);
  accent-color: #0af;
  cursor: pointer;
}

.custom-checkbox-label input[type="checkbox"]:checked {
  box-shadow: 0 0 8px rgba(0, 180, 255, 0.5);
}

/* === Font === */
@font-face {
  font-family: 'OrapaFont';
  src: url('font.ttf') format('truetype');
}

/* === Responsive Adjustments === */
@media (max-width: 900px) {
  .feedback-panel {
    width: 260px;
    right: 8px;
    top: 8px;
  }
}

@media (max-width: 600px) {
  .feedback-panel {
    position: fixed;
    left: 8px;
    right: 8px;
    top: auto;
    bottom: 8px;
    width: auto;
    max-height: 40vh;
  }
}

/* === Submit Button Container === */
#submitContainer {
  position: absolute;
  bottom: 80px;
  /* ✅ lifted slightly up */
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  text-align: center;
}

/* === Modal Dialog === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: rgba(30, 30, 40, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 30px 40px;
  text-align: center;
  color: #eee;
  font-family: 'Orbitron', 'Exo 2', sans-serif;
  box-shadow: 0 0 20px rgba(0, 180, 255, 0.3);
}

.modal-content p {
  margin-bottom: 20px;
  font-size: 15px;
  letter-spacing: 0.5px;
}