/* ==========================================================
   LAUGHING BUDDHA - MODERN STYLING
   ========================================================== */

:root {
  --bg-dark: #0A0E17;
  --bg-card: rgba(22, 27, 34, 0.85);
  --bg-card-hover: rgba(30, 36, 46, 0.95);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-bright: rgba(255, 255, 255, 0.22);
  
  --gold-primary: #FFB800;
  --gold-glow: rgba(255, 184, 0, 0.4);
  --green-accent: #2ECC71;
  --red-accent: #FF4757;
  
  --team-a: #FF4757;
  --team-b: #1E90FF;
  --team-c: #2ED573;
  --team-d: #FFA502;

  --font-display: 'Fredoka', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-dark);
  font-family: var(--font-body);
  color: #FFFFFF;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Ambient dynamic background */
.ambient-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 184, 0, 0.12) 0%, rgba(116, 53, 142, 0.08) 45%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  transition: background 0.8s ease;
}

.ambient-glow.exploding {
  background: radial-gradient(circle, rgba(255, 71, 87, 0.4) 0%, rgba(255, 107, 129, 0.2) 50%, transparent 80%);
  animation: pulse-explosion 0.4s infinite alternate;
}

@keyframes pulse-explosion {
  from { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  to { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
}

/* App Container Layout */
.app-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 580px;
  margin: 0 auto;
  padding: 10px 14px 16px 14px;
  gap: 12px;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

.title-meta {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #FFF 30%, #FFD166 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #FFA502;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #E2E8F0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFF;
  border-color: var(--border-bright);
}

.icon-btn:active {
  transform: scale(0.92);
}

/* Game Stage */
.game-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  position: relative;
  width: 100%;
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(255, 184, 0, 0.12);
  color: #FFD166;
  border: 1px solid rgba(255, 184, 0, 0.3);
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FFD166;
  box-shadow: 0 0 8px #FFD166;
  animation: blink-dot 1.5s infinite ease-in-out;
}

@keyframes blink-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.status-pill.danger {
  background: rgba(255, 71, 87, 0.2);
  color: #FF6B81;
  border-color: rgba(255, 71, 87, 0.5);
}

.status-pill.danger .status-dot {
  background: #FF4757;
  box-shadow: 0 0 10px #FF4757;
}

/* Buddha Pedestal & Frame */
.buddha-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.pedestal-halo {
  position: absolute;
  width: clamp(320px, 44vh, 440px);
  height: clamp(320px, 44vh, 440px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 184, 0, 0.25) 0%, transparent 70%);
  filter: blur(35px);
  pointer-events: none;
  transition: all 0.4s ease;
}

.buddha-frame {
  position: relative;
  width: clamp(260px, 36vh, 360px);
  height: clamp(260px, 36vh, 360px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.buddha-card:active .buddha-frame {
  transform: scale(0.95);
}

#buddhaImg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.6));
  pointer-events: none;
  transition: transform 0.15s ease;
}

/* Shaking Animation */
.shaking-active .buddha-frame {
  animation: shake-wild 0.08s infinite alternate ease-in-out;
}

@keyframes shake-wild {
  0% { transform: translate(-3px, 2px) rotate(-3deg) scale(1.02); }
  50% { transform: translate(3px, -2px) rotate(3deg) scale(0.99); }
  100% { transform: translate(-2px, -3px) rotate(-1deg) scale(1.03); }
}

/* Pop In Animation for Challenge */
.pop-in {
  animation: pop-bounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes pop-bounce {
  0% { transform: scale(0.7) rotate(-5deg); opacity: 0; }
  70% { transform: scale(1.06) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Action Panel (Dynamic States) */
.action-panel {
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 12px 14px 14px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.control-state {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.control-state.active {
  display: flex;
}

/* Buttons */
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #FFB800 0%, #FF9F1C 100%);
  color: #1A120B;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 184, 0, 0.35);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.4, 1);
  width: 100%;
  max-width: 300px;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 184, 0, 0.5);
}

.primary-btn:active {
  transform: translateY(1px) scale(0.98);
}

.pulse-glow {
  animation: pulse-glow-btn 2s infinite ease-in-out;
}

@keyframes pulse-glow-btn {
  0%, 100% { box-shadow: 0 6px 20px rgba(255, 184, 0, 0.35); }
  50% { box-shadow: 0 8px 30px rgba(255, 184, 0, 0.65); }
}

.green-btn {
  background: linear-gradient(135deg, #2ED573 0%, #10AC84 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 20px rgba(46, 213, 115, 0.35);
}
.green-btn:hover {
  box-shadow: 0 8px 25px rgba(46, 213, 115, 0.55);
}

.red-btn {
  background: linear-gradient(135deg, #FF4757 0%, #EE5253 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.35);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #E2E8F0;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFF;
}

.idle-hint {
  font-size: 0.78rem;
  color: #94A3B8;
  margin-top: 8px;
}

/* Shaking / Laughing Indicator */
.laughing-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: rgba(255, 184, 0, 0.15);
  border: 1px solid rgba(255, 184, 0, 0.35);
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 1rem;
  color: #FFD166;
}

.laugh-wave {
  width: 10px;
  height: 10px;
  background: #FFB800;
  border-radius: 50%;
  animation: wave-bounce 0.6s infinite alternate ease-in-out;
}

@keyframes wave-bounce {
  from { transform: scale(0.6); opacity: 0.5; }
  to { transform: scale(1.3); opacity: 1; }
}

/* Challenge Header Bar */
.challenge-header-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-bottom: 8px;
}

.challenge-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
}

.challenge-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  color: #FFF;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.challenge-instructions {
  font-size: 0.82rem;
  line-height: 1.32;
  color: #E2E8F0;
  max-width: 440px;
  margin: 0 auto 8px auto;
}

/* Card Word Box */
.card-word-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 8px;
  width: 100%;
}

.card-word-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #94A3B8;
  margin-bottom: 2px;
}

.card-word-display {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 1px;
  color: #FFD166;
  text-transform: uppercase;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-btn-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 6px;
}

.btn-pill {
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.accent-btn {
  background: linear-gradient(135deg, #74358E 0%, #9B59B6 100%);
  color: #FFF;
  box-shadow: 0 4px 12px rgba(116, 53, 142, 0.4);
}
.accent-btn:active { transform: scale(0.95); }

.challenge-actions-row {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 6px;
  padding-bottom: 2px;
}

/* Explosion Banner */
.explosion-banner {
  margin-bottom: 8px;
}

.boom-emoji {
  font-size: 2.2rem;
  display: block;
  animation: shake-wild 0.2s infinite;
}

.explosion-banner h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #FF4757;
  text-shadow: 0 0 15px rgba(255, 71, 87, 0.6);
}

.boom-subtitle {
  font-size: 0.82rem;
  color: #CBD5E1;
}

.scoring-card {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 71, 87, 0.3);
  border-radius: 16px;
  padding: 10px 12px;
}

.scoring-card h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #FFD166;
  margin-bottom: 2px;
}

.scoring-subtext {
  font-size: 0.72rem;
  color: #94A3B8;
  margin-bottom: 8px;
}

.team-award-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.award-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: #FFF;
  font-family: var(--font-display);
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.award-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--border-bright);
}

.award-btn:active {
  transform: scale(0.95);
}

.team-badge-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Scoreboard Footer */
.app-scoreboard {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 10px 14px;
  flex-shrink: 0;
  margin-top: auto;
  position: relative;
  z-index: 5;
}

.scoreboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.scoreboard-title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #94A3B8;
}

.text-link-btn {
  background: none;
  border: none;
  font-size: 0.68rem;
  font-weight: 700;
  color: #FF6B81;
  cursor: pointer;
  letter-spacing: 0.5px;
  text-decoration: underline;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}
.text-link-btn:hover { opacity: 1; }

.scoreboard-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
  gap: 8px;
}

.score-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px 6px;
  text-align: center;
  transition: all 0.2s ease;
}

.score-card.leading {
  border-color: rgba(255, 184, 0, 0.4);
  box-shadow: 0 0 10px rgba(255, 184, 0, 0.15);
}

.team-name-tag {
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.score-pips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.pip {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.pip.filled {
  background: var(--gold-primary);
  box-shadow: 0 0 6px var(--gold-primary);
  transform: scale(1.15);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  background: #161B22;
  border: 1px solid var(--border-bright);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  animation: modal-pop 0.3s cubic-bezier(0.2, 0.8, 0.4, 1);
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #FFF;
}

.close-modal {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-content {
  padding: 16px 18px;
  overflow-y: auto;
  font-size: 0.88rem;
  color: #CBD5E1;
}

.rules-scroll h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #FFD166;
  margin: 14px 0 6px 0;
}
.rules-scroll h4:first-child { margin-top: 0; }

.rules-scroll p {
  line-height: 1.4;
  margin-bottom: 10px;
}

.rule-item {
  background: rgba(0, 0, 0, 0.25);
  border-left: 4px solid var(--gold-primary);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
}
.rule-item strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 2px;
  color: #FFF;
}
.rule-item p {
  margin-bottom: 0;
  font-size: 0.8rem;
}

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-subtle);
}

.full-w { width: 100%; max-width: none; }

/* Settings Modal UI */
.setting-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #94A3B8;
  margin-bottom: 8px;
}

.team-count-selector, .goal-selector {
  display: flex;
  gap: 8px;
}

.count-btn, .goal-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: #CBD5E1;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.count-btn.active, .goal-btn.active {
  background: rgba(255, 184, 0, 0.2);
  border-color: var(--gold-primary);
  color: #FFD166;
}

.team-name-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-color-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.team-text-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 12px;
  color: #FFF;
  font-size: 0.86rem;
  font-family: var(--font-body);
}

.team-text-input:focus {
  outline: none;
  border-color: var(--gold-primary);
}

/* Small Confirmation Modal */
.small-box {
  max-width: 340px;
  padding: 18px;
  text-align: center;
}
.small-box h3 { font-family: var(--font-display); margin-bottom: 6px; }
.small-box p { font-size: 0.84rem; color: #94A3B8; margin-bottom: 16px; }

.modal-action-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.modal-action-row button { flex: 1; }

/* Victory Modal */
.victory-box {
  text-align: center;
  padding: 24px 20px;
  position: relative;
}

#confettiCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.trophy-icon {
  font-size: 3.5rem;
  margin-bottom: 10px;
  animation: bounce-trophy 1.2s infinite ease-in-out;
}

@keyframes bounce-trophy {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.victory-box h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: #FFD166;
  text-shadow: 0 0 15px rgba(255, 209, 102, 0.5);
  margin-bottom: 4px;
}

.winner-subtitle {
  font-size: 0.9rem;
  color: #CBD5E1;
  margin-bottom: 16px;
}

.final-score-list {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-around;
}

/* Utilities */
.hidden { display: none !important; }

/* Responsive tweaks for compact and short mobile screens */
@media (max-height: 720px) {
  .app-container {
    padding: 6px 12px 10px 12px;
    gap: 8px;
  }
  .buddha-card {
    margin-bottom: 4px;
  }
  .buddha-frame {
    width: clamp(220px, 30vh, 290px);
    height: clamp(220px, 30vh, 290px);
  }
  .pedestal-halo {
    width: clamp(260px, 35vh, 340px);
    height: clamp(260px, 35vh, 340px);
  }
  .action-panel {
    padding: 10px 12px;
  }
  .primary-btn {
    padding: 9px 18px;
    font-size: 0.92rem;
  }
}

/* ==========================================================
   PIGEON WHITEBOARD STYLING
   ========================================================== */
.whiteboard-trigger-btn {
  background: linear-gradient(135deg, #84B827 0%, #689F18 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(132, 184, 39, 0.4);
}
.whiteboard-trigger-btn:active {
  transform: scale(0.95);
}

.whiteboard-box {
  max-width: 520px;
  width: 100%;
  height: min(85vh, 600px);
  background: #161B22;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.whiteboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #0D1117;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.whiteboard-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.whiteboard-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #84B827;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.whiteboard-word-badge {
  background: rgba(132, 184, 39, 0.2);
  border: 1px solid #84B827;
  color: #A6E22E;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.whiteboard-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.whiteboard-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #E2E8F0;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.whiteboard-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFF;
}
.whiteboard-btn:active {
  transform: scale(0.94);
}

.whiteboard-canvas-wrap {
  flex: 1;
  width: 100%;
  position: relative;
  background: #FFFFFF;
  overflow: hidden;
  cursor: crosshair;
  touch-action: none;
}

#whiteboardCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.whiteboard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--border-subtle);
  background: #0D1117;
  flex-shrink: 0;
}

.whiteboard-rule {
  font-size: 0.72rem;
  color: #94A3B8;
  font-weight: 600;
}

.small-btn {
  padding: 7px 16px !important;
  font-size: 0.82rem !important;
  width: auto !important;
  max-width: none !important;
}

/* ==========================================================
   PASSWORD LOCK SCREEN OVERLAY
   ========================================================== */
.lock-screen-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #1B2230 0%, #080B10 100%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
}

.lock-screen-overlay.unlocked {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lock-box {
  background: rgba(22, 27, 34, 0.95);
  border: 1px solid var(--border-bright);
  border-radius: 24px;
  padding: 32px 24px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 184, 0, 0.15);
  animation: modal-pop 0.35s cubic-bezier(0.2, 0.8, 0.4, 1);
}

.lock-avatar {
  width: 110px;
  height: 110px;
  margin: 0 auto 16px auto;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 184, 0, 0.2) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.5));
}

.lock-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lock-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  background: linear-gradient(135deg, #FFF 30%, #FFD166 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.lock-subtitle {
  font-size: 0.82rem;
  color: #94A3B8;
  margin-bottom: 20px;
}

.lock-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lock-input-group {
  position: relative;
  width: 100%;
}

.lock-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 16px;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 1.1rem;
  text-align: center;
  letter-spacing: 2px;
  transition: all 0.2s ease;
}

.lock-input:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 16px rgba(255, 184, 0, 0.35);
}

.lock-error {
  font-size: 0.8rem;
  color: #FF6B81;
  font-weight: 600;
  margin-top: 4px;
  animation: shake-error 0.35s ease-in-out;
}

@keyframes shake-error {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
