/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
  /* Colors */
  --bg-dark: #0a0f1d;
  --bg-deep: #050811;
  --bg-gradient: radial-gradient(circle at 50% 50%, #121829 0%, #050811 100%);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dark: #111827;
  
  /* Glassmorphism Styling */
  --glass-bg: rgba(18, 24, 43, 0.65);
  --glass-bg-hover: rgba(26, 35, 61, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-glow: rgba(139, 92, 246, 0.25);
  --glass-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
  
  /* Categories & Neon Accents */
  --color-primary: #8b5cf6;
  --color-primary-glow: rgba(139, 92, 246, 0.5);
  
  --color-c1: #f59e0b; /* Amber */
  --color-c1-glow: rgba(245, 158, 11, 0.4);
  
  --color-c2: #10b981; /* Emerald */
  --color-c2-glow: rgba(16, 185, 129, 0.4);
  
  --color-c3: #ef4444; /* Crimson */
  --color-c3-glow: rgba(239, 68, 68, 0.4);
  
  --color-c4: #3b82f6; /* Blue */
  --color-c4-glow: rgba(59, 130, 246, 0.4);
  
  --color-c5: #a855f7; /* Violet */
  --color-c5-glow: rgba(168, 85, 247, 0.4);
  
  --color-c6: #06b6d4; /* Cyan */
  --color-c6-glow: rgba(6, 182, 212, 0.4);
  
  --color-c7: #f43f5e; /* Rose */
  --color-c7-glow: rgba(244, 63, 94, 0.4);
  
  --color-c8: #eab308; /* Gold */
  --color-c8-glow: rgba(234, 179, 8, 0.4);
  
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-danger-glow: rgba(239, 68, 68, 0.5);
  
  /* Animations & Radii */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-dark);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Canvas Floating Background */
#bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: rgba(5, 8, 17, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-sm);
  border: 2px solid var(--bg-dark);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.6);
}

/* ==========================================================================
   LAYOUT CONTAINER
   ========================================================================== */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  margin-bottom: 25px;
  z-index: 10;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  user-select: none;
  transition: transform var(--transition-fast);
}
.logo-area:hover {
  transform: scale(1.02);
}

.logo-emoji {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 8px var(--color-primary));
}

.logo-text h1 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text .subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-primary);
  font-weight: 700;
  display: block;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: default;
}

.stat-icon {
  font-size: 1.1rem;
}

/* ==========================================================================
   BUTTONS & INTERACTIVE ELEMENTS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
  color: white;
  box-shadow: 0 4px 15px var(--color-primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--color-primary-glow);
  filter: brightness(1.1);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-primary-glow {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 0 15px var(--color-primary);
}
.btn-primary-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px var(--color-primary);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-danger-outline {
  background: transparent;
  border: 2px solid var(--color-danger);
  color: var(--color-danger);
}
.btn-danger-outline:hover {
  background: var(--color-danger);
  color: white;
  box-shadow: 0 0 15px var(--color-danger-glow);
}

.btn-success-glow {
  background: var(--color-success);
  color: white;
  box-shadow: 0 0 12px var(--color-success);
}
.btn-success-glow:hover {
  box-shadow: 0 0 22px var(--color-success);
  transform: translateY(-2px);
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.icon-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: scale(1.08);
}

.flex-1 { flex: 1; }

/* Tooltip Utility */
.tooltip {
  position: relative;
}
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: rgba(5, 8, 17, 0.9);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-fast);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  z-index: 100;
}
.tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   SCREENS GENERAL STYLING (SPA ENGINE)
   ========================================================================== */
.main-content {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

.game-screen {
  display: none;
  width: 100%;
  animation: none;
}

/* Modern entry animation using modern CSS properties for active state */
.game-screen.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
  scale: 1;
  transition:
    display 0.4s,
    opacity 0.4s ease-out,
    scale 0.4s ease-out;
  transition-behavior: allow-discrete;
}

@starting-style {
  .game-screen.active {
    opacity: 0;
    scale: 0.97;
  }
}

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

.current-category-name {
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--glass-bg);
  padding: 8px 18px;
  border-radius: 50px;
  border: 1px solid var(--glass-border);
}

/* Glass Panel Template */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 30px;
}

/* ==========================================================================
   SCREEN 1: DASHBOARD
   ========================================================================== */
.hero-section {
  text-align: center;
  margin: 15px auto 40px auto;
  max-width: 750px;
}

.hero-section h2 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #ffffff 30%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-section p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-left: 15px;
  letter-spacing: 0.5px;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 20px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 10px var(--color-primary);
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
  margin-bottom: 45px;
}

.category-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 25px;
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 15px;
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-6px);
  background: var(--glass-bg-hover);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* Dynamic Glows based on Category */
.category-card::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.15;
  transition: opacity var(--transition-normal);
}
.category-card.c1::after { background: var(--color-c1); }
.category-card.c2::after { background: var(--color-c2); }
.category-card.c3::after { background: var(--color-c3); }
.category-card.c4::after { background: var(--color-c4); }
.category-card.c5::after { background: var(--color-c5); }
.category-card.c6::after { background: var(--color-c6); }
.category-card.c7::after { background: var(--color-c7); }
.category-card.c8::after { background: var(--color-c8); }

.category-card:hover::after {
  opacity: 0.35;
}

.category-card.c1:hover { border-color: var(--color-c1); box-shadow: 0 8px 30px var(--color-c1-glow); }
.category-card.c2:hover { border-color: var(--color-c2); box-shadow: 0 8px 30px var(--color-c2-glow); }
.category-card.c3:hover { border-color: var(--color-c3); box-shadow: 0 8px 30px var(--color-c3-glow); }
.category-card.c4:hover { border-color: var(--color-c4); box-shadow: 0 8px 30px var(--color-c4-glow); }
.category-card.c5:hover { border-color: var(--color-c5); box-shadow: 0 8px 30px var(--color-c5-glow); }
.category-card.c6:hover { border-color: var(--color-c6); box-shadow: 0 8px 30px var(--color-c6-glow); }
.category-card.c7:hover { border-color: var(--color-c7); box-shadow: 0 8px 30px var(--color-c7-glow); }
.category-card.c8:hover { border-color: var(--color-c8); box-shadow: 0 8px 30px var(--color-c8-glow); }

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cat-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.c1 .cat-badge { color: var(--color-c1); }
.c2 .cat-badge { color: var(--color-c2); }
.c3 .cat-badge { color: var(--color-c3); }
.c4 .cat-badge { color: var(--color-c4); }
.c5 .cat-badge { color: var(--color-c5); }
.c6 .cat-badge { color: var(--color-c6); }
.c7 .cat-badge { color: var(--color-c7); }
.c8 .cat-badge { color: var(--color-c8); }

.cat-icon {
  font-size: 1.8rem;
}

.cat-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.cat-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
}

.cat-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.progress-container {
  flex: 1;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 5px;
}

.progress-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 50px;
  background: var(--color-primary);
  transition: width var(--transition-slow) ease-out;
}
.c1 .progress-bar-fill { background: var(--color-c1); }
.c2 .progress-bar-fill { background: var(--color-c2); }
.c3 .progress-bar-fill { background: var(--color-c3); }
.c4 .progress-bar-fill { background: var(--color-c4); }
.c5 .progress-bar-fill { background: var(--color-c5); }
.c6 .progress-bar-fill { background: var(--color-c6); }
.c7 .progress-bar-fill { background: var(--color-c7); }
.c8 .progress-bar-fill { background: var(--color-c8); }

.stars-earned {
  display: flex;
  gap: 3px;
}

.star-icon {
  font-size: 1.1rem;
  filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.5));
  transition: opacity var(--transition-fast);
}
.star-icon.dimmed {
  opacity: 0.2;
  filter: none;
}

/* Button style modifications on cards */
.btn-cat-action {
  width: 100%;
}
.c1 .btn-cat-action { background: var(--color-c1); box-shadow: 0 4px 12px var(--color-c1-glow); }
.c2 .btn-cat-action { background: var(--color-c2); box-shadow: 0 4px 12px var(--color-c2-glow); }
.c3 .btn-cat-action { background: var(--color-c3); box-shadow: 0 4px 12px var(--color-c3-glow); }
.c4 .btn-cat-action { background: var(--color-c4); box-shadow: 0 4px 12px var(--color-c4-glow); }
.c5 .btn-cat-action { background: var(--color-c5); box-shadow: 0 4px 12px var(--color-c5-glow); }
.c6 .btn-cat-action { background: var(--color-c6); box-shadow: 0 4px 12px var(--color-c6-glow); }
.c7 .btn-cat-action { background: var(--color-c7); box-shadow: 0 4px 12px var(--color-c7-glow); }
.c8 .btn-cat-action { background: var(--color-c8); box-shadow: 0 4px 12px var(--color-c8-glow); }

/* Achievements Panel */
.achievements-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.achievement-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.achievement-card.locked {
  filter: grayscale(1);
  opacity: 0.55;
  border-style: dashed;
}

.achievement-card.unlocked {
  filter: none;
  opacity: 1;
  border-color: var(--color-primary-glow);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
  animation: shine-pulse 2s infinite alternate;
}

@keyframes shine-pulse {
  from { border-color: rgba(139, 92, 246, 0.25); }
  to { border-color: rgba(139, 92, 246, 0.7); box-shadow: 0 0 15px rgba(139, 92, 246, 0.25); }
}

.ach-icon {
  font-size: 1.8rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}
.unlocked .ach-icon {
  background: rgba(139, 92, 246, 0.15);
  box-shadow: inset 0 0 8px rgba(139, 92, 246, 0.3);
}

.ach-info h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.achievement-card.locked .ach-info h5 {
  color: var(--text-muted);
}

.ach-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.reset-area {
  text-align: center;
  margin-bottom: 20px;
}

.btn-danger-outline {
  font-size: 0.85rem;
  padding: 8px 16px;
}

/* ==========================================================================
   SCREEN 2: MODE SELECTOR
   ========================================================================== */
.selector-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.selector-container h3 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.selector-container p {
  color: var(--text-muted);
  margin-bottom: 30px;
}

.mode-options-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
}

.mode-option-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 25px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.mode-option-card:hover {
  background: var(--glass-bg-hover);
  transform: translateX(5px);
  border-color: var(--color-primary-glow);
}

.mode-icon-wrapper {
  width: 55px;
  height: 55px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
}

.mode-info {
  flex-grow: 1;
}

.mode-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.mode-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ==========================================================================
   SCREEN 3: GAMEPLAY - BELAJAR & FLASHCARDS
   ========================================================================== */
.learn-mode-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .learn-mode-layout {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* 3D Card Setup */
.card-3d-wrapper {
  perspective: 1200px;
  aspect-ratio: 4/3;
  width: 100%;
  max-height: 380px;
}

.card-3d {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform var(--transition-slow);
  cursor: pointer;
}

/* When flipped class is applied */
.card-3d.flipped {
  transform: rotateY(180deg);
}

.card-side {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.card-instructions {
  position: absolute;
  top: 15px;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.card-front {
  background: linear-gradient(135deg, rgba(23, 28, 48, 0.9) 0%, rgba(13, 17, 33, 0.9) 100%);
  border-color: rgba(139, 92, 246, 0.3);
}

.card-kanji-big {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 4.5rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.tap-to-flip {
  position: absolute;
  bottom: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--color-primary);
  text-shadow: 0 0 10px var(--color-primary-glow);
  animation: pulse-glow 1.5s infinite alternate;
}

@keyframes pulse-glow {
  from { opacity: 0.4; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1.03); }
}

.card-back {
  background: linear-gradient(135deg, rgba(16, 24, 48, 0.95) 0%, rgba(9, 13, 28, 0.95) 100%);
  transform: rotateY(180deg);
  border-color: rgba(16, 185, 129, 0.3);
  justify-content: space-between;
}

.card-back-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.card-kana {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-c2);
  letter-spacing: 1px;
}

.speech-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-main);
  transition: all var(--transition-fast);
}
.speech-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--color-c2);
  transform: scale(1.08);
}

.card-meaning {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  margin: auto 0;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

/* Explorer Panel */
.explorer-panel h4 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.explorer-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.kanji-breakdown-selectors {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.kanji-tile {
  font-family: 'Noto Sans JP', sans-serif;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.kanji-tile:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-primary);
  transform: scale(1.05);
}
.kanji-tile.selected {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--color-primary);
  box-shadow: 0 0 15px var(--color-primary-glow);
}

.kanji-detail-card {
  background: rgba(5, 8, 17, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* Animate change */
  transition: opacity var(--transition-fast);
}

.detail-top {
  display: flex;
  align-items: center;
  gap: 15px;
}

.detail-char {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--color-primary);
  text-shadow: 0 0 8px var(--color-primary-glow);
}

.detail-readings {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 0.95rem;
  font-weight: 700;
}

.detail-meaning {
  font-size: 0.95rem;
  font-weight: 600;
}

.learn-controls {
  display: flex;
  gap: 15px;
  grid-column: 1 / -1;
  margin-top: 15px;
}

/* ==========================================================================
   SCREEN 4: GAMEPLAY - RAKIT KANJI
   ========================================================================== */
.build-mode-layout {
  max-width: 650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 25px;
  width: 100%;
}

.build-question-card {
  text-align: center;
  padding: 20px;
}

.build-kana {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.15rem;
  color: var(--color-primary);
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}

.build-meaning {
  font-size: 1.6rem;
  font-weight: 800;
}

.build-slots-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 15px 0;
}

.build-slot {
  font-family: 'Noto Sans JP', sans-serif;
  flex: 1;
  max-width: 75px;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  background: rgba(5, 8, 17, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 900;
  color: transparent;
  transition: all var(--transition-fast);
}

.build-slot.filled {
  border-style: solid;
  border-color: var(--color-primary);
  background: rgba(139, 92, 246, 0.1);
  color: white;
  text-shadow: 0 0 10px var(--color-primary-glow);
  box-shadow: 0 0 12px var(--color-primary-glow);
  cursor: pointer;
  user-select: none;
}

.build-slot.filled:hover {
  border-color: var(--color-danger);
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.35);
  transform: translateY(-2px);
}

.build-slot.drag-over {
  border-color: var(--color-success) !important;
  background: rgba(46, 204, 113, 0.15) !important;
  box-shadow: 0 0 18px var(--color-success) !important;
  transform: scale(1.06);
}

.build-slot.dragging {
  opacity: 0.4;
  border-style: dashed;
}

.build-slot.error {
  border-color: var(--color-danger);
  background: rgba(239, 68, 68, 0.1);
  box-shadow: 0 0 15px var(--color-danger-glow);
  animation: shake 0.4s ease;
}

.build-pool-section {
  text-align: center;
}
.build-pool-section p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.build-pool-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px;
}

.build-tile {
  font-family: 'Noto Sans JP', sans-serif;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.build-tile:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-3px);
  border-color: var(--color-primary);
  box-shadow: 0 6px 15px var(--color-primary-glow);
}
.build-tile.used {
  opacity: 0.2;
  pointer-events: none;
  transform: scale(0.9);
}

.build-controls {
  display: flex;
  gap: 15px;
}
.build-controls button {
  flex: 1;
}

/* ==========================================================================
   SCREEN 5: GAMEPLAY - KUIS CEPAT
   ========================================================================== */
.quiz-progress-bar-outer {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}

.quiz-timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
  background-size: 300% 100%;
  border-radius: 50px;
  transition: width 0.1s linear;
}

.quiz-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.combo-hud {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(245, 158, 11, 0.1);
  padding: 4px 12px;
  border-radius: 50px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--color-c1);
  font-weight: 700;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition-fast);
}

.combo-hud.active {
  opacity: 1;
  transform: scale(1);
}

.streak-fire {
  font-size: 1.1rem;
  animation: fire-flicker 0.6s infinite alternate;
}

@keyframes fire-flicker {
  from { transform: scale(1); }
  to { transform: scale(1.15) rotate(5deg); }
}

.quiz-layout {
  max-width: 750px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 25px;
  width: 100%;
}

.quiz-question-box {
  text-align: center;
  padding: 25px;
  position: relative;
  overflow: hidden;
}

.quiz-question-tag {
  font-size: 0.75rem;
  color: var(--color-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: block;
  margin-bottom: 8px;
}

.quiz-question-text {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 1px;
}
.quiz-question-text.text-large {
  font-size: 1.6rem;
  font-family: inherit;
  font-weight: 700;
}

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

@media (min-width: 600px) {
  .quiz-options-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.quiz-option-btn {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: white;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.quiz-option-btn:hover {
  background: var(--glass-bg-hover);
  border-color: var(--color-primary-glow);
  transform: translateY(-2px);
}

.option-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.quiz-option-btn:hover .option-letter {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.option-text {
  flex-grow: 1;
}

/* Feedback States */
.quiz-option-btn.correct {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: var(--color-success) !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3) !important;
}
.quiz-option-btn.correct .option-letter {
  background: var(--color-success) !important;
  border-color: var(--color-success) !important;
  color: white !important;
}

.quiz-option-btn.wrong {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: var(--color-danger) !important;
  box-shadow: 0 0 15px var(--color-danger-glow) !important;
  animation: shake 0.4s ease;
}
.quiz-option-btn.wrong .option-letter {
  background: var(--color-danger) !important;
  border-color: var(--color-danger) !important;
  color: white !important;
}

/* Shaking animation for failures */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

/* ==========================================================================
   SCREEN 6: GAMEPLAY - TARUNG MEMORI
   ========================================================================== */
.memory-layout {
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
}

.memory-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 auto;
}

@media (min-width: 480px) {
  .memory-grid-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
  }
}

.memory-card-wrapper {
  aspect-ratio: 1;
  perspective: 800px;
}

.memory-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform var(--transition-normal);
  cursor: pointer;
}

.memory-card.flipped {
  transform: rotateY(180deg);
}

.memory-card-side {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.memory-card-front {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  border-color: rgba(139, 92, 246, 0.2);
  color: var(--color-primary);
  font-size: 1.6rem;
}
.memory-card-front::after {
  content: '❓';
  filter: drop-shadow(0 0 5px var(--color-primary-glow));
}

.memory-card-back {
  background: linear-gradient(135deg, #111827 0%, #030712 100%);
  transform: rotateY(180deg);
  color: white;
  border-color: rgba(255, 255, 255, 0.12);
}

.memory-card-back.type-kanji {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  border-color: rgba(139, 92, 246, 0.4);
  text-shadow: 0 0 8px var(--color-primary-glow);
}
@media (min-width: 480px) {
  .memory-card-back.type-kanji {
    font-size: 1.8rem;
  }
}

.memory-card-back.type-meaning {
  font-size: 0.75rem;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
@media (min-width: 480px) {
  .memory-card-back.type-meaning {
    font-size: 0.85rem;
  }
}

.memory-back-kana {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.65rem;
  color: var(--color-c2);
}

.memory-card.matched {
  transform: rotateY(180deg);
  pointer-events: none;
}
.memory-card.matched .memory-card-back {
  border-color: var(--color-success) !important;
  background: rgba(16, 185, 129, 0.05) !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25) !important;
  animation: match-success 0.5s ease-out;
}

@keyframes match-success {
  0% { transform: rotateY(180deg) scale(1); }
  50% { transform: rotateY(180deg) scale(1.08); }
  100% { transform: rotateY(180deg) scale(1); }
}

/* ==========================================================================
   SCREEN 7: GAME OVER / HASIL GAME
   ========================================================================== */
.result-container {
  max-width: 550px;
  margin: 40px auto;
  text-align: center;
}

.result-trophy {
  font-size: 3.5rem;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 15px var(--color-c1));
  animation: float 2.5s infinite alternate ease-in-out;
}

@keyframes float {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

.result-container h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.result-container p {
  color: var(--text-muted);
  margin-bottom: 25px;
}

.result-stats-board {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.r-stat-item {
  flex: 1;
  background: rgba(5, 8, 17, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.r-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.r-val {
  font-size: 1.25rem;
  font-weight: 800;
}
.r-val.score-val {
  color: var(--color-primary);
  text-shadow: 0 0 10px var(--color-primary-glow);
}

.result-stars-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 20px;
  margin-bottom: 30px;
}

.r-stars-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}

.result-stars-display {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.result-star {
  font-size: 2.2rem;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.4));
}
.result-star.dimmed {
  opacity: 0.15;
  filter: none;
  transform: scale(0.9);
}

.stars-sub-comment {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.result-actions {
  display: flex;
  gap: 15px;
}

/* ==========================================================================
   POPUP MODAL & TOASTS
   ========================================================================== */
/* Popover/Dialog styling with modern CSS dialog rules */
.glass-dialog {
  margin: auto;
  border: none;
  background: transparent;
  padding: 0;
  max-width: 550px;
  width: 90%;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  opacity: 0;
  scale: 0.95;
  transition:
    opacity 0.4s ease-out,
    scale 0.4s ease-out,
    display 0.4s allow-discrete;
}

.glass-dialog[open] {
  opacity: 1;
  scale: 1;
}

@starting-style {
  .glass-dialog[open] {
    opacity: 0;
    scale: 0.95;
  }
}

.glass-dialog::backdrop {
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s ease-out, display 0.4s allow-discrete;
}

.glass-dialog[open]::backdrop {
  opacity: 1;
}

@starting-style {
  .glass-dialog[open]::backdrop {
    opacity: 0;
  }
}

.dialog-content {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.dialog-header {
  padding: 20px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dialog-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.dialog-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color var(--transition-fast);
  line-height: 1;
}
.dialog-close-btn:hover {
  color: white;
}

.dialog-body {
  padding: 25px;
  max-height: 60vh;
  overflow-y: auto;
}

.dialog-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 15px;
  margin-bottom: 6px;
  color: var(--color-primary);
}
.dialog-body h4:first-of-type {
  margin-top: 0;
}

.dialog-body p, .dialog-body ul {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.dialog-body ul {
  padding-left: 20px;
}
.dialog-body li {
  margin-bottom: 6px;
}

.dialog-footer {
  padding: 15px 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
}

/* Sound Indicator Toast */
#sound-indicator {
  position: fixed;
  top: 95px;
  right: 40px;
  background: rgba(16, 24, 48, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 999;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  pointer-events: none;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s, transform 0.3s, display 0.3s allow-discrete;
}

#sound-indicator.hidden {
  opacity: 0;
  transform: translateY(-10px);
  display: none;
}

/* Global Achievement Toast */
#achievement-toast {
  position: fixed;
  bottom: 40px;
  right: 40px;
  background: linear-gradient(135deg, rgba(23, 28, 48, 0.95) 0%, rgba(13, 17, 33, 0.95) 100%);
  border: 1px solid var(--color-primary);
  box-shadow: 0 10px 30px var(--color-primary-glow);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  z-index: 1000;
  pointer-events: none;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out, display 0.4s allow-discrete;
}

#achievement-toast.hidden {
  opacity: 0;
  transform: translateY(20px);
  display: none;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.toast-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 8px var(--color-primary));
}

.toast-info {
  display: flex;
  flex-direction: column;
}

.toast-title {
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.toast-desc {
  font-size: 1rem;
  font-weight: 700;
  color: white;
}

/* ==========================================================================
   GLOBAL FOOTER
   ========================================================================== */
.app-footer {
  text-align: center;
  padding: 30px 10px 10px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 40px;
}

/* ==========================================================================
   RESPONSIVENESS (MOBILE FIRST REFINEMENTS)
   ========================================================================== */
@media (max-width: 600px) {
  .app-container {
    padding: 10px;
  }
  
  .app-header {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }
  
  .header-controls {
    width: 100%;
    justify-content: space-between;
  }
  
  .hero-section h2 {
    font-size: 1.6rem;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
  }
  
  .card-kanji-big {
    font-size: 3rem;
  }
  
  .card-meaning {
    font-size: 1.25rem;
  }

  /* Mobile gameplay touchups */
  .card-3d-wrapper {
    max-height: 285px;
  }
  
  .quiz-option-btn {
    padding: 12px 18px;
    font-size: 0.9rem;
  }
  
  .option-letter {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .build-tile {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
  }
  
  .build-slot {
    font-size: 1.6rem;
  }
}

@media (max-width: 420px) {
  .app-header {
    padding: 12px;
  }
  
  .logo-emoji {
    font-size: 1.8rem;
  }
  
  .logo-text h1 {
    font-size: 1.25rem;
  }
  
  .header-controls {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .stat-badge {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
  
  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .build-tile {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }
  
  .build-slot {
    min-width: 40px;
    font-size: 1.3rem;
  }
  
  .result-star {
    font-size: 1.8rem;
  }
}

/* ==========================================================================
   LIGHT THEME OVERRIDES
   ========================================================================== */
body.light-theme {
  --bg-dark: #f0f2f5;
  --bg-deep: #e4e7eb;
  --bg-gradient: radial-gradient(circle at 50% 50%, #f8fafc 0%, #cbd5e1 100%);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dark: #f8fafc;
  
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-hover: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-border-glow: rgba(139, 92, 246, 0.25);
  --glass-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  
  --color-primary-glow: rgba(139, 92, 246, 0.25);
  --color-c1-glow: rgba(245, 158, 11, 0.2);
  --color-c2-glow: rgba(16, 185, 129, 0.2);
  --color-c3-glow: rgba(239, 68, 68, 0.2);
  --color-c4-glow: rgba(59, 130, 246, 0.2);
  --color-c5-glow: rgba(168, 85, 247, 0.2);
  --color-c6-glow: rgba(6, 182, 212, 0.2);
  --color-c7-glow: rgba(244, 63, 94, 0.2);
  --color-c8-glow: rgba(234, 179, 8, 0.2);
}

body.light-theme #bg-particles {
  opacity: 0.22;
}

body.light-theme .app-header {
  border-color: rgba(15, 23, 42, 0.06);
}

body.light-theme .logo-text h1 {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .stat-badge {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.06);
}

body.light-theme .hero-section h2 {
  background: linear-gradient(135deg, #0f172a 30%, #6d28d9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .category-card {
  border-color: rgba(15, 23, 42, 0.06);
}
body.light-theme .category-card.c1:hover { border-color: var(--color-c1); }
body.light-theme .category-card.c2:hover { border-color: var(--color-c2); }
body.light-theme .category-card.c3:hover { border-color: var(--color-c3); }
body.light-theme .category-card.c4:hover { border-color: var(--color-c4); }
body.light-theme .category-card.c5:hover { border-color: var(--color-c5); }
body.light-theme .category-card.c6:hover { border-color: var(--color-c6); }
body.light-theme .category-card.c7:hover { border-color: var(--color-c7); }
body.light-theme .category-card.c8:hover { border-color: var(--color-c8); }

body.light-theme .cat-badge {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.05);
}

body.light-theme .cat-stats {
  border-top-color: rgba(15, 23, 42, 0.06);
}

body.light-theme .progress-bar-bg {
  background: rgba(15, 23, 42, 0.05);
}

body.light-theme .achievement-card {
  border-color: rgba(15, 23, 42, 0.06);
}
body.light-theme .achievement-card.locked {
  background: rgba(15, 23, 42, 0.02);
}
body.light-theme .achievement-card.unlocked {
  background: var(--glass-bg);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}

body.light-theme .mode-option-card {
  border-color: rgba(15, 23, 42, 0.06);
}
body.light-theme .mode-icon-wrapper {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.12);
}

/* Learn Card Light overrides */
body.light-theme .card-front {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border-color: rgba(139, 92, 246, 0.2);
  color: #0f172a;
}
body.light-theme .card-front .card-kanji-big {
  text-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

body.light-theme .card-back {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(16, 185, 129, 0.2);
  color: #0f172a;
}
body.light-theme .card-back .card-meaning {
  color: #0f172a;
  text-shadow: none;
}
body.light-theme .card-back-header {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

body.light-theme .speech-btn {
  color: #475569;
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.06);
}
body.light-theme .speech-btn:hover {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-c2);
}

body.light-theme .kanji-tile {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}
body.light-theme .kanji-tile:hover {
  background: rgba(15, 23, 42, 0.08);
}
body.light-theme .kanji-tile.selected {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--color-primary);
}

body.light-theme .kanji-detail-card {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(15, 23, 42, 0.04);
}

/* Rakit slots overrides */
body.light-theme .build-slot {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.5);
}
body.light-theme .build-slot.filled {
  color: #0f172a;
  text-shadow: none;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}
body.light-theme .build-tile {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}
body.light-theme .build-tile:hover {
  background: #f8fafc;
}

/* Quiz mode overrides */
body.light-theme .quiz-hud {
  background: rgba(15, 23, 42, 0.02);
}
body.light-theme .quiz-progress-bar-outer {
  background: rgba(15, 23, 42, 0.05);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
body.light-theme .quiz-option-btn {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}
body.light-theme .quiz-option-btn:hover {
  background: #f8fafc;
}
body.light-theme .option-letter {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.06);
}

/* Memory game overrides */
body.light-theme .memory-card-front {
  background: linear-gradient(135deg, #e0e7ff 0%, #cbd5e1 100%);
  border-color: rgba(139, 92, 246, 0.18);
}
body.light-theme .memory-card-back {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}
body.light-theme .memory-card-back.type-kanji {
  text-shadow: none;
}

/* Result overrides */
body.light-theme .r-stat-item {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(15, 23, 42, 0.04);
}

/* dialog and toast overrides */
body.light-theme #achievement-toast {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-color: var(--color-primary);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
}
body.light-theme .toast-desc {
  color: #0f172a;
}

body.light-theme #sound-indicator {
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
}

body.light-theme .app-footer {
  border-top-color: rgba(15, 23, 42, 0.05);
}

/* Light theme overrides for Weak Kanji Widget */
body.light-theme .weak-kanji-panel {
  background: var(--glass-bg);
  border-color: rgba(239, 68, 68, 0.18);
  box-shadow: var(--glass-shadow), 0 0 20px rgba(239, 68, 68, 0.03);
}

body.light-theme .weak-kanji-panel:hover {
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: var(--glass-shadow), 0 0 25px rgba(239, 68, 68, 0.08);
}

body.light-theme .weak-kanji-count {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.2);
}

body.light-theme .weak-kanji-card {
  background: rgba(255, 240, 243, 0.85); /* Premium soft pink-red tint */
  border-color: rgba(239, 68, 68, 0.12);
}

body.light-theme .weak-kanji-card:hover {
  background: rgba(255, 230, 235, 0.95);
  border-color: rgba(239, 68, 68, 0.3);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.08);
}

body.light-theme .weak-kanji-card-kanji {
  color: #c53030; /* Premium dark crimson for maximum readability */
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.08);
}

body.light-theme .weak-kanji-card:hover .weak-kanji-card-kanji {
  color: #9b2c2c;
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

body.light-theme .weak-kanji-scroll-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .weak-kanji-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(239, 68, 68, 0.15);
}

body.light-theme .weak-kanji-scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(239, 68, 68, 0.35);
}


/* Light theme overrides for Certificate Widget */
body.light-theme .certificate-panel {
  background: linear-gradient(135deg, rgba(243, 232, 255, 0.85) 0%, rgba(254, 243, 199, 0.85) 100%); /* Elegant light purple-gold tint */
  border-color: rgba(139, 92, 246, 0.15);
  box-shadow: var(--glass-shadow), 0 0 25px rgba(139, 92, 246, 0.03);
}

body.light-theme .cert-text-group h4 {
  color: #1e1b4b; /* Deep indigo text */
}

body.light-theme .cert-progress-bar-bg {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.08);
}

body.light-theme #btn-view-certificate.btn-locked {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.4);
}


/* Light theme overrides for Certificate Dialog Modal */
body.light-theme .certificate-dialog {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(197, 160, 89, 0.4) !important;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.18) !important;
}

body.light-theme .cert-dialog-content #btn-close-certificate {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .cert-dialog-content #btn-close-certificate:hover {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border-color: #ef4444;
}

/* Global Utility Classes */
.hidden {
  display: none !important;
}

/* ==========================================================================
   USER PROFILE & LOG PROGRESS STYLES
   ========================================================================== */
.active-profile-card {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}
body.light-theme .active-profile-card {
  background: rgba(139, 92, 246, 0.05);
}

.active-profile-tag {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-primary);
  letter-spacing: 1.5px;
  display: block;
}

#active-profile-name {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 4px 0 10px 0;
  letter-spacing: 0.5px;
}

.active-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
body.light-theme .active-profile-stats {
  color: #475569;
}

.profile-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 25px 0;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 5px;
}

.profile-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
body.light-theme .profile-item {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.05);
}

.profile-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--color-primary-glow);
}
body.light-theme .profile-item:hover {
  background: rgba(15, 23, 42, 0.04);
}

.profile-item.active {
  border-color: var(--color-primary);
  background: rgba(139, 92, 246, 0.06);
}

.profile-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-item-info h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
}
body.light-theme .profile-item-info h5 {
  color: #0f172a;
}

.profile-item-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}
body.light-theme .profile-item-info span {
  color: #64748b;
}

.profile-item-actions {
  display: flex;
  gap: 8px;
}

.profile-create-form {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.profile-create-form input {
  flex: 1;
  background: rgba(5, 8, 17, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  color: white;
  font-family: inherit;
  font-size: 0.9rem;
}
body.light-theme .profile-create-form input {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

.profile-create-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-danger-sm {
  background: transparent;
  border: 1px solid var(--color-danger);
  color: var(--color-danger);
  cursor: pointer;
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.btn-danger-sm:hover {
  background: var(--color-danger);
  color: white;
}

/* ==========================================================================
   GOOGLE AUTH & GAME HISTORY TAB STYLES
   ========================================================================== */
.google-auth-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 25px;
  text-align: center;
  transition: all var(--transition-fast);
}
body.light-theme .google-auth-card {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.06);
}
.google-auth-card:hover {
  border-color: rgba(139, 92, 246, 0.2);
}

.auth-card-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.google-login-btn {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d1d5db;
  font-weight: 700;
  font-size: 0.9rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.google-login-btn:hover {
  background: #f9fafb;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.08);
}

.google-icon {
  width: 18px;
  height: 18px;
}

.user-profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  margin-bottom: 12px;
}

.user-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

.user-info-text {
  display: flex;
  flex-direction: column;
}

.user-info-text h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
}
body.light-theme .user-info-text h5 {
  color: #0f172a;
}

.user-info-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-success);
  margin-bottom: 5px;
  background: rgba(16, 185, 129, 0.06);
  padding: 4px 12px;
  border-radius: 50px;
  width: fit-content;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  display: inline-block;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 8px var(--color-success); }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* Modal Tabs */
.dialog-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 15px;
  gap: 15px;
}
body.light-theme .dialog-tabs {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 8px 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.tab-btn:hover {
  color: white;
}
body.light-theme .tab-btn:hover {
  color: #0f172a;
}
.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Table styling */
.history-table-container {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8rem;
}

.history-table th, .history-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
body.light-theme .history-table th, body.light-theme .history-table td {
  border-bottom-color: rgba(15, 23, 42, 0.04);
}

.history-table th {
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  background: var(--bg-dark);
  z-index: 1;
}
body.light-theme .history-table th {
  background: #f0f2f5;
}

.history-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}
body.light-theme .history-table tbody tr:hover {
  background: rgba(15, 23, 42, 0.01);
}

.history-empty {
  text-align: center;
  padding: 40px 10px;
}

.empty-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 10px;
  opacity: 0.5;
}

.history-empty p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Make table responsive on small phones */
@media (max-width: 480px) {
  .history-table thead {
    display: none; /* Hide standard headers */
  }
  .history-table tr {
    display: block;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    padding: 8px;
  }
  .history-table td {
    display: flex;
    justify-content: space-between;
    padding: 4px 6px;
    border: none;
  }
  .history-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--color-primary);
  }
}

/* ==========================================================================
   GLOBAL ARENA (LEADERBOARD & ACTIVITY FEED) STYLING
   ========================================================================== */
.global-arena-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 25px;
  margin: 20px 0 40px 0;
  width: 100%;
}

.arena-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--glass-shadow);
  transition: border-color var(--transition-normal), transform var(--transition-normal);
  overflow: hidden;
}

.arena-panel:hover {
  border-color: var(--glass-border-glow);
  transform: translateY(-2px);
}

.arena-table th, .arena-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}

.arena-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Rank Glow Badges */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.75rem;
}

.rank-badge.rank-1 {
  background: var(--color-c1);
  color: var(--text-dark);
  box-shadow: 0 0 10px var(--color-c1-glow);
}

.rank-badge.rank-2 {
  background: #cbd5e1; /* Silver */
  color: var(--text-dark);
  box-shadow: 0 0 10px rgba(203, 213, 225, 0.4);
}

.rank-badge.rank-3 {
  background: #b45309; /* Bronze */
  color: var(--text-main);
  box-shadow: 0 0 10px rgba(180, 83, 9, 0.4);
}

.rank-badge.rank-other {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

/* Activity Items */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  animation: slideInUp 0.3s ease-out;
}

.activity-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.activity-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--color-primary);
  object-fit: cover;
}

.activity-content {
  flex: 1;
  font-size: 0.8rem;
  line-height: 1.3;
  text-align: left;
}

.activity-username {
  font-weight: 700;
  color: var(--text-main);
}

.activity-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

/* Live dot pulsing */
.live-dot {
  animation: livePulse 1.2s infinite alternate;
}

@keyframes livePulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 8px #ff4757; }
}

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

/* Loader spinning */
.spinner-icon {
  display: inline-block;
  animation: spin 1.5s linear infinite;
}

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

/* Activity Feed Custom Scrollbar */
.activity-list::-webkit-scrollbar {
  width: 4px;
}

.activity-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 20px;
}

.activity-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
}

.activity-list::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-glow);
}

/* Responsive grid for arena */
.result-grid-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 25px;
  width: 100%;
  max-width: 1100px;
  margin: 30px auto;
  align-items: start;
  justify-content: center;
}

.result-activity-panel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  max-height: 480px;
}

.result-activity-panel .activity-list {
  flex: 1;
  overflow-y: auto;
}

@media (max-width: 900px) {
  .global-arena-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .result-grid-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 15px auto;
  }
  .result-activity-panel {
    max-height: 350px;
  }
}

/* ==========================================================================
   WIDGET KANJI LEMAH (PERLU DIULANG)
   ========================================================================== */
.weak-kanji-panel {
  background: rgba(22, 10, 15, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px 25px;
  margin-bottom: 35px;
  box-shadow: var(--glass-shadow), 0 0 20px rgba(239, 68, 68, 0.05);
  animation: fadeIn 0.5s ease;
  transition: all var(--transition-normal);
}

.weak-kanji-panel:hover {
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: var(--glass-shadow), 0 0 25px rgba(239, 68, 68, 0.1);
}

.weak-kanji-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

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

.weak-title-group h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ff6b6b;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.weak-panel-icon {
  font-size: 1.2rem;
  animation: pulse-dot 1.8s infinite alternate;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); filter: drop-shadow(0 0 2px rgba(239,68,68,0.5)); }
  100% { transform: scale(1.1); filter: drop-shadow(0 0 8px rgba(239,68,68,0.9)); }
}

.weak-kanji-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.weak-kanji-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.btn-remedial-all {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
  font-weight: 700;
  transition: all var(--transition-fast);
}

.btn-remedial-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
  background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
}

.weak-kanji-scroll-container {
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-behavior: smooth;
}

/* Scrollbar tipis premium */
.weak-kanji-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.weak-kanji-scroll-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

.weak-kanji-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  transition: background 0.3s;
}

.weak-kanji-scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(239, 68, 68, 0.45);
}

.weak-kanji-list {
  display: flex;
  gap: 15px;
  padding: 5px 2px;
}

.weak-kanji-card {
  flex: 0 0 150px;
  background: rgba(18, 12, 16, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: center;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.weak-kanji-card:hover {
  transform: translateY(-4px);
  background: rgba(28, 16, 22, 0.85);
  border-color: rgba(239, 68, 68, 0.3);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(239, 68, 68, 0.08);
}

.weak-kanji-card-kanji {
  font-size: 2.1rem;
  font-weight: 800;
  color: #ff8a8a;
  margin: 5px 0 0 0;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
  transition: transform var(--transition-fast);
}

.weak-kanji-card:hover .weak-kanji-card-kanji {
  transform: scale(1.1);
  color: #ff6b6b;
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.weak-kanji-card-kana {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.weak-kanji-card-meaning {
  font-size: 0.75rem;
  color: var(--text-main);
  opacity: 0.9;
  font-weight: 600;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.2em;
  line-height: 1.15;
  width: 100%;
}

.weak-kanji-card-buttons {
  display: flex;
  width: 100%;
  gap: 8px;
  margin-top: 5px;
}

.btn-hafal {
  flex: 1;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-hafal:hover {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

.btn-bedah-mini {
  font-size: 0.7rem;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-bedah-mini:hover {
  background: #8b5cf6;
  color: #fff;
  border-color: #8b5cf6;
  box-shadow: 0 3px 10px rgba(139, 92, 246, 0.3);
}
@media (max-width: 900px) {
  .global-arena-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .result-grid-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 15px auto;
  }
  .result-activity-panel {
    max-height: 350px;
  }
}

/* ==========================================================================
   WIDGET SERTIFIKAT KELULUSAN (VERY BOTTOM)
   ========================================================================== */
.certificate-panel {
  background: linear-gradient(135deg, rgba(22, 16, 35, 0.75) 0%, rgba(10, 15, 29, 0.75) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px 30px;
  margin-top: 40px;
  margin-bottom: 25px;
  box-shadow: var(--glass-shadow), 0 0 25px rgba(139, 92, 246, 0.05);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.certificate-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #8b5cf6, #d97706);
}

.cert-panel-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.cert-panel-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cert-medal-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.6));
  animation: float-medal 3s ease-in-out infinite alternate;
}

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

.cert-text-group h4 {
  margin: 0 0 4px 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.cert-text-group p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cert-progress-group {
  display: flex;
  align-items: center;
  gap: 25px;
  flex-grow: 1;
  max-width: 550px;
  justify-content: flex-end;
}

.cert-progress-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
  max-width: 320px;
}

.cert-progress-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.cert-progress-bar-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #8b5cf6 0%, #d97706 50%, #f59e0b 100%);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
  position: relative;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Shimmer/shine effect on fill */
.cert-progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100px;
  width: 80px;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shine-bar 3s infinite linear;
}

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

.cert-progress-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: right;
  letter-spacing: 0.5px;
}

#btn-view-certificate {
  min-width: 160px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

#btn-view-certificate.btn-locked {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
}

#btn-view-certificate.btn-unlocked {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #8b5cf6 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
  animation: cert-btn-glow 2.5s infinite alternate;
}

#btn-view-certificate.btn-unlocked:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.5);
}

@keyframes cert-btn-glow {
  0% { box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35), 0 0 0 0px rgba(139, 92, 246, 0.2); }
  100% { box-shadow: 0 4px 25px rgba(245, 158, 11, 0.5), 0 0 12px 6px rgba(139, 92, 246, 0.4); }
}

.cert-lock-icon {
  font-size: 0.95rem;
}

/* ==========================================================================
   MODAL SERTIFIKAT DIALOG
   ========================================================================== */
.certificate-dialog {
  max-width: 900px !important;
  width: 95% !important;
  background: rgba(10, 6, 15, 0.95) !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.08) !important;
  padding: 0 !important;
  border-radius: var(--radius-lg) !important;
  overflow: visible !important;
}

.cert-dialog-content {
  padding: 30px 40px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  gap: 20px;
}

.cert-dialog-content #btn-close-certificate {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.cert-dialog-content #btn-close-certificate:hover {
  background: rgba(239, 68, 68, 0.8);
  color: #fff;
  border-color: #ef4444;
}

/* Premium Printable Certificate Card layout */
.certificate-card {
  width: 100%;
  max-width: 800px;
  height: auto;
  aspect-ratio: 297 / 210; /* Perfect A4 Landscape Ratio! */
  background: #fbfaf5;
  color: #1e293b;
  border-radius: 8px;
  position: relative;
  box-sizing: border-box;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  padding: 15px;
  border: 12px double #c5a059;
}

/* Decorative background ornaments inside certificate */
.cert-sakura-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.08;
  background-image: radial-gradient(circle at 10% 20%, rgba(197, 160, 89, 0.15) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(197, 160, 89, 0.15) 0%, transparent 40%);
  pointer-events: none;
}

.cert-inner-border {
  width: 100%;
  height: 100%;
  border: 2px solid rgba(197, 160, 89, 0.5);
  padding: 25px 35px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  position: relative;
}

.cert-inner-border::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1px solid rgba(197, 160, 89, 0.2);
  pointer-events: none;
}

/* Header styling */
.cert-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cert-header-gold-toga {
  font-size: 2.2rem;
  margin-bottom: 5px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.cert-header h2 {
  font-family: 'Georgia', serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: #926f2f;
  margin: 0 0 5px 0;
  letter-spacing: 2px;
}

.cert-divider-line {
  width: 180px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c5a059, transparent);
  margin: 2px 0 6px 0;
}

.cert-header h3 {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  margin: 0;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Body Content */
.cert-body {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cert-lead-text {
  font-family: 'Georgia', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: #475569;
  margin: 0;
}

.cert-recipient-name {
  font-family: 'Georgia', serif;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #7c5c24 0%, #b89149 50%, #856126 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #926f2f;
  margin: 5px 0;
  letter-spacing: 1px;
  text-transform: capitalize;
  border-bottom: 1px solid rgba(197, 160, 89, 0.3);
  padding-bottom: 5px;
  width: 80%;
  max-width: 500px;
}

.cert-desc-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #334155;
  margin: 5px 0 0 0;
  max-width: 580px;
}

.cert-achievement-details {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #475569;
  font-weight: 500;
  margin: 0;
  max-width: 580px;
}

/* Footer layout */
.cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

.cert-sign-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 180px;
}

.cert-signature {
  font-family: 'Georgia', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1rem;
  color: #1e293b;
  height: 25px;
  display: flex;
  align-items: center;
}

.cert-date {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  color: #334155;
  height: 25px;
  display: flex;
  align-items: center;
}

.cert-sign-line {
  width: 100%;
  height: 1px;
  background: #c5a059;
  margin: 5px 0;
}

.cert-sign-block p {
  margin: 0;
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 3D Gold Seal Badge */
.cert-seal-block {
  display: flex;
  justify-content: center;
  align-items: center;
}

.cert-gold-seal {
  width: 75px;
  height: 75px;
  background: radial-gradient(circle at 35% 35%, #fff176 0%, #f57f17 50%, #ff8f00 100%);
  border-radius: 50%;
  border: 2px dashed #f59e0b;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4), inset 0 0 10px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.cert-gold-seal::before {
  content: '';
  position: absolute;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 1px solid #c5a059;
  pointer-events: none;
}

.cert-seal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #4e340e;
  font-weight: 800;
  font-size: 0.85rem;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}

.cert-seal-inner .seal-level {
  font-size: 0.5rem;
  letter-spacing: 0.5px;
  margin: -2px 0;
  font-weight: 700;
}

.cert-seal-inner .seal-star {
  font-size: 0.45rem;
  margin-top: 1px;
}

/* Dialogue Action Buttons */
.cert-dialog-actions-footer {
  display: flex;
  width: 100%;
  gap: 15px;
  justify-content: center;
  margin-top: 10px;
}

.btn-print-cert {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
}

.btn-print-cert:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.45);
}

/* ==========================================================================
   PRINT-ONLY CUSTOM MEDIA RULES
   ========================================================================== */
@media print {
  body {
    background: #fff !important;
    color: #1e293b !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Hide all elements of the application */
  body > * {
    display: none !important;
  }
  
  /* Show only the dialog wrapper and make it full screen landscape */
  #certificate-dialog {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
  }

  .cert-dialog-content {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Hide modal buttons and elements during print */
  #btn-close-certificate, 
  .cert-dialog-actions-footer {
    display: none !important;
  }

  /* Target the certificate card itself and shape it exactly to standard printed A4 landscape */
  .certificate-card {
    display: block !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 297mm !important; /* A4 Landscape Standard Width */
    height: 210mm !important; /* A4 Landscape Standard Height */
    box-shadow: none !important;
    border: 15px double #c5a059 !important;
    margin: 0 !important;
    background-color: #fbfaf5 !important;
    background: #fbfaf5 !important;
    box-sizing: border-box !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  .cert-sakura-bg {
    display: block !important;
    opacity: 0.15 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  .cert-gold-seal {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  .cert-verified-google {
    display: inline-flex !important;
    background-color: rgba(5, 150, 105, 0.08) !important;
    border: 1px solid rgba(5, 150, 105, 0.25) !important;
    color: #059669 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* ==========================================================================
   GOOGLE LOGIN WAJIB (MANDATORY LOGIN LAYOUT)
   ========================================================================== */
.mandatory-login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.98) 0%, rgba(5, 8, 17, 0.99) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.login-glow-card {
  background: rgba(18, 24, 43, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-lg);
  padding: 40px 45px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 40px rgba(139, 92, 246, 0.05);
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.4s ease;
}

.login-logo-wrapper {
  font-size: 3.5rem;
  margin-bottom: 15px;
  filter: drop-shadow(0 4px 15px rgba(245, 158, 11, 0.5));
  animation: float-logo 4s ease-in-out infinite alternate;
}

@keyframes float-logo {
  0% { transform: translateY(0px) scale(0.95); }
  100% { transform: translateY(-8px) scale(1.05); }
}

.login-glow-card h2 {
  font-family: 'Georgia', serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #c5a059 0%, #fff 50%, #c5a059 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.login-glow-card h3 {
  font-size: 0.9rem;
  color: var(--color-primary);
  margin: 5px 0 20px 0;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.login-warning-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 25px;
}

.login-bullet-points {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin: 0 auto 30px auto;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 18px 22px;
  border-radius: var(--radius-md);
}

.point-item {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-instruction {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  font-weight: 500;
}

.btn-google-login-big {
  width: 100%;
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 800;
  background: linear-gradient(135deg, #4285f4 0%, #357ae8 100%);
  border: none;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 18px rgba(66, 133, 244, 0.4);
  transition: all var(--transition-normal);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-google-login-big:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(66, 133, 244, 0.6);
  background: linear-gradient(135deg, #5195ff 0%, #4285f4 100%);
}

.cert-verified-google {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: #059669; /* Emerald green */
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.25);
  padding: 3px 12px;
  border-radius: 20px;
  margin: 5px 0 0 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.5px;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* Light theme overrides for Mandatory Login & Verifier */
body.light-theme .mandatory-login-screen {
  background: radial-gradient(circle at 50% 50%, #f1f5f9 0%, #cbd5e1 100%);
}

body.light-theme .login-glow-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(197, 160, 89, 0.3);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12), 0 0 30px rgba(139, 92, 246, 0.03);
}

body.light-theme .login-glow-card h2 {
  background: linear-gradient(135deg, #926f2f 0%, #1e293b 50%, #926f2f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .login-bullet-points {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.05);
}

body.light-theme .cert-verified-google {
  background: rgba(5, 150, 105, 0.06);
  border-color: rgba(5, 150, 105, 0.2);
}
