/* Splash — Ampul & Anahtar açılış ekranı */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: radial-gradient(ellipse at 50% 30%, #152238 0%, #0a1628 55%, #060d18 100%);
  display: block;
  opacity: 1;
  transition:
    opacity 2.2s cubic-bezier(0.22, 1, 0.36, 1),
    background 1.8s ease;
  will-change: opacity, background;
}

.splash-screen.is-lit {
  background: radial-gradient(ellipse at 50% 25%, #2a2010 0%, #1a1508 40%, #0a1628 100%);
}

.splash-screen.is-exiting {
  opacity: 0;
  pointer-events: none;
}

.splash-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 0 2rem 2rem;
  user-select: none;
}

/* Ampul montajı — kablo ekranın en üstünden başlar */
.bulb-assembly {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.bulb-wire {
  width: 3px;
  background: linear-gradient(to bottom, #4a5568, #2d3748);
  border-radius: 2px;
  height: var(--wire-length, 18vh);
  min-height: 64px;
  max-height: 150px;
  transition: height 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.05);
}

.bulb-assembly.is-rising .bulb-wire {
  height: 48px;
}

.bulb-socket {
  width: 28px;
  height: 18px;
  background: linear-gradient(180deg, #6b7280 0%, #374151 100%);
  border-radius: 2px 2px 4px 4px;
  margin-top: -1px;
  position: relative;
  z-index: 2;
}

.bulb-socket::before,
.bulb-socket::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 1px;
}

.bulb-socket::before { top: 5px; }
.bulb-socket::after { top: 11px; }

.bulb-glass {
  position: relative;
  width: 90px;
  height: 110px;
  margin-top: -2px;
  transform-origin: top center;
  animation: bulb-swing 5s ease-in-out infinite;
  transition: transform 0.8s ease;
}

.bulb-assembly.is-rising .bulb-glass,
.bulb-assembly.is-lit .bulb-glass {
  animation: none;
  transform: rotate(0deg);
}

@keyframes bulb-swing {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

.bulb-shape {
  width: 90px;
  height: 100px;
  background: radial-gradient(ellipse at 40% 35%, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 40%, rgba(30, 40, 60, 0.6) 100%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50% 50% 45% 45%;
  position: relative;
  transition:
    background 1.6s ease,
    border-color 1.4s ease,
    box-shadow 1.8s ease;
  box-shadow: inset 0 -20px 30px rgba(0, 0, 0, 0.3);
}

.bulb-assembly.is-lit .bulb-shape {
  background: radial-gradient(ellipse at 40% 35%, #fffef5 0%, #ffe9a0 35%, #ffc830 70%, #ff9500 100%);
  border-color: rgba(255, 220, 100, 0.6);
  box-shadow:
    0 0 40px rgba(255, 200, 50, 0.8),
    0 0 80px rgba(255, 180, 30, 0.5),
    0 0 120px rgba(255, 150, 0, 0.3),
    inset 0 -10px 20px rgba(255, 200, 50, 0.4);
}

.bulb-filament {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 30px;
  opacity: 0.3;
  transition: opacity 1s ease 0.5s;
}

.bulb-filament::before,
.bulb-filament::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 2px;
  height: 28px;
  background: #888;
  border-radius: 1px;
}

.bulb-filament::before {
  left: 6px;
  transform: rotate(-8deg);
}

.bulb-filament::after {
  right: 6px;
  transform: rotate(8deg);
}

.bulb-assembly.is-lit .bulb-filament {
  opacity: 1;
}

.bulb-assembly.is-lit .bulb-filament::before,
.bulb-assembly.is-lit .bulb-filament::after {
  background: #ff6600;
  box-shadow: 0 0 8px #ff9500;
}

.bulb-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 200, 80, 0.35) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 2s ease 0.3s;
  pointer-events: none;
  z-index: -1;
}

.bulb-assembly.is-lit .bulb-glow {
  opacity: 1;
}

.bulb-base {
  width: 40px;
  height: 14px;
  background: linear-gradient(180deg, #9ca3af, #6b7280);
  border-radius: 0 0 6px 6px;
  margin: -4px auto 0;
}

/* Anahtar */
.switch-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding-top: 2.5rem;
  min-height: 0;
}

.light-switch {
  position: relative;
  width: 70px;
  height: 110px;
  background: linear-gradient(145deg, #e8e8e8, #d0d0d0);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  padding: 12px;
  transition: transform 0.15s ease;
  outline: none;
}

.light-switch:hover {
  transform: scale(1.03);
}

.light-switch:active {
  transform: scale(0.97);
}

.light-switch.is-on {
  background: linear-gradient(145deg, #f0f0f0, #d8d8d8);
}

.switch-plate-screws::before,
.switch-plate-screws::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  background: #aaa;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.switch-plate-screws::before { top: 8px; left: 50%; transform: translateX(-50%); }
.switch-plate-screws::after { bottom: 8px; left: 50%; transform: translateX(-50%); }

.switch-toggle {
  display: block;
  width: 100%;
  height: 50px;
  background: linear-gradient(180deg, #f5f5f5 0%, #e0e0e0 100%);
  border-radius: 4px;
  position: relative;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease;
}

.light-switch.is-on .switch-toggle {
  transform: translateY(38px);
  background: linear-gradient(180deg, #e8e8e8 0%, #d5d5d5 100%);
}

.switch-label-on,
.switch-label-off {
  position: absolute;
  font-size: 9px;
  font-weight: 700;
  color: #888;
  letter-spacing: 0.05em;
  left: 50%;
  transform: translateX(-50%);
}

.switch-label-on { top: 18px; }
.switch-label-off { bottom: 18px; }

.splash-hint {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  animation: hint-pulse 2.5s ease-in-out infinite;
  margin: 0;
  transition: opacity 0.6s ease;
}

.splash-hint.is-hidden {
  opacity: 0;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.8; }
}

.splash-brand {
  position: absolute;
  bottom: 2rem;
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Splash kilidi — sadece scroll */
body.splash-lock {
  overflow: hidden;
}

@media (max-width: 576px) {
  .bulb-wire {
    --wire-length: 14vh;
    min-height: 52px;
  }

  .bulb-assembly.is-rising .bulb-wire {
    height: 36px;
  }

  .switch-area {
    padding-top: 1.5rem;
  }

  .bulb-shape { width: 70px; height: 80px; }
  .bulb-glass { width: 70px; height: 90px; }
}
