/* ===== Global Resets & Base Styles ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #16213e;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  box-sizing: border-box;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
  position: relative;
}

body.permissions-ready {
  opacity: 1;
}

/* Background Elements */
.bg-fix {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: linear-gradient(125deg, #000000 0%, #1a1a2e 40%, #16213e 70%, #0f3460 100%);
}

.bg-pulse {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 30% 30%, rgba(102, 126, 234, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(161, 140, 209, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(255, 103, 227, 0.05) 0%, transparent 60%);
  z-index: -1;
  animation: bg-pulse-anim 20s ease-in-out infinite alternate;
  pointer-events: none;
  will-change: transform;
  transform: translateZ(0);
}

@keyframes bg-pulse-anim {
  0% { transform: translate(0, 0) scale(1) translateZ(0); }
  100% { transform: translate(5%, 5%) scale(1.1) translateZ(0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  0% { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}

/* Typography */
h1 {
  color: #fff;
  text-align: center;
  margin: 5px 0 30px;
  font-size: 28px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Utility Classes */
.hidden { display: none !important; }
.flex { display: flex !important; }
.v-hidden { visibility: hidden !important; }
.scroll-lock { overflow: hidden !important; }
