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

body {
  background: #111111;
  color: #f9f9f9;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#page-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

header {
  text-align: center;
  padding: 2rem 0;
}

header h1 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  color: #8e8e8e;
  font-weight: 400;
}

#unity-container-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

#unity-container {
  position: relative;
  background: #1d1d1d;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 
    0px 0px 32px 10px rgba(255, 255, 255, 0.2);
    0 24px 6px rgba(255, 255, 255, 0.1),
    0 0 40px rgba(200, 200, 200, 0.08);
}

#unity-container.unity-desktop {
  position: relative;
}

#unity-container.unity-mobile {
  position: fixed;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  border-radius: 0;
}

#unity-canvas {
  background: #EEE0DB;
  display: block;
  width: 100%;
  height: 100%;
}

.unity-mobile #unity-canvas {
  width: 100%;
  height: 100%;
}

#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#loading-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.25rem;
  color: #8037ff;
  font-weight: 600;
}

#unity-progress-bar-container {
  width: 300px;
  height: 4px;
  background: #2a2a2a;
  border-radius: 2px;
  overflow: hidden;
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background: #8037ff;
  transition: width 0.1s ease;
}

#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translateX(-50%);
  background: #ff275a;
  color: #ffffff;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  display: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  max-width: 90%;
  box-shadow: 0 4px 12px rgba(255, 39, 90, 0.3);
}

#unity-warning > div {
  padding: 0.5rem 0;
}

#resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  cursor: nwse-resize;
  z-index: 100;
}

#resize-handle::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 24px 24px;
  border-color: transparent transparent #8037ff transparent;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

#resize-handle:hover::before {
  opacity: 1;
}

#resize-handle::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background-image:
    linear-gradient(135deg, transparent 30%, #ffffff 30%, #ffffff 35%, transparent 35%),
    linear-gradient(135deg, transparent 45%, #ffffff 45%, #ffffff 50%, transparent 50%),
    linear-gradient(135deg, transparent 60%, #ffffff 60%, #ffffff 65%, transparent 65%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: 0.9;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  #page-container {
    padding: 1rem;
    gap: 2rem;
  }

  header {
    padding: 1rem 0;
  }

  #resize-handle {
    display: none;
  }
}
