/* DESIGN SYSTEM & GLOBAL VARIABLES */
:root {
  --font-primary: 'Outfit', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Brand Colors */
  --bg-dark: #070913;
  --bg-card: rgba(20, 24, 46, 0.65);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(255, 255, 255, 0.15);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Primary Gradients */
  --grad-primary: linear-gradient(135deg, #6366f1, #8b5cf6, #d946ef);
  --grad-glow: 0 8px 32px 0 rgba(99, 102, 241, 0.37);
  
  /* Dimension Theme Colors */
  --theme-nf: #10b981;
  --theme-nt: #8b5cf6;
  --theme-sj: #3b82f6;
  --theme-sp: #f59e0b;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* BACKGROUND DECORATIONS */
.decor-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  opacity: 0.45;
  pointer-events: none;
  mix-blend-mode: screen;
}

.orb-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #6366f1 0%, transparent 80%);
  top: -50px;
  left: -100px;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #d946ef 0%, transparent 80%);
  bottom: 10%;
  right: -150px;
}

.orb-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 80%);
  top: 40%;
  left: 30%;
}

/* LAYOUT CONTAINER */
.app-container {
  width: 100%;
  max-width: 480px; /* Perfect H5 ratio */
  min-height: 100vh;
  padding: 24px 20px calc(24px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
}

/* SCREEN MANAGEMENT */
.screen {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  flex-direction: column;
  flex-grow: 1;
}

.screen.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* GLASS PANEL UTILITY */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* TYPOGRAPHY & BRAND */
.brand {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 24px;
}

.brand-badge {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: 12px;
}

.brand-logo {
  font-size: 3.5rem;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
  animation: pulse 3s infinite ease-in-out;
}

.brand-title {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(to right, #ffffff, #d8b4fe, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.brand-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 2px;
}

/* HERO CARD */
.hero-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 30px 24px;
  margin-bottom: 30px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.hero-visual {
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.pet-avatar-sim {
  position: relative;
  width: 110px;
  height: 76px;
  background: linear-gradient(135deg, rgba(255, 192, 203, 0.25), rgba(167, 139, 250, 0.25));
  border: 2px dashed rgba(255, 105, 180, 0.4);
  border-radius: 99px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.emoji-bounce {
  font-size: 2.2rem;
  position: relative;
}

.emoji-bounce.delay-1 {
  /* no animation delay needed */
}



.hero-intro {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.hero-intro strong {
  color: #fff;
}

/* BUTTONS */
.btn {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 700;
  padding: 16px 28px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  width: auto;
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--grad-glow);
}

.btn-primary:active {
  transform: scale(0.97);
  opacity: 0.9;
}

.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 30%;
  height: 200%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  transform: rotate(30deg);
  animation: shine 4s infinite linear;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:active {
  background: rgba(255, 255, 255, 0.15);
}

.btn-full {
  width: 100%;
}

.btn-icon-only {
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 14px;
}

.btn-back {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-back:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.15);
}

.icon {
  width: 20px;
  height: 20px;
}

/* SETUP SCREEN FORM */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 14px 16px;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  transition: all 0.3s;
  outline: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus {
  border-color: #818cf8;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

/* SEGMENTED CONTROL */
.segmented-control {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: 14px;
}

.segmented-control input[type="radio"] {
  display: none;
}

.segmented-control label {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.25s;
}

.segmented-control input[type="radio"]:checked + label {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.segmented-control.species-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
}

.segmented-control.species-control label {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 12px 6px;
  border-radius: 12px;
}

.segmented-control.species-control input[type="radio"]:checked + label {
  background: rgba(99, 102, 241, 0.15);
  border-color: #818cf8;
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}


/* OPTGROUP & OPTION STYLING */
select optgroup,
select option {
  background-color: #14182e;
  color: #ffffff;
}

/* QUIZ INTERFACE */
.quiz-header {
  margin-top: 10px;
  margin-bottom: 24px;
}

.progress-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.progress-bar-track {
  flex-grow: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  width: 5%;
  height: 100%;
  background: var(--grad-primary);
  border-radius: 99px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#quiz-progress-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 42px;
  text-align: right;
}

.dimension-indicators {
  display: flex;
  gap: 6px;
}

.dim-badge {
  flex: 1;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 0;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 6px;
  transition: all 0.3s;
}

.dim-badge.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

.question-container {
  flex-grow: 1;
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.question-card {
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 28px 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  transform: scale(1);
  transition: transform 0.3s, opacity 0.3s;
}

.question-card.slide-out {
  transform: scale(0.95);
  opacity: 0;
}

.q-number {
  font-size: 1.5rem;
  font-weight: 900;
  color: #818cf8;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.q-text {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
  margin-bottom: 24px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.option-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  font-family: var(--font-primary);
  width: 100%;
}

.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.25s;
}

.option-content {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  transition: all 0.25s;
}

.option-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glow);
}

.option-btn:active {
  background: rgba(99, 102, 241, 0.1);
  border-color: #818cf8;
}

.option-btn:active .option-letter {
  background: #6366f1;
  color: #fff;
  border-color: #6366f1;
}

.option-btn:active .option-content {
  color: #fff;
}

.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.footer-tip {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* RESULT SCREEN */
.result-card-container {
  margin-bottom: 24px;
}

.result-profile-card {
  border-radius: 28px;
  padding: 26px;
  border: 1px solid var(--border-color);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

/* Subgroup colors on Result Screen */
.result-profile-card.group-nf {
  background: linear-gradient(180deg, #1b3c2e 0%, #0d1e18 100%);
  border-color: rgba(16, 185, 129, 0.25);
  box-shadow: 0 16px 48px rgba(16, 185, 129, 0.15);
}
.result-profile-card.group-nt {
  background: linear-gradient(180deg, #2d2244 0%, #151022 100%);
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow: 0 16px 48px rgba(139, 92, 246, 0.15);
}
.result-profile-card.group-sj {
  background: linear-gradient(180deg, #1d2e47 0%, #0d1624 100%);
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 16px 48px rgba(59, 130, 246, 0.15);
}
.result-profile-card.group-sp {
  background: linear-gradient(180deg, #453610 0%, #201805 100%);
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow: 0 16px 48px rgba(245, 158, 11, 0.15);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.pet-avatar-result {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.result-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.pet-species-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 99px;
  display: inline-block;
  margin-top: 2px;
}

.pbti-showcase {
  text-align: center;
  padding: 10px 0 20px;
}

.pbti-code {
  font-size: 4.5rem;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.1;
  background: linear-gradient(to bottom, #ffffff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Highlight matching PBTI styles */
.group-nf .pbti-code { background: linear-gradient(to bottom, #fff, #a7f3d0); -webkit-background-clip: text; }
.group-nt .pbti-code { background: linear-gradient(to bottom, #fff, #ddd6fe); -webkit-background-clip: text; }
.group-sj .pbti-code { background: linear-gradient(to bottom, #fff, #bfdbfe); -webkit-background-clip: text; }
.group-sp .pbti-code { background: linear-gradient(to bottom, #fff, #fde68a); -webkit-background-clip: text; }

.pbti-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 6px;
}
.group-nf .pbti-title { color: #34d399; }
.group-nt .pbti-title { color: #a78bfa; }
.group-sj .pbti-title { color: #60a5fa; }
.group-sp .pbti-title { color: #fbbf24; }

.pbti-group-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 4px;
}

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 16px 0;
}

.personality-details h4 {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.personality-details p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.match-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-score {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
}

.stars-display {
  color: #fbbf24;
  letter-spacing: 1px;
  font-size: 0.95rem;
}

.match-tag {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.match-comment-box {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  padding: 14px 16px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.comment-quote-icon {
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 2.2rem;
  font-family: Georgia, serif;
  line-height: 1;
  color: rgba(255, 255, 255, 0.06);
}

.match-comment {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #e2e8f0;
  position: relative;
  z-index: 2;
  text-indent: 12px;
}

.action-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* SHARE SCREEN DESIGNER */
.share-designer {
  padding: 16px;
}

.card-preview-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

/* Card Mockup matching real outputs */
.card-preview-wrapper {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  padding: 16px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.card-preview-wrapper.group-nf {
  background: linear-gradient(135deg, #112a1e 0%, #07120c 100%);
  border: 2px solid rgba(16, 185, 129, 0.3);
}
.card-preview-wrapper.group-nt {
  background: linear-gradient(135deg, #201732 0%, #0c0914 100%);
  border: 2px solid rgba(139, 92, 246, 0.3);
}
.card-preview-wrapper.group-sj {
  background: linear-gradient(135deg, #132034 0%, #080d16 100%);
  border: 2px solid rgba(59, 130, 246, 0.3);
}
.card-preview-wrapper.group-sp {
  background: linear-gradient(135deg, #2e240a 0%, #130f04 100%);
  border: 2px solid rgba(245, 158, 11, 0.3);
}

.preview-card-frame {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.preview-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.preview-pbti-tag {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.group-nf .preview-pbti-tag { color: #34d399; }
.group-nt .preview-pbti-tag { color: #a78bfa; }
.group-sj .preview-pbti-tag { color: #60a5fa; }
.group-sp .preview-pbti-tag { color: #fbbf24; }

.preview-pet-name {
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  margin-top: 2px;
}

.preview-brand-logo {
  font-size: 1.3rem;
  opacity: 0.8;
}

/* PHOTO BOX */
.preview-photo-box {
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  cursor: pointer;
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 20px;
  text-align: center;
}

.photo-placeholder .icon {
  width: 32px;
  height: 32px;
  opacity: 0.7;
}

.preview-pet-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  transition: filter 0.3s ease;
}

.preview-pet-img.hidden {
  display: none;
}

/* Style overlay for design effects */
.style-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  transition: all 0.3s;
}

/* FILTER EFFECTS (CSS overlays applied to photo box) */
.style-chibi {
  background: radial-gradient(circle, rgba(255, 192, 203, 0.25) 0%, rgba(255, 255, 255, 0) 80%);
  box-shadow: inset 0 0 20px rgba(255, 105, 180, 0.3);
}

.style-cyber {
  background: linear-gradient(180deg, rgba(0, 255, 255, 0.15) 0%, rgba(255, 0, 128, 0.15) 100%);
  mix-blend-mode: color-burn;
}

.style-mystic {
  background: radial-gradient(circle, rgba(123, 97, 255, 0.1) 0%, rgba(0, 0, 0, 0.4) 100%);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

.style-sunny {
  background: radial-gradient(circle at 10% 10%, rgba(255, 223, 128, 0.3) 0%, rgba(255, 223, 128, 0) 60%);
  filter: contrast(1.15) brightness(1.05) saturate(1.1);
}

.preview-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
}

.preview-desc-box {
  flex-grow: 1;
}

.preview-description {
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.preview-relationship {
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
}

.preview-qrcode-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.qrcode-mini {
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: 6px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-dots {
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(square, #000 0%, #000 100%) 0 0/14px 14px,
    radial-gradient(square, #000 0%, #000 100%) 100% 0/14px 14px,
    radial-gradient(square, #000 0%, #000 100%) 0 100%/14px 14px,
    repeating-linear-gradient(45deg, #000, #000 2px, transparent 2px, transparent 4px);
  background-size: 14px 14px, 14px 14px, 14px 14px, 100% 100%;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-position: 0 0, 100% 0, 0 100%, 0 0;
  opacity: 0.85;
}

.preview-qrcode-box span {
  font-size: 0.5rem;
  color: var(--text-muted);
  font-weight: 700;
}

/* DESIGNER CONTROLS */
.designer-controls {
  margin-top: 20px;
}

.designer-controls label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.filter-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: #818cf8;
}

.filter-btn.active .filter-name {
  color: #fff;
  font-weight: 700;
}

.filter-emoji {
  font-size: 1.1rem;
}

.filter-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.control-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ANIMATIONS */
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.7)); }
  100% { transform: scale(1); opacity: 0.9; }
}

@keyframes shine {
  0% { left: -60%; }
  100% { left: 140%; }
}

@keyframes bouncePet {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

/* RESPONSIVE SCALES */
@media (max-height: 700px) {
  .brand-logo { font-size: 2.8rem; }
  .brand-title { font-size: 1.8rem; }
  .hero-card { padding: 18px 16px; margin-bottom: 16px; }
  .btn { padding: 12px 20px; }
  .question-card { padding: 20px; }
  .option-btn { padding: 12px 16px; }
  .pbti-code { font-size: 3.5rem; }
}
