/* ==========================================================================
   딸 퀘스트 (Daughter Quest Lv.6) - 화사하고 밝은 러블리 파스텔 테마 스타일시트
   ========================================================================== */

:root {
  --bg-primary: #fffaf5;
  --bg-secondary: #ffffff;
  --bg-subtle: #fff2e8;
  
  --primary-pink: #ff6584;
  --primary-peach: #ff8e6e;
  --primary-gradient: linear-gradient(135deg, #ff758c 0%, #ff7eb3 50%, #feb47b 100%);
  --secondary-gradient: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
  --mint-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --yellow-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
  --purple-gradient: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);

  --accent-pink: #ff477e;
  --accent-yellow: #ffb703;
  --accent-mint: #06d6a0;
  --accent-purple: #8338ec;
  --accent-blue: #3a86ff;

  --text-main: #2b2d42;
  --text-muted: #6c757d;
  --text-light: #ffffff;
  
  --card-shadow: 0 12px 30px rgba(255, 117, 140, 0.1);
  --card-shadow-hover: 0 20px 40px rgba(255, 117, 140, 0.18);
  --border-subtle: rgba(255, 182, 193, 0.4);
  
  --font-base: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
}

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

body {
  font-family: var(--font-base);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 230, 235, 0.8) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(254, 243, 199, 0.8) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(224, 242, 254, 0.5) 0%, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

/* ==========================================================================
   Header & Top Banner
   ========================================================================== */
.top-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(255, 140, 160, 0.08);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

.brand-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 4px 8px rgba(255, 101, 132, 0.3));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(3deg); }
}

.brand-text h1 {
  font-size: 1.35rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.brand-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.user-status-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff5f7;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1.5px solid #ffd1dc;
  box-shadow: 0 4px 12px rgba(255, 105, 180, 0.1);
}

.rank-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-pink);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.xp-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.xp-bar-bg {
  width: 90px;
  height: 10px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.xp-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.xp-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: #4a5568;
}

.stars-count {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: #b7791f;
  background: #fefcbf;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Navigation Tabs
   ========================================================================== */
.nav-tabs-wrapper {
  background: #ffffff;
  border-bottom: 1px solid rgba(255, 182, 193, 0.3);
  position: sticky;
  top: 68px;
  z-index: 90;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.nav-tabs {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 1rem;
  gap: 0.5rem;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  border: 1.5px solid transparent;
  background: #fbfbfd;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: #fff0f3;
  color: var(--accent-pink);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(255, 101, 132, 0.35);
  transform: translateY(-2px);
}

/* ==========================================================================
   Main Container
   ========================================================================== */
.main-content {
  max-width: 1200px;
  margin: 1.75rem auto 4rem auto;
  padding: 0 1.25rem;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.35s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-banner {
  background: linear-gradient(135deg, #fff1f3 0%, #fffbf2 50%, #f3f8ff 100%);
  border: 2px solid #ffd8e0;
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: "✨";
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 3rem;
  opacity: 0.2;
}

.hero-text h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.hero-text h2 span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text p {
  color: #4a5568;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-pink);
  border: 1px solid #ffd1dc;
  box-shadow: 0 2px 8px rgba(255, 105, 180, 0.08);
}

/* ==========================================================================
   Quest System
   ========================================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 182, 193, 0.4);
}

.filter-chip {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1.5px solid #ffccd5;
  color: #4a5568;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.filter-chip:hover {
  background: #fff0f3;
  border-color: var(--accent-pink);
}

.filter-chip.active {
  background: var(--accent-pink);
  color: #ffffff;
  border-color: var(--accent-pink);
  box-shadow: 0 4px 12px rgba(255, 71, 126, 0.3);
}

.quest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.quest-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1.5px solid #ffe3e8;
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.quest-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
  border-color: #ffb8c6;
}

.quest-card.completed {
  background: linear-gradient(145deg, #ffffff 0%, #fafffa 100%);
  border-color: #b7f4d8;
}

.quest-card.completed::after {
  content: "COMPLETED ✨";
  position: absolute;
  top: 15px;
  right: -30px;
  transform: rotate(45deg);
  background: var(--accent-mint);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 35px;
  box-shadow: 0 2px 8px rgba(6, 214, 160, 0.3);
}

.quest-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.quest-cat-tag {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: #fff0f3;
  color: var(--accent-pink);
}

.quest-diff {
  font-size: 0.85rem;
  color: #f59e0b;
  font-weight: 700;
}

.quest-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #2d3748;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.quest-summary {
  font-size: 0.92rem;
  color: #555e6d;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.quest-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed #ffd8e0;
  padding-top: 0.9rem;
  margin-top: 0.5rem;
}

.quest-xp {
  font-size: 0.85rem;
  font-weight: 800;
  color: #d97706;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-open-quest {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 101, 132, 0.25);
  transition: all 0.2s;
}

.btn-open-quest:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 18px rgba(255, 101, 132, 0.4);
}

/* ==========================================================================
   Simulator (Roleplaying)
   ========================================================================== */
.sim-container {
  max-width: 800px;
  margin: 0 auto;
}

.scenario-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 2px solid #ffd8e0;
  box-shadow: var(--card-shadow);
  padding: 2rem;
  margin-bottom: 2rem;
}

.scenario-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1.5px solid #ffe6eb;
}

.scenario-step {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--accent-pink);
  background: #fff0f3;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
}

.scenario-title-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.scenario-icon {
  font-size: 2.2rem;
  background: #fff5f7;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid #ffd1dc;
}

.scenario-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #2d3748;
}

.scenario-context {
  background: #fffaf0;
  border-left: 4px solid #f6ad55;
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1rem;
  color: #4a5568;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.option-item {
  background: #fafafa;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: #2d3748;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.option-item:hover {
  background: #fff5f7;
  border-color: #ffb8c6;
  transform: translateX(4px);
}

.option-item.selected-best {
  background: #f0fdf4;
  border-color: #22c55e;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
}

.option-item.selected-warn {
  background: #fffbeb;
  border-color: #f59e0b;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.option-item.selected-bad {
  background: #fef2f2;
  border-color: #ef4444;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.sim-result-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1.5rem;
  animation: fadeIn 0.3s;
}

.sim-reaction {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.75rem;
}

.sim-feedback {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.sim-expert-tip {
  background: #eef2ff;
  border-left: 4px solid #6366f1;
  padding: 0.85rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
  color: #3730a3;
  font-weight: 600;
}

.sim-nav-btns {
  display: flex;
  justify-content: space-between;
  margin-top: 1.75rem;
}

/* ==========================================================================
   Daily Stamp Board (칭찬 도장판)
   ========================================================================== */
.stamp-board-header {
  text-align: center;
  margin-bottom: 2rem;
}

.stamp-board-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stamp-card {
  background: #ffffff;
  border: 2px dashed #ffccd5;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  transition: all 0.25s;
  cursor: pointer;
  position: relative;
}

.stamp-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-pink);
  box-shadow: var(--card-shadow);
}

.stamp-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.stamp-title {
  font-size: 1rem;
  font-weight: 800;
  color: #2d3748;
  margin-bottom: 0.25rem;
}

.stamp-desc {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.stamp-action-btn {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  background: #fff0f3;
  color: var(--accent-pink);
  border: 1px solid #ffd1dc;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.stamp-card.stamped {
  background: #fff8f9;
  border-style: solid;
  border-color: #ff6584;
}

.stamp-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  width: 90px;
  height: 90px;
  border: 4px solid #ff3366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff3366;
  font-size: 1.15rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 15px rgba(255, 51, 102, 0.25);
  pointer-events: none;
  animation: stampPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes stampPop {
  0% { transform: translate(-50%, -50%) scale(2) rotate(0deg); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1) rotate(-15deg); opacity: 1; }
}

/* ==========================================================================
   Magic Conversations (대화 치트키)
   ========================================================================== */
.search-filter-box {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  border: 2px solid #ffe3e8;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
}

.search-input:focus {
  border-color: var(--accent-pink);
  box-shadow: 0 0 0 3px rgba(255, 101, 132, 0.15);
}

.conv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.conv-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1.5px solid #ffe3e8;
  box-shadow: var(--card-shadow);
  padding: 1.25rem;
  position: relative;
  transition: all 0.2s;
}

.conv-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.conv-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  background: #fff0f3;
  color: var(--accent-pink);
  margin-bottom: 0.75rem;
}

.conv-bad {
  background: #fff5f5;
  border-left: 3px solid #f87171;
  padding: 0.65rem 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem;
  color: #991b1b;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.conv-magic {
  background: #f0fdf4;
  border-left: 3px solid #22c55e;
  padding: 0.75rem 0.95rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem;
  color: #166534;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.conv-reason {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
}

.conv-copy-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}

.conv-copy-btn:hover {
  background: var(--accent-pink);
  color: #ffffff;
  border-color: var(--accent-pink);
}

/* ==========================================================================
   Parenting Test (양육 유형 자가진단)
   ========================================================================== */
.test-card {
  max-width: 750px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 2px solid #ffd8e0;
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

.test-progress-bar {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: 99px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.test-progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  width: 10%;
  transition: width 0.3s;
}

.test-question {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.test-options {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.test-opt-btn {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.test-opt-btn:hover {
  background: #fff0f3;
  border-color: #ffb8c6;
  transform: translateX(4px);
}

/* Test Result */
.test-result-box {
  text-align: center;
  padding: 1rem;
}

.test-result-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounce 2s infinite;
}

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

.test-result-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--accent-pink);
  margin-bottom: 0.5rem;
}

.test-result-summary {
  font-size: 1.1rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 1.5rem;
}

.test-result-desc {
  background: #fff8f9;
  border: 1.5px solid #ffd8e0;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-size: 0.95rem;
  color: #475569;
  margin-bottom: 1.25rem;
  line-height: 1.6;
  text-align: left;
}

.test-result-advice {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem;
  color: #166534;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Certificate Generator (수료증 발급소)
   ========================================================================== */
.cert-section {
  max-width: 800px;
  margin: 0 auto;
}

.cert-input-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 2px solid #ffd8e0;
  padding: 1.75rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.input-group {
  flex: 1;
  min-width: 200px;
}

.input-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.35rem;
}

.cert-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
}

.cert-input:focus {
  border-color: var(--accent-pink);
}

.cert-canvas-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 2px solid #ffd8e0;
  box-shadow: var(--card-shadow);
}

#certCanvas {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Modals & Popups
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.25rem;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.25s;
}

.modal-window {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 2px solid #ffd8e0;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  padding: 2rem;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* Common Buttons */
.btn-primary {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 101, 132, 0.3);
  transition: all 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 101, 132, 0.45);
}

.btn-secondary {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

/* Confetti Canvas */
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* Toast */
.toast-msg {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(43, 45, 66, 0.95);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 700;
  z-index: 10000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-banner {
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-text h2 {
    font-size: 1.4rem;
  }
  .header-inner {
    padding: 0.75rem 1rem;
  }
  .quest-grid {
    grid-template-columns: 1fr;
  }
  .conv-grid {
    grid-template-columns: 1fr;
  }
  .stamp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .test-card {
    padding: 1.25rem;
  }
  .scenario-card {
    padding: 1.25rem;
  }
}
