:root {
  /* Pixels Per Inch (PPI): This determines the "zoom" level of the pedalboard */
  --ppi: 80;

  --bg-color: #415e82;
  --board-color: #4e6b8f;
  --text-primary: #e0e0e0;
  --text-secondary: #a0aec0;
  --placeholder-text-primary: #cccccc;
  --accent-color: #fca311;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, sans-serif;
  overflow-x: hidden;
}

header {
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left, .header-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.header-right {
  justify-content: flex-end;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 2px;
}

#auth-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.logout-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
  padding: 0;
}

.logout-btn:hover {
  color: var(--accent-color);
}

/* The Workspace Container */
.workspace {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: calc(100vh - 81px);
  box-sizing: border-box;
  /* Fill remaining space below header, but allow expansion */
}

/* Standard Page Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
  box-sizing: border-box;
}

/* The Virtual Pedalboard */
.pedalboard-container {
  flex: 1;
  background-color: var(--board-color);
  border-radius: 8px;
  padding: 2rem;
  min-height: 450px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
  overflow-x: auto;
  overflow-y: auto; /* Allow vertical scroll if pedals overlap bounds */

  /* Setup as a column so we can vertically center the inner wrapper */
  display: flex;
  flex-direction: column;
  justify-content: center;

  /* Background texture/grid */
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* The inner wrapper provides safe max-content block-centering without flexbox clipping bugs */
.pedalboard-inner {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 1.5rem;
  width: max-content;
  margin: 0 auto;
}

/* Pedal Component */
.pedal {
  /* Dimensions set dynamically via inline style, falling back to 0 */
  width: calc(var(--pedal-width, 0) * var(--ppi) * 1px);
  height: calc(var(--pedal-height, 0) * var(--ppi) * 1px);

  position: relative;
  background-size: 100% 100%;
  /* Stretch background to fill pedal dimensions */
  background-repeat: no-repeat;
  background-position: 0 0;
  /* Align background to top-left */
  border-radius: 4px;
  filter: drop-shadow(4px 10px 10px rgba(0, 0, 0, 0.4));
  cursor: grab;
  transition: transform 0.2s ease, filter 0.2s ease;
  flex-shrink: 0;
  /* Prevent squishing */
}

.pedal:active {
  cursor: grabbing;
  transform: scale(0.98);
  filter: drop-shadow(2px 5px 5px rgba(0, 0, 0, 0.5));
}



/* Missing Controls UI */
.pedal.missing-controls {
  opacity: 0.6;
  filter: grayscale(0.5) drop-shadow(4px 10px 10px rgba(0, 0, 0, 0.4));
  cursor: pointer;
}

.pedal.missing-controls:hover {
  opacity: 0.8;
  filter: grayscale(0.2) drop-shadow(0 12px 12px rgba(0, 0, 0, 0.6));
  transform: translateY(-2px);
}

.missing-controls-message {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  padding: 10px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  /* Let clicks pass through to the pedal */
  border-radius: 4px;
}

.pedal.missing-controls:hover .missing-controls-message {
  opacity: 1;
}

/* Signal Chain Indicators */
.pedal::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -1.5rem;
  /* Pointing towards the previous pedal (Right) */
  width: 1.5rem;
  height: 4px;
  background: var(--accent-color);
  transform: translateY(-50%);
  opacity: 0.5;
  z-index: 0;
}

.pedal:first-child::before {
  display: none;
  /* No line before the very first pedal (guitar input) */
}

/* The new Dynamic CSS Clone Trick Knob */
.knob-clone {
  --w: calc(var(--pedal-width) * var(--ppi) * 1px);
  --h: calc(var(--pedal-height) * var(--ppi) * 1px);
  --kw: calc(var(--kr) * 2 * var(--w));

  position: absolute;
  left: calc(var(--kx) * 100%);
  top: calc(var(--ky) * 100%);
  width: var(--kw);
  height: var(--kw);

  transform: translate(-50%, -50%) rotate(var(--knob-rot, 0deg));
  transform-origin: center center;

  background-image: inherit;
  background-size: var(--w) var(--h);
  background-position:
    calc(-1 * (var(--kx) * var(--w) - var(--kw) / 2)) calc(-1 * (var(--ky) * var(--h) - var(--kw) / 2));

  border-radius: 50%;
  cursor: pointer;

  /* Give the clone a subtle drop shadow so it visually separates from the flat image behind it */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8), inset 0 2px 4px rgba(255, 255, 255, 0.4);

  /* Smoothly transition physical knob turns */
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.2s;
  will-change: transform;
}

.knob-clone:hover {
  /* Slightly lift shadow to indicate it's interactable */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.9), inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.knob-clone:active {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 1), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.slider-clone {
  --w: calc(var(--pedal-width) * var(--ppi) * 1px);
  --h: calc(var(--pedal-height) * var(--ppi) * 1px);
  
  --sw: calc(var(--cw) * var(--w));
  --sh: calc(var(--ch) * var(--w));   /* control.h and cap_h are percentages of width! */
  
  --track-w-px: calc(var(--tw) * var(--w));
  --track-h-px: calc(var(--th) * var(--w));

  /* Compute Top-Left corner of Track using kx/ky center coordinates */
  --track-left-px: calc((var(--kx) * var(--w)) - (var(--track-w-px) / 2));
  --track-top-px: calc((var(--ky) * var(--h)) - (var(--track-h-px) / 2));
  
  position: absolute;
  /* Left edge of cap starts at track left edge + (track_width - cap_width) / 2 to center horizontally */
  left: calc(var(--track-left-px) + ((var(--track-w-px) - var(--sw)) / 2));

  /* Offset is percentage of track height */
  --offset-px: calc(var(--offset) * var(--track-h-px));
  --soffset-px: calc(var(--soffset) * var(--track-h-px));
  
  top: calc(var(--track-top-px) + var(--offset-px));
  
  width: var(--sw);
  height: var(--sh);
  
  background-image: inherit;
  background-size: var(--w) var(--h);
  
  --sy-px: calc(var(--track-top-px) + var(--soffset-px));
  background-position: calc(-1 * var(--track-left-px) - ((var(--track-w-px) - var(--sw)) / 2)) calc(-1 * var(--sy-px));

  border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  transition: top 0.1s ease-out, box-shadow 0.2s;
}

.slider-clone:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.9), inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.slider-clone:active {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 1), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}



/* Search Bar UI */
.search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
  max-width: 500px;
  margin: 0 1rem;
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--board-color);
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.search-form .search-input {
  flex-grow: 1;
  min-width: 0;
}

header .search-input {
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
}

header .search-btn {
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--board-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.search-results.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.2s;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.search-result-img {
  width: 40px;
  height: 60px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.search-result-info {
  display: flex;
  flex-direction: column;
}

.search-result-brand {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.search-result-name {
  font-size: 1rem;
  font-weight: 600;
}

/* Trash Region */
.trash-region {
  height: 80px;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
  flex-shrink: 0;
}

.trash-region.drag-over {
  background: rgba(252, 163, 17, 0.1);
  /* using accent color */
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* Hero Section */
.hero {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem;
}

.hero h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Grid layout for search results and profile boards */
.grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

/* Card item */
.card {
  background: var(--board-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  min-height: 120px;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.manage-admins {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Overlays for review page (matches coord_finder) */
.draggable-knob {
  position: absolute;
  border-radius: 50%;
  border: 2px solid #0f0;
  background: rgba(0, 255, 0, 0.2);
  transform: translate(-50%, -50%);
  cursor: default;
  pointer-events: none;
}

.draggable-knob .indicator {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 50%;
  background: white;
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(var(--deg, 0deg));
  pointer-events: none;
}

.draggable-knob::after {
  content: attr(data-label);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #0f0;
  white-space: nowrap;
}

.draggable-switch-round {
  position: absolute;
  border-radius: 50%;
  border: 2px solid #0ff;
  background: rgba(0, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  cursor: default;
  pointer-events: none;
}

.draggable-switch-round .indicator {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 50%;
  background: white;
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(var(--deg, 0deg));
  pointer-events: none;
}

.draggable-switch-round::after {
  content: attr(data-label);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #0ff;
  white-space: nowrap;
}

.draggable-switch-rect {
  position: absolute;
  border-radius: 4px;
  border: 2px solid #0ff;
  background: rgba(0, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  cursor: default;
  pointer-events: none;
}

.draggable-switch-rect .indicator {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 50%;
  background: white;
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(var(--deg, 0deg));
  pointer-events: none;
}

.draggable-switch-rect::after {
  content: attr(data-label);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #0ff;
  white-space: nowrap;
}

.draggable-slider {
  position: absolute;
  border-radius: 4px;
  border: 1px dashed #0ff;
  background: rgba(0, 255, 255, 0.05);
  transform: translate(-50%, -50%);
  cursor: default;
  pointer-events: none;
}

.draggable-slider::after {
  content: attr(data-label);
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: #0ff;
  white-space: nowrap;
}

/* Modern Inputs & Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.meta-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.meta-field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-field input:not([type="checkbox"]),
.meta-field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.meta-field input:not([type="checkbox"]):focus,
.meta-field textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(252, 163, 17, 0.2);
}

/* Modern Buttons (Replaces default dated styling) */
.btn,
.search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', -apple-system, sans-serif;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  white-space: nowrap;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.btn.primary-btn,
.search-btn {
  background: var(--accent-color);
  color: #000;
  border: none;
  box-shadow: 0 4px 12px rgba(252, 163, 17, 0.3);
}

.btn.primary-btn:hover,
.search-btn:hover {
  background: #ffb84d;
  /* lighter accent */
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(252, 163, 17, 0.4);
  color: #000;
}

.btn.primary-btn:active,
.search-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(252, 163, 17, 0.3);
}

/* View Board Metadata Panel */
.metadata-panel {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0;
  gap: 2rem;
}

.meta-content {
  flex-grow: 1;
}

.meta-actions {
  text-align: right;
  min-width: 200px;
  padding-left: 2rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  header {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
  }
  .header-left { order: 1; }
  .header-right { order: 2; }
  .header-center {
    order: 3;
    flex: 1 1 100%;
    margin: 0;
    max-width: none;
  }
  .hero h2 {
    font-size: 2.2rem;
  }
  .hero .search-form {
    flex-direction: column !important;
  }
  .hero .search-form .btn {
    width: 100%;
  }
  .hero .glass-panel > div:last-child {
    flex-direction: column !important;
  }
  .workspace {
    padding: 1rem;
    gap: 1rem;
    height: auto;
    min-height: calc(100vh - 81px);
  }
  .glass-panel {
    padding: 1.25rem;
  }
  .pedalboard-container {
    padding: 1rem;
    min-height: 400px;
    overflow-y: auto;
  }
  .sidebar-layout {
    flex-direction: column !important;
  }
  .board-sidebar {
    width: 100% !important;
    padding-right: 0 !important;
    gap: 1rem !important;
  }
  .metadata-panel {
    flex-direction: column;
    gap: 1rem;
  }
  .meta-actions {
    text-align: left;
    padding-left: 0;
    border-left: none;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    box-sizing: border-box;
  }
  #owner-actions a.btn {
    width: auto !important;
    display: inline-block !important;
  }
}

/* Sidebar Layout UI */
.sidebar-layout {
  flex-direction: row;
  align-items: stretch;
}

.board-sidebar {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-right: 0.5rem;
}

.board-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

/* Shared utility to keep main layout organized */
.glass-panel {
  background: var(--board-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

/* Global Placeholder Text */
::placeholder {
  color: var(--placeholder-text-primary);
  font-style: italic;
}

/* Custom Dialog UI */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dialog-overlay.show {
  opacity: 1;
}

.dialog-box {
  background: var(--board-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dialog-overlay.show .dialog-box {
  transform: translateY(0) scale(1);
}

.dialog-header {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-color);
  margin: 0;
}

.dialog-body {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.5;
  margin: 0;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.dialog-btn {
  background: var(--accent-color);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 4px 12px rgba(252, 163, 17, 0.3);
}

.dialog-btn:hover {
  background: #ffb84d;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(252, 163, 17, 0.4);
}

.dialog-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(252, 163, 17, 0.3);
}

.dialog-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  margin-top: 0.5rem;
}

.dialog-input:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(252, 163, 17, 0.2);
}

.dialog-btn.cancel-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  box-shadow: none;
}

.dialog-btn.cancel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Dynamic DOM Elements Styles */
.board-card-title {
  margin: 0;
  color: var(--accent-color);
}

.board-card-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--placeholder-text-primary);
}

.board-card-bottom {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.board-card-user {
  font-size: 0.8rem;
  color: var(--placeholder-text-primary);
}

.board-card-rating {
  text-align: right;
  font-size: 1.2rem;
  font-weight: bold;
}

.board-card-star {
  color: var(--accent-color);
}

.board-card-edit {
  margin: 0;
  font-size: 0.8rem;
  color: var(--accent-color);
}

.review-list-msg {
  margin-top: 1rem;
  font-size: 0.8rem;
  text-decoration: underline;
}

.admin-user-span {
  font-size: 0.8rem;
  color: var(--accent-color);
  margin-left: 0.5rem;
}

.admin-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  color: white;
}
.admin-btn-remove {
  background: #ff3333;
}
.admin-btn-make {
  background: #33cc33;
}

.admin-link {
  color: var(--accent-color);
}

.review-user-span {
  font-size: 0.8rem;
  color: var(--placeholder-text-primary);
}

.auth-user-link {
  color: white;
  text-decoration: none;
}

/* --- Migration Utility Classes --- */

/* Display Utilities */
.d-flex { display: flex; }
.d-none { display: none !important; }
.d-block { display: block !important; }

.flex-col { display: flex; flex-direction: column; }
.flex-row { display: flex; flex-direction: row; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow-1 { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1; }

.gap-05 { gap: 0.5rem; }
.gap-1 { gap: 1rem; }
.gap-15 { gap: 1.5rem; }
.gap-2 { gap: 2rem; }

/* Margins & Paddings */
.m-0 { margin: 0; }
.m-auto { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-0 { margin-top: 0; }
.mt-05 { margin-top: 0.5rem; }
.mt-1 { margin-top: 1rem; }
.mt-15 { margin-top: 1.5rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }
.mb-0 { margin-bottom: 0; }
.mb-025 { margin-bottom: 0.25rem; }
.mb-05 { margin-bottom: 0.5rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-15 { margin-bottom: 1.5rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.ml-05 { margin-left: 0.5rem; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.p-05 { padding: 0.5rem; }
.p-1 { padding: 1rem; }
.p-15 { padding: 1.5rem; }
.p-2 { padding: 2rem; }
.pt-1 { padding-top: 1rem; }
.pt-15 { padding-top: 1.5rem; }
.py-2 { padding-top: 2rem; padding-bottom: 2rem; }
.px-1 { padding-left: 1rem; padding-right: 1rem; }

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-sm { font-size: 0.8rem; }
.text-md { font-size: 0.9rem; }
.text-95 { font-size: 0.95rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.1rem; }
.text-xl { font-size: 1.2rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 2rem; }
.text-hero { font-size: 3.5rem; }

.font-bold { font-weight: bold; }
.font-semibold { font-weight: 600; }
.font-extrabold { font-weight: 800; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }
.italic { font-style: italic; }

.uppercase { text-transform: uppercase; }
.no-underline { text-decoration: none; }
.underline { text-decoration: underline; }

.text-white { color: white; }
.text-white-40 { color: rgba(255, 255, 255, 0.4); }
.text-white-60 { color: rgba(255, 255, 255, 0.6); }
.text-white-70 { color: rgba(255, 255, 255, 0.7); }
.text-white-80 { color: rgba(255, 255, 255, 0.8); }
.text-accent { color: var(--accent-color) !important; }
.text-secondary { color: var(--text-secondary); }

.line-height-16 { line-height: 1.6; }
.letter-spacing-neg1 { letter-spacing: -1px; }

/* Borders & Backgrounds */
.border-top { border-top: 1px solid rgba(255,255,255,0.1); }
.border-bottom { border-bottom: 1px solid rgba(255,255,255,0.1); }
.border-none { border: none; }
.border-box { box-sizing: border-box; }

.bg-danger { background: #ff4d4d !important; color: white !important; }
.bg-success { background: #33cc33 !important; color: white !important; }
.bg-admin-danger { background: #8b0000 !important; color: white !important; }
.bg-panel { background: var(--board-color); }
.rounded-8 { border-radius: 8px; }
.border-panel { border: 1px solid rgba(255, 255, 255, 0.1); }

/* Opacity */
.opacity-50 { opacity: 0.5; }

/* Sizing */
.w-100 { width: 100% !important; }
.w-auto { width: auto; }
.max-w-100 { max-width: 100%; }
.max-w-600 { max-width: 600px; }
.w-350px { width: 350px; }
.w-300px { width: 300px; }
.h-48px { height: 48px; }
.min-h-400 { min-height: 400px; }
.min-w-0 { min-width: 0; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.pr-05 { padding-right: 0.5rem; }
.pb-05 { padding-bottom: 0.5rem; }

/* Interactive */
.cursor-pointer { cursor: pointer !important; }
.cursor-default { cursor: default; }
.cursor-grab { cursor: grab !important; }
.cursor-ns-resize { cursor: ns-resize !important; }

.z-1 { z-index: 1 !important; }
.z-2 { z-index: 2 !important; }
.z-3 { z-index: 3 !important; }

/* Backgrounds & Borders */
.bg-white-5 { background-color: rgba(255, 255, 255, 0.05); }
.rounded-4 { border-radius: 4px; }
.p-05 { padding: 0.5rem; }
.py-05 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.px-1 { padding-left: 1rem; padding-right: 1rem; }
.gap-05 { gap: 0.5rem; }
.gap-1 { gap: 1rem; }

/* Canvas Previews */
.slider-cap-preview {
    position: absolute;
    width: 100%;
    left: 0;
    background-color: rgba(255,0,0,0.3);
    border: 1px solid red;
}
.slider-patch-preview {
    position: absolute;
    width: 100%;
    left: 0;
    background-color: rgba(0,255,0,0.3);
    border: 1px dashed green;
}

/* Custom Component Classes */
.hidden { display: none !important; }