/**
 * Yggdrasil Cosmos - Full Screen Immersive Experience
 * No columns, no scroll - pure 3D cosmos with sliding panel overlays
 *
 * Design System: Uses design-tokens.css for phi-based spacing, typography, z-index
 */

@import url('./design-tokens.css');

/* ============================================
   CSS VARIABLES (Legacy aliases → use tokens)
   ============================================ */
:root {
  /* Legacy aliases - migrate to design tokens gradually */
  --ygg-fire: var(--color-fire);
  --ygg-fire-glow: var(--color-fire-glow);
  --ygg-ice: var(--color-ice);
  --ygg-ice-glow: var(--color-ice-glow);
  --ygg-bg: var(--color-bg-primary);

  /* Panel padding uses token */
  --panel-padding: var(--space-lg);
}

/* ============================================
   FULL SCREEN COSMOS CONTAINER
   ============================================ */
.yggdrasil-cosmos {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--ygg-bg);
  z-index: var(--z-base);
}

.yggdrasil-cosmos canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: var(--z-base);
  cursor: grab;
}

.yggdrasil-cosmos canvas:active {
  cursor: grabbing;
}

/* Hide backgrounds when cosmos is active */
body:has(.yggdrasil-cosmos) .yggdrasil-bg,
body:has(.yggdrasil-cosmos) .nordic-mist,
body:has(.yggdrasil-cosmos) .floating-symbols,
body:has(.yggdrasil-cosmos) .viking-spirits {
  display: none;
}

/* ============================================
   LOADING STATE - Branded Fire Animation
   ============================================ */
.ygg-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--ygg-bg);
  z-index: var(--z-overlay);
  transition: opacity var(--duration-slower) var(--ease-out);
  overflow: hidden;
}

.ygg-loading.fade-out {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* Fire emblem with glow */
.ygg-loading-emblem {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: var(--space-xl);
}

.ygg-loading-fire {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  animation: fire-pulse 1.618s ease-in-out infinite;
  filter: drop-shadow(0 0 20px var(--color-fire-glow));
}

.ygg-loading-ring {
  position: absolute;
  inset: 0;
  border: 2px solid var(--color-fire);
  border-radius: var(--radius-full);
  opacity: 0.3;
  animation: ring-expand 2.618s ease-out infinite;
}

.ygg-loading-ring:nth-child(2) {
  animation-delay: 0.618s;
}

.ygg-loading-ring:nth-child(3) {
  animation-delay: 1.236s;
}

@keyframes fire-pulse {
  0%,
  100% {
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 0 20px var(--color-fire-glow)) brightness(1);
  }
  50% {
    transform: scale(1.08) translateY(-4px);
    filter: drop-shadow(0 0 30px var(--color-fire-glow)) brightness(1.2);
  }
}

@keyframes ring-expand {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* Particles rising */
.ygg-loading-particles {
  position: absolute;
  bottom: 40%;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  pointer-events: none;
}

.ygg-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--color-fire);
  border-radius: var(--radius-full);
  animation: particle-rise 2s ease-out infinite;
  opacity: 0;
}

.ygg-particle:nth-child(1) {
  left: 20%;
  animation-delay: 0s;
}
.ygg-particle:nth-child(2) {
  left: 35%;
  animation-delay: 0.3s;
}
.ygg-particle:nth-child(3) {
  left: 50%;
  animation-delay: 0.1s;
}
.ygg-particle:nth-child(4) {
  left: 65%;
  animation-delay: 0.5s;
}
.ygg-particle:nth-child(5) {
  left: 80%;
  animation-delay: 0.2s;
}
.ygg-particle:nth-child(6) {
  left: 25%;
  animation-delay: 0.7s;
}
.ygg-particle:nth-child(7) {
  left: 55%;
  animation-delay: 0.4s;
}
.ygg-particle:nth-child(8) {
  left: 75%;
  animation-delay: 0.6s;
}

@keyframes particle-rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-150px) scale(0);
    opacity: 0;
  }
}

/* Loading text */
.ygg-loading-text {
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

/* Progress bar */
.ygg-loading-bar {
  width: 200px;
  height: 3px;
  background: var(--color-bg-hover);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.ygg-loading-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--color-fire), var(--color-fire-light));
  border-radius: var(--radius-sm);
  animation: loading-sweep 1.618s var(--ease-in-out) infinite;
  box-shadow: 0 0 10px var(--color-fire-glow);
}

@keyframes loading-sweep {
  0% {
    width: 0%;
    margin-left: 0%;
  }
  50% {
    width: 40%;
    margin-left: 30%;
  }
  100% {
    width: 0%;
    margin-left: 100%;
  }
}

/* Legacy icon support (fallback) */
.ygg-loading-icon {
  font-size: 64px;
  margin-bottom: var(--space-lg);
  animation: fire-pulse 1.618s ease-in-out infinite;
  filter: drop-shadow(0 0 20px var(--color-fire-glow));
}

/* ============================================
   SLIDING PANEL OVERLAYS
   ============================================ */
.ygg-panel-overlay {
  position: fixed;
  top: 0;
  height: 100vh;
  width: var(--panel-width);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  z-index: var(--z-overlay);
  transition: transform var(--duration-slow) var(--ease-in-out);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Left panel - Tracks */
.ygg-panel-overlay.ygg-panel-left {
  left: 0;
  transform: translateX(-100%);
  border-left: none;
  border-right: 1px solid rgba(255, 100, 50, 0.2);
}

.ygg-panel-overlay.ygg-panel-left.open {
  transform: translateX(0);
}

/* Right panel - Profile */
.ygg-panel-overlay.ygg-panel-right {
  right: 0;
  transform: translateX(100%);
  border-right: none;
  border-left: 1px solid rgba(100, 200, 255, 0.2);
}

.ygg-panel-overlay.ygg-panel-right.open {
  transform: translateX(0);
}

/* Panel header */
.ygg-panel-header {
  padding: var(--panel-padding);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ygg-panel-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--color-text-inverse);
}

.ygg-panel-close {
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  background: var(--color-bg-hover);
  border: none;
  border-radius: var(--radius-full);
  color: var(--color-text-tertiary);
  font-size: var(--text-lg);
  cursor: pointer;
  transition: var(--transition-colors), var(--transition-transform);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ygg-panel-close:hover {
  background: var(--color-error-bg);
  color: var(--color-error);
  transform: scale(1.05);
}

/* Panel content */
.ygg-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--panel-padding);
}

/* ============================================
   PANEL TOGGLE BUTTONS (Corner Icons)
   ============================================ */
.ygg-toggle-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: var(--touch-target-comfortable);
  height: var(--touch-target-comfortable);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--color-text-primary);
  font-size: var(--text-xl);
  cursor: pointer;
  z-index: var(--z-sticky);
  transition: var(--transition-all);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ygg-toggle-btn:hover {
  transform: translateY(-50%) scale(1.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.ygg-toggle-btn.left {
  left: var(--space-md);
}

.ygg-toggle-btn.right {
  right: var(--space-md);
}

.ygg-toggle-btn.left:hover {
  box-shadow: 0 0 20px var(--ygg-fire-glow);
}

.ygg-toggle-btn.right:hover {
  box-shadow: 0 0 20px var(--ygg-ice-glow);
}

/* Hide toggle when panel is open */
.ygg-panel-overlay.ygg-panel-left.open ~ .ygg-toggle-btn.left,
.ygg-panel-overlay.ygg-panel-right.open ~ .ygg-toggle-btn.right {
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   COSMOS PANEL - Project Details Slide-in
   ============================================ */
.cosmos-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 340px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-bg-elevated), rgba(5, 10, 20, 0.98));
  border-left: 1px solid rgba(255, 100, 50, 0.2);
  transform: translateX(100%);
  transition: transform var(--duration-slow) var(--ease-in-out);
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column;
  font-family:
    'Inter',
    -apple-system,
    sans-serif;
  color: var(--color-text-secondary);
  overflow: hidden;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

.cosmos-panel.open {
  transform: translateX(0);
}

/* Panel close button */
.cosmos-panel .panel-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  background: var(--color-bg-hover);
  border: none;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  font-size: var(--text-2xl);
  cursor: pointer;
  transition: var(--transition-colors);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.cosmos-panel .panel-close:hover {
  background: var(--color-error-bg);
  color: var(--color-error);
}

/* Track indicator strip */
.cosmos-panel .panel-track-indicator {
  height: 4px;
  background: linear-gradient(90deg, var(--color-fire), var(--color-fire-light));
}

/* Panel header */
.cosmos-panel .panel-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-lg) var(--space-md);
}

/* Project icon */
.cosmos-panel .panel-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-fire), var(--color-fire-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow-fire);
}

/* Title group */
.cosmos-panel .panel-title-group {
  flex: 1;
  min-width: 0;
}

.cosmos-panel .panel-title {
  margin: 0 0 4px;
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
  line-height: var(--leading-tight);
}

.cosmos-panel .panel-track {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-fire-light);
}

/* Status bar */
.cosmos-panel .panel-status-bar {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-lg);
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

.cosmos-panel .panel-status {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cosmos-panel .panel-status .status-live {
  color: var(--color-success);
}

.cosmos-panel .panel-status .status-building {
  color: var(--color-warning);
}

.cosmos-panel .panel-kscore {
  font-size: var(--text-xs);
  color: var(--color-ice);
  font-weight: var(--font-semibold);
}

/* Description */
.cosmos-panel .panel-description {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  line-height: var(--leading-normal);
}

/* Content area */
.cosmos-panel .panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--space-lg) var(--space-lg);
}

/* Sections */
.cosmos-panel .panel-section {
  margin-bottom: var(--space-lg);
}

.cosmos-panel .panel-section h3 {
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-sm);
}

/* Action buttons container */
.cosmos-panel .panel-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Panel button */
.cosmos-panel .panel-btn {
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-bg-hover);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition:
    var(--transition-transform),
    box-shadow var(--duration-fast) var(--ease-out);
  text-align: center;
}

.cosmos-panel .panel-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 100, 50, 0.2);
}

.cosmos-panel .panel-btn.primary {
  background: linear-gradient(135deg, var(--color-fire), var(--color-fire-light));
  border-color: transparent;
}

/* Track-specific colors */
.cosmos-panel.track-dev .panel-track-indicator,
.cosmos-panel.track-dev .panel-icon {
  background: linear-gradient(90deg, var(--color-fire), var(--color-fire-light));
}

.cosmos-panel.track-games .panel-track-indicator,
.cosmos-panel.track-games .panel-icon {
  background: linear-gradient(90deg, var(--color-track-dev), #bb66ff);
}

.cosmos-panel.track-content .panel-track-indicator,
.cosmos-panel.track-content .panel-icon {
  background: linear-gradient(90deg, var(--color-ice), var(--color-success));
}

/* ============================================
   COSMOS ERROR - Error Boundary UI
   ============================================ */
.cosmos-error {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-bg-primary) 0%, #0a1628 100%);
  z-index: var(--z-modal);
  font-family:
    'Inter',
    -apple-system,
    sans-serif;
}

.cosmos-error .error-content {
  text-align: center;
  max-width: 400px;
  padding: var(--space-2xl);
  color: var(--color-text-secondary);
}

.cosmos-error .error-icon {
  color: var(--color-error);
  margin-bottom: var(--space-lg);
}

.cosmos-error .error-title {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
}

.cosmos-error .error-message {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  line-height: var(--leading-normal);
}

.cosmos-error .error-suggestion {
  margin: 0 0 var(--space-lg);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.cosmos-error .error-details {
  margin-bottom: var(--space-lg);
  text-align: left;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.cosmos-error .error-details pre {
  margin-top: var(--space-sm);
  padding: var(--space-sm);
  background: var(--color-error-bg);
  border-radius: var(--radius-sm);
  overflow: auto;
  max-height: 100px;
  font-size: var(--text-2xs);
  color: var(--color-error);
}

.cosmos-error .error-retry {
  padding: var(--space-sm) var(--space-lg);
  background: linear-gradient(135deg, var(--color-fire), var(--color-fire-light));
  border: none;
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition:
    var(--transition-transform),
    box-shadow var(--duration-fast) var(--ease-out);
}

.cosmos-error .error-retry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 68, 68, 0.4);
}

/* ============================================
   SECTION DIVIDERS & TITLES
   ============================================ */
.ygg-section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  margin: var(--space-lg) 0;
}

.ygg-section-title {
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-md);
}

/* ============================================
   QUIZ SECTION (Find Your Path)
   ============================================ */
.ygg-quiz-section {
  background: var(--color-fire-bg);
  border: 1px solid rgba(255, 69, 0, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.ygg-quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.ygg-quiz-title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text-inverse);
}

.ygg-quiz-step {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

.ygg-quiz-progress {
  height: 3px;
  background: var(--color-bg-hover);
  border-radius: var(--radius-xs);
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.ygg-quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ygg-fire), var(--color-fire-light));
  transition: width var(--duration-normal) ease;
}

.ygg-quiz-question {
  font-size: var(--text-base);
  color: var(--color-text-inverse);
  margin: 0 0 var(--space-md);
  line-height: var(--leading-snug);
}

.ygg-quiz-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.ygg-quiz-option {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  padding: var(--space-md) var(--space-md);
  background: var(--color-bg-hover);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  text-align: left;
}

.ygg-quiz-option:hover {
  background: rgba(255, 69, 0, 0.1);
  border-color: rgba(255, 69, 0, 0.3);
  transform: translateX(4px);
}

.ygg-quiz-option-icon {
  font-size: var(--text-lg);
  width: var(--space-lg);
  text-align: center;
}

.ygg-quiz-option-text {
  flex: 1;
}

/* Quiz Result */
.ygg-quiz-result {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.ygg-quiz-result-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.ygg-quiz-result-icon {
  font-size: var(--text-3xl);
}

.ygg-quiz-result-text {
  display: flex;
  flex-direction: column;
}

.ygg-quiz-result-label {
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-muted);
}

.ygg-quiz-result-track {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

.ygg-quiz-result-desc {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
  margin: 0 0 var(--space-md);
  line-height: var(--leading-snug);
}

.ygg-quiz-retake {
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  color: var(--color-text-tertiary);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.ygg-quiz-retake:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-border-strong);
  color: var(--color-text-inverse);
}

/* ============================================
   TRACKS LIST (Enhanced)
   ============================================ */
.ygg-tracks-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.ygg-track-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.ygg-track-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.ygg-track-card.recommended {
  border-color: rgba(255, 69, 0, 0.3);
  background: rgba(255, 69, 0, 0.05);
}

.ygg-track-card.active {
  border-color: var(--ygg-fire);
  background: rgba(255, 69, 0, 0.1);
}

.ygg-track-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.ygg-track-icon {
  font-size: var(--text-2xl);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-hover);
  border-radius: var(--radius-md);
}

.ygg-track-info {
  flex: 1;
  min-width: 0;
}

.ygg-track-name {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text-inverse);
  margin-bottom: var(--space-xs);
}

.ygg-track-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  font-size: var(--text-2xs);
  color: var(--color-text-muted);
}

.ygg-track-badge {
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  padding: 3px var(--space-sm);
  background: var(--color-fire-bg);
  color: var(--ygg-fire);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.ygg-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.ygg-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.ygg-progress-fill.dev {
  background: linear-gradient(90deg, #9945ff, #bb66ff);
}
.ygg-progress-fill.games {
  background: linear-gradient(90deg, #f97316, #fbbf24);
}
.ygg-progress-fill.content {
  background: linear-gradient(90deg, #10b981, #34d399);
}

/* Module Cards */
.ygg-track-modules {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ygg-module-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.ygg-module-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
}

.ygg-module-number {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

.ygg-module-info {
  flex: 1;
  min-width: 0;
}

.ygg-module-title {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: white;
  margin-bottom: 2px;
}

.ygg-module-meta {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
}

.ygg-module-status {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   BUILDER PROFILE CARD (Right Panel)
   ============================================ */
.ygg-builder-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
}

.ygg-builder-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.ygg-avatar-large {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1a2e, #2d2d44);
  border: 2px solid var(--ygg-ice);
  box-shadow: 0 0 20px var(--ygg-ice-glow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ygg-avatar-icon {
  font-size: 32px;
}

.ygg-level-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--ygg-ice), #00d9ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #000;
  border: 2px solid var(--ygg-bg);
}

.ygg-builder-info {
  flex: 1;
}

.ygg-builder-name {
  font-size: 20px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.ygg-wallet-addr {
  font-size: 12px;
  color: var(--ygg-ice);
  font-family: 'JetBrains Mono', monospace;
}

.ygg-connect-wallet {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--ygg-ice), #00d9ff);
  border: none;
  border-radius: 6px;
  color: #000;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ygg-connect-wallet:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--ygg-ice-glow);
}

.ygg-builder-level {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  margin-bottom: 16px;
}

.ygg-level-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ygg-ice);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ygg-total-xp {
  font-size: 14px;
  font-family: 'JetBrains Mono', monospace;
  color: #ffd700;
}

.ygg-badges-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.ygg-badge {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.ygg-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.ygg-badge-placeholder {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}

/* Stats Toggle Button */
.ygg-stats-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.ygg-stats-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.ygg-stats-toggle.expanded {
  border-radius: 10px 10px 0 0;
  border-bottom: none;
}

.ygg-stats-arrow {
  font-size: 10px;
  transition: transform 0.3s;
}

/* Expandable Stats */
.ygg-stats-expanded {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
  border-radius: 0 0 10px 10px;
}

.ygg-stats-expanded.show {
  max-height: 500px;
  padding: 16px;
}

.ygg-stats-section {
  margin-bottom: 16px;
}

.ygg-stats-section:last-child {
  margin-bottom: 0;
}

.ygg-stats-section h4 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 12px;
}

.ygg-stats-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ygg-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.ygg-stat-row span:first-child {
  color: rgba(255, 255, 255, 0.6);
}

.ygg-stat-row span:last-child {
  color: white;
  font-family: 'JetBrains Mono', monospace;
}

/* Track Progress in Stats */
.ygg-track-progress-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ygg-track-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ygg-track-label {
  font-size: 11px;
  width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ygg-track-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.ygg-track-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.ygg-track-percent {
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255, 255, 255, 0.5);
  width: 32px;
  text-align: right;
}

.ygg-member-since {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 8px;
}

/* ============================================
   BURN STATS HUD (Bottom Center)
   ============================================ */
.ygg-burn-hud {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(10, 10, 15, 0.9) 20%,
    rgba(10, 10, 15, 0.9) 80%,
    rgba(0, 0, 0, 0) 100%
  );
  padding: var(--space-md) var(--space-2xl);
  border-radius: var(--radius-full);
  border-top: 1px solid rgba(255, 69, 0, 0.3);
  z-index: var(--z-sticky);
}

.ygg-burn-metric {
  text-align: center;
}

.ygg-burn-metric-label {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 4px;
}

.ygg-burn-metric-value {
  font-size: 16px;
  font-family: 'JetBrains Mono', monospace;
  color: white;
}

.ygg-live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ygg-live-dot {
  width: 8px;
  height: 8px;
  background: var(--ygg-fire);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--ygg-fire);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.ygg-live-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--ygg-fire);
  text-transform: uppercase;
}

/* Disconnected state */
.ygg-live-indicator:not(.is-live) .ygg-live-dot {
  background: var(--text-dim);
  box-shadow: none;
  animation: none;
}

.ygg-live-indicator:not(.is-live) .ygg-live-text {
  color: var(--text-dim);
}

/* ============================================
   CTA HINT - First-time visitor onboarding
   ============================================ */
.ygg-cta-hint {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--glass-bg);
  border: 1px solid var(--color-fire);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  z-index: var(--z-sticky);
  pointer-events: none;
  opacity: 0;
  transition:
    opacity var(--duration-normal) var(--ease-out),
    transform var(--duration-normal) var(--ease-out);
  box-shadow:
    0 0 20px var(--color-fire-glow),
    var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.ygg-cta-hint.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  animation: cta-float 3s ease-in-out infinite;
}

.ygg-cta-hint.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-20px);
}

.ygg-cta-hint .cta-icon {
  font-size: var(--text-xl);
  animation: cta-bounce 1s ease-in-out infinite;
}

.ygg-cta-hint .cta-text {
  font-weight: var(--font-medium);
}

@keyframes cta-float {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-8px);
  }
}

@keyframes cta-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

/* ============================================
   SVG FALLBACK
   ============================================ */
.yggdrasil-svg-fallback {
  display: none;
}

.yggdrasil-cosmos.webgl-fallback .yggdrasil-svg-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  :root {
    --panel-width: 100vw;
  }

  .ygg-burn-hud {
    padding: var(--space-sm) var(--space-lg);
    gap: var(--space-md);
    bottom: var(--space-md);
  }

  .ygg-burn-metric-value {
    font-size: var(--text-sm);
  }

  /* Keep touch target accessible on mobile */
  .ygg-toggle-btn {
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    font-size: var(--text-base);
  }

  .ygg-modal-content {
    width: 95vw;
    max-height: 90vh;
    margin: 5vh auto;
  }

  /* CTA hint moves up on mobile to avoid HUD overlap */
  .ygg-cta-hint {
    bottom: 140px;
  }
}

/* ============================================
   PROJECT DETAIL MODAL
   ============================================ */
.ygg-project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--duration-normal) var(--ease-out),
    visibility var(--duration-normal) var(--ease-out);
}

.ygg-project-modal.open {
  opacity: 1;
  visibility: visible;
}

.ygg-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.ygg-modal-content {
  position: relative;
  width: 90vw;
  max-width: 800px;
  max-height: 85vh;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px var(--ygg-fire-glow);
}

.ygg-project-modal.open .ygg-modal-content {
  transform: scale(1) translateY(0);
}

.ygg-modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  background: var(--color-bg-hover);
  border: none;
  border-radius: var(--radius-full);
  color: var(--color-text-tertiary);
  font-size: var(--text-2xl);
  cursor: pointer;
  transition: var(--transition-colors), var(--transition-transform);
  z-index: var(--z-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ygg-modal-close:hover {
  background: var(--color-bg-active);
  color: var(--color-text-primary);
  transform: scale(1.05);
}

.ygg-modal-body {
  padding: 32px;
  overflow-y: auto;
  max-height: 85vh;
}

/* Project Header */
.ygg-project-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.ygg-project-icon {
  font-size: 48px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.ygg-project-title-group h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.ygg-project-track {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 4px;
}

.track-core {
  background: rgba(255, 69, 0, 0.2);
  color: var(--ygg-fire);
}
.track-analytics {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}
.track-tools {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}
.track-infrastructure {
  background: rgba(139, 92, 246, 0.2);
  color: #8b5cf6;
}
.track-education {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}
.track-trading {
  background: rgba(236, 72, 153, 0.2);
  color: #ec4899;
}
.track-gaming {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
}
.track-community {
  background: rgba(6, 182, 212, 0.2);
  color: #06b6d4;
}
.track-launchpad {
  background: rgba(251, 146, 60, 0.2);
  color: #fb923c;
}

/* Status Badge */
.status-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-live {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}
.status-building {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}
.status-planned {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}
.status-completed {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}
.status-in-progress {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

/* Overview */
.ygg-project-overview {
  font-size: 16px;
  line-height: 1.7;
  color: #b0b0b0;
  margin-bottom: 20px;
}

/* Tech Tags */
.ygg-project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tech-tag {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 12px;
  color: #a0a0a0;
  font-family: 'JetBrains Mono', monospace;
}

/* Sections */
.ygg-project-section {
  margin-bottom: 28px;
}

.ygg-project-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Features Grid */
.ygg-features-grid {
  display: grid;
  gap: 16px;
}

.ygg-feature-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
}

.ygg-feature-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 12px 0;
}

.ygg-feature-card p {
  font-size: 13px;
  line-height: 1.6;
  color: #909090;
  margin: 6px 0;
}

.ygg-feature-card strong {
  color: var(--ygg-fire);
}

/* Mini Tree Grid */
.ygg-minitree-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.ygg-minitree-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.ygg-minitree-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.ygg-minitree-item.status-completed {
  border-color: rgba(34, 197, 94, 0.3);
}

.ygg-minitree-item.status-in-progress {
  border-color: rgba(59, 130, 246, 0.3);
}

.minitree-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.minitree-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.minitree-name {
  font-size: 13px;
  font-weight: 500;
  color: #e0e0e0;
}

.minitree-status {
  font-size: 11px;
  color: #707070;
  text-transform: capitalize;
}

/* Roadmap */
.ygg-roadmap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ygg-roadmap-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.roadmap-phase {
  padding: 4px 12px;
  background: var(--ygg-fire);
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
}

.roadmap-text {
  font-size: 14px;
  color: #c0c0c0;
}

/* Action Buttons */
.ygg-project-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ygg-btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.ygg-btn-primary {
  background: var(--ygg-fire);
  color: #fff;
  border: none;
}

.ygg-btn-primary:hover {
  background: #ff5a1a;
  transform: translateY(-2px);
}

.ygg-btn-secondary {
  background: transparent;
  color: #c0c0c0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ygg-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ============================================
   CONTRIBUTORS SECTION (L2b Project Timeline)
   ============================================ */
.ygg-contributors-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ygg-contributor-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.ygg-contributor-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

.contributor-avatar {
  font-size: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  flex-shrink: 0;
}

.contributor-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contributor-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.contributor-role {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.contributor-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.contributor-commits {
  font-size: 12px;
  color: var(--ygg-ice);
  font-family: 'JetBrains Mono', monospace;
}

.contributor-diff {
  display: flex;
  gap: 8px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
}

.diff-add {
  color: #22c55e;
}

.diff-del {
  color: #ef4444;
}

/* ============================================
   LESSON MODAL
   ============================================ */
.ygg-lesson-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--duration-normal) var(--ease-out),
    visibility var(--duration-normal) var(--ease-out);
}

.ygg-lesson-modal.open {
  opacity: 1;
  visibility: visible;
}

.ygg-lesson-content {
  position: relative;
  width: 95vw;
  max-width: 1100px;
  height: 85vh;
  max-height: 700px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  display: flex;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(100, 200, 255, 0.15);
}

.ygg-lesson-modal.open .ygg-lesson-content {
  transform: scale(1) translateY(0);
}

/* Lesson Sidebar */
.ygg-lesson-sidebar {
  width: 280px;
  background: rgba(0, 0, 0, 0.3);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.ygg-lesson-module-info {
  padding: 24px 20px;
  border-bottom: 1px solid var(--glass-border);
}

.ygg-lesson-module-info h2 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px;
}

.ygg-lesson-module-info p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 12px;
  line-height: 1.5;
}

.ygg-lesson-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.ygg-lesson-count {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 11px;
  color: var(--ygg-ice);
}

.ygg-lesson-xp {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 150, 0, 0.1));
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #ffd700;
}

.ygg-lesson-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.ygg-lesson-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.ygg-lesson-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.ygg-lesson-item.active {
  background: rgba(100, 200, 255, 0.15);
  border-left: 3px solid var(--ygg-ice);
}

.ygg-lesson-item.completed .lesson-status {
  color: #22c55e;
}

.lesson-number {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.ygg-lesson-item.active .lesson-number {
  background: var(--ygg-ice);
  color: #000;
}

.lesson-info {
  flex: 1;
  min-width: 0;
}

.lesson-title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lesson-duration {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.lesson-status {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.3);
}

/* Lesson Main Content */
.ygg-lesson-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ygg-lesson-header {
  padding: 32px 32px 24px;
  border-bottom: 1px solid var(--glass-border);
}

.lesson-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(100, 200, 255, 0.2);
  color: var(--ygg-ice);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.ygg-lesson-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.lesson-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.ygg-lesson-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.lesson-content {
  margin-bottom: 32px;
}

.lesson-content p {
  font-size: 16px;
  line-height: 1.8;
  color: #c0c0c0;
}

.lesson-placeholder {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
}

.placeholder-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.lesson-placeholder p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.ygg-lesson-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--glass-border);
}

.ygg-lesson-actions .ygg-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ============================================
   XP NOTIFICATION
   ============================================ */
.ygg-xp-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #000;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  font-family: 'JetBrains Mono', monospace;
  z-index: var(--z-toast);
  opacity: 0;
  transition: all var(--duration-normal) var(--ease-bounce);
  box-shadow: 0 10px 40px rgba(255, 215, 0, 0.4);
  pointer-events: none;
}

.ygg-xp-notification.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ============================================
   RESPONSIVE - LESSON MODAL
   ============================================ */
@media (max-width: 768px) {
  .ygg-lesson-content {
    flex-direction: column;
    height: 95vh;
  }

  .ygg-lesson-sidebar {
    width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }

  .ygg-lesson-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 12px;
  }

  .ygg-lesson-item {
    flex-shrink: 0;
    padding: 8px 12px;
  }

  .ygg-lesson-header {
    padding: 20px;
  }

  .ygg-lesson-header h1 {
    font-size: 20px;
  }

  .ygg-lesson-body {
    padding: 20px;
  }

  .ygg-lesson-actions {
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
  }

  .ygg-lesson-actions .ygg-btn {
    flex: 1;
    min-width: 100px;
    padding: 10px 16px;
    font-size: 12px;
  }
}

/* ============================================
   RICH LESSON CONTENT
   ============================================ */

.lesson-content-rich {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.lesson-section {
  line-height: 1.7;
}

.lesson-section h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.lesson-section h4 {
  margin: 16px 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: #e0e0e0;
}

.lesson-section h5 {
  margin: 12px 0 6px;
  font-size: 14px;
  font-weight: 500;
  color: #ccc;
}

.lesson-section p {
  margin: 0 0 12px;
  color: #bbb;
}

.lesson-section strong {
  color: #fff;
}

/* Intro */
.lesson-intro {
  font-size: 16px;
  color: #ccc;
  border-left: 3px solid var(--ygg-fire);
  padding-left: 16px;
}

/* Diagram */
.lesson-diagram {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
}

.diagram-ascii {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.4;
  color: #00ff88;
  white-space: pre;
  margin: 0;
  overflow-x: auto;
}

/* Concept */
.lesson-concept {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Notes */
.lesson-note {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
  background: rgba(0, 200, 255, 0.08);
  border: 1px solid rgba(0, 200, 255, 0.2);
}

.lesson-note-tip {
  background: rgba(255, 200, 0, 0.08);
  border-color: rgba(255, 200, 0, 0.2);
}

.lesson-note-warning {
  background: rgba(255, 100, 0, 0.1);
  border-color: rgba(255, 100, 0, 0.3);
}

.note-icon {
  font-size: 20px;
  flex-shrink: 0;
}

/* Code blocks */
.code-block {
  background: #0d1117;
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin: 12px 0;
  border: 1px solid #30363d;
}

.code-block code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #c9d1d9;
}

.inline-code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  background: rgba(110, 118, 129, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  color: #ff79c6;
}

/* Tables */
.lesson-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}

.lesson-table th,
.lesson-table td {
  padding: 10px 12px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lesson-table th {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-weight: 600;
}

.lesson-table td {
  color: #bbb;
}

/* Exercises */
.lesson-exercise {
  background: linear-gradient(135deg, rgba(153, 69, 255, 0.1), rgba(100, 50, 200, 0.05));
  border: 1px solid rgba(153, 69, 255, 0.3);
  border-radius: 12px;
  padding: 20px;
}

.exercise-instructions {
  color: #ccc;
  margin-bottom: 16px;
}

.code-editor-container {
  position: relative;
  margin: 16px 0;
}

.code-starter {
  display: none;
}

.code-input {
  width: 100%;
  min-height: 200px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  color: #c9d1d9;
  resize: vertical;
}

.code-input:focus {
  outline: none;
  border-color: var(--ygg-fire);
}

.exercise-hints {
  margin: 16px 0;
  padding: 12px;
  background: rgba(255, 200, 0, 0.05);
  border-radius: 8px;
}

.exercise-hints summary {
  cursor: pointer;
  color: #ffc800;
  font-weight: 500;
}

.exercise-hints ul {
  margin: 12px 0 0 20px;
  color: #bbb;
}

.exercise-hints li {
  margin: 8px 0;
}

.verification-input {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.verification-input label {
  color: #ccc;
}

.verify-input {
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
}

.verify-input:focus {
  outline: none;
  border-color: var(--ygg-fire);
}

/* Quiz */
.lesson-quiz-inline,
.lesson-quiz-final {
  background: linear-gradient(135deg, rgba(0, 200, 150, 0.1), rgba(0, 150, 100, 0.05));
  border: 1px solid rgba(0, 200, 150, 0.3);
  border-radius: 12px;
  padding: 20px;
}

.quiz-info {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quiz-passing {
  color: var(--ygg-ice);
  font-weight: 500;
}

.quiz-questions {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quiz-question {
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.quiz-question.correct {
  background: rgba(0, 200, 100, 0.15);
  border: 1px solid rgba(0, 200, 100, 0.4);
}

.quiz-question.incorrect {
  background: rgba(255, 100, 100, 0.15);
  border: 1px solid rgba(255, 100, 100, 0.4);
}

.question-number {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
}

.question-text {
  font-size: 15px;
  color: #fff;
  margin-bottom: 16px;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-label:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.option-label input[type='radio'] {
  width: 18px;
  height: 18px;
  accent-color: var(--ygg-fire);
}

.option-text {
  color: #ccc;
}

.question-explanation {
  margin-top: 12px;
  padding: 12px;
  background: rgba(0, 150, 255, 0.1);
  border-radius: 8px;
  font-size: 14px;
  color: #88c8ff;
}

.question-explanation.hidden {
  display: none;
}

/* Project */
.lesson-project {
  background: linear-gradient(135deg, rgba(255, 150, 0, 0.1), rgba(200, 100, 0, 0.05));
  border: 1px solid rgba(255, 150, 0, 0.3);
  border-radius: 12px;
  padding: 20px;
}

.project-requirements,
.project-steps,
.project-rubric {
  margin-bottom: 20px;
}

.project-requirements ul {
  margin: 8px 0 0 20px;
  color: #bbb;
}

.project-requirements li {
  margin: 6px 0;
}

.project-step {
  padding: 16px;
  margin: 12px 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border-left: 3px solid var(--ygg-fire);
}

.project-rubric table {
  width: 100%;
  border-collapse: collapse;
}

.project-rubric th,
.project-rubric td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.project-rubric th {
  color: #fff;
  font-weight: 600;
}

.project-rubric td {
  color: #bbb;
}

.project-submission {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.project-url-input {
  width: 100%;
  padding: 12px;
  margin: 12px 0;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
}

.project-url-input:focus {
  outline: none;
  border-color: var(--ygg-fire);
}

/* Resources */
.lesson-resources {
  background: rgba(100, 100, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(100, 100, 255, 0.2);
}

.resources-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resource-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #ccc;
  text-decoration: none;
  transition: all 0.2s ease;
}

.resource-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--ygg-fire);
  color: #fff;
}

.resource-icon {
  font-size: 18px;
}

.resource-title {
  flex: 1;
}

.resource-external {
  color: #888;
}

/* Lesson Header Enhanced */
.lesson-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.lesson-xp {
  background: linear-gradient(135deg, #ffd700, #ff9500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 14px;
}

/* Notifications */
.ygg-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: var(--space-sm) var(--space-lg);
  background: rgba(20, 25, 35, 0.95);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  z-index: var(--z-toast);
  opacity: 0;
  transition: all var(--duration-normal) var(--ease-in-out);
  backdrop-filter: blur(10px);
}

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

.ygg-notification-success {
  border-color: rgba(0, 200, 100, 0.5);
  background: rgba(0, 50, 30, 0.95);
}

.ygg-notification-error {
  border-color: rgba(255, 100, 100, 0.5);
  background: rgba(50, 20, 20, 0.95);
}

.ygg-notification-warning {
  border-color: rgba(255, 200, 0, 0.5);
  background: rgba(50, 40, 10, 0.95);
}

/* Mobile adjustments for rich content */
@media (max-width: 768px) {
  .lesson-content-rich {
    gap: 16px;
  }

  .diagram-ascii {
    font-size: 10px;
  }

  .code-block code {
    font-size: 11px;
  }

  .code-input {
    min-height: 150px;
    font-size: 12px;
  }

  .lesson-table {
    font-size: 12px;
  }

  .lesson-table th,
  .lesson-table td {
    padding: 8px;
  }

  .option-label {
    padding: 10px 12px;
  }

  .lesson-exercise,
  .lesson-quiz-inline,
  .lesson-quiz-final,
  .lesson-project {
    padding: 16px;
  }
}

/* ============================================
   PROJECT MODAL - ENHANCED LAYOUT
   ============================================ */

/* Section hint */
.section-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: -8px 0 12px 0;
  font-style: italic;
}

/* Components Grid */
.ygg-components-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.ygg-component-card {
  background: rgba(20, 20, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ygg-component-card:hover {
  background: rgba(30, 30, 45, 0.8);
  border-color: rgba(255, 100, 50, 0.3);
  transform: translateY(-2px);
}

.ygg-component-card.expanded {
  background: rgba(40, 30, 35, 0.9);
  border-color: rgba(255, 100, 50, 0.5);
}

.ygg-component-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.component-icon {
  font-size: 24px;
}

.component-name {
  flex: 1;
  font-weight: 600;
  color: #fff;
}

.component-status {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.component-status.status-completed {
  background: rgba(100, 255, 100, 0.2);
  color: #8f8;
}

.component-status.status-in-progress {
  background: rgba(255, 200, 50, 0.2);
  color: #fc8;
}

.component-status.status-planned {
  background: rgba(100, 150, 255, 0.2);
  color: #8af;
}

.ygg-component-preview {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ygg-component-card.expanded .ygg-component-preview {
  display: none;
}

.ygg-component-details {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.component-detail-row {
  margin-bottom: 12px;
}

.component-detail-row:last-child {
  margin-bottom: 0;
}

.detail-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 150, 100, 0.9);
  margin-bottom: 4px;
}

.component-detail-row p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

/* Builders Grid */
.ygg-builders-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ygg-builder-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(20, 20, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 200px;
}

.ygg-builder-card:hover {
  background: rgba(30, 30, 45, 0.8);
  border-color: rgba(100, 150, 255, 0.4);
  transform: translateY(-2px);
}

.builder-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.builder-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.builder-name {
  font-weight: 600;
  color: #fff;
  font-size: 14px;
}

.builder-role {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.builder-github {
  font-size: 12px;
  color: rgba(100, 150, 255, 0.8);
}

.no-contributors {
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
  font-size: 13px;
}

/* Deep Learn Section */
.ygg-deeplearn-section {
  background: linear-gradient(135deg, rgba(255, 100, 50, 0.1), rgba(100, 50, 150, 0.1));
  border: 1px solid rgba(255, 100, 50, 0.3);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.ygg-deeplearn-section h3 {
  margin-bottom: 8px;
}

.deeplearn-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
}

.deeplearn-skills-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.skill-preview-tag {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.ygg-btn-deeplearn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #ff6644, #ff4466);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(255, 100, 50, 0.3);
}

.ygg-btn-deeplearn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255, 100, 50, 0.5);
}

.deeplearn-icon {
  font-size: 20px;
}

/* Mobile adjustments for project modal */
@media (max-width: 768px) {
  .ygg-components-grid {
    grid-template-columns: 1fr;
  }

  .ygg-builders-grid {
    flex-direction: column;
  }

  .ygg-builder-card {
    min-width: auto;
  }

  .ygg-deeplearn-section {
    padding: 16px;
  }

  .ygg-btn-deeplearn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   SKILL MODAL
   ============================================ */

.ygg-skill-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.ygg-skill-modal.open {
  pointer-events: auto;
  opacity: 1;
}

.ygg-skill-modal .ygg-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.ygg-skill-modal .ygg-modal-content {
  position: relative;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(20, 25, 40, 0.98), rgba(10, 15, 25, 0.98));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.ygg-skill-modal.open .ygg-modal-content {
  transform: translateY(0);
}

.ygg-skill-modal .ygg-modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  background: var(--color-bg-hover);
  border: none;
  border-radius: var(--radius-full);
  color: var(--color-text-tertiary);
  font-size: var(--text-xl);
  cursor: pointer;
  transition: var(--transition-colors), var(--transition-transform);
  z-index: var(--z-elevated);
}

.ygg-skill-modal .ygg-modal-close:hover {
  background: var(--color-error-bg);
  color: var(--color-error);
  transform: scale(1.05);
}

.ygg-skill-modal .ygg-modal-body {
  padding: 0;
}

/* Skill Header */
.ygg-skill-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 28px 20px;
  border-bottom: 2px solid;
  background: linear-gradient(135deg, rgba(255, 68, 68, 0.05), transparent);
}

.ygg-skill-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: linear-gradient(135deg, rgba(255, 68, 68, 0.2), rgba(255, 100, 68, 0.1));
  border-radius: 18px;
  flex-shrink: 0;
}

.ygg-skill-title-group {
  flex: 1;
  min-width: 0;
}

.ygg-skill-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.ygg-skill-meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.ygg-skill-track {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ygg-skill-difficulty {
  color: #ffaa00;
}

/* Skill Stats */
.ygg-skill-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--glass-border);
}

.ygg-skill-stat {
  text-align: center;
}

.ygg-stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #00d9ff;
}

.ygg-stat-label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Skill Description */
.ygg-skill-description {
  padding: 20px 28px;
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: #bbb;
}

/* Skill Sections */
.ygg-skill-section {
  padding: 20px 28px;
  border-top: 1px solid var(--glass-border);
}

.ygg-skill-section h3 {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Prerequisites */
.ygg-skill-prereqs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ygg-skill-prereq {
  padding: 8px 14px;
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 20px;
  color: #ff8866;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.ygg-skill-prereq:hover {
  background: rgba(255, 68, 68, 0.2);
  border-color: rgba(255, 68, 68, 0.5);
}

.ygg-skill-prereq-none {
  color: #00ff88;
  font-size: 14px;
}

/* Learning Outcomes */
.ygg-skill-outcomes {
  margin: 0;
  padding-left: 24px;
  list-style: none;
}

.ygg-skill-outcomes li {
  position: relative;
  padding: 8px 0;
  color: #ccc;
  font-size: 14px;
  line-height: 1.5;
}

.ygg-skill-outcomes li::before {
  content: '✓';
  position: absolute;
  left: -24px;
  color: #00ff88;
  font-weight: bold;
}

/* Topics */
.ygg-skill-topics {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ygg-skill-topic {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border-left: 3px solid rgba(255, 68, 68, 0.5);
}

.ygg-skill-topic-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.ygg-skill-topic-num {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 68, 68, 0.2);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  color: #ff6644;
}

.ygg-skill-topic-name {
  flex: 1;
  font-weight: 600;
  color: #fff;
}

.ygg-skill-topic-duration {
  font-size: 12px;
  color: #888;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
}

.ygg-skill-topic-desc {
  margin: 0;
  font-size: 13px;
  color: #999;
  line-height: 1.6;
}

/* Resources */
.ygg-skill-resources {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ygg-skill-resource {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0, 100, 200, 0.1);
  border: 1px solid rgba(0, 150, 255, 0.2);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s;
}

.ygg-skill-resource:hover {
  background: rgba(0, 100, 200, 0.2);
  border-color: rgba(0, 150, 255, 0.4);
  transform: translateX(4px);
}

.ygg-resource-type {
  padding: 4px 10px;
  background: rgba(0, 150, 255, 0.2);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #00aaff;
}

.ygg-resource-title {
  flex: 1;
  color: #ddd;
  font-size: 14px;
}

/* Projects */
.ygg-skill-projects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ygg-skill-project {
  padding: 8px 14px;
  background: rgba(153, 68, 255, 0.1);
  border: 1px solid rgba(153, 68, 255, 0.3);
  border-radius: 20px;
  color: #bb88ff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.ygg-skill-project:hover {
  background: rgba(153, 68, 255, 0.2);
  border-color: rgba(153, 68, 255, 0.5);
}

/* Skill Actions */
.ygg-skill-actions {
  padding: 24px 28px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: center;
}

.ygg-skill-actions .ygg-btn-primary {
  min-width: 200px;
  padding: 14px 32px;
  font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .ygg-skill-modal .ygg-modal-content {
    width: 95%;
    max-height: 90vh;
    border-radius: 16px;
  }

  .ygg-skill-header {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .ygg-skill-meta {
    justify-content: center;
  }

  .ygg-skill-stats {
    gap: 20px;
  }

  .ygg-stat-value {
    font-size: 20px;
  }

  .ygg-skill-section {
    padding: 16px 20px;
  }

  .ygg-skill-description {
    padding: 16px 20px;
  }
}

/* ============================================
   FILTER LEGEND PANEL
   ============================================ */

.ygg-filter-legend {
  position: fixed;
  bottom: var(--space-lg);
  left: var(--space-lg);
  z-index: var(--z-overlay);
  background: linear-gradient(135deg, rgba(15, 20, 35, 0.95), rgba(10, 15, 25, 0.98));
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: var(--transition-all);
}

.ygg-filter-legend.collapsed .ygg-legend-content {
  display: none;
}

.ygg-legend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legend-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.legend-toggle {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.legend-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.ygg-legend-content {
  padding: 16px;
}

.legend-section {
  margin-bottom: 16px;
}

.legend-section:last-child {
  margin-bottom: 0;
}

.legend-section-title {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.legend-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.legend-filter:hover {
  background: rgba(255, 255, 255, 0.05);
}

.legend-filter input[type='checkbox'] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.legend-filter input[type='checkbox']:checked {
  background: #ff6644;
  border-color: #ff6644;
}

.legend-filter input[type='checkbox']:checked::after {
  content: '\2713';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 10px;
  font-weight: bold;
}

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-icon {
  font-size: 12px;
  width: 12px;
  text-align: center;
  flex-shrink: 0;
}

.legend-icon.pulse {
  animation: pulse-icon 1.5s ease-in-out infinite;
}

.legend-icon.dim {
  opacity: 0.5;
}

@keyframes pulse-icon {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.legend-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  flex: 1;
}

.legend-count {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

/* Track-specific checkbox colors */
.legend-filter[data-value='dev'] input[type='checkbox']:checked {
  background: #ff4444;
  border-color: #ff4444;
}

.legend-filter[data-value='games'] input[type='checkbox']:checked {
  background: #aa44ff;
  border-color: #aa44ff;
}

.legend-filter[data-value='content'] input[type='checkbox']:checked {
  background: #44aaff;
  border-color: #44aaff;
}

/* Status-specific checkbox colors */
.legend-filter[data-value='live'] input[type='checkbox']:checked {
  background: #44ff88;
  border-color: #44ff88;
}

.legend-filter[data-value='building'] input[type='checkbox']:checked {
  background: #ffaa44;
  border-color: #ffaa44;
}

.legend-filter[data-value='planned'] input[type='checkbox']:checked {
  background: #888899;
  border-color: #888899;
}

/* Phi Harmony section */
.legend-phi {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.phi-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.phi-symbol {
  font-size: 20px;
  font-weight: 300;
  color: #ffcc44;
  font-style: italic;
}

.phi-value {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Monaco', 'Consolas', monospace;
}

.phi-desc {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.4;
}

/* Filter legend mobile */
@media (max-width: 768px) {
  .ygg-filter-legend {
    bottom: auto;
    top: var(--space-md);
    left: var(--space-md);
    max-width: 160px;
    min-width: auto;
  }

  .ygg-filter-legend:not(.collapsed) {
    max-height: 60vh;
    overflow-y: auto;
  }

  .ygg-legend-header {
    padding: var(--space-sm) var(--space-md);
  }

  .legend-title {
    font-size: var(--text-xs);
  }

  .ygg-legend-content {
    padding: var(--space-sm);
  }
}

/* ============================================
   COMPONENT MODAL
   ============================================ */

.ygg-component-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-popover);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.ygg-component-modal.open {
  pointer-events: auto;
  opacity: 1;
}

.ygg-component-modal .ygg-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.ygg-component-modal .ygg-modal-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(20, 25, 40, 0.98), rgba(10, 15, 25, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
}

.ygg-component-modal.open .ygg-modal-content {
  transform: scale(1) translateY(0);
}

.ygg-component-modal .ygg-modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  background: var(--color-bg-hover);
  border: none;
  border-radius: var(--radius-full);
  color: var(--color-text-tertiary);
  font-size: var(--text-xl);
  cursor: pointer;
  transition: var(--transition-colors), var(--transition-transform);
  z-index: var(--z-elevated);
}

.ygg-component-modal .ygg-modal-close:hover {
  background: var(--color-error-bg);
  color: var(--color-error);
  transform: scale(1.05);
}

/* Component Modal Header */
.ygg-component-modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(255, 100, 68, 0.08), transparent);
}

.component-modal-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, rgba(255, 68, 68, 0.2), rgba(255, 100, 68, 0.1));
  border-radius: 14px;
  flex-shrink: 0;
}

.component-modal-titles {
  flex: 1;
  min-width: 0;
}

.component-modal-titles h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.component-modal-project {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.component-modal-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.component-modal-status.status-live {
  background: rgba(68, 255, 136, 0.15);
  color: #44ff88;
}

.component-modal-status.status-building {
  background: rgba(255, 170, 68, 0.15);
  color: #ffaa44;
}

.component-modal-status.status-planned {
  background: rgba(136, 136, 170, 0.15);
  color: #8888aa;
}

/* Component Modal Grid */
.component-modal-grid {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.component-modal-section {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border-left: 3px solid rgba(255, 100, 68, 0.5);
}

.component-modal-section:nth-child(1) {
  border-left-color: #00d9ff;
}
.component-modal-section:nth-child(2) {
  border-left-color: #ff6644;
}
.component-modal-section:nth-child(3) {
  border-left-color: #44ff88;
}
.component-modal-section.future {
  border-left-color: #9944ff;
  grid-column: 1 / -1;
}

.component-modal-section h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.component-modal-section p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

/* Component Modal Actions */
.component-modal-actions {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Mobile adjustments for filter legend and component modal */
@media (max-width: 768px) {
  .ygg-filter-legend {
    bottom: auto;
    top: 80px;
    left: 12px;
    right: 12px;
    min-width: auto;
  }

  .ygg-legend-content {
    padding: 12px;
  }

  .legend-section {
    margin-bottom: 12px;
  }

  .ygg-component-modal .ygg-modal-content {
    width: 95%;
    max-height: 90vh;
    border-radius: 16px;
  }

  .ygg-component-modal-header {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .component-modal-grid {
    padding: 16px;
    grid-template-columns: 1fr;
  }

  .component-modal-section.future {
    grid-column: 1;
  }

  .component-modal-actions {
    flex-direction: column;
  }

  .component-modal-actions .ygg-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   PROGRESS TRACKING UI
   ============================================ */

/* XP Progress Bar */
.ygg-xp-progress {
  margin: 12px 0;
}

.ygg-xp-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.ygg-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6644, #ffaa44);
  border-radius: 4px;
  transition: width 0.5s ease;
  position: relative;
}

.ygg-xp-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  animation: xp-shimmer 2s infinite;
}

@keyframes xp-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.ygg-xp-to-next {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  display: block;
}

/* Streak Display */
.ygg-streak-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  margin: 12px 0;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.ygg-streak-display.active {
  opacity: 1;
  background: linear-gradient(135deg, rgba(255, 100, 50, 0.15), rgba(255, 150, 50, 0.1));
  border: 1px solid rgba(255, 150, 50, 0.2);
}

.streak-icon {
  font-size: 24px;
  animation: streak-pulse 1.5s ease-in-out infinite;
}

.ygg-streak-display:not(.active) .streak-icon {
  animation: none;
  opacity: 0.3;
}

@keyframes streak-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

.streak-count {
  font-size: 24px;
  font-weight: 700;
  color: #ffaa44;
}

.ygg-streak-display:not(.active) .streak-count {
  color: rgba(255, 255, 255, 0.3);
}

.streak-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

/* Stats Grid */
.ygg-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.ygg-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.2s ease;
}

.ygg-stat-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.ygg-stat-card .stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.ygg-stat-card .stat-label {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* Track Progress Bar */
.ygg-track-progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin: 0 12px;
}

.ygg-track-progress-bar.small {
  height: 6px;
  margin: 0 8px;
}

.ygg-track-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.ygg-track-progress-row {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ygg-track-progress-row:last-child {
  border-bottom: none;
}

.ygg-track-label {
  min-width: 120px;
  font-size: 13px;
  font-weight: 500;
}

.ygg-track-percent {
  min-width: 40px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

/* Specialized Progress */
.ygg-specialized-list {
  margin-top: 8px;
}

.ygg-specialized-row {
  display: flex;
  align-items: center;
  padding: 6px 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ygg-specialized-row:hover {
  background: rgba(255, 255, 255, 0.03);
  margin: 0 -8px;
  padding: 6px 8px;
  border-radius: 6px;
}

.specialized-name {
  min-width: 100px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ygg-no-progress {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 16px;
  font-style: italic;
}

/* Badge More Indicator */
.ygg-badge-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
}

/* Stats Section in Expanded Panel */
.ygg-stats-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ygg-stats-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.ygg-stats-section h4 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Notification Toast */
.ygg-notification-toast {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: var(--z-toast);
  padding: var(--space-md) var(--space-lg);
  background: rgba(20, 25, 40, 0.95);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition-all);
}

.ygg-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.ygg-notification.success {
  border-color: rgba(68, 255, 136, 0.3);
  background: linear-gradient(135deg, rgba(20, 35, 25, 0.95), rgba(20, 25, 40, 0.95));
}

.ygg-notification.info {
  border-color: rgba(68, 170, 255, 0.3);
  background: linear-gradient(135deg, rgba(20, 25, 45, 0.95), rgba(20, 25, 40, 0.95));
}

.ygg-notification-icon {
  font-size: 24px;
}

.ygg-notification-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

/* Level Up Animation */
@keyframes level-up-glow {
  0% {
    box-shadow: 0 0 20px rgba(255, 170, 68, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 170, 68, 0.6);
  }
  100% {
    box-shadow: 0 0 20px rgba(255, 170, 68, 0.3);
  }
}

.ygg-notification.level-up {
  animation: level-up-glow 1s ease-in-out 3;
  border-color: rgba(255, 170, 68, 0.5);
}
