:root {
  --bg-dark: #06060f;
  --bg-secondary: #0d0d1a;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-glow: rgba(99, 102, 241, 0.15);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  
  --font-family: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 8px;
  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 20px;
  --space-xl: 28px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  justify-content: center;
}

/* Ambient Background elements */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: -2;
}

.bg-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.45;
  pointer-events: none;
  animation: floatGlow 15s infinite alternate ease-in-out;
}

.bg-glow--primary {
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
  top: -10%;
  right: -10%;
}

.bg-glow--secondary {
  background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
  bottom: -10%;
  left: -10%;
  animation-delay: -5s;
}

@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 40px) scale(1.1); }
}

/* App Core Layout (iOS/Android Native Frame style) */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: rgba(6, 6, 15, 0.7);
  backdrop-filter: blur(30px);
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
  position: relative;
  padding-bottom: 74px; /* Space for bottom nav */
}

/* Header style */
.app-header {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  background: rgba(13, 13, 26, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-icon {
  font-size: 24px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px var(--accent-primary));
}

.logo-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(to right, #ffffff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-subtitle {
  font-size: 11px;
  color: var(--accent-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-stats {
  display: flex;
  gap: var(--space-xs);
}

.header-stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.header-stat-item.streak-active {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.05);
}

.flame-icon {
  animation: pulseFlame 1s infinite alternate;
}

@keyframes pulseFlame {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px #f59e0b); }
  100% { transform: scale(1.15); filter: drop-shadow(0 0 6px #f97316); }
}

.xp-unit {
  font-size: 9px;
  color: var(--text-secondary);
  margin-left: 2px;
}

/* Main Container and Pages */
.app-main {
  flex-grow: 1;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
}

.app-page {
  display: none;
  flex-direction: column;
  flex-grow: 1;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-page.active {
  display: flex;
}

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

/* Premium Card and Bento Styling */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: var(--space-md);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.card-header {
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 8px;
}

.card-header h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

/* Circular Dashboard progress */
.study-dashboard {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(139, 92, 246, 0.04));
}

.dashboard-chart {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.circular-progress {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-primary) 0deg, rgba(255,255,255,0.05) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
  transition: background 0.3s ease;
}

.circular-progress::before {
  content: '';
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #0b0b16;
}

.progress-val {
  position: relative;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.dashboard-info h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.dashboard-info p {
  font-size: 11px;
  color: var(--text-secondary);
}

/* XP Level Bar */
.xp-level-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.xp-bar-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
  border-radius: 3px;
  box-shadow: 0 0 8px var(--accent-primary);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.xp-level-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* 3D Flip Card Container */
.anki-card-container {
  perspective: 1000px;
  height: 320px;
  margin-bottom: var(--space-md);
  position: relative;
}

.anki-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.15);
  cursor: pointer;
}

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

.anki-card.swiping-right {
  transform: translate3d(120px, -20px, 0) rotate(15deg) rotateY(180deg);
  opacity: 0;
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.anki-card.swiping-left {
  transform: translate3d(-120px, -20px, 0) rotate(-15deg) rotateY(180deg);
  opacity: 0;
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.card-side {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--card-border);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Card Glow overlays depending on mastery status */
.anki-card-container::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 0 30px transparent;
  pointer-events: none;
  z-index: 10;
  transition: all 0.3s ease;
}

.anki-card-container.glow-right::before {
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.25);
  border: 2px solid var(--color-success);
}

.anki-card-container.glow-left::before {
  box-shadow: 0 0 40px rgba(239, 104, 104, 0.25);
  border: 2px solid var(--color-error);
}

.card-front {
  background: radial-gradient(circle at 50% 30%, rgba(25, 25, 50, 0.9), rgba(10, 10, 24, 0.95));
  align-items: center;
  justify-content: center;
  text-align: center;
}

.card-back {
  background: radial-gradient(circle at 50% 30%, rgba(13, 13, 30, 0.95), rgba(6, 6, 15, 0.98));
  transform: rotateY(180deg);
  text-align: left;
}

.card-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.due-badge-indicator {
  right: auto;
  left: 18px;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
  display: none;
}

.card-main-content {
  margin: auto;
}

.card-word {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.card-kana {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.card-instruction {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: auto;
}

.card-actions-row {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.action-btn-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.02);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.action-btn-circle:hover {
  background: rgba(255,255,255,0.06);
  transform: scale(1.05);
}

/* Card Back Contents */
.card-back-scrollable {
  flex-grow: 1;
  width: 100%;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: var(--space-md);
}

.card-back-scrollable::-webkit-scrollbar {
  width: 4px;
}

.card-back-scrollable::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 2px;
}

.card-back-translation {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.card-section {
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.card-definition {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.6;
}

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

.lang-selector-pills {
  display: flex;
  gap: 3px;
}

.lang-selector-pills .pill {
  border: none;
  background: rgba(255,255,255,0.02);
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-selector-pills .pill.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

.card-example {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  border-left: 2px solid var(--accent-primary);
  padding-left: 8px;
  font-style: italic;
}

/* SRS feedback buttons row */
.srs-actions-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.srs-btn {
  flex: 1;
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-weight: 700;
  font-size: 12px;
  transition: all 0.2s ease;
  background: rgba(255,255,255,0.01);
}

.srs-btn small {
  font-size: 8px;
  font-weight: 500;
  color: var(--text-muted);
}

.srs-btn--forget {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.15);
}
.srs-btn--forget:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.35);
}

.srs-btn--medium {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.15);
}
.srs-btn--medium:hover {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.35);
}

.srs-btn--know {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.15);
}
.srs-btn--know:hover {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
}

/* Commute Mode Panel styling */
.commute-mode-panel {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(13, 13, 26, 0.4) 100%);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.panel-title-group {
  display: flex;
  gap: var(--space-sm);
}

.panel-icon {
  font-size: 20px;
  color: var(--accent-primary);
  animation: pulseHeadphone 2s infinite alternate ease-in-out;
}

@keyframes pulseHeadphone {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px var(--accent-primary)); }
  100% { transform: scale(1.1); filter: drop-shadow(0 0 6px var(--accent-primary)); }
}

.panel-title-group h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.panel-title-group p {
  font-size: 10px;
  color: var(--text-secondary);
}

.btn {
  border: none;
  font-family: var(--font-family);
  font-weight: 700;
  border-radius: var(--border-radius-md);
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background: rgba(255,255,255,0.03);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.06);
}

.panel-body {
  margin-top: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.control-row label {
  color: var(--text-secondary);
  font-weight: 600;
}

.tab-group {
  display: flex;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--card-border);
  padding: 2px;
  border-radius: 12px;
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--accent-primary);
  color: #fff;
}

.playing-indicator {
  color: #34d399;
  font-weight: 700;
  font-size: 10px;
}

/* PAGE 2: Match Game Connection Board */
.game-intro-card {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  margin-top: 24px;
}

.game-intro-card h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.game-intro-card p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.game-board-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex-grow: 1;
}

.game-board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  flex-grow: 1;
}

.game-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  min-height: 80px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.game-item.selected {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

.game-item.correct {
  border-color: var(--color-success);
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
  opacity: 0.3;
  pointer-events: none;
  transform: scale(0.95);
}

.game-item.incorrect {
  border-color: var(--color-error);
  background: rgba(239, 68, 68, 0.1);
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* PAGE 3: Stats styling */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 12px 6px;
}

.stat-label {
  font-size: 9px;
  color: var(--text-secondary);
  font-weight: 700;
}

.stat-number {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.box-distribution {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.box-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 24px;
  align-items: center;
  gap: var(--space-sm);
  font-size: 11px;
  font-weight: 600;
}

.box-bar-row span:first-child {
  color: var(--text-secondary);
}

.box-bar-bg {
  height: 8px;
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
  overflow: hidden;
}

.box-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.box-bar-fill.box-bar--red { background: var(--color-error); }
.box-bar-fill.box-bar--yellow { background: var(--color-warning); }
.box-bar-fill.box-bar--green { background: var(--color-success); }

/* PagerDuty Incident simulate card */
.alert-simulator-card {
  border-color: rgba(239, 68, 68, 0.15);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.02), rgba(13, 13, 26, 0.2));
}

.simulator-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.alarm-bell {
  animation: ringAlarm 0.8s infinite alternate ease-in-out;
}

@keyframes ringAlarm {
  0% { transform: rotate(0) scale(1); }
  50% { transform: rotate(-8deg) scale(1.1); }
  100% { transform: rotate(8deg) scale(1.1); }
}

.simulator-body p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}

/* Bottom Navigation Bar */
.app-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: rgba(13, 13, 26, 0.9);
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.nav-item {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-icon {
  font-size: 20px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-label {
  font-size: 9px;
  font-weight: 700;
}

.nav-item.active {
  color: var(--accent-primary);
}

.nav-item.active .nav-icon {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 4px var(--accent-primary));
}

/* Level Up Popover */
.level-up-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.level-up-overlay.active {
  display: flex;
}

.level-up-dialog {
  text-align: center;
  max-width: 320px;
  animation: scaleUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUp {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.level-up-badge {
  font-size: 64px;
  margin-bottom: var(--space-md);
  animation: pulseRotate 2s infinite alternate ease-in-out;
}

@keyframes pulseRotate {
  0% { transform: scale(1) rotate(-5deg); }
  100% { transform: scale(1.15) rotate(5deg); }
}

.level-up-title {
  font-size: 24px;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.level-up-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.level-up-rank {
  font-size: 32px;
  font-weight: 900;
  background: linear-gradient(135deg, #fff, var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* PagerDuty Notification Style Toast */
.pd-alert {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  background: #110404;
  border: 2px solid #ef4444;
  border-radius: var(--border-radius-md);
  box-shadow: 0 15px 30px rgba(239, 68, 68, 0.25);
  z-index: 2000;
  animation: slideUpIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes slideUpIn {
  from { transform: translate(-50%, -20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.pd-alert-header {
  background: #ef4444;
  color: #fff;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.close-alert-btn {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.pd-alert-body {
  padding: var(--space-md);
  text-align: left;
}

.pd-alert-body h4 {
  font-size: 13px;
  color: #fff;
  font-weight: 700;
  margin-bottom: 4px;
}

.pd-alert-body p {
  font-size: 11px;
  color: #fca5a5;
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.pd-alert-action-btn {
  width: 100%;
  border: none;
  background: #ef4444;
  color: #fff;
  padding: 10px;
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pd-alert-action-btn:hover {
  background: #dc2626;
}

/* Custom UI Elements: Toast Notification */
.toast-alert {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(13, 13, 26, 0.95);
  border: 1px solid var(--card-border);
  padding: 8px 20px;
  border-radius: 20px;
  z-index: 1000;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

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

.toast-alert--success { border-color: var(--color-success); color: #34d399; }
.toast-alert--info { border-color: var(--accent-primary); color: #818cf8; }
.toast-alert--warning { border-color: var(--color-warning); color: #fbbf24; }
