/* public/styles/global.css */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

#debug {
  position: fixed;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,0.8);
  color: #0f0;
  font-family: monospace;
  font-size: 12px;
  padding: 8px;
  z-index: 10000;
  border-radius: 4px;
  max-width: 90%;
  word-break: break-word;
}

/* Глобальный загрузочный экран */
#app-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 20000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: opacity 0.5s ease;
}

#app-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #e94560;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loading-title {
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
}

.loading-status {
  color: #888;
  font-size: 14px;
  margin-bottom: 20px;
}

.loading-bar-container {
  width: 300px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar {
  width: 0%;
  height: 100%;
  background: #e94560;
  transition: width 0.3s ease;
}

.loading-percent {
  color: #e94560;
  font-size: 12px;
  margin-top: 8px;
  font-family: monospace;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  button {
    width: 40px !important;
    height: 40px !important;
    font-size: 16px !important;
  }
  .loading-bar-container {
    width: 250px;
  }
}