html,
body,
#root {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
  user-select: none;
}

/* Açık mod: sistem koyu olsa bile .dark yoksa açık mod renkleri kesin uygulanır */
html:not(.dark) body,
body {
  background: #f8fafc;
  color: #0f172a;
}

/* Koyu mod: sadece html.dark varsa koyu renkler uygulanır */
html.dark body {
  background: #0b1220;
  color: #e8eef7;
}

#boot-fallback {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: #f8fafc;
  color: #0f172a;
  background-image: linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
}

html.dark #boot-fallback {
  background: #0b1220;
  color: #e8eef7;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

#boot-fallback.boot-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: bootFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.boot-logo-wrap {
  position: relative;
  width: 220px;
  height: 76px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.boot-logo-glow {
  position: absolute;
  inset: -12px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.45) 0%, rgba(37, 99, 235, 0.15) 55%, transparent 70%);
  filter: blur(24px);
  animation: bootPulse 2.4s ease-in-out infinite alternate;
}

.boot-logo-img {
  position: relative;
  max-width: 220px;
  height: auto;
  max-height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.5));
}

html.dark .boot-logo-light {
  display: none !important;
}

html:not(.dark) .boot-logo-dark {
  display: none !important;
}

.boot-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
}

.boot-sub {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 24px 0;
  font-weight: 500;
}

.boot-bar-track {
  width: 200px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

html:not(.dark) .boot-bar-track {
  background: rgba(0, 0, 0, 0.08);
}
html:not(.dark) .boot-sub {
  color: #64748b;
}
html:not(.dark) .boot-logo-img {
  filter: drop-shadow(0 10px 20px rgba(14, 165, 233, 0.25));
}

.boot-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 50%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #818cf8);
  animation: bootProgress 1.4s ease-in-out infinite;
}

@keyframes bootFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bootPulse {
  0% {
    opacity: 0.5;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes bootProgress {
  0% {
    left: -40%;
    width: 30%;
  }
  50% {
    left: 30%;
    width: 55%;
  }
  100% {
    left: 100%;
    width: 30%;
  }
}
