/* === GLOBAL STYLES === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #100d14;
  color: #ede0d4;
  width: 100vw;
  height: 100vh;
}

/* Only hide overflow when board is active (for drawing) */
body.board-active {
  overflow: hidden;
}

#app {
  width: 100%;
  height: 100%;
  position: relative;
}

/* === LANDING PAGE === */
#landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #ede0d4, #d4c4b4);
  padding: 2rem;
  position: relative;
  overflow: auto; /* Allow pull-to-refresh on mobile */
}

.hero-section {
  text-align: center;
  margin-bottom: 5rem;
}

.hero-section h1 {
  font-family: 'Crimson Text', serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  letter-spacing: 2px;
  color: #100d14;
  margin: 0;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-family: 'Crimson Text', serif;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 400;
  color: #100d14;
  opacity: 0.7;
  margin: 2rem 0 0 0;
  letter-spacing: 0.5px;
}

.landing-content {
  max-width: 600px;
  width: 100%;
  display: none; /* Hidden by default, shown by JavaScript */
  flex-direction: column;
  gap: 2rem;
}

.boards-section h2 {
  font-size: 1.2rem;
  font-weight: 400;
  color: #100d14;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.recent-boards-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #100d14;
  opacity: 0.6;
  margin-bottom: 1rem;
  text-align: center;
  letter-spacing: 0.1em;
}

#recent-boards-list {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0;
  scroll-behavior: smooth;
}

/* Hide scrollbar but keep functionality */
#recent-boards-list::-webkit-scrollbar {
  height: 4px;
}

#recent-boards-list::-webkit-scrollbar-track {
  background: rgba(16, 13, 20, 0.05);
  border-radius: 2px;
}

#recent-boards-list::-webkit-scrollbar-thumb {
  background: rgba(16, 13, 20, 0.2);
  border-radius: 2px;
}

#recent-boards-list::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 13, 20, 0.3);
}

.board-card {
  padding: 1rem 1.25rem;
  background: rgba(16, 13, 20, 0.03);
  border: 1px solid rgba(16, 13, 20, 0.12);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 180px;
  flex-shrink: 0;
  position: relative;
}

.board-card:hover {
  background: rgba(16, 13, 20, 0.06);
  border-color: rgba(16, 13, 20, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(16, 13, 20, 0.08);
}

.board-card.featured {
  background: rgba(16, 13, 20, 0.06);
  border: 1px solid rgba(16, 13, 20, 0.3);
}

.board-card.featured:hover {
  background: rgba(16, 13, 20, 0.1);
  border-color: rgba(16, 13, 20, 0.4);
  box-shadow: 0 2px 12px rgba(16, 13, 20, 0.12);
}

.board-card-name {
  font-size: 1.05rem;
  color: #100d14;
  font-weight: 500;
  font-family: 'Crimson Text', serif;
}

.private-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.5rem;
  background: rgba(16, 13, 20, 0.1);
  color: #100d14;
  border-radius: 4px;
  border: 1px solid rgba(16, 13, 20, 0.15);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  flex-shrink: 0;
}

.board-card-meta {
  font-size: 0.75rem;
  color: #100d14;
  opacity: 0.5;
  letter-spacing: 0.02em;
}

.remove-board-btn {
  background: none;
  border: none;
  color: #100d14;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  margin: 0;
  opacity: 0.3;
  transition: opacity 0.2s ease;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

.board-card:hover .remove-board-btn {
  opacity: 0.5;
}

.remove-board-btn:hover {
  opacity: 1 !important;
}

.primary-button {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  font-family: 'Crimson Text', serif;
  background: #100d14;
  color: #ede0d4;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.25s ease;
  letter-spacing: 0.3px;
}

.primary-button:hover {
  background: #1a1620;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 13, 20, 0.25);
}

.primary-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(16, 13, 20, 0.2);
}

.primary-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* === BOARD AREA === */
#board-area {
  width: 100%;
  height: 100%;
  position: relative;
  background: #fff;
}

#board {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

/* === UNIFIED DRAGGABLE TOOLBAR === */
#unified-toolbar {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(31, 28, 25, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  border: none;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
  z-index: 200;
  user-select: none;
  transition: box-shadow 0.3s ease, opacity 0.3s ease;
}

#unified-toolbar:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

/* Drag handle */
.toolbar-drag-handle {
  cursor: grab;
  color: rgba(212, 196, 180, 0.4);
  font-size: 16px;
  line-height: 1;
  padding: 0.25rem 0.4rem;
  margin-left: -0.2rem;
  margin-right: 0.25rem;
  border-radius: 6px;
  transition: all 0.3s;
  letter-spacing: -2px;
}

.toolbar-drag-handle:hover {
  color: rgba(212, 196, 180, 0.6);
  background: rgba(212, 196, 180, 0.03);
}

.toolbar-drag-handle:active,
#unified-toolbar.dragging .toolbar-drag-handle {
  cursor: grabbing;
  color: rgba(212, 196, 180, 0.8);
  background: rgba(212, 196, 180, 0.05);
}

#unified-toolbar.dragging {
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.45);
  transition: none;
}

/* Toolbar separator */
.toolbar-separator {
  display: none;
}

/* Board name + Presence Indicator (merged) */
.board-presence {
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  background: rgba(237, 224, 212, 0.08);
  border: none;
  position: relative;
  outline: none;
}

.board-presence:hover {
  background: rgba(237, 224, 212, 0.12);
  box-shadow: 0 0 12px rgba(212, 196, 180, 0.15);
}

#board-presence-text {
  color: #ede0d4;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1;
}

#bar-presence-dropdown {
  position: fixed;
  min-width: 200px;
  max-height: 300px;
  overflow-y: auto;
  background: rgba(31, 28, 25, 0.95);
  border: none;
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
  display: none;
  z-index: 201;
}

.presence-home-button {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: #ede0d4;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: left;
  font-weight: 500;
}

.presence-home-button:hover {
  background: rgba(237, 224, 212, 0.05);
  box-shadow: 0 0 8px rgba(212, 196, 180, 0.1);
}

.presence-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ede0d4;
  opacity: 0.5;
  padding: 0.5rem 0.75rem 0.25rem 0.75rem;
  font-weight: 600;
}

.presence-user-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: #ede0d4;
  border-radius: 8px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.presence-user-item:hover {
  background: rgba(237, 224, 212, 0.05);
  box-shadow: 0 0 8px rgba(212, 196, 180, 0.1);
}

.presence-user-item.current-user {
  font-weight: 600;
  background: rgba(106, 183, 168, 0.15);
}

.presence-separator {
  height: 1px;
  background: rgba(237, 224, 212, 0.1);
  margin: 0.5rem 0.75rem;
}

.presence-user-colors {
  display: flex;
  gap: 3px;
  margin-left: auto;
}

.presence-user-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
}



/* Sync indicator (shows save status) */
.sync-indicator {
  font-size: 1rem;
  line-height: 1;
  margin-left: 0.25rem;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.sync-indicator.synced {
  color: #7bc77b; /* Green checkmark */
}

.sync-indicator.saving {
  color: #ede0d4; /* Beige spinner */
  animation: spin 1s linear infinite;
}

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

/* Mode Buttons */
.mode-buttons {
  display: flex;
  gap: 0.5rem;
  border: none;
  border-radius: 8px;
  overflow: visible;
}

.mode-btn {
  padding: 8px 14px;
  font-size: 16px;
  background: transparent;
  color: rgba(212, 196, 180, 0.5);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.mode-btn:hover {
  background: rgba(212, 196, 180, 0.03);
  color: rgba(212, 196, 180, 0.7);
}

.mode-btn.active {
  background: transparent;
  color: #ede0d4;
  box-shadow: 0 0 12px rgba(212, 196, 180, 0.25);
}

/* Bar Control (for dropdowns) */
.bar-control {
  position: relative;
  outline: none;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
}

/* Brush Icon */
#brush-icon,
#gallery-brush-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(237, 224, 212, 0.9);
  border: 2px solid rgba(212, 196, 180, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(212, 196, 180, 0.6);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

/* Dropdown Container */
.bar-dropdown {
  position: fixed;
  background: rgba(31, 28, 25, 0.95);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
  z-index: 201;
  padding: 0 0.75rem 0.75rem 0.75rem;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
}

.dropdown-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.6;
  color: #ede0d4;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

/* Brush Options (in dropdown) */
.brush-option {
  cursor: pointer;
  transition: all 0.2s;
  opacity: 0.5;
  align-self: center;
  /* Larger padding for easier clicking - especially for small brushes */
  padding: 10px;
  /* Ensure minimum clickable size */
  min-width: 36px;
  min-height: 36px;
  /* Center the visual circle within the padded area */
  display: flex;
  align-items: center;
  justify-content: center;
  /* No background on container - circle is shown via pseudo-element */
  background: transparent;
  border: none;
  position: relative;
}

/* Visual circle indicator (actual size representation) */
.brush-option:not([data-size="auto"])::before {
  content: '';
  display: block;
  border-radius: 50%;
  background: rgba(212, 196, 180, 0.6);
  border: 2px solid transparent;
  transition: all 0.2s;
  /* Size is set via CSS custom properties from JavaScript */
  width: var(--brush-visual-size, 10px);
  height: var(--brush-visual-size, 10px);
}

/* Auto brush option (text-based) */
.brush-option[data-size="auto"] {
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  color: #ede0d4;
  background: rgba(255, 255, 255, 0.1);
  width: auto;
  height: auto;
  min-width: auto;
  min-height: auto;
}

.brush-option:hover {
  opacity: 0.7;
}

.brush-option:hover::before {
  transform: scale(1.1);
}

.brush-option.active {
  opacity: 1;
}

.brush-option.active::before {
  background: #ede0d4;
}

.brush-option[data-size="auto"].active {
  background: rgba(212, 196, 180, 0.1);
  color: #ede0d4;
  box-shadow: 0 0 12px rgba(212, 196, 180, 0.2);
}

/* Icon Button */
.icon-button {
  padding: 8px 14px;
  font-size: 18px;
  background: transparent;
  color: rgba(212, 196, 180, 0.5);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.icon-button:hover {
  background: rgba(212, 196, 180, 0.03);
  color: rgba(212, 196, 180, 0.8);
  box-shadow: 0 0 8px rgba(212, 196, 180, 0.1);
}

/* Toggle Button (for Gallery Mode) */
.toggle-button {
  position: relative;
}

.toggle-button.active {
  background: rgba(212, 196, 180, 0.08);
  color: #ede0d4;
  box-shadow: 0 0 8px rgba(212, 196, 180, 0.15);
}

.toggle-button.active .toggle-icon {
  color: #ede0d4;
}

.toggle-icon {
  display: inline-block;
  transition: all 0.3s;
}

/* === MINIMAP === */
#minimap {
  display: none; /* Disabled for now */
  position: fixed;
  top: 60px;
  left: 20px;
  border: 2px solid #444;
  background: #000;
  z-index: 100;
  cursor: pointer;
  border-radius: 4px;
  opacity: 0.3;
  transition: all 0.3s ease;
}

#minimap.expanded {
  opacity: 0.7;
}


/* === MENU DROPDOWN === */
.dropdown-menu {
  position: fixed;
  background: rgba(31, 28, 25, 0.95);
  border: none;
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
  z-index: 201;
}


.dropdown-menu button {
  display: block;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  border-radius: 8px;
  color: #ede0d4;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.dropdown-menu button:hover {
  background: rgba(237, 224, 212, 0.05);
  box-shadow: 0 0 8px rgba(212, 196, 180, 0.1);
}

.menu-toggle-button {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
}

.toggle-indicator {
  font-size: 1.2rem;
  transition: all 0.3s;
  color: rgba(212, 196, 180, 0.5);
}

.menu-toggle-button.active .toggle-indicator {
  color: #ede0d4;
}


/* === MODAL === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 2rem;
}

.modal-content {
  background: #1a1a1a;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  border: 2px solid #444;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid #444;
}

.modal-header h2 {
  color: #ede0d4;
  font-size: 1.5rem;
  font-weight: 400;
}

.close-button {
  background: none;
  border: none;
  color: #ede0d4;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.close-button:hover {
  color: #fff;
}

.modal-body {
  padding: 1.5rem;
  color: #ede0d4;
}

.modal-body h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #fff;
  font-weight: 400;
}

.modal-body h3:first-child {
  margin-top: 0;
}

.modal-body ul {
  padding-left: 1.5rem;
  line-height: 1.6;
}

.modal-body li {
  margin-bottom: 0.5rem;
}

.modal-body p {
  line-height: 1.6;
  opacity: 0.9;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 3rem;
  }

  #unified-toolbar {
    gap: 0.35rem;
    padding: 0.35rem 0.5rem;
  }

  .board-presence {
    padding: 0.3rem 0.5rem;
  }

  #board-presence-text {
    font-size: 0.85rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mode-btn {
    padding: 4px 8px;
    font-size: 14px;
  }

  .icon-button {
    padding: 4px 8px;
    font-size: 16px;
  }

  .toolbar-separator {
    margin: 0 0.15rem;
  }
}

/* === UTILITY CLASSES === */
.hidden {
  display: none !important;
}

/* === PROFILE SETUP STAGE === */
#profile-setup-stage {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, #ede0d4, #d4c4b4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#profile-setup-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 3rem;
  max-width: 400px;
  width: 100%;
}

#profile-setup-form .form-title {
  font-family: 'Crimson Text', serif;
  font-size: 1.75rem;
  font-weight: 400;
  color: #100d14;
  margin-bottom: 0.5rem;
}

#setup-name-input,
#edit-name-input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  font-family: 'Crimson Text', serif;
  border: 2px solid rgba(16, 13, 20, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  color: #100d14;
  transition: all 0.2s ease;
  text-align: center;
}

#setup-name-input:focus,
#edit-name-input:focus {
  outline: none;
  border-color: rgba(16, 13, 20, 0.4);
  background: rgba(255, 255, 255, 0.95);
}

#setup-name-input::placeholder,
#edit-name-input::placeholder {
  color: rgba(16, 13, 20, 0.35);
  font-style: italic;
}

/* === COLOR PICKER === */
#setup-color-picker-container,
#edit-color-picker-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.color-picker-label {
  font-size: 0.8rem;
  color: #100d14;
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.6;
}

.color-picker-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.color-picker-wrapper {
  position: relative;
  width: 50px;
  height: 50px;
}

.user-color-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}

.color-display {
  position: absolute;
  top: 0;
  left: 0;
  width: 50px;
  height: 50px;
  border: 3px solid rgba(16, 13, 20, 0.15);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: all 0.2s;
  pointer-events: none;
  z-index: 1;
}

.color-picker-wrapper:hover .color-display {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.randomize-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  font-size: 1.3rem;
  line-height: 1;
  border: 2px solid rgba(16, 13, 20, 0.15);
  border-radius: 50%;
  background: transparent;
  color: #100d14;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}

.randomize-btn:hover {
  background: rgba(16, 13, 20, 0.05);
  border-color: rgba(16, 13, 20, 0.3);
  transform: rotate(180deg);
  opacity: 1;
}

/* === IDENTITY BADGE === */
#identity-badge {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  z-index: 10;
}

#identity-name {
  font-size: 0.9rem;
  font-weight: 400;
  color: #100d14;
  opacity: 0.7;
}

.edit-profile-link {
  background: transparent;
  border: none;
  color: #100d14;
  opacity: 0.5;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.edit-profile-link:hover {
  opacity: 0.9;
  transform: scale(1.1);
}

/* === PROFILE EDITOR MODAL === */
#profile-editor-modal .modal-content {
  max-width: 400px;
  background: linear-gradient(to bottom, #ede0d4, #d4c4b4);
  border: none;
}

#profile-editor-modal .modal-header {
  padding: 2rem 2rem 1rem 2rem;
  border-bottom: none;
}

#profile-editor-modal .modal-header h2 {
  color: #100d14;
  font-family: 'Crimson Text', serif;
  font-size: 1.5rem;
  font-weight: 400;
}

#profile-editor-modal .close-button {
  color: #100d14;
  opacity: 0.6;
}

#profile-editor-modal .close-button:hover {
  opacity: 1;
}

#profile-editor-modal .modal-body {
  padding: 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#profile-editor-modal .modal-footer {
  padding: 1rem 2rem 2rem 2rem;
  border-top: none;
  margin-top: 0;
}

#profile-editor-modal .secondary-button {
  background: transparent;
  border: 2px solid rgba(16, 13, 20, 0.2);
  color: #100d14;
}

#profile-editor-modal .secondary-button:hover {
  background: rgba(16, 13, 20, 0.05);
  border-color: rgba(16, 13, 20, 0.3);
}

#profile-editor-modal .primary-button {
  background: #100d14;
  color: #ede0d4;
}

/* === LANDING DIVIDER === */
.landing-divider {
  text-align: center;
  margin: 1rem 0;
}

.divider-text {
  font-size: 0.9rem;
  color: #100d14;
  opacity: 0.5;
  font-weight: 400;
}

/* === BOARD INPUT FORM === */
#board-input-form {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#room-input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  font-family: 'Crimson Text', serif;
  border: 2px solid rgba(16, 13, 20, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  color: #100d14;
  transition: all 0.2s ease;
  text-align: center;
}

#room-input:focus {
  outline: none;
  border-color: rgba(16, 13, 20, 0.4);
  background: rgba(255, 255, 255, 0.95);
}

#room-input::placeholder {
  color: rgba(16, 13, 20, 0.35);
  font-style: italic;
}

.error-message {
  color: #d32f2f;
  font-size: 0.85rem;
  margin-top: -0.5rem;
  padding: 0 0.25rem;
}

/* === CREATE BOARD MODAL (SPECIAL STYLING) === */
#create-board-modal .modal-content {
  max-width: 480px;
  background: linear-gradient(to bottom, #ede0d4, #d4c4b4);
  border: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#create-board-modal .modal-header {
  padding: 3rem 3rem 1rem 3rem;
  border-bottom: none;
  justify-content: center;
}

#create-board-modal .modal-header h2 {
  color: #100d14;
  font-family: 'Crimson Text', serif;
  font-size: 1.75rem;
  font-weight: 400;
  text-align: center;
}

#create-board-modal .modal-body {
  padding: 2rem 3rem;
  text-align: center;
  color: #100d14;
  line-height: 1.8;
}

#create-board-modal .modal-body p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

#create-board-modal .modal-body #new-board-name {
  font-weight: 600;
  font-style: italic;
}

#create-board-modal .modal-options {
  margin: 2rem 0 1.5rem 0;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
}

#create-board-modal .checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 1rem;
  justify-content: center;
}

#create-board-modal .checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #100d14;
}

#create-board-modal .checkbox-label span {
  font-weight: 500;
}

#create-board-modal .option-hint {
  margin-top: 0.75rem;
  margin-bottom: 0;
  font-size: 0.85rem;
  opacity: 0.6;
  font-style: italic;
}

#create-board-modal .modal-note {
  margin-top: 1.5rem;
  margin-bottom: 0;
  font-size: 0.9rem;
  opacity: 0.7;
}

#create-board-modal .modal-footer {
  padding: 1.5rem 3rem 3rem 3rem;
  border-top: none;
  margin-top: 0;
  justify-content: center;
  gap: 1rem;
}

#create-board-modal .secondary-button {
  background: transparent;
  border: 2px solid rgba(16, 13, 20, 0.2);
  color: #100d14;
  padding: 0.75rem 2rem;
}

#create-board-modal .secondary-button:hover {
  background: rgba(16, 13, 20, 0.05);
  border-color: rgba(16, 13, 20, 0.3);
}

#create-board-modal .primary-button {
  background: #100d14;
  color: #ede0d4;
  padding: 0.75rem 2rem;
}

#create-board-modal .primary-button:hover {
  background: #1a1620;
}

/* === MODAL FOOTER === */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(237, 224, 212, 0.1);
}

.secondary-button {
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  font-family: 'Crimson Text', serif;
  border: 2px solid rgba(237, 224, 212, 0.3);
  border-radius: 8px;
  background: transparent;
  color: #ede0d4;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-button:hover {
  background: rgba(237, 224, 212, 0.1);
  border-color: rgba(237, 224, 212, 0.5);
}
/* === LOADING OVERLAY === */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(16, 13, 20, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  gap: 1rem;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(237, 224, 212, 0.2);
  border-top-color: #ede0d4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  font-family: 'Crimson Text', serif;
  font-size: 1.2rem;
  color: #ede0d4;
  opacity: 0.8;
}

/* === TOKEN MODAL === */
#token-modal .modal-content {
  max-width: 600px;
  background: linear-gradient(to bottom, #ede0d4, #d4c4b4);
  border: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#token-modal .modal-header {
  padding: 3rem 3rem 1rem 3rem;
  border-bottom: none;
  justify-content: center;
}

#token-modal .modal-header h2 {
  color: #100d14;
  font-family: 'Crimson Text', serif;
  font-size: 1.75rem;
  font-weight: 400;
  text-align: center;
}

#token-modal .modal-body {
  padding: 2rem 3rem;
  text-align: center;
  color: #100d14;
  line-height: 1.8;
}

#token-modal .modal-body p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

#token-modal .modal-body #token-board-name {
  font-weight: 600;
  font-style: italic;
}

#token-modal .modal-note {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.token-display-container {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
}

#token-url-display {
  flex: 1;
  padding: 0.75rem;
  font-size: 0.85rem;
  font-family: 'Monaco', 'Courier New', monospace;
  background: white;
  border: 1px solid rgba(16, 13, 20, 0.2);
  border-radius: 4px;
  color: #100d14;
  outline: none;
}

#copy-token-btn {
  padding: 0.75rem 1rem;
  font-size: 1.2rem;
  background: #100d14;
  color: #ede0d4;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

#copy-token-btn:hover {
  background: #1a1620;
}

.token-warning {
  margin-top: 1.5rem;
  margin-bottom: 0;
  padding: 1rem;
  background: rgba(255, 200, 100, 0.3);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
}

#token-modal .modal-footer {
  padding: 1.5rem 3rem 3rem 3rem;
  border-top: none;
  margin-top: 0;
  justify-content: center;
}

#token-modal .primary-button {
  background: #100d14;
  color: #ede0d4;
  padding: 0.75rem 2.5rem;
}

#token-modal .primary-button:hover {
  background: #1a1620;
}

/* === SHARE MODAL === */
#share-modal .modal-content {
  max-width: 500px;
  background: linear-gradient(to bottom, #ede0d4, #d4c4b4);
  border: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#share-modal .modal-header {
  padding: 3rem 3rem 1rem 3rem;
  border-bottom: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#share-modal .modal-header h2 {
  color: #100d14;
  font-family: 'Crimson Text', serif;
  font-size: 1.75rem;
  font-weight: 400;
}

#share-modal .close-button {
  background: none;
  border: none;
  font-size: 2rem;
  color: #100d14;
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.2s;
}

#share-modal .close-button:hover {
  opacity: 1;
}

#share-modal .modal-body {
  padding: 2rem 3rem 3rem 3rem;
  text-align: center;
  color: #100d14;
  line-height: 1.8;
}

#share-modal .modal-body p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

#share-modal #share-board-name {
  font-weight: 600;
  font-style: italic;
}

.share-url-container {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
}

#share-url-display {
  flex: 1;
  padding: 0.75rem;
  font-size: 0.85rem;
  font-family: 'Monaco', 'Courier New', monospace;
  background: white;
  border: 1px solid rgba(16, 13, 20, 0.2);
  border-radius: 4px;
  color: #100d14;
  outline: none;
}

#copy-share-btn {
  padding: 0.75rem 1rem;
  font-size: 1.2rem;
  background: #100d14;
  color: #ede0d4;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

#copy-share-btn:hover {
  background: #1a1620;
}

.qr-code-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
}

#qr-code-canvas canvas {
  display: block;
}

.share-note {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 1rem;
  margin-bottom: 0;
}

.share-note.private-warning {
  background: rgba(255, 200, 100, 0.3);
  padding: 0.75rem;
  border-radius: 6px;
  font-weight: 500;
  opacity: 1;
}
