/* ============================================
   CREATE BOARD MODAL — WOW Design v2
   Glassmorphism + Micro-animations + Particles
   ============================================ */

/* === KEYFRAMES === */
@keyframes cbModalIn {
  from { opacity: 0; transform: scale(0.88) translateY(24px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 6px rgba(220,20,60,0.25), 0 0 18px rgba(220,20,60,0.08); }
  50% { box-shadow: 0 0 16px rgba(220,20,60,0.45), 0 0 36px rgba(220,20,60,0.15); }
}
@keyframes checkPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.1); }
  66% { transform: translate(-15px, 15px) scale(0.95); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-25px, 20px) scale(0.9); }
  66% { transform: translate(20px, -10px) scale(1.05); }
}
@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(15px, 25px) scale(1.1); }
}
@keyframes cbShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
@keyframes cbParticleRise {
  0% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translateY(-120px) scale(0.3) rotate(180deg); }
}
@keyframes cbCheckDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes cbCircleFill {
  to { stroke-dashoffset: 0; }
}

/* === MODAL STRUCTURE === */
#NewBoard .modal-dialog {
  max-width: 780px;
}
#NewBoard.show .modal-dialog {
  animation: cbModalIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Glassmorphism Shell */
#NewBoard .modal-content.cb-modal-glass {
  background: rgba(22, 22, 32, 0.94);
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 24px;
  box-shadow:
    0 32px 64px rgba(0,0,0,0.45),
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 1px 0 rgba(255,255,255,0.06) inset;
  overflow: hidden;
  position: relative;
}

/* Floating Orbs (decorative) */
.cb-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.cb-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.12;
}
.cb-orb-1 {
  width: 200px; height: 200px;
  background: #dc143c;
  top: -60px; right: -40px;
  animation: orbFloat1 8s ease-in-out infinite;
}
.cb-orb-2 {
  width: 150px; height: 150px;
  background: #9b1b8a;
  bottom: 10%; left: -30px;
  animation: orbFloat2 10s ease-in-out infinite;
}
.cb-orb-3 {
  width: 120px; height: 120px;
  background: #6a1b9a;
  top: 50%; right: 20%;
  animation: orbFloat3 12s ease-in-out infinite;
}

/* === HEADER === */
.cb-modal-header {
  background: linear-gradient(135deg, #dc143c 0%, #b91372 40%, #7b1fa2 100%);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  padding: 28px 32px 24px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.cb-modal-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}
.cb-header-content {
  display: flex;
  align-items: center;
  gap: 16px;
}
.cb-brand-icon {
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
}
.cb-modal-header .cb-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0,0,0,0.2);
  letter-spacing: -0.01em;
}
.cb-modal-header .cb-subtitle {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.72);
  margin-top: 2px;
}
.cb-close-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  font-size: 0.85rem;
}
.cb-close-btn:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
  transform: rotate(90deg);
}

/* === BODY === */
.cb-modal-body {
  padding: 28px 32px 12px;
  position: relative;
  z-index: 1;
}

/* === BOARD NAME — Floating Label === */
.cb-name-group {
  position: relative;
  margin-bottom: 28px;
}
.cb-name-group .cb-name-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.25);
  font-size: 0.95rem;
  transition: color 0.3s;
  z-index: 2;
  pointer-events: none;
}
.cb-name-group input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px 20px 12px 48px;
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}
.cb-name-label {
  position: absolute;
  left: 48px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.35);
  font-size: 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 2;
}
.cb-name-group input:focus ~ .cb-name-label,
.cb-name-group input:not(:placeholder-shown) ~ .cb-name-label {
  top: 8px;
  transform: translateY(0);
  font-size: 0.7rem;
  color: #dc143c;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.cb-name-line {
  position: absolute;
  bottom: 0; left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #dc143c, #9b1b8a);
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}
.cb-name-group input:focus ~ .cb-name-line {
  width: calc(100% - 4px);
}
.cb-name-group input:focus {
  border-color: rgba(220,20,60,0.4);
  background: rgba(220,20,60,0.04);
  box-shadow: 0 0 0 4px rgba(220,20,60,0.08);
}
.cb-name-group input:focus ~ .cb-name-icon {
  color: #dc143c;
}
.cb-shake {
  animation: cbShake 0.5s ease;
}
.cb-shake input {
  border-color: #ff4444 !important;
}

/* === CHOICE CARDS === */
.cb-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
}
.cb-choice-card {
  background: rgba(255,255,255,0.03);
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 28px 22px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}
.cb-choice-glow {
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(135deg, #dc143c, #9b1b8a, #6a1b9a, #dc143c);
  background-size: 300% 300%;
  animation: gradientShift 4s ease infinite;
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 0;
}
.cb-choice-card.active .cb-choice-glow {
  opacity: 1;
}
.cb-choice-card.active {
  background: rgba(220,20,60,0.08);
  border-color: transparent;
  box-shadow: 0 8px 32px rgba(220,20,60,0.15);
}
.cb-choice-card.active::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 16px;
  background: rgba(22,22,32,0.92);
  z-index: 0;
}
.cb-choice-card:hover {
  border-color: rgba(220,20,60,0.35);
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3), 0 0 24px rgba(220,20,60,0.08);
}
.cb-choice-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
  display: block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}
.cb-choice-card:hover .cb-choice-icon {
  transform: scale(1.2) rotate(-8deg);
}
.cb-choice-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.cb-choice-desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.4;
  position: relative;
  z-index: 1;
}
.cb-choice-check {
  position: absolute;
  top: 12px; right: 12px;
  width: 26px; height: 26px;
  background: linear-gradient(135deg, #dc143c, #9b1b8a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.7rem;
  opacity: 0;
  transform: scale(0);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}
.cb-choice-card.active .cb-choice-check {
  opacity: 1;
  transform: scale(1);
}

/* === TEMPLATE SECTION === */
.cb-template-section {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s ease 0.1s,
              margin 0.4s ease;
  margin-top: 0;
}
.cb-template-section.open {
  max-height: 550px;
  opacity: 1;
  margin-top: 24px;
  overflow-y: auto;
}

/* Search */
.cb-template-search {
  position: relative;
  margin-bottom: 14px;
}
.cb-template-search input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 11px 14px 11px 40px;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.3s;
}
.cb-template-search input:focus {
  border-color: rgba(220,20,60,0.4);
  box-shadow: 0 0 0 3px rgba(220,20,60,0.06);
}
.cb-template-search i {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.3);
  font-size: 0.82rem;
}

/* Category Tabs */
.cb-cat-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cb-cat-tab {
  padding: 7px 14px;
  border-radius: 22px;
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.cb-cat-tab:hover {
  background: rgba(220,20,60,0.1);
  color: rgba(255,255,255,0.9);
  border-color: rgba(220,20,60,0.25);
}
.cb-cat-tab.active {
  background: linear-gradient(135deg, #dc143c, #9b1b8a);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 14px rgba(220,20,60,0.3);
}

/* Template Grid */
.cb-template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-height: 400px;
  overflow-y: auto;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.cb-template-grid::-webkit-scrollbar { width: 5px; }
.cb-template-grid::-webkit-scrollbar-track { background: transparent; }
.cb-template-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 5px; }

/* Template Card */
.cb-tpl-card {
  background: rgba(255,255,255,0.03);
  border: 2px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  animation: fadeSlideUp 0.45s ease both;
  animation-delay: calc(var(--i, 0) * 0.06s);
  display: flex;
  flex-direction: column;
}
.cb-tpl-card:hover {
  border-color: rgba(220,20,60,0.35);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0,0,0,0.3), 0 0 20px rgba(220,20,60,0.08);
  background: rgba(255,255,255,0.05);
}
.cb-tpl-card.selected {
  border-color: #dc143c;
  background: rgba(220,20,60,0.08);
  animation: pulseGlow 2.5s ease infinite;
}

/* Check badge */
.cb-tpl-check {
  position: absolute;
  top: 10px; right: 10px;
  width: 24px; height: 24px;
  background: linear-gradient(135deg, #dc143c, #9b1b8a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.6rem;
  opacity: 0;
  transform: scale(0);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 3;
}
.cb-tpl-card.selected .cb-tpl-check {
  opacity: 1;
  animation: checkPop 0.45s ease forwards;
}

/* Mini Preview */
.cb-tpl-preview {
  width: 100%;
  height: 65px;
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  margin-bottom: 12px;
  padding: 6px;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(3, 1fr);
  overflow: hidden;
}
.prev-block {
  border-radius: 4px;
  min-height: 0;
  transition: opacity 0.3s;
}
.prev-block.type-text { background: rgba(220,20,60,0.5); }
.prev-block.type-image { background: rgba(66,165,245,0.5); }
.prev-block.type-embed { background: rgba(76,175,80,0.5); }
.prev-block.type-checklist { background: rgba(255,167,38,0.5); }
.prev-block.type-chart { background: rgba(171,71,188,0.5); }
.prev-block.type-countdown { background: rgba(38,198,218,0.5); }
.prev-block.type-quote { background: rgba(255,112,67,0.5); }
.prev-block.type-default { background: rgba(255,255,255,0.12); }

/* Template Info */
.cb-tpl-info { flex: 1; }
.cb-tpl-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cb-tpl-desc {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}
.cb-tpl-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.cb-tpl-badge.cat-content { background: rgba(220,20,60,0.15); color: #ff6b81; }
.cb-tpl-badge.cat-professional { background: rgba(66,165,245,0.15); color: #64b5f6; }
.cb-tpl-badge.cat-education { background: rgba(76,175,80,0.15); color: #81c784; }
.cb-tpl-badge.cat-personal { background: rgba(255,167,38,0.15); color: #ffb74d; }
.cb-tpl-badge.cat-creative { background: rgba(171,71,188,0.15); color: #ce93d8; }

/* Use This button */
.cb-tpl-use-btn {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  padding: 5px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #dc143c, #9b1b8a);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  z-index: 2;
}
.cb-tpl-card:hover .cb-tpl-use-btn {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === ADVANCED / TEMP SECTION === */
.cb-temp-section {
  margin-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 16px;
}
.cb-temp-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  font-size: 0.82rem;
  transition: color 0.3s;
  user-select: none;
  font-weight: 500;
}
.cb-temp-toggle:hover { color: rgba(255,255,255,0.7); }
.cb-temp-chevron {
  font-size: 0.6rem;
  transition: transform 0.3s ease;
}
.cb-temp-toggle.expanded .cb-temp-chevron {
  transform: rotate(180deg);
}
.cb-temp-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  padding-top: 0;
}
.cb-temp-body.open {
  max-height: 250px;
  opacity: 1;
  padding-top: 14px;
}
.cb-temp-body .form-check-label {
  color: rgba(255,255,255,0.65);
}
.cb-temp-body .form-label {
  color: rgba(255,255,255,0.5);
}
.cb-temp-body select,
.cb-temp-body .form-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.85rem;
}
.cb-temp-body .form-check-input {
  background-color: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}
.cb-temp-body .form-check-input:checked {
  background-color: #dc143c;
  border-color: #dc143c;
}

/* === FOOTER === */
.cb-modal-footer {
  padding: 12px 32px 28px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}
.cb-btn-cancel {
  padding: 11px 24px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
}
.cb-btn-cancel:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.cb-btn-create {
  padding: 12px 36px;
  border-radius: 14px;
  background: linear-gradient(135deg, #dc143c 0%, #9b1b8a 100%);
  color: #fff;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 20px rgba(220,20,60,0.3);
  letter-spacing: 0.3px;
}
.cb-btn-create:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(220,20,60,0.4);
}
.cb-btn-create:active {
  transform: translateY(0) scale(0.98);
}
.cb-btn-text {
  position: relative;
  z-index: 1;
}
/* Shimmer sweep */
.cb-btn-shimmer {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  pointer-events: none;
}
.cb-btn-shimmer::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2.5s ease-in-out infinite;
}

/* === SUCCESS OVERLAY === */
.cb-success-overlay {
  position: absolute;
  inset: 0;
  background: rgba(16,16,24,0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.cb-success-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.cb-success-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.cb-particle {
  position: absolute;
  bottom: 40%;
  font-size: 1.2rem;
  animation: cbParticleRise 2s ease-out forwards;
}
.cb-success-icon {
  width: 90px; height: 90px;
  margin-bottom: 18px;
}
.cb-checkmark {
  width: 90px; height: 90px;
}
.cb-checkmark-circle {
  stroke: #dc143c;
  stroke-width: 2;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: cbCircleFill 0.6s ease 0.2s forwards;
}
.cb-checkmark-path {
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: cbCheckDraw 0.4s ease 0.7s forwards;
}
.cb-success-text {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.cb-success-subtext {
  color: rgba(255,255,255,0.45);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* No templates / Loading */
.cb-no-templates {
  grid-column: 1 / -1;
  text-align: center;
  padding: 36px;
  color: rgba(255,255,255,0.35);
  font-size: 0.9rem;
}
.cb-template-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 36px;
  color: rgba(255,255,255,0.45);
}
/* Custom 3-dot loader */
.cb-loader {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 8px;
}
.cb-loader-ring {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #dc143c;
}
.cb-loader-ring:nth-child(1) { animation: cbDotPulse 1.2s ease-in-out 0s infinite; }
.cb-loader-ring:nth-child(2) { animation: cbDotPulse 1.2s ease-in-out 0.15s infinite; }
.cb-loader-ring:nth-child(3) { animation: cbDotPulse 1.2s ease-in-out 0.3s infinite; }
@keyframes cbDotPulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.6); opacity: 1; }
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] #NewBoard .modal-content.cb-modal-glass,
.light-mode #NewBoard .modal-content.cb-modal-glass {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 32px 64px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
}
[data-theme="light"] .cb-orb { opacity: 0.06; }
[data-theme="light"] .cb-name-group input,
.light-mode .cb-name-group input {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.1);
  color: #222;
}
[data-theme="light"] .cb-name-label,
.light-mode .cb-name-label { color: rgba(0,0,0,0.4); }
[data-theme="light"] .cb-name-group .cb-name-icon,
.light-mode .cb-name-group .cb-name-icon { color: rgba(0,0,0,0.25); }
[data-theme="light"] .cb-choice-card,
.light-mode .cb-choice-card {
  background: rgba(0,0,0,0.015);
  border-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .cb-choice-card.active::before,
.light-mode .cb-choice-card.active::before {
  background: rgba(255,255,255,0.96);
}
[data-theme="light"] .cb-choice-title,
.light-mode .cb-choice-title { color: #222; }
[data-theme="light"] .cb-choice-desc,
.light-mode .cb-choice-desc { color: rgba(0,0,0,0.45); }
[data-theme="light"] .cb-tpl-card,
.light-mode .cb-tpl-card {
  background: rgba(0,0,0,0.015);
  border-color: rgba(0,0,0,0.05);
}
[data-theme="light"] .cb-tpl-name,
.light-mode .cb-tpl-name { color: #222; }
[data-theme="light"] .cb-tpl-desc,
.light-mode .cb-tpl-desc { color: rgba(0,0,0,0.45); }
[data-theme="light"] .cb-tpl-preview,
.light-mode .cb-tpl-preview { background: rgba(0,0,0,0.04); }
[data-theme="light"] .cb-cat-tab,
.light-mode .cb-cat-tab {
  background: rgba(0,0,0,0.03);
  color: rgba(0,0,0,0.5);
  border-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .cb-template-search input,
.light-mode .cb-template-search input {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
  color: #222;
}
[data-theme="light"] .cb-temp-toggle,
.light-mode .cb-temp-toggle { color: rgba(0,0,0,0.4); }
[data-theme="light"] .cb-temp-body .form-check-label,
.light-mode .cb-temp-body .form-check-label { color: rgba(0,0,0,0.6); }
[data-theme="light"] .cb-temp-body .form-label,
.light-mode .cb-temp-body .form-label { color: rgba(0,0,0,0.5); }
[data-theme="light"] .cb-temp-body select,
.light-mode .cb-temp-body select {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
  color: #222;
}
[data-theme="light"] .cb-btn-cancel,
.light-mode .cb-btn-cancel {
  background: rgba(0,0,0,0.03);
  color: rgba(0,0,0,0.55);
  border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .cb-success-overlay,
.light-mode .cb-success-overlay { background: rgba(255,255,255,0.96); }
[data-theme="light"] .cb-success-text,
.light-mode .cb-success-text { color: #222; }
[data-theme="light"] .cb-success-subtext,
.light-mode .cb-success-subtext { color: rgba(0,0,0,0.45); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  #NewBoard .modal-dialog { max-width: 95%; margin: 12px auto; }
  .cb-template-grid { grid-template-columns: repeat(2, 1fr); }
  .cb-modal-body { padding: 20px 20px 8px; }
  .cb-modal-footer { padding: 12px 20px 24px; }
  .cb-modal-header { padding: 22px 20px 18px; }
}
@media (max-width: 480px) {
  .cb-choice-row { grid-template-columns: 1fr; gap: 12px; }
  .cb-template-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cb-header-content { gap: 12px; }
  .cb-brand-icon { width: 40px; height: 40px; font-size: 1rem; }
  .cb-modal-header .cb-title { font-size: 1.2rem; }
}
