/* ═══════════════════════════════════════════════════════════════════
   Padlet Alt — Design System + Styles
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Reset & Variables ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Brightened Indigo-Purple palette */
  --bg-primary: #2d2a5e;
  --bg-surface: rgba(65, 60, 130, 0.65);
  --bg-card: rgba(75, 70, 140, 0.55);
  --bg-hover: rgba(95, 88, 165, 0.6);
  --border: rgba(165, 180, 252, 0.3);
  --border-glow: rgba(165, 180, 252, 0.55);
  --text-primary: #f8fafc;
  --text-secondary: #c7d2fe;
  --text-muted: #818cf8;
  --accent: #6366f1;
  --accent-bright: #a78bfa;
  --danger: #fb7185;
  --success: #34d399;
  --glass-blur: 16px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .25);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, .35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .45);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: .2s cubic-bezier(.4, 0, .2, 1);
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input,
textarea {
  font-family: inherit;
}

/* ─── Glass effect ────────────────────────────────────────────────── */
.glass {
  background: var(--bg-surface);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════════════════ */

.landing-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
}

/* Animated blobs */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .35;
  animation: blobFloat 20s ease-in-out infinite;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: #6366f1;
  top: -10%;
  left: -5%;
  animation-delay: 0s;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: #a855f7;
  bottom: -10%;
  right: -5%;
  animation-delay: -7s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: #818cf8;
  top: 40%;
  left: 50%;
  animation-delay: -14s;
}

@keyframes blobFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(40px, -30px) scale(1.05);
  }

  66% {
    transform: translate(-20px, 20px) scale(.95);
  }
}

.landing-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  width: 100%;
  max-width: 460px;
}

.landing-card {
  width: 100%;
  padding: 2.5rem 2rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* Logo */
.logo-section {
  text-align: center;
  margin-bottom: 1.75rem;
}

.logo-icon {
  display: inline-flex;
  margin-bottom: .75rem;
}

.logo-section h1 {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  color: var(--text-secondary);
  font-size: .9rem;
  margin-top: .25rem;
}

/* Tabs */
.tab-switcher {
  display: flex;
  gap: 4px;
  background: rgba(15, 13, 26, .5);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: 1.5rem;
}

.tab-btn {
  flex: 1;
  padding: .55rem 1rem;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: .85rem;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99, 102, 241, .4);
}

.tab-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeUp .25s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

.panel-desc {
  color: var(--text-secondary);
  font-size: .88rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.5rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: .9rem;
  box-shadow: 0 4px 16px rgba(99, 102, 241, .35);
  transition: var(--transition);
  width: 100%;
  justify-content: center;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, .5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: .6;
  pointer-events: none;
}

/* Code input */
.code-input-group {
  display: flex;
  gap: .5rem;
}

.code-input-group input {
  flex: 1;
  padding: .7rem 1rem;
  background: rgba(15, 13, 26, .6);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-align: center;
  text-transform: uppercase;
  transition: var(--transition);
}

.code-input-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, .2);
}

.code-input-group input::placeholder {
  color: var(--text-muted);
  letter-spacing: 3px;
  opacity: .5;
}

.code-input-group .btn-primary {
  width: auto;
  flex-shrink: 0;
}

.error-msg {
  color: var(--danger);
  font-size: .82rem;
  margin-top: .5rem;
  min-height: 1.2em;
  text-align: center;
}

/* Footer */
.landing-footer {
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: .75rem;
  opacity: .6;
}

/* ═══════════════════════════════════════════════════════════════════
   BOARD PAGE
   ═══════════════════════════════════════════════════════════════════ */

.board-body {
  padding-top: 72px;
}

/* ─── Header ──────────────────────────────────────────────────────── */
.board-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.header-center {
  display: flex;
  align-items: center;
}

.back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: var(--transition);
}

.back-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.session-badge {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .6rem .3rem .75rem;
  background: rgba(15, 13, 26, .5);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

.code-label {
  font-size: .6rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.code-value {
  font-size: .9rem;
  font-weight: 700;
  color: var(--accent-bright);
  letter-spacing: 2px;
}

.copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  transition: var(--transition);
}

.copy-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.identity-badge {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .75rem;
  background: rgba(15, 13, 26, .4);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  font-size: .82rem;
  font-weight: 600;
}

.identity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.participant-count {
  display: flex;
  align-items: center;
  gap: .3rem;
  color: var(--text-secondary);
  font-size: .85rem;
  font-weight: 600;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-glow);
}

.hidden {
  display: none !important;
}

/* ─── Board Grid (masonry-like) ───────────────────────────────────── */
.board-grid {
  columns: 3;
  column-gap: 1rem;
  padding: 1rem 1.25rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .board-grid {
    columns: 2;
  }
}

@media (max-width: 560px) {
  .board-grid {
    columns: 1;
  }
}

/* ─── Card ────────────────────────────────────────────────────────── */
.board-card {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: var(--transition);
  animation: fadeUp .3s ease;
}

.board-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-sm);
}

.card-author {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  font-weight: 600;
  margin-bottom: .5rem;
  opacity: .85;
}

.card-author-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .3rem;
}

.card-content {
  font-size: .88rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: .75rem;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
}

.card-action-btn {
  display: flex;
  align-items: center;
  gap: .3rem;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 600;
  transition: var(--transition);
  padding: .2rem .4rem;
  border-radius: var(--radius-sm);
}

.card-action-btn:hover {
  color: var(--accent);
  background: rgba(99, 102, 241, .1);
}

.card-action-btn.liked {
  color: #f87171;
}

.card-action-btn.liked svg path {
  fill: #f87171;
}

.card-delete-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  opacity: 0;
}

.board-card:hover .card-delete-btn {
  opacity: 1;
}

.card-delete-btn:hover {
  color: var(--danger);
  background: rgba(248, 113, 113, .1);
}

/* ─── Comments Section ────────────────────────────────────────────── */
.card-comments {
  margin-top: .75rem;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
  display: block;
}


.comment-item {
  display: flex;
  gap: .4rem;
  margin-bottom: .5rem;
}

.comment-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.comment-body {
  flex: 1;
}

.comment-author {
  font-size: .7rem;
  font-weight: 700;
}

.comment-text {
  font-size: .8rem;
  color: var(--text-secondary);
  word-break: break-word;
}

.comment-input-row {
  display: flex;
  gap: .35rem;
  margin-top: .5rem;
}

.comment-input-row input {
  flex: 1;
  padding: .4rem .6rem;
  background: rgba(15, 13, 26, .5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: .8rem;
  transition: var(--transition);
}

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

.comment-input-row button {
  padding: .4rem .7rem;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  transition: var(--transition);
}

.comment-input-row button:hover {
  background: var(--accent-bright);
}

/* ─── Comment Likes ───────────────────────────────────────────────── */
.comment-like-btn {
  display: flex;
  align-items: center;
  gap: .2rem;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 600;
  padding: .15rem .3rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
  margin-top: 2px;
}

.comment-like-btn:hover {
  color: var(--accent);
  background: rgba(99, 102, 241, .1);
}

.comment-like-btn.liked {
  color: #f87171;
}

.comment-like-btn.liked svg path {
  fill: #f87171;
}

.comment-like-count {
  min-width: 8px;
  text-align: center;
}

/* ─── Empty State ─────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
  font-size: .9rem;
  text-align: center;
  gap: 1rem;
}

.empty-state.hidden {
  display: none;
}

/* ─── FAB ─────────────────────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(99, 102, 241, .5);
  transition: var(--transition);
  z-index: 50;
}

.fab:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 32px rgba(99, 102, 241, .6);
}

.fab:active {
  transform: scale(1);
}

/* ─── Modals ──────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn .15s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  animation: modalPop .2s ease;
}

.modal-sm {
  max-width: 380px;
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(.95) translateY(10px);
  }

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.3rem;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* QR modal */
.qr-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #fff;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.qr-container img {
  width: 100%;
  max-width: 280px;
  height: auto;
}

.qr-url {
  text-align: center;
  font-size: .75rem;
  color: var(--accent-bright);
  word-break: break-all;
  margin-bottom: .25rem;
}

.qr-hint {
  text-align: center;
  font-size: .78rem;
  color: var(--text-muted);
}

/* New card form */
.new-card-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.new-card-form input,
.new-card-form textarea {
  width: 100%;
  padding: .65rem .85rem;
  background: rgba(15, 13, 26, .5);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: .9rem;
  transition: var(--transition);
  resize: vertical;
}

.new-card-form input:focus,
.new-card-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, .15);
}

.new-card-form input::placeholder,
.new-card-form textarea::placeholder {
  color: var(--text-muted);
  opacity: .5;
}

/* Settings toggles */
.settings-body {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem .75rem;
  background: rgba(15, 13, 26, .3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: .88rem;
  transition: var(--transition);
}

.toggle-row:hover {
  border-color: var(--border-glow);
}

.toggle-row input {
  display: none;
}

.toggle-switch {
  position: relative;
  width: 42px;
  height: 24px;
  background: rgba(100, 100, 140, .3);
  border-radius: var(--radius-full);
  transition: var(--transition);
  flex-shrink: 0;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: var(--transition);
}

.toggle-row input:checked+.toggle-switch {
  background: var(--accent);
}

.toggle-row input:checked+.toggle-switch::after {
  left: 21px;
  background: #fff;
}

/* ─── Toast ───────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: .6rem 1.2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: .82rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  z-index: 500;
  animation: toastIn .25s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ─── Spinner ─────────────────────────────────────────────────────── */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

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

/* ─── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .board-header {
    padding: 0 .75rem;
  }

  .header-center {
    display: none;
  }

  .landing-card {
    padding: 2rem 1.25rem 1.5rem;
  }

  .board-grid {
    padding: .75rem .75rem 6rem;
  }
}

/* ─── Presenter-only utility ──────────────────────────────────────── */
.presenter-only {
  display: none;
}

body.is-presenter .presenter-only {
  display: flex !important;
}