:root {
  --wii-white: #F5F5F5;
  --wii-blue: #00A1E4;
  --wii-blue-light: #7DD3FC;
  --wii-green: #78C850;
  --wii-gray: #E8E8E8;
  --wii-dark: #2D2D2D;
  --wii-red: #E85050;
}

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

body {
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(180deg, #EBF5FF 0%, #F5F5F5 40%, #E8F0FE 100%);
  min-height: 100vh;
  transition: background 0.4s ease, color 0.4s ease;
}

body.dark-mode {
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  color: #e0e0e0;
}

.drop-zone {
  border: 3px dashed #00A1E4;
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.drop-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0,161,228,0.05) 0%, transparent 70%);
  transition: all 0.3s ease;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: #78C850;
  box-shadow: 0 0 30px rgba(0,161,228,0.2), inset 0 0 30px rgba(0,161,228,0.05);
  transform: scale(1.01);
}

.drop-zone:hover::before, .drop-zone.drag-over::before {
  background: radial-gradient(circle at center, rgba(0,161,228,0.12) 0%, transparent 70%);
}

.glass-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

body.dark-mode .glass-card {
  background: rgba(30, 40, 60, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.dark-mode .drop-zone {
  border-color: #0077aa;
}

body.dark-mode .drop-zone:hover {
  border-color: #78C850;
  box-shadow: 0 0 30px rgba(0,161,228,0.3), inset 0 0 30px rgba(0,161,228,0.08);
}

.hex-viewer {
  font-family: 'JetBrains Mono', monospace;
  background: #0a0e14;
  color: #39ff14;
  border-radius: 12px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.6;
}

.hex-offset {
  color: #ff9800;
}

.hex-highlight {
  color: #00e5ff;
}

.hex-ascii {
  color: #78C850;
}

@keyframes spin-disc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-disc {
  animation: spin-disc 3s linear infinite;
}

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

.fade-slide-in {
  animation: fadeSlideIn 0.5s ease forwards;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.loading-shimmer {
  background: linear-gradient(90deg, transparent 25%, rgba(0,161,228,0.15) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

.sparkle {
  animation: sparkle 2s ease-in-out infinite;
}

.toast-enter {
  animation: fadeSlideIn 0.3s ease forwards;
}

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

.toast-exit {
  animation: toastExit 0.3s ease forwards;
}

.btn-wii {
  background: linear-gradient(135deg, #00A1E4, #0088cc);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 10px 20px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,161,228,0.3);
}

.btn-wii:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,161,228,0.4);
}

.btn-green {
  background: linear-gradient(135deg, #78C850, #5ea63a);
  box-shadow: 0 4px 12px rgba(120,200,80,0.3);
}

.btn-green:hover {
  box-shadow: 0 6px 20px rgba(120,200,80,0.4);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}

.status-valid {
  background: rgba(120, 200, 80, 0.15);
  color: #4a8c2a;
  border: 1px solid rgba(120, 200, 80, 0.3);
}

body.dark-mode .status-valid {
  color: #78C850;
}

.status-invalid {
  background: rgba(232, 80, 80, 0.15);
  color: #c43030;
  border: 1px solid rgba(232, 80, 80, 0.3);
}

body.dark-mode .status-invalid {
  color: #E85050;
}

canvas {
  image-rendering: pixelated;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0,161,228,0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0,161,228,0.5);
}