@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Analogous Color Palette: Red -> Pink -> Purple (Cheerful & Energetic) */
  --primary-red: #ff2a5f;
  --primary-red-hover: #e01b4c;
  --accent-pink: #ff6584;
  --accent-pink-light: #ff8fa3;
  --accent-magenta: #d926a9;
  --primary-purple: #7928ca;
  --primary-purple-light: #9f45f7;
  --deep-purple: #3a1078;
  --dark-bg: #130924;
  --dark-surface: #1e1035;
  --card-bg: rgba(43, 20, 72, 0.75);
  --card-border: rgba(255, 101, 132, 0.25);
  --card-glow: rgba(255, 42, 95, 0.15);

  /* Functional Colors */
  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.15);
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-error-bg: rgba(239, 68, 68, 0.15);
  --color-info: #38bdf8;

  /* Neutrals */
  --text-primary: #ffffff;
  --text-secondary: #f3d5f5;
  --text-muted: #bda2c7;
  --border-light: rgba(255, 255, 255, 0.12);

  /* Gradients */
  --gradient-main: linear-gradient(135deg, #ff2a5f 0%, #ff6584 45%, #7928ca 100%);
  --gradient-accent: linear-gradient(135deg, #ff6584 0%, #d926a9 50%, #9f45f7 100%);
  --gradient-purple-pink: linear-gradient(135deg, #7928ca 0%, #d926a9 60%, #ff2a5f 100%);
  --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  --gradient-silver: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
  --gradient-bronze: linear-gradient(135deg, #fdba74 0%, #c2410c 100%);
  --gradient-bg-mesh: radial-gradient(circle at 10% 20%, rgba(255, 42, 95, 0.2) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(121, 40, 202, 0.25) 0%, transparent 45%),
                      radial-gradient(circle at 50% 50%, rgba(217, 38, 169, 0.15) 0%, transparent 50%);

  /* Typography */
  --font-heading: 'Fredoka', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Transitions & Shadows */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(19, 9, 36, 0.4);
  --shadow-glow: 0 0 25px rgba(255, 42, 95, 0.35);
  --shadow-purple-glow: 0 0 25px rgba(121, 40, 202, 0.4);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--dark-bg);
  background-image: var(--gradient-bg-mesh);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  position: relative;
}

/* Floating Background Shapes */
.bg-ambient-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  animation: floatAmbient 12s ease-in-out infinite alternate;
}

.bg-ambient-shape.shape-1 {
  width: 350px;
  height: 350px;
  background: var(--primary-red);
  top: -50px;
  left: -50px;
}

.bg-ambient-shape.shape-2 {
  width: 400px;
  height: 400px;
  background: var(--primary-purple);
  bottom: -50px;
  right: -50px;
  animation-delay: -4s;
}

.bg-ambient-shape.shape-3 {
  width: 300px;
  height: 300px;
  background: var(--accent-magenta);
  top: 40%;
  left: 60%;
  animation-delay: -7s;
}

/* App Container */
#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.game-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(30, 16, 53, 0.8);
  border-bottom: 1px solid var(--card-border);
  padding: 0.75rem 1.5rem;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-glow);
  transform: rotate(-4deg);
  transition: transform var(--transition-fast);
}

.logo-brand:hover .logo-icon {
  transform: rotate(4deg) scale(1.08);
}

.logo-text h1 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text span {
  font-size: 0.72rem;
  color: var(--accent-pink-light);
  font-weight: 600;
  letter-spacing: 0.5px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  background: rgba(255, 101, 132, 0.15);
  color: var(--text-primary);
  border-color: rgba(255, 101, 132, 0.3);
}

.nav-btn.active {
  background: var(--gradient-accent);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(217, 38, 169, 0.4);
}

.user-status-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(58, 16, 120, 0.6);
  border: 1px solid rgba(255, 101, 132, 0.3);
  padding: 0.35rem 0.8rem 0.35rem 0.5rem;
  border-radius: var(--radius-full);
}

.user-avatar-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

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

.user-name-tag {
  font-weight: 700;
  font-size: 0.85rem;
  color: #ffffff;
}

.user-score-tag {
  font-size: 0.75rem;
  color: var(--accent-pink-light);
  font-weight: 600;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: rgba(255, 42, 95, 0.2);
  color: var(--text-primary);
  border-color: var(--accent-pink);
  transform: scale(1.05);
}

/* Main Content Area */
.main-viewport {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  box-sizing: border-box;
}

/* Page Views System */
.view-section {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.view-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Card Component */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-main);
  opacity: 0.8;
}

/* Buttons */
.btn-primary {
  background: var(--gradient-main);
  color: #ffffff;
  border: none;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 30px rgba(255, 42, 95, 0.6);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 101, 132, 0.2);
  border-color: var(--accent-pink);
  transform: translateY(-2px);
}

.btn-purple {
  background: var(--gradient-purple-pink);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-purple-glow);
}

.btn-purple:hover {
  box-shadow: 0 0 30px rgba(121, 40, 202, 0.6);
}

/* =========================================
   LOGIN SCREEN (MINIMALIST & CENTERED)
   ========================================= */
.login-single-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(85vh - 80px);
  padding: 1.5rem 1rem;
}

.login-card {
  max-width: 440px;
  width: 100%;
  padding: 2.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 0 25px rgba(255, 42, 95, 0.2);
  border: 1.5px solid var(--card-border);
}

.login-logo-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
}

.large-logo-icon {
  width: 58px;
  height: 58px;
  font-size: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 25px rgba(255, 42, 95, 0.5);
}

.login-brand-title h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.login-brand-title span {
  font-size: 0.8rem;
  color: var(--accent-pink-light);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: block;
  margin-top: 0.25rem;
}

.login-header-text {
  text-align: center;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
}

.login-header-text h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: #fff;
  font-weight: 600;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 1rem;
  font-size: 1.1rem;
  color: var(--accent-pink);
  pointer-events: none;
}

.form-control {
  width: 100%;
  background: rgba(19, 9, 36, 0.8);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: #fff;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-red);
  box-shadow: 0 0 16px rgba(255, 42, 95, 0.3);
  background: rgba(25, 12, 48, 0.95);
}

.form-control::placeholder {
  color: rgba(189, 162, 199, 0.5);
}

/* =========================================
   DASHBOARD / MISSION SELECTOR
   ========================================= */
.dashboard-header {
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.welcome-box h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: #fff;
}

.welcome-box h2 span {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.overall-progress-card {
  background: rgba(58, 16, 120, 0.4);
  border: 1px solid var(--card-border);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.progress-circular-info {
  display: flex;
  flex-direction: column;
}

.progress-circular-info span:first-child {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.progress-circular-info span:last-child {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-pink-light);
}

.progress-bar-container {
  width: 140px;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-main);
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* Missions Grid */
.missions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.mission-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.mission-card:hover:not(.mission-locked) {
  transform: translateY(-6px);
  border-color: var(--accent-pink);
  box-shadow: 0 12px 30px rgba(255, 42, 95, 0.25);
}

.mission-card.mission-locked {
  opacity: 0.6;
  filter: grayscale(0.4);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(30, 16, 53, 0.5);
  cursor: not-allowed;
}

.mission-card.mission-locked:hover {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mission-icon-box.icon-locked {
  background: rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
  filter: grayscale(1);
}

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

.shake-anim {
  animation: shake 0.4s ease-in-out !important;
}

.mission-card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.mission-card-badge.status-completed {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.mission-card-badge.status-unlocked {
  background: rgba(255, 101, 132, 0.15);
  color: var(--accent-pink-light);
  border: 1px solid rgba(255, 101, 132, 0.35);
}

.mission-card-badge.status-locked {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mission-icon-box {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: var(--gradient-main);
  box-shadow: var(--shadow-glow);
}

.mission-content h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.mission-content p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.mission-meta-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.mission-points-tag {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #fbbf24;
  font-weight: 700;
}

.mission-stars {
  display: flex;
  gap: 0.15rem;
  font-size: 0.9rem;
}

/* =========================================
   MISSION GAMEPLAY ARENA
   ========================================= */
.mission-arena {
  max-width: 860px;
  margin: 0 auto;
}

.arena-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.back-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.back-btn:hover {
  background: rgba(255, 101, 132, 0.2);
  color: #fff;
  border-color: var(--accent-pink);
}

.arena-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-chip {
  background: rgba(58, 16, 120, 0.6);
  border: 1px solid var(--card-border);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.arena-progress-line {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.arena-progress-fill {
  height: 100%;
  background: var(--gradient-main);
  transition: width 0.3s ease;
}

.interactive-scenario-box {
  background: rgba(19, 9, 36, 0.6);
  border: 1px solid rgba(255, 101, 132, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.scenario-tag {
  display: inline-block;
  background: var(--gradient-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.scenario-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.scenario-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Interactive Simulation Widgets (e.g. Fake Social Post, Phishing Email, Password Builder) */
.simulation-widget {
  background: rgba(30, 16, 53, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
  box-shadow: var(--shadow-sm);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.post-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-purple-pink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-author h4 {
  font-size: 0.9rem;
  color: #fff;
}

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

.post-body {
  font-size: 0.92rem;
  color: #f1f5f9;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-pink);
  margin-bottom: 0.75rem;
}

.post-highlight {
  background: rgba(255, 42, 95, 0.25);
  color: #ff8fa3;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-weight: 600;
}

/* Question & Answer Options */
.answers-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.answer-option-btn {
  background: rgba(58, 16, 120, 0.4);
  border: 1.5px solid var(--card-border);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: all var(--transition-fast);
}

.answer-option-btn:hover:not(:disabled) {
  background: rgba(255, 101, 132, 0.2);
  border-color: var(--accent-pink);
  transform: translateX(4px);
}

.answer-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.answer-option-btn.correct {
  background: var(--color-success-bg) !important;
  border-color: var(--color-success) !important;
  color: #a7f3d0 !important;
}

.answer-option-btn.correct .answer-letter {
  background: var(--color-success);
  color: #064e3b;
}

.answer-option-btn.wrong {
  background: var(--color-error-bg) !important;
  border-color: var(--color-error) !important;
  color: #fca5a5 !important;
}

.answer-option-btn.wrong .answer-letter {
  background: var(--color-error);
  color: #450a0a;
}

/* Explanation & Feedback box */
.feedback-box {
  display: none;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  animation: fadeIn 0.3s ease;
}

.feedback-box.correct {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--color-success);
  color: #ecfdf5;
}

.feedback-box.wrong {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--color-error);
  color: #fef2f2;
}

.feedback-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.feedback-text {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.arena-controls {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

/* Mini Password Strength Game Widget in Mission 2 */
.pw-tester-widget {
  background: rgba(19, 9, 36, 0.85);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
}

.pw-input-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.pw-checklist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
}

.pw-req-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
}

.pw-req-item.met {
  color: var(--color-success);
  font-weight: 600;
}

/* Mission Completion Modal / Screen */
.completion-banner {
  text-align: center;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.victory-trophy {
  font-size: 4.5rem;
  animation: victoryBounce 1s infinite alternate ease-in-out;
}

.completion-banner h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.completion-score-badge {
  background: rgba(255, 42, 95, 0.2);
  border: 1px solid var(--accent-pink);
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

/* =========================================
   TOP CHART / LEADERBOARD
   ========================================= */
.leaderboard-container {
  max-width: 900px;
  margin: 0 auto;
}

.leaderboard-header {
  text-align: center;
  margin-bottom: 2rem;
}

.leaderboard-header h2 {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  color: #fff;
}

.leaderboard-header h2 span {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.leaderboard-header p {
  color: var(--text-secondary);
}

/* Podium Top 3 */
.podium-section {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding: 0 1rem;
}

.podium-card {
  background: rgba(43, 20, 72, 0.65);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1.25rem 1rem;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--card-border);
}

.podium-card.rank-1 {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.2) 0%, rgba(43, 20, 72, 0.9) 100%);
  border-color: #fbbf24;
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.3);
  height: 240px;
  justify-content: flex-end;
}

.podium-card.rank-2 {
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.15) 0%, rgba(43, 20, 72, 0.9) 100%);
  border-color: #cbd5e1;
  height: 200px;
  justify-content: flex-end;
}

.podium-card.rank-3 {
  background: linear-gradient(180deg, rgba(253, 186, 116, 0.15) 0%, rgba(43, 20, 72, 0.9) 100%);
  border-color: #fdba74;
  height: 180px;
  justify-content: flex-end;
}

.podium-crown {
  position: absolute;
  top: -24px;
  font-size: 1.8rem;
  animation: floatAmbient 2.5s infinite alternate ease-in-out;
}

.podium-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.podium-card.rank-1 .podium-avatar {
  width: 58px;
  height: 58px;
  border: 2px solid #fbbf24;
}

.podium-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.podium-nim {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.podium-score {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-pink-light);
  margin-top: 0.35rem;
}

.podium-badge-number {
  position: absolute;
  bottom: 0.5rem;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  opacity: 0.25;
  color: #fff;
}

/* Leaderboard List Table */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.leaderboard-row {
  background: rgba(30, 16, 53, 0.7);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition-fast);
}

.leaderboard-row:hover {
  background: rgba(58, 16, 120, 0.6);
  border-color: var(--card-border);
  transform: translateX(4px);
}

.leaderboard-row.current-user {
  background: rgba(255, 42, 95, 0.15);
  border: 1.5px solid var(--primary-red);
  box-shadow: 0 0 16px rgba(255, 42, 95, 0.25);
}

.rank-index {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-pink-light);
  text-align: center;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.player-avatar {
  font-size: 1.3rem;
}

.player-details h4 {
  font-size: 0.95rem;
  color: #fff;
}

.player-details span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.player-badges {
  display: flex;
  gap: 0.25rem;
  font-size: 1rem;
}

.player-final-score {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fbbf24;
  text-align: right;
}

/* =========================================
   SCORE SUMMARY / REPORT CARD (KHS)
   ========================================= */
.report-container {
  max-width: 860px;
  margin: 0 auto;
}

.certificate-card {
  background: linear-gradient(135deg, rgba(43, 20, 72, 0.9) 0%, rgba(30, 16, 53, 0.95) 100%);
  border: 2px solid var(--accent-pink);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-glow);
  position: relative;
}

.cert-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-size: 8rem;
  opacity: 0.04;
  font-family: var(--font-heading);
  font-weight: 900;
  color: #fff;
  pointer-events: none;
  white-space: nowrap;
}

.cert-header {
  text-align: center;
  border-bottom: 2px dashed rgba(255, 101, 132, 0.3);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.cert-header h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: #fff;
  letter-spacing: -0.5px;
}

.cert-header p {
  color: var(--accent-pink-light);
  font-size: 0.95rem;
  font-weight: 600;
}

.cert-student-meta {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1rem;
  background: rgba(19, 9, 36, 0.6);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
}

.meta-item {
  text-align: center;
}

.meta-item span:first-child {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.meta-item span:last-child {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

/* Grade Grade Grade Display */
.grade-showcase {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  align-items: center;
  background: rgba(58, 16, 120, 0.3);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.grade-badge-huge {
  text-align: center;
  background: var(--gradient-main);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  box-shadow: var(--shadow-glow);
}

.grade-badge-huge .letter {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.grade-badge-huge .predicate {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffe4e6;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.competency-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comp-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.comp-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.comp-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.comp-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gradient-accent);
}

/* Mission Breakdown Table */
.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.breakdown-table th {
  background: rgba(19, 9, 36, 0.8);
  color: var(--accent-pink-light);
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.breakdown-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.breakdown-table tr:hover td {
  background: rgba(255, 101, 132, 0.05);
}

.cert-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* =========================================
   TOAST / MODAL SYSTEM
   ========================================= */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: rgba(30, 16, 53, 0.95);
  border-left: 4px solid var(--primary-red);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideInRight 0.3s ease;
}

/* Team Management & Table Styles for Misi 1 */
.team-table-card {
  margin-top: 1.5rem;
}

.custom-game-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 1rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.custom-game-table th {
  background: rgba(30, 16, 53, 0.95);
  color: var(--accent-pink-light);
  padding: 1rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(255, 42, 95, 0.3);
}

.custom-game-table td {
  padding: 1rem 1.25rem;
  background: rgba(30, 16, 53, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 0.95rem;
  vertical-align: middle;
}

.custom-game-table tr:hover td {
  background: rgba(255, 42, 95, 0.08);
}

.custom-game-table tr.captain-row td {
  background: rgba(255, 42, 95, 0.15);
  font-weight: 600;
  border-bottom: 2px solid rgba(255, 42, 95, 0.3);
}

.badge-role {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-role.captain {
  background: linear-gradient(135deg, #ff2a5f, #d926a9);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 42, 95, 0.4);
}

.badge-role.member {
  background: rgba(121, 40, 202, 0.25);
  border: 1px solid rgba(159, 69, 247, 0.4);
  color: var(--text-secondary);
}

.btn-delete-row {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-delete-row:hover {
  background: var(--color-error);
  color: #fff;
  transform: scale(1.05);
}

.btn-finish-mission {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 1rem 2.2rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  transition: all var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-finish-mission:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.6);
}

.btn-finish-mission:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Modal Popup Styles */
.modal-backdrop-custom {
  position: fixed;
  inset: 0;
  background: rgba(10, 4, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.25s ease-out;
}

.modal-content-custom {
  background: rgba(30, 16, 53, 0.95);
  border: 1px solid rgba(255, 101, 132, 0.4);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 42, 95, 0.3);
  animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Print Stylesheet for Report Card */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .game-header, .nav-links, .cert-actions, .bg-ambient-shape, .back-btn, #btn-print-report {
    display: none !important;
  }
  .certificate-card {
    border: 2px solid #000 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #000 !important;
  }
  .cert-header h2, .cert-header p, .meta-item span, .breakdown-table td, .breakdown-table th {
    color: #000 !important;
  }
}

/* =========================================
   RESPONSIVENESS
   ========================================= */
@media (max-width: 900px) {
  .login-hero-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .login-banner {
    text-align: center;
    align-items: center;
  }
  .login-banner h2 {
    font-size: 2.2rem;
  }
  .podium-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .podium-card {
    height: auto !important;
    border-radius: var(--radius-lg);
  }
  .grade-showcase {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .nav-text-label {
    display: none;
  }
  .nav-btn {
    padding: 0.5rem;
  }
  .user-name-tag {
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .missions-grid {
    grid-template-columns: 1fr;
  }
  .certificate-card {
    padding: 1.25rem;
  }
}

/* ==========================================================================
   Secret Admin Trigger & Master Modal Styles
   Dikembangkan Oleh: TeFa MIK Ngawi
   ========================================================================== */
.btn-secret-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 4px;
  vertical-align: middle;
  opacity: 0.18;
  font-size: 0.8rem;
  transition: opacity 0.25s ease, transform 0.25s ease;
  color: inherit;
  border-radius: 4px;
}

.btn-secret-trigger:hover,
.btn-secret-trigger:focus {
  opacity: 0.9;
  transform: scale(1.25);
  background: rgba(255, 101, 132, 0.2);
}

.btn-corner-secret {
  position: fixed;
  bottom: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.22;
  transition: all 0.25s ease;
  z-index: 99;
}

.btn-corner-secret:hover {
  opacity: 0.95;
  background: rgba(255, 101, 132, 0.25);
  border-color: rgba(255, 101, 132, 0.5);
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(255, 101, 132, 0.4);
}

.corner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 3, 16, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 9999;
}

.admin-auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(30, 14, 52, 0.95);
  border: 1.5px solid rgba(255, 101, 132, 0.35);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 42, 95, 0.2);
}

.admin-auth-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.75px;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 42, 95, 0.15);
  color: var(--accent-pink-light);
  border: 1px solid rgba(255, 42, 95, 0.3);
}

.btn-eye-toggle {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-eye-toggle:hover {
  opacity: 1 !important;
  transform: translateY(-50%) scale(1.15) !important;
}
