/**
 * RB Flame Loader — Ultra VIP / Lüks ateş
 */
.rb-flame-loader {
  --rb-crimson: #c8102e;
  --rb-red: #e60026;
  --rb-flame: #ff4d1a;
  --rb-amber: #ff9a3c;
  --rb-gold: #d4af37;
  --rb-gold-light: #f5d78e;
  --rb-champagne: #fff8e7;
  --rb-void: #030508;
  --rb-panel: rgba(12, 10, 14, 0.72);
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.55s;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.rb-flame-loader.rb-flame-loader--out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* —— Arka plan katmanları —— */
.rb-flame-loader__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 50% 42%, rgba(200, 16, 46, 0.35) 0%, transparent 62%),
    radial-gradient(ellipse 90% 50% at 50% 100%, rgba(212, 175, 55, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 20% 15%, rgba(255, 77, 26, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(245, 215, 142, 0.06) 0%, transparent 35%),
    linear-gradient(165deg, #020304 0%, #0a080c 28%, #120a0e 52%, #0c0a10 78%, #030508 100%);
}

.rb-flame-loader__aurora {
  position: absolute;
  inset: -20%;
  background:
    conic-gradient(from 200deg at 50% 50%,
      transparent 0deg,
      rgba(230, 0, 38, 0.06) 40deg,
      transparent 80deg,
      rgba(212, 175, 55, 0.08) 140deg,
      transparent 200deg,
      rgba(255, 77, 26, 0.05) 260deg,
      transparent 360deg);
  animation: rb-aurora-spin 18s linear infinite;
  opacity: 0.9;
  pointer-events: none;
}

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

.rb-flame-loader__grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.rb-flame-loader__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 180px rgba(0, 0, 0, 0.85),
    inset 0 -80px 120px rgba(200, 16, 46, 0.08);
}

.rb-flame-loader__floor-glow {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: min(420px, 90vw);
  height: 120px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255, 77, 26, 0.25) 0%, rgba(230, 0, 38, 0.08) 40%, transparent 70%);
  filter: blur(28px);
  animation: rb-floor-pulse 3s ease-in-out infinite;
}

@keyframes rb-floor-pulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scaleX(0.95); }
  50% { opacity: 1; transform: translateX(-50%) scaleX(1.05); }
}

/* —— Kıvılcımlar —— */
.rb-flame-loader__embers {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.rb-flame-loader__ember {
  position: absolute;
  bottom: -10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--rb-gold-light);
  box-shadow:
    0 0 6px var(--rb-amber),
    0 0 14px rgba(230, 0, 38, 0.5);
  opacity: 0;
  animation: rb-ember-rise var(--rb-ember-dur, 3s) ease-in infinite;
  animation-delay: var(--rb-ember-delay, 0s);
}

.rb-flame-loader__ember--lg {
  width: 5px;
  height: 5px;
  box-shadow: 0 0 10px var(--rb-gold), 0 0 22px rgba(255, 77, 26, 0.7);
}

.rb-flame-loader__ember--sm {
  width: 2px;
  height: 2px;
  background: #fff;
}

@keyframes rb-ember-rise {
  0% { opacity: 0; transform: translateY(0) translateX(0) scale(0.3); }
  12% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translateY(-105vh) translateX(var(--rb-ember-drift, 0)) scale(0.05);
  }
}

/* —— Sahne —— */
.rb-flame-loader__stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(320px, 92vw);
  padding: 0 16px;
}

.rb-flame-loader__halo {
  position: absolute;
  top: 0;
  left: 50%;
  width: 260px;
  height: 260px;
  margin-left: -130px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent,
    rgba(212, 175, 55, 0.15),
    transparent,
    rgba(230, 0, 38, 0.2),
    transparent,
    rgba(245, 215, 142, 0.12),
    transparent);
  filter: blur(20px);
  animation: rb-halo-spin 8s linear infinite;
  pointer-events: none;
}

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

.rb-flame-loader__orbit {
  position: absolute;
  top: 18px;
  left: 50%;
  border-radius: 50%;
  border: 1px solid transparent;
  pointer-events: none;
}

.rb-flame-loader__orbit--a {
  width: 248px;
  height: 248px;
  margin-left: -124px;
  border-top-color: rgba(212, 175, 55, 0.35);
  border-right-color: rgba(212, 175, 55, 0.08);
  animation: rb-orbit 4s linear infinite;
}

.rb-flame-loader__orbit--b {
  width: 228px;
  height: 228px;
  margin-left: -114px;
  top: 28px;
  border-bottom-color: rgba(230, 0, 38, 0.3);
  border-left-color: rgba(230, 0, 38, 0.06);
  animation: rb-orbit 2.8s linear infinite reverse;
}

@keyframes rb-orbit {
  to { transform: rotate(360deg); }
}

.rb-flame-loader__crest {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: -6px;
  filter: drop-shadow(0 2px 12px rgba(212, 175, 55, 0.5));
  animation: rb-crest-float 2.5s ease-in-out infinite;
}

.rb-flame-loader__crest-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.45em;
  text-indent: 0.45em;
  color: var(--rb-gold-light);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
}

@keyframes rb-crest-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* —— Halkalar —— */
.rb-flame-loader__ring {
  position: relative;
  width: 220px;
  height: 220px;
  margin-top: 4px;
}

.rb-flame-loader__ring::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(212, 175, 55, 0.4);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.12);
  animation: rb-orbit 14s linear infinite;
  pointer-events: none;
}

.rb-flame-loader__ring::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px solid rgba(230, 0, 38, 0.12);
  pointer-events: none;
}

.rb-flame-loader__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.rb-flame-loader__ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 4;
}

.rb-flame-loader__ring-fill {
  fill: none;
  stroke: url(#rbFlameRingGrad);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 490;
  stroke-dashoffset: 490;
  animation: rb-ring-draw 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards, rb-ring-pulse 2.2s ease-in-out infinite 1.4s;
}

@keyframes rb-ring-draw {
  to { stroke-dashoffset: 72; }
}

@keyframes rb-ring-pulse {
  0%, 100% { stroke-width: 4; opacity: 1; }
  50% { stroke-width: 5; opacity: 0.92; }
}

.rb-flame-loader__ring-inner-track {
  fill: none;
  stroke: rgba(212, 175, 55, 0.08);
  stroke-width: 2;
}

.rb-flame-loader__ring-inner-fill {
  fill: none;
  stroke: url(#rbGoldRingGrad);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 390;
  stroke-dashoffset: 390;
  opacity: 0.85;
  animation: rb-ring-inner-draw 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

@keyframes rb-ring-inner-draw {
  to { stroke-dashoffset: 100; }
}

/* —— Alev —— */
.rb-flame-loader__flame-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 90px;
  height: 100px;
  transform: translate(-50%, -48%);
  pointer-events: none;
  z-index: 1;
}

.rb-flame-loader__flame--glow {
  width: 80px;
  height: 90px;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center bottom, rgba(255, 77, 26, 0.55) 0%, rgba(230, 0, 38, 0.2) 45%, transparent 70%);
  filter: blur(14px);
  animation: rb-flame-glow-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes rb-flame-glow-pulse {
  from { opacity: 0.7; transform: translateX(-50%) scale(0.9); }
  to { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.rb-flame-loader__flame {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  transform-origin: center bottom;
}

.rb-flame-loader__flame--outer {
  width: 64px;
  height: 72px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(200, 16, 46, 0.4) 25%,
    rgba(255, 77, 26, 0.65) 70%,
    rgba(212, 175, 55, 0.2) 100%);
  animation: rb-flame-outer 0.5s ease-in-out infinite alternate;
}

.rb-flame-loader__flame--mid {
  width: 46px;
  height: 58px;
  bottom: 6px;
  background: linear-gradient(180deg,
    var(--rb-champagne) 0%,
    var(--rb-gold-light) 18%,
    var(--rb-amber) 50%,
    var(--rb-red) 100%);
  box-shadow:
    0 0 40px rgba(255, 154, 60, 0.7),
    0 0 80px rgba(230, 0, 38, 0.35);
  animation: rb-flame-mid 0.38s ease-in-out infinite alternate-reverse;
}

.rb-flame-loader__flame--core {
  width: 20px;
  height: 32px;
  bottom: 12px;
  background: linear-gradient(180deg, #fff 0%, var(--rb-champagne) 35%, var(--rb-gold-light) 100%);
  box-shadow: 0 0 24px rgba(255, 248, 231, 0.95);
  animation: rb-flame-core 0.22s ease-in-out infinite alternate;
}

@keyframes rb-flame-outer {
  from { transform: translateX(-50%) scaleX(0.9) scaleY(0.94); opacity: 0.8; }
  to { transform: translateX(-50%) scaleX(1.08) scaleY(1.06); opacity: 1; }
}

@keyframes rb-flame-mid {
  from { transform: translateX(-50%) scaleX(0.93) scaleY(0.94); }
  to { transform: translateX(-50%) scaleX(1.06) scaleY(1.1); }
}

@keyframes rb-flame-core {
  from { transform: translateX(-50%) scaleY(0.88); }
  to { transform: translateX(-50%) scaleY(1.12); }
}

/* —— Marka kartı (cam + altın) —— */
.rb-flame-loader__brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  text-align: center;
  padding: 18px 22px 16px;
  min-width: 118px;
  max-width: 158px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 248, 231, 0.12) 0%, transparent 42%),
    linear-gradient(180deg, rgba(22, 16, 20, 0.92) 0%, rgba(8, 6, 10, 0.96) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 60px rgba(230, 0, 38, 0.35),
    0 24px 48px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(212, 175, 55, 0.15);
  overflow: hidden;
}

.rb-flame-loader__brand-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 248, 231, 0.18) 45%, transparent 100%);
  animation: rb-brand-shine 2.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes rb-brand-shine {
  0% { left: -100%; }
  45%, 100% { left: 150%; }
}

.rb-flame-loader__brand-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--rb-gold-light);
  opacity: 0.7;
}

.rb-flame-loader__brand-corner--tl {
  top: 6px;
  left: 6px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.rb-flame-loader__brand-corner--br {
  bottom: 6px;
  right: 6px;
  border-bottom: 1px solid;
  border-right: 1px solid;
}

.rb-flame-loader__brand-title {
  display: block;
  position: relative;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(13px, 3.8vw, 17px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff 0%, var(--rb-champagne) 55%, var(--rb-gold-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.rb-flame-loader__brand-divider {
  display: block;
  width: 48px;
  height: 1px;
  margin: 8px auto;
  background: linear-gradient(90deg, transparent, var(--rb-gold), var(--rb-red), var(--rb-gold), transparent);
  opacity: 0.9;
}

.rb-flame-loader__brand-sub {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(7px, 2vw, 9px);
  font-weight: 800;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
  color: var(--rb-gold-light);
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.6);
}

/* —— Alt metin —— */
.rb-flame-loader__status {
  display: flex;
  gap: 3px;
  margin: 26px 0 6px;
  padding: 0;
  list-style: none;
}

.rb-flame-loader__status span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--rb-champagne) 0%, var(--rb-gold-light) 50%, var(--rb-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rb-letter-wave 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
}

.rb-flame-loader__status span:nth-child(1) { animation-delay: 0s; }
.rb-flame-loader__status span:nth-child(2) { animation-delay: 0.08s; }
.rb-flame-loader__status span:nth-child(3) { animation-delay: 0.16s; }
.rb-flame-loader__status span:nth-child(4) { animation-delay: 0.24s; }
.rb-flame-loader__status span:nth-child(5) { animation-delay: 0.32s; }
.rb-flame-loader__status span:nth-child(6) { animation-delay: 0.4s; }
.rb-flame-loader__status span:nth-child(7) { animation-delay: 0.48s; }
.rb-flame-loader__status span:nth-child(8) { animation-delay: 0.56s; }
.rb-flame-loader__status span:nth-child(9) { animation-delay: 0.64s; }
.rb-flame-loader__status span:nth-child(10) { animation-delay: 0.72s; }

@keyframes rb-letter-wave {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

.rb-flame-loader__tagline {
  margin: 0 0 14px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.55);
}

/* —— İlerleme çubuğu —— */
.rb-flame-loader__bar {
  position: relative;
  width: 100%;
  max-width: 240px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.15);
  overflow: hidden;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.4);
}

.rb-flame-loader__bar-glow {
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, transparent, rgba(230, 0, 38, 0.3), transparent);
  animation: rb-bar-glow-move 2s ease-in-out infinite;
}

@keyframes rb-bar-glow-move {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.rb-flame-loader__bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg,
    var(--rb-crimson),
    var(--rb-red),
    var(--rb-gold-light),
    var(--rb-gold));
  box-shadow: 0 0 16px rgba(255, 77, 26, 0.8), 0 0 8px rgba(212, 175, 55, 0.5);
  animation: rb-bar-slide 1.35s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes rb-bar-slide {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(320%); }
}

@media (prefers-reduced-motion: reduce) {
  .rb-flame-loader__ember,
  .rb-flame-loader__aurora,
  .rb-flame-loader__orbit,
  .rb-flame-loader__halo,
  .rb-flame-loader__floor-glow,
  .rb-flame-loader__crest,
  .rb-flame-loader__flame,
  .rb-flame-loader__brand-shine,
  .rb-flame-loader__ring-fill,
  .rb-flame-loader__ring-inner-fill,
  .rb-flame-loader__status span,
  .rb-flame-loader__bar-fill,
  .rb-flame-loader__bar-glow {
    animation: none !important;
  }
  .rb-flame-loader__ring-fill { stroke-dashoffset: 72; }
  .rb-flame-loader__ring-inner-fill { stroke-dashoffset: 100; }
}
