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

:root {
  --primary-navy: #0A0E1A;
  --secondary-navy: #121829;
  --emerald-dark: #072F1D;
  --emerald-medium: #0D5C3A;
  --emerald-light: #168855;
  --emerald-glow: #1eb572;
  --gold-primary: #D4AF37;
  --gold-light: #F3C623;
  --gold-glow: #FFF07C;
  --white: #FFFFFF;
  --gray-light: #E0E6ED;
  --gray-muted: #8E9AAF;
  --danger-red: #D90429;
  --danger-glow: #FF4D6D;
  --overlay-bg: rgba(10, 14, 26, 0.85);
  
  --font-display: 'Outfit', sans-serif;
  --font-accent: 'Cinzel', serif;
  --font-sans: 'Inter', sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-gold: 0 0 15px rgba(212, 175, 55, 0.3);
  --shadow-emerald: 0 0 15px rgba(22, 136, 85, 0.25);
  --border-gold: 1px solid rgba(212, 175, 55, 0.4);
}

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

body {
  background-color: #05070D;
  color: var(--white);
  font-family: var(--font-sans);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* 9:16 Aspect Ratio Container Lock */
.app-container {
  width: 100%;
  max-width: 450px;
  height: 100vh;
  height: 100dvh;
  background: radial-gradient(circle at top, var(--emerald-dark) 0%, var(--primary-navy) 70%);
  border-left: 1px solid rgba(212, 175, 55, 0.15);
  border-right: 1px solid rgba(212, 175, 55, 0.15);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

/* Custom Scrollbar for Inner Content */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--primary-navy);
}
::-webkit-scrollbar-thumb {
  background: var(--emerald-medium);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--emerald-light);
}

/* Typography Utility */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.5px;
}
.accent-text {
  font-family: var(--font-accent);
  color: var(--gold-light);
}

/* Common Screen Settings */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: translateY(15px);
  z-index: 10;
  padding: 16px;
  overflow-y: auto;
}
.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Loading/Splash Screen */
#splash-screen {
  background: radial-gradient(circle at center, var(--emerald-medium) 0%, var(--primary-navy) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
}
.islamic-ornament-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  clip-path: polygon(50% 0%, 83% 12%, 100% 43%, 94% 78%, 68% 97%, 32% 97%, 6% 78%, 0% 43%, 17% 12%);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-gold);
  animation: logoPulse 4s infinite ease-in-out;
}
.logo-icon {
  font-size: 3.5rem;
  color: var(--primary-navy);
}
.splash-title {
  font-size: 2.2rem;
  margin-bottom: 8px;
  text-shadow: 0 4px 10px rgba(0,0,0,0.5);
  font-family: var(--font-accent);
  background: linear-gradient(to right, var(--gold-light), var(--gold-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.splash-subtitle {
  font-size: 1.1rem;
  color: var(--gray-light);
  margin-bottom: 40px;
  font-weight: 300;
  letter-spacing: 1px;
}
.loader-bar {
  width: 180px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.2);
}
.loader-progress {
  width: 0%;
  height: 100%;
  background: linear-gradient(to right, var(--gold-primary), var(--gold-light));
  border-radius: 10px;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--gold-light);
}

/* RPG Profile Dashboard Header */
.dashboard-header {
  background: linear-gradient(180deg, rgba(18, 24, 41, 0.9) 0%, rgba(10, 14, 26, 0.7) 100%);
  border: var(--border-gold);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-emerald);
}
.profile-avatar-container {
  position: relative;
}
.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  background: var(--emerald-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.8rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.profile-level-badge {
  position: absolute;
  bottom: -6px;
  right: -6px;
  background: var(--gold-primary);
  color: var(--primary-navy);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.75rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--primary-navy);
}
.profile-details {
  flex-grow: 1;
}
.profile-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-title {
  font-size: 0.75rem;
  color: var(--gold-light);
  font-weight: 500;
  letter-spacing: 0.5px;
}
.xp-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 6px;
  position: relative;
}
.xp-bar-fill {
  width: 30%;
  height: 100%;
  background: linear-gradient(to right, var(--emerald-light), var(--emerald-glow));
  border-radius: 6px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.xp-text {
  font-size: 0.7rem;
  color: var(--gray-muted);
  text-align: right;
  margin-top: 2px;
}
.header-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-family: var(--font-display);
  font-weight: 700;
}
.coin-display, .streak-display {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
}
.coin-display i {
  color: var(--gold-light);
  animation: coinSpinAnim 3s infinite linear;
}
.streak-display i {
  color: #FF5A5F;
}

/* Dashboard Modules Grid */
.dashboard-title-bar {
  margin-bottom: 12px;
  text-align: center;
}
.dashboard-title-bar h2 {
  font-family: var(--font-accent);
  color: var(--gold-light);
  font-size: 1.3rem;
}
.dashboard-scroll-area {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 2px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}
.module-card {
  background: linear-gradient(135deg, var(--secondary-navy) 0%, rgba(18, 24, 41, 0.6) 100%);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}
.module-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, var(--secondary-navy) 0%, rgba(22, 136, 85, 0.15) 100%);
  box-shadow: var(--shadow-emerald);
}
.module-number-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--emerald-dark);
  border: 1px solid var(--emerald-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--gold-light);
}
.module-number-badge span {
  font-size: 0.6rem;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--gray-muted);
}
.module-info {
  flex-grow: 1;
}
.module-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 3px;
  line-height: 1.2;
}
.module-desc {
  font-size: 0.75rem;
  color: var(--gray-muted);
  line-height: 1.3;
}
.module-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}
.module-stars {
  color: var(--gray-muted);
  font-size: 0.75rem;
  letter-spacing: 1px;
}
.module-stars.earned {
  color: var(--gold-light);
}
.module-card-arrow {
  color: var(--gold-primary);
  font-size: 1.1rem;
}

/* Quiz Screen Header & Status Bar */
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.back-btn {
  background: none;
  border: none;
  color: var(--gray-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition-smooth);
}
.back-btn:hover {
  color: var(--white);
  transform: translateX(-2px);
}
.quiz-title {
  font-size: 1rem;
  color: var(--gold-light);
  font-family: var(--font-accent);
  max-width: 60%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quiz-lives {
  display: flex;
  gap: 4px;
  color: var(--danger-glow);
  font-size: 1.1rem;
}
.heart-icon.lost {
  color: var(--gray-muted);
  opacity: 0.3;
}

/* Boss Fight Visual Indicator */
.boss-banner {
  background: linear-gradient(90deg, var(--danger-red) 0%, #7209B7 100%);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 0 15px rgba(217, 4, 41, 0.4);
  animation: bossPulse 2s infinite alternate ease-in-out;
  border: 1px solid var(--danger-glow);
}
.boss-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-accent);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}
.boss-hp-bar {
  flex-grow: 1;
  max-width: 150px;
  height: 10px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.boss-hp-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, #FF4D6D, #D90429);
  transition: width 0.3s ease;
}

/* Timer and Progress Line */
.quiz-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}
.quiz-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--gold-primary);
  transition: width 0.3s ease;
}
.question-timer-container {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}
.question-timer-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, var(--gold-light), var(--gold-primary));
  transition: width 0.1s linear;
}

/* Question Area */
.quiz-box {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 20px;
}
.question-number {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--gold-light);
  letter-spacing: 1.5px;
  margin-bottom: 6px;
  text-align: center;
  font-family: var(--font-display);
}
.question-text {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  margin-bottom: 24px;
  color: var(--white);
  padding: 0 8px;
}
.question-text b, .question-text i {
  color: var(--gold-glow);
}

/* Multiple Choice Option Buttons */
.options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.option-btn {
  background: var(--secondary-navy);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 12px;
}
.option-btn:hover:not(:disabled) {
  background: rgba(22, 136, 85, 0.15);
  border-color: var(--emerald-medium);
  transform: scale(1.01);
}
.option-letter {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-muted);
  flex-shrink: 0;
}
.option-btn:hover:not(:disabled) .option-letter {
  background: var(--emerald-medium);
  border-color: var(--emerald-light);
  color: var(--white);
}
.option-btn.correct {
  background: var(--emerald-medium) !important;
  border-color: var(--emerald-light) !important;
  box-shadow: 0 0 12px rgba(22, 136, 85, 0.4);
}
.option-btn.correct .option-letter {
  background: var(--white) !important;
  color: var(--emerald-medium) !important;
}
.option-btn.wrong {
  background: var(--danger-red) !important;
  border-color: var(--danger-glow) !important;
  box-shadow: 0 0 12px rgba(217, 4, 41, 0.4);
  animation: shake 0.4s ease-in-out;
}
.option-btn.wrong .option-letter {
  background: var(--white) !important;
  color: var(--danger-red) !important;
}
.option-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Hints/Powerups Section */
.hints-container {
  display: flex;
  justify-content: space-around;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.hint-btn {
  flex: 1;
  background: rgba(18, 24, 41, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  padding: 8px;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.hint-btn:hover:not(:disabled) {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold-primary);
}
.hint-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.hint-icon {
  font-size: 1.1rem;
  color: var(--gold-light);
}
.hint-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-light);
}
.hint-cost {
  font-size: 0.6rem;
  color: var(--gold-light);
  font-weight: 700;
}

/* Result Screen */
.result-box {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 10px 0;
}
.result-badge {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-light) 0%, var(--gold-primary) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  color: var(--primary-navy);
  box-shadow: var(--shadow-gold);
  margin-bottom: 16px;
  animation: logoPulse 2s infinite;
}
.result-badge.fail {
  background: radial-gradient(circle, var(--danger-glow) 0%, var(--danger-red) 100%);
  box-shadow: 0 0 15px rgba(217, 4, 41, 0.4);
  color: var(--white);
}
.result-status {
  font-family: var(--font-accent);
  font-size: 1.5rem;
  color: var(--gold-light);
  margin-bottom: 8px;
}
.result-stars {
  font-size: 2.2rem;
  color: var(--gray-muted);
  letter-spacing: 6px;
  margin-bottom: 16px;
}
.result-stars .active-star {
  color: var(--gold-light);
  text-shadow: 0 0 10px var(--gold-glow);
}
.result-stats-card {
  background: var(--secondary-navy);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  width: 100%;
  max-width: 320px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.result-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.result-stat-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  font-family: var(--font-display);
}
.result-stat-lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--gray-muted);
  margin-top: 4px;
}

/* Button UI */
.primary-btn {
  background: linear-gradient(135deg, var(--emerald-medium), var(--emerald-light));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 14px 24px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
  max-width: 320px;
  box-shadow: var(--shadow-emerald);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.primary-btn:hover {
  background: linear-gradient(135deg, var(--emerald-light), var(--emerald-glow));
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(22, 136, 85, 0.4);
}
.secondary-btn {
  background: transparent;
  border: var(--border-gold);
  border-radius: 12px;
  padding: 14px 24px;
  color: var(--gold-light);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
  max-width: 320px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.secondary-btn:hover {
  background: rgba(212, 175, 55, 0.1);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

/* Modal Overlay & Card styling */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-bg);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 24px;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  background: radial-gradient(circle at top, var(--emerald-dark) 0%, var(--secondary-navy) 100%);
  border: var(--border-gold);
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 350px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.active .modal-card {
  transform: scale(1);
}
.modal-icon {
  font-size: 3rem;
  color: var(--gold-light);
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(243, 198, 35, 0.4);
}
.modal-title {
  font-size: 1.35rem;
  color: var(--white);
  margin-bottom: 8px;
  font-family: var(--font-accent);
}
.modal-body {
  font-size: 0.9rem;
  color: var(--gray-light);
  line-height: 1.45;
  margin-bottom: 20px;
}
.modal-close-btn {
  margin-top: 10px;
}

/* Leaderboard Board layout */
.leaderboard-title {
  text-align: center;
  font-family: var(--font-accent);
  color: var(--gold-light);
  font-size: 1.3rem;
  margin-bottom: 16px;
}
.leaderboard-list {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.leaderboard-item {
  background: var(--secondary-navy);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--gray-light);
}
.leaderboard-item.rank-1 .rank-badge {
  background: var(--gold-primary);
  color: var(--primary-navy);
  box-shadow: var(--shadow-gold);
}
.leaderboard-item.rank-2 .rank-badge {
  background: silver;
  color: var(--primary-navy);
}
.leaderboard-item.rank-3 .rank-badge {
  background: #CD7F32;
  color: var(--white);
}
.leaderboard-name {
  flex-grow: 1;
  font-size: 0.95rem;
  font-weight: 600;
}
.leaderboard-score {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold-light);
  font-size: 0.95rem;
}

/* Form inputs styling */
.form-group {
  margin-bottom: 16px;
  text-align: left;
}
.form-label {
  display: block;
  font-size: 0.8rem;
  color: var(--gold-light);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.text-input {
  width: 100%;
  background: rgba(18, 24, 41, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  padding: 12px;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}
.text-input:focus {
  border-color: var(--gold-light);
  box-shadow: var(--shadow-gold);
}

/* App Footer Styling */
.app-footer {
  text-align: center;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.65rem;
  color: var(--gray-muted);
  letter-spacing: 0.5px;
  background: rgba(10, 14, 26, 0.9);
  flex-shrink: 0;
}
.app-footer span {
  color: var(--gold-light);
  font-weight: 600;
}

/* Bottom Navigation Bar */
.bottom-nav {
  display: flex;
  background: var(--primary-navy);
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  padding: 6px 0;
  flex-shrink: 0;
}
.nav-item {
  flex: 1;
  background: none;
  border: none;
  color: var(--gray-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px;
  transition: var(--transition-smooth);
}
.nav-item:hover, .nav-item.active {
  color: var(--gold-light);
}
.nav-item i {
  font-size: 1.15rem;
}
.nav-item span {
  font-size: 0.65rem;
  font-weight: 500;
}

/* Certificate Canvas Hide */
#share-canvas {
  display: none;
}

/* Keyframes & Animations */
@keyframes logoPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
  }
}

@keyframes bossPulse {
  0% {
    box-shadow: 0 0 10px rgba(217, 4, 41, 0.3);
  }
  100% {
    box-shadow: 0 0 20px rgba(217, 4, 41, 0.7);
  }
}

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

@keyframes coinSpinAnim {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

/* Particle Canvas Effect */
#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* --- TOAST NOTIFICATIONS & CUSTOM CONFIRM STYLES --- */

/* Side-by-side Button Row for Custom Confirm Modals */
.modal-buttons-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  width: 100%;
  justify-content: center;
}

.modal-buttons-row .primary-btn,
.modal-buttons-row .secondary-btn {
  flex: 1;
  margin-bottom: 0;
  max-width: none;
  font-size: 0.9rem;
  padding: 10px 16px;
  height: auto;
}

.modal-buttons-row .primary-btn.destructive-btn {
  background: linear-gradient(135deg, var(--danger-red), var(--danger-glow));
  box-shadow: 0 0 15px rgba(217, 4, 41, 0.25);
}

.modal-buttons-row .primary-btn.destructive-btn:hover {
  background: linear-gradient(135deg, var(--danger-glow), #ff6b8b);
  box-shadow: 0 5px 15px rgba(255, 77, 109, 0.4);
}

/* Toast Container (contained within aspect-ratio app-container) */
.toast-container {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 380px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  background: rgba(18, 24, 41, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--white);
  font-size: 0.85rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-item.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-item.success {
  border-color: var(--emerald-glow);
  box-shadow: 0 0 15px rgba(30, 181, 114, 0.2);
}
.toast-item.success i {
  color: var(--emerald-glow);
  font-size: 1.1rem;
}

.toast-item.error {
  border-color: var(--danger-glow);
  box-shadow: 0 0 15px rgba(255, 77, 109, 0.2);
}
.toast-item.error i {
  color: var(--danger-glow);
  font-size: 1.1rem;
}

.toast-item.warning {
  border-color: var(--gold-light);
  box-shadow: 0 0 15px rgba(243, 198, 35, 0.2);
}
.toast-item.warning i {
  color: var(--gold-light);
  font-size: 1.1rem;
}

.toast-item.info {
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}
.toast-item.info i {
  color: var(--gold-primary);
  font-size: 1.1rem;
}

.toast-content {
  flex-grow: 1;
  line-height: 1.4;
  font-weight: 500;
}

