/* ==========================================================================
   FUN-E English Learning App - Unified Premium Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Quicksand:wght@400;500;700&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
  --primary: #5856d6;
  --secondary: #ff2d55;
  --accent: #ff9500;
  --success: #34c759;
  --danger: #ff3b30;
  
  --student-bg: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
  --admin-bg: #0b0f19;
  
  --glass-student: rgba(255, 255, 255, 0.7);
  --glass-admin: rgba(20, 26, 42, 0.7);
  
  --font-title: 'Outfit', 'Noto Sans KR', sans-serif;
  --font-body: 'Quicksand', 'Noto Sans KR', sans-serif;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--student-bg);
  min-height: 100vh;
  color: #2c3e50;
  overflow-x: hidden;
  transition: background 0.3s ease;
}

/* ==========================================================================
   Main Portal Styles (index.html)
   ========================================================================== */

.portal-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 15px;
  text-align: center;
}

.portal-header {
  margin-bottom: 30px;
  animation: fadeInDown 0.8s ease;
}

.portal-title {
  font-family: var(--font-title);
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #8e2de2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 5px;
}

.portal-subtitle {
  font-size: 1rem;
  color: #64748b;
  font-weight: 500;
  line-height: 1.4;
}

.portal-main-mobile {
  margin-bottom: 30px;
}

.mobile-start-card {
  background: white;
  border-radius: 28px;
  padding: 30px 20px;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--primary);
  transition: transform 0.2s ease;
}

.mobile-start-card:active {
  transform: scale(0.98);
}

.primary-start-btn {
  background: linear-gradient(135deg, #5856d6 0%, #ff2d55 100%);
  font-size: 1.25rem;
  padding: 16px 24px;
  border-radius: 50px;
  color: white;
  font-weight: 800;
  border: none;
  box-shadow: 0 10px 20px rgba(88, 86, 214, 0.35);
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.primary-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(88, 86, 214, 0.45);
}

.portal-footer {
  margin-top: 30px;
  padding: 20px 0 15px 0;
  border-top: 1px dashed #cbd5e1;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

.admin-footer-link {
  color: #64748b;
  text-decoration: underline;
  font-weight: 600;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.admin-footer-link:hover {
  color: var(--primary);
}

.portal-card {
  background: white;
  border-radius: 24px;
  padding: 40px 30px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.portal-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 45px -10px rgba(88, 86, 214, 0.25);
}

.portal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
}

.portal-card.student-card::before {
  background: linear-gradient(90deg, #ff6b81, #ff4757);
}

.portal-card.admin-card::before {
  background: linear-gradient(90deg, #3498db, #2980b9);
}

.portal-icon {
  font-size: 5rem;
  margin-bottom: 20px;
  animation: bounceSlow 3s infinite;
}

.portal-card.admin-card .portal-icon {
  animation-delay: 1.5s;
}

.portal-card h2 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.portal-card p {
  color: #64748b;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 25px;
}

.portal-btn {
  padding: 12px 30px;
  border-radius: 50px;
  border: none;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.student-card .portal-btn {
  background: #ff6b81;
  color: white;
}

.student-card .portal-btn:hover {
  background: #ff4757;
  box-shadow: 0 8px 20px rgba(255, 107, 129, 0.4);
}

.admin-card .portal-btn {
  background: #3498db;
  color: white;
}

.admin-card .portal-btn:hover {
  background: #2980b9;
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

/* 안내 박스 */
.info-box {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  padding: 20px;
  max-width: 800px;
  margin: 30px auto;
  border-left: 5px solid var(--primary);
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.info-box h3 {
  margin-bottom: 10px;
  color: var(--primary);
}

.info-box ul {
  padding-left: 20px;
  color: #475569;
}

.info-box li {
  margin-bottom: 8px;
}

/* ==========================================================================
   Student Screen (student.html)
   ========================================================================== */

.student-body {
  background: linear-gradient(135deg, #eef2f7 0%, #d8e2ed 100%);
}

.student-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 15px 10px;
}

/* 학년 상단 헤더 */
.student-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  background: white;
  border-radius: 20px;
  padding: 15px 15px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  text-align: center;
}

.student-title-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.logo-emoji {
  font-size: 2rem;
  flex-shrink: 0;
}

.student-title-area h1 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  color: #2c3e50;
  word-break: keep-all;
  white-space: normal;
  line-height: 1.3;
  text-align: center;
}

.student-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  padding: 5px 10px;
  border-radius: 50px;
  font-weight: 700;
  border: 1px solid #e2e8f0;
  font-size: 0.85rem;
  white-space: nowrap;
}

.stat-pill.stars {
  background: #fef3c7;
  border-color: #fde68a;
  color: #d97706;
}

/* 학년 탭 선택기 */
.grade-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 25px;
}

.grade-btn {
  background: white;
  border: 2px solid #e2e8f0;
  padding: 10px 4px;
  border-radius: 14px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.grade-btn:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  color: var(--primary);
}

.grade-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 10px 20px -5px rgba(88, 86, 214, 0.4);
}

.grade-btn-emoji {
  font-size: 1.4rem;
}

/* 로드맵 맵 */
.roadmap-container {
  background: white;
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}

.roadmap-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
}

.map-path {
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: relative;
  padding: 20px 0 55px 0;
  flex-wrap: wrap;
  gap: 55px 10px;
}

.map-path::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 6px;
  background: #e2e8f0;
  z-index: 1;
  transform: translateY(-50%);
}

.roadmap-node {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: white;
  border: 4px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  position: relative;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.roadmap-node:hover {
  transform: scale(1.1);
}

.roadmap-node.completed {
  border-color: var(--success);
  background: #f0fdf4;
}

.roadmap-node.active {
  border-color: var(--accent);
  background: #fffbeb;
  box-shadow: 0 0 20px rgba(255, 149, 0, 0.4);
  animation: pulseActive 2s infinite;
}

.roadmap-node.locked {
  background: #f1f5f9;
  border-color: #cbd5e1;
  cursor: not-allowed;
}

.node-icon {
  font-size: 1.6rem;
}

.roadmap-node.locked .node-icon {
  filter: grayscale(1);
}

.node-label {
  position: absolute;
  top: 78px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  width: 95px;
  text-align: center;
  word-break: keep-all;
  white-space: normal;
  line-height: 1.25;
}

.roadmap-node.completed .node-label {
  color: var(--success);
}

.roadmap-node.active .node-label {
  color: var(--accent);
}

/* 퀴즈 대화상자 / 모달 */
.quiz-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 15px 10px 50px 10px;
}

.quiz-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.quiz-card {
  background: white;
  width: 95%;
  max-width: 480px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: scale(0.85);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2);
  margin: auto;
}

.quiz-overlay.open .quiz-card {
  transform: scale(1);
}

.quiz-header {
  background: var(--primary);
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quiz-header h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
}

.quiz-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
}

.quiz-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  width: 100%;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--success);
  width: 30%;
  transition: width 0.3s ease;
}

.quiz-body {
  padding: 20px 16px;
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.quiz-question-emoji {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 8px;
}

.quiz-question-text {
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 15px;
  line-height: 1.4;
  word-break: keep-all;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 15px;
}

.option-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.option-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.option-btn.selected {
  border-color: var(--primary);
  background: #eef2f7;
}

.option-number {
  background: #cbd5e1;
  color: #475569;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.option-btn.selected .option-number {
  background: var(--primary);
  color: white;
}

/* 퀴즈 결과 피드백 */
.quiz-feedback {
  padding: 15px;
  border-radius: 12px;
  margin-top: 15px;
  text-align: center;
  font-weight: 700;
  display: none;
}

.quiz-feedback.correct {
  background: #dcfce7;
  color: #15803d;
  display: block;
}

.quiz-feedback.wrong {
  background: #fee2e2;
  color: #b91c1c;
  display: block;
}

.quiz-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
}

.hint-btn {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #d97706;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
}

.submit-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(88, 86, 214, 0.3);
}

.submit-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  box-shadow: none;
}

/* 폭죽 이펙트 오버레이 */
.confetti-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 200;
  display: none;
}

/* ==========================================================================
   Admin Dashboard Screen (admin.html)
   ========================================================================== */

.admin-body {
  background-color: var(--admin-bg);
  color: #cbd5e1;
}

.admin-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* 어드민 헤더 */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 20px;
}

.admin-title-area {
  display: flex;
  align-items: center;
  gap: 15px;
}

.admin-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-title-area h1 {
  font-family: var(--font-title);
  color: white;
  font-size: 1.8rem;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  padding: 8px 16px;
  border-radius: 50px;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.live-dot {
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  animation: pulseLive 1.5s infinite;
}

/* 통계 그리드 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid #1e293b;
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.stat-card h3 {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  color: white;
}

.stat-card .trend {
  font-size: 0.85rem;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.trend.up { color: #10b981; }
.trend.down { color: #ef4444; }

/* 2컬럼 레이아웃 (실시간 피드 & 통계 차트) */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-panel {
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid #1e293b;
  border-radius: 24px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  height: 600px;
}

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

.panel-header h2 {
  font-family: var(--font-title);
  color: white;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 실시간 타임라인 피드 */
.timeline-feed {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 10px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.timeline-feed::-webkit-scrollbar {
  width: 6px;
}

.timeline-feed::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

.feed-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 15px 20px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  position: relative;
  animation: slideInLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.feed-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.feed-item.correct .feed-icon {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.feed-item.wrong .feed-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.feed-item.completed .feed-icon {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.feed-content {
  flex-grow: 1;
}

.feed-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.feed-user {
  font-weight: 700;
  font-size: 0.95rem;
  color: white;
}

.feed-time {
  font-size: 0.8rem;
  color: #64748b;
}

.feed-desc {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.4;
}

.feed-details {
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  font-size: 0.85rem;
  color: #64748b;
  border-left: 3px solid #334155;
}

.feed-item.correct .feed-details {
  border-color: #10b981;
}

.feed-item.wrong .feed-details {
  border-color: #ef4444;
}

/* 차트/분석 화면 */
.analysis-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.chart-placeholder {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(15, 23, 42, 0.4);
  border: 1px dashed #334155;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

/* SVG 막대 그래프 */
.svg-chart {
  width: 100%;
  height: 250px;
  margin-top: 15px;
}

.bar {
  fill: #3b82f6;
  rx: 6px;
  transition: height 0.5s ease, y 0.5s ease;
}

.bar-label {
  fill: #94a3b8;
  font-size: 11px;
  text-anchor: middle;
}

.bar-val {
  fill: white;
  font-size: 12px;
  font-weight: 700;
  text-anchor: middle;
}

/* 로그 비우기 버튼 */
.btn-danger {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ef4444;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
}

/* ==========================================================================
   애니메이션 효과음 정의 (Animations)
   ========================================================================== */

@keyframes pulseActive {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 149, 0, 0.6); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(255, 149, 0, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 149, 0, 0); }
}

@keyframes pulseLive {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* 칭찬 애니메이션 팝업 */
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 15px;
  background: #ffd300;
  top: 0;
  opacity: 0;
  animation: confettiFall 2.5s ease-out infinite;
}

@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ==========================================================================
   Duolingo & Yar-Cat Mascot Extensions
   ========================================================================== */

/* 상단 듀오링고형 배지 */
.stat-pill.hearts {
  background: #ffe5e5;
  border-color: #ffb3b3;
  color: #ff2d55;
}

.stat-pill.streak {
  background: #fff0e6;
  border-color: #ffd1b3;
  color: #ff6600;
}

.stat-pill.gems {
  background: #e6f7ff;
  border-color: #b3e6ff;
  color: #0099ff;
}

.stat-pill.xp {
  background: #f0e6ff;
  border-color: #d9b3ff;
  color: #8a2be2;
}

/* PWA 핸드폰 홈 화면 추가 카드 */
.pwa-install-card {
  background: linear-gradient(135deg, #f0f3ff 0%, #e6ecff 100%);
  border: 2px solid #5856d6;
  border-radius: 20px;
  padding: 18px;
  margin-top: 20px;
  text-align: left;
  box-shadow: 0 8px 20px rgba(88, 86, 214, 0.15);
}

.pwa-shortcut-btn {
  background: white;
  color: #5856d6;
  border: 2px solid #5856d6;
  font-size: 1.1rem;
  padding: 16px 20px;
  border-radius: 50px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(88, 86, 214, 0.15);
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pwa-shortcut-btn:hover {
  background: #5856d6;
  color: white;
  transform: translateY(-2px);
}

.yarcat-hero-img-large {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 14px 30px rgba(88, 86, 214, 0.3);
  border: 5px solid white;
  animation: bounceSlow 3s infinite;
}

.minimal-main-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 25px;
}

/* 상단 내비게이션 바 & 홈 바로가기 */
.top-nav-bar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.home-quick-btn {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 8px 16px;
  border-radius: 50px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.home-quick-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* 야르캣 3D 이미지 마스코트 */
.yarcat-hero-container {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.yarcat-hero-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(88, 86, 214, 0.25);
  border: 4px solid white;
  animation: bounceSlow 3s infinite;
}

.yarcat-img-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  border: 3px solid #ff6b81;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

/* 야르캣 (Yar-Cat) 마스코트 컴포넌트 */
.yarcat-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 20px;
  padding: 15px;
  margin-bottom: 20px;
  position: relative;
  transition: all 0.3s ease;
}

.yarcat-avatar {
  font-size: 3.8rem;
  background: #ffffff;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
  border: 3px solid #ff6b81;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.yarcat-wrapper.correct .yarcat-avatar {
  animation: catBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.4);
  border-color: #34c759;
}

.yarcat-wrapper.wrong .yarcat-avatar {
  animation: catShake 0.4s ease;
  border-color: #ff3b30;
}

.yarcat-speech {
  background: white;
  border-radius: 16px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 700;
  color: #2c3e50;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
  position: relative;
  line-height: 1.4;
  flex-grow: 1;
}

.yarcat-speech::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 10px solid white;
}

/* 듀오링고 단어 블록 (Word Block Puzzle) */
.word-puzzle-container {
  margin: 10px 0;
}

.word-slot {
  min-height: 48px;
  background: #f1f5f9;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 6px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}

.word-slot.has-words {
  background: #f8fafc;
  border-color: var(--primary);
  border-style: solid;
}

.word-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding: 6px 0;
}

.word-chip {
  background: white;
  border: 2px solid #cbd5e1;
  border-bottom: 3px solid #cbd5e1;
  padding: 7px 12px;
  border-radius: 12px;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: #2c3e50;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.word-chip:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  color: var(--primary);
}

.word-chip:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.word-chip.used {
  opacity: 0.25;
  cursor: not-allowed;
  transform: none;
}

@keyframes catBounce {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.2) translateY(-12px); }
}

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

