body {
    box-sizing: border-box;
  }
  
  * {
    font-family: 'M PLUS Rounded 1c', sans-serif;
  }
  
  .pixel-font {
    font-family: 'Press Start 2P', cursive;
  }
  
  @keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
  }
  
  @keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.5); }
    50% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.8); }
  }
  
  @keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
  }
  
  @keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
  }
  
  @keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  @keyframes levelUp {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
  }
  
  @keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
  }
  
  .float-animation {
    animation: float 3s ease-in-out infinite;
  }
  
  .pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
  }
  
  .shake-animation {
    animation: shake 0.5s ease-in-out;
  }
  
  .sparkle {
    animation: sparkle 1s ease-in-out;
  }
  
  .slide-up {
    animation: slideUp 0.5s ease-out forwards;
  }
  
  .level-up-animation {
    animation: levelUp 0.5s ease-in-out;
  }
  
  .bounce-animation {
    animation: bounce 2s ease-in-out infinite;
  }
  
  .game-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }
  
  .game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
  }
  
  .game-btn:active {
    transform: translateY(0);
  }
  
  .game-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
  }
  
  .game-btn:hover::after {
    left: 100%;
  }
  
  .level-card {
    transition: all 0.3s ease;
    cursor: pointer;
  }
  
  .level-card:hover {
    transform: scale(1.05);
  }
  
  .level-card.locked {
    filter: grayscale(100%);
    opacity: 0.6;
  }
  
  .level-card.locked:hover {
    transform: scale(1);
    cursor: not-allowed;
  }
  
  .monster-sprite {
    transition: all 0.3s ease;
  }
  
  .monster-sprite:hover {
    transform: scale(1.1);
  }
  
  .monster-sprite.defeated {
    opacity: 0.3;
    filter: grayscale(100%);
  }
  
  .code-block {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    border-left: 4px solid #8b5cf6;
    font-family: 'Consolas', 'Monaco', monospace;
  }
  
  .progress-bar {
    background: linear-gradient(90deg, #8b5cf6, #ec4899, #f59e0b);
    background-size: 200% 100%;
    animation: gradient 3s ease infinite;
  }
  
  @keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  
  .nav-item {
    position: relative;
    transition: all 0.3s ease;
  }
  
  .nav-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #8b5cf6;
    transition: all 0.3s ease;
    transform: translateX(-50%);
  }
  
  .nav-item:hover::after,
  .nav-item.active::after {
    width: 100%;
  }
  
  .quiz-option {
    transition: all 0.3s ease;
    cursor: pointer;
  }
  
  .quiz-option:hover {
    transform: translateX(10px);
    background: rgba(139, 92, 246, 0.2);
  }
  
  .quiz-option.correct {
    background: rgba(34, 197, 94, 0.3);
    border-color: #22c55e;
  }
  
  .quiz-option.incorrect {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
  }
  
  .badge {
    transition: all 0.3s ease;
  }
  
  .badge:hover {
    transform: rotate(10deg) scale(1.1);
  }
  
  .star-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
  }
  
  .star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s ease-in-out infinite;
  }
  
  @keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
  }
  
  .page {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .page.active {
    display: block;
    opacity: 1;
  }
  
  .toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    transition: all 0.3s ease;
    z-index: 1000;
  }
  
  .toast.show {
    transform: translateX(-50%) translateY(0);
  }
  
  .hero-speech {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 15px 20px;
  }
  
  .hero-speech::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 30px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: white transparent transparent;
  }
  
  .map-path {
    stroke-dasharray: 10;
    animation: dash 1s linear infinite;
  }
  
  @keyframes dash {
    to { stroke-dashoffset: -20; }
  }
  
  .xp-fill {
    transition: width 0.5s ease;
  }
  
  .tab-content {
    display: none;
  }
  
  .tab-content.active {
    display: block;
    animation: slideUp 0.3s ease;
  }