const { useState, useEffect } = React;

/* ═══════════════════════════════════════════════════════════════
   LIGHT THEME: Dashboard screen content (adapted per device)
   ═══════════════════════════════════════════════════════════════ */

function LightDesktopScreen({ w = 380, h = 260 }) {
  return (
    <div style={{
      width: w, height: h, background: '#ffffff',
      fontFamily: "'Geist', sans-serif", overflow: 'hidden',
      display: 'flex', flexDirection: 'column',
    }}>
      {/* Browser bar */}
      <div style={{
        display: 'flex', alignItems: 'center', padding: '6px 10px', gap: 5,
        borderBottom: '1px solid #e8e8e6', background: '#f5f5f3', flexShrink: 0,
      }}>
        <div style={{ display: 'flex', gap: 4 }}>
          <span style={{ width: 7, height: 7, borderRadius: '50%', background: '#ff5f57' }}></span>
          <span style={{ width: 7, height: 7, borderRadius: '50%', background: '#ffbd2e' }}></span>
          <span style={{ width: 7, height: 7, borderRadius: '50%', background: '#28c840' }}></span>
        </div>
        <div style={{
          marginLeft: 8, padding: '2px 10px', borderRadius: 4,
          background: '#fff', border: '1px solid #e0e0de',
          fontSize: 8, color: '#888',
          fontFamily: "'Geist Mono', monospace",
        }}>ik-işleri.tr/dashboard</div>
      </div>

      {/* Body */}
      <div style={{ display: 'flex', flex: 1, minHeight: 0 }}>
        {/* Sidebar */}
        <div style={{
          width: 90, borderRight: '1px solid #e8e8e6', padding: '10px 8px',
          background: '#fafaf8', flexShrink: 0,
        }}>
          <div style={{
            fontFamily: "'Instrument Serif', serif", fontSize: 11, color: '#1a1a18',
            marginBottom: 10, paddingLeft: 4,
          }}>
            ik-işleri<span style={{ color: '#0d9488' }}>.tr</span>
          </div>
          {['Özet', 'Özlük', 'İzin', 'Bordro', 'Raporlar'].map((l, i) => (
            <div key={i} style={{
              fontSize: 8, padding: '3px 6px', borderRadius: 3, marginBottom: 1,
              color: i === 0 ? '#1a1a18' : '#888',
              background: i === 0 ? '#eeeeec' : 'transparent',
              fontWeight: i === 0 ? 500 : 400,
            }}>{l}</div>
          ))}
        </div>

        {/* Main */}
        <div style={{ flex: 1, padding: '10px 12px', overflow: 'hidden' }}>
          <div style={{
            fontFamily: "'Geist Mono', monospace", fontSize: 7,
            color: '#999', textTransform: 'uppercase', letterSpacing: '0.08em',
          }}>MART 2026</div>
          <div style={{
            fontFamily: "'Instrument Serif', serif", fontSize: 14,
            color: '#1a1a18', margin: '2px 0 8px',
          }}>Günaydın, Zeynep.</div>

          {/* Stats */}
          <div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: 4, marginBottom: 8 }}>
            {[['142', 'Çalışan'], ['8', 'İzinde'], ['4', 'Kadro'], ['₺1.84M', 'Bordro']].map(([v, k], i) => (
              <div key={i} style={{
                border: '1px solid #e8e8e6', padding: '5px 6px', borderRadius: 4,
                background: '#fff',
              }}>
                <div style={{ fontSize: 12, fontWeight: 600, color: '#1a1a18' }}>{v}</div>
                <div style={{ fontSize: 6, color: '#999', fontFamily: "'Geist Mono', monospace" }}>{k}</div>
              </div>
            ))}
          </div>

          {/* Chart bars */}
          <div style={{
            border: '1px solid #e8e8e6', borderRadius: 4, padding: '6px 8px',
            background: '#fff',
          }}>
            <div style={{
              fontSize: 7, color: '#999', marginBottom: 6,
              fontFamily: "'Geist Mono', monospace",
            }}>DEVAM & İZİN</div>
            <div style={{ display: 'flex', gap: 2, alignItems: 'flex-end', height: 36 }}>
              {[28, 34, 22, 38, 32, 30, 40, 36, 20, 38, 32, 36].map((h, i) => (
                <div key={i} style={{
                  flex: 1, display: 'flex', flexDirection: 'column', gap: 1,
                }}>
                  <div style={{
                    height: h * 0.7, background: '#c8c8c4', borderRadius: 1,
                  }}></div>
                  <div style={{
                    height: (Math.random() * 10 + 3), background: '#0d9488', borderRadius: 1,
                  }}></div>
                </div>
              ))}
            </div>
          </div>
        </div>
      </div>
    </div>
  );
}

function LightTabletScreen({ w = 220, h = 300 }) {
  return (
    <div style={{
      width: w, height: h, background: '#ffffff',
      fontFamily: "'Geist', sans-serif", overflow: 'hidden',
      display: 'flex', flexDirection: 'column',
    }}>
      {/* Top bar */}
      <div style={{
        display: 'flex', alignItems: 'center', justifyContent: 'space-between',
        padding: '8px 12px', borderBottom: '1px solid #e8e8e6',
        background: '#fafaf8', flexShrink: 0,
      }}>
        <div style={{
          fontFamily: "'Instrument Serif', serif", fontSize: 12, color: '#1a1a18',
        }}>
          ik-işleri<span style={{ color: '#0d9488' }}>.tr</span>
        </div>
        <span style={{ fontSize: 14, color: '#999' }}>≡</span>
      </div>

      {/* Content */}
      <div style={{ flex: 1, padding: '10px 12px', overflow: 'hidden' }}>
        <div style={{
          fontFamily: "'Geist Mono', monospace", fontSize: 7,
          color: '#999', textTransform: 'uppercase',
        }}>MART 2026</div>
        <div style={{
          fontFamily: "'Instrument Serif', serif", fontSize: 15,
          color: '#1a1a18', margin: '2px 0 10px',
        }}>Günaydın, Zeynep.</div>

        {/* Stats 2 col */}
        <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 5, marginBottom: 10 }}>
          {[['142', 'Çalışan', '+6'], ['8', 'İzinde', 'bugün'], ['₺1.84M', 'Bordro', 'Mart'], ['4', 'Açık kadro', '3 süreç']].map(([v, k], i) => (
            <div key={i} style={{
              border: '1px solid #e8e8e6', padding: '6px 8px', borderRadius: 5,
              background: '#fff',
            }}>
              <div style={{ fontSize: 14, fontWeight: 600, color: '#1a1a18' }}>{v}</div>
              <div style={{ fontSize: 7, color: '#999', fontFamily: "'Geist Mono', monospace" }}>{k}</div>
            </div>
          ))}
        </div>

        {/* Approvals */}
        <div style={{
          border: '1px solid #e8e8e6', borderRadius: 5, padding: '6px 8px',
          background: '#fff',
        }}>
          <div style={{
            fontSize: 7, color: '#999', marginBottom: 5,
            fontFamily: "'Geist Mono', monospace", textTransform: 'uppercase',
          }}>ONAY BEKLEYEN · 7</div>
          {[['E. Yıldız', 'İzin', '3g'], ['M. Kaya', 'Masraf', '₺2.1K'], ['B. Öztürk', 'Mesai', '6s']].map(([n, t, v], i) => (
            <div key={i} style={{
              display: 'flex', justifyContent: 'space-between', alignItems: 'center',
              padding: '4px 0', borderBottom: i < 2 ? '1px solid #f0f0ee' : 'none',
              fontSize: 8, color: '#555',
            }}>
              <span style={{ fontWeight: 500, color: '#1a1a18' }}>{n}</span>
              <div style={{ display: 'flex', gap: 8, alignItems: 'center' }}>
                <span style={{ color: '#999' }}>{t}</span>
                <span style={{ fontFamily: "'Geist Mono', monospace", color: '#1a1a18' }}>{v}</span>
              </div>
            </div>
          ))}
        </div>
      </div>
    </div>
  );
}

function LightMobileScreen({ w = 140, h = 280 }) {
  return (
    <div style={{
      width: w, height: h, background: '#ffffff',
      fontFamily: "'Geist', sans-serif", overflow: 'hidden',
      display: 'flex', flexDirection: 'column',
    }}>
      {/* Status bar */}
      <div style={{
        display: 'flex', justifyContent: 'space-between', alignItems: 'center',
        padding: '4px 10px', fontSize: 7, color: '#1a1a18',
        fontFamily: "'Geist Mono', monospace", flexShrink: 0,
        fontWeight: 600,
      }}>
        <span>09:41</span>
        <div style={{ display: 'flex', gap: 3, alignItems: 'center' }}>
          <span style={{ fontSize: 7 }}>●●●○</span>
          <span style={{ fontSize: 7 }}>■</span>
        </div>
      </div>

      {/* Header */}
      <div style={{
        padding: '6px 10px 8px', borderBottom: '1px solid #e8e8e6',
        flexShrink: 0,
      }}>
        <div style={{
          fontFamily: "'Instrument Serif', serif", fontSize: 13, color: '#1a1a18',
        }}>
          ik-işleri<span style={{ color: '#0d9488' }}>.tr</span>
        </div>
        <div style={{
          fontFamily: "'Geist Mono', monospace", fontSize: 6,
          color: '#999', marginTop: 1,
        }}>MART 2026</div>
      </div>

      {/* Content */}
      <div style={{ flex: 1, padding: '8px 10px', overflow: 'hidden' }}>
        <div style={{
          fontFamily: "'Instrument Serif', serif", fontSize: 13,
          color: '#1a1a18', marginBottom: 8,
        }}>Günaydın, Zeynep.</div>

        {/* Stats */}
        <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4, marginBottom: 8 }}>
          {[['142', 'Çalışan'], ['8', 'İzinde']].map(([v, k], i) => (
            <div key={i} style={{
              border: '1px solid #e8e8e6', padding: '5px 6px', borderRadius: 4,
              background: '#fff',
            }}>
              <div style={{ fontSize: 13, fontWeight: 600, color: '#1a1a18' }}>{v}</div>
              <div style={{ fontSize: 6, color: '#999', fontFamily: "'Geist Mono', monospace" }}>{k}</div>
            </div>
          ))}
        </div>

        {/* Quick action */}
        <div style={{
          background: '#f0fdf9', border: '1px solid #ccf2eb',
          borderRadius: 6, padding: '6px 8px', marginBottom: 8,
        }}>
          <div style={{ display: 'flex', alignItems: 'center', gap: 6, marginBottom: 4 }}>
            <div style={{
              width: 18, height: 18, borderRadius: '50%',
              background: 'linear-gradient(135deg, #fbbf24, #f59e0b)',
              display: 'flex', alignItems: 'center', justifyContent: 'center',
              color: '#1a1305', fontSize: 6, fontWeight: 700,
            }}>EY</div>
            <div>
              <div style={{ fontSize: 7, fontWeight: 600, color: '#1a1a18' }}>Emre Y.</div>
              <div style={{ fontSize: 6, color: '#999' }}>Yıllık izin · 3 gün</div>
            </div>
          </div>
          <div style={{ display: 'flex', gap: 4 }}>
            <button style={{
              flex: 1, padding: '3px', fontSize: 7, fontWeight: 600,
              background: '#0d9488', color: '#fff',
              border: 'none', borderRadius: 4, fontFamily: 'inherit',
            }}>Onayla</button>
            <button style={{
              flex: 1, padding: '3px', fontSize: 7,
              background: '#fff', color: '#888',
              border: '1px solid #e0e0de', borderRadius: 4, fontFamily: 'inherit',
            }}>Reddet</button>
          </div>
        </div>

        {/* Mini chart */}
        <div style={{ display: 'flex', gap: 1.5, alignItems: 'flex-end', height: 28 }}>
          {[20, 26, 18, 30, 24, 22, 32, 28, 16, 30, 24, 28].map((h, i) => (
            <div key={i} style={{
              flex: 1, height: h * 0.6,
              background: i % 3 === 0 ? '#0d9488' : '#d4d4d0',
              borderRadius: 1,
            }}></div>
          ))}
        </div>
      </div>

      {/* Bottom tab bar */}
      <div style={{
        display: 'flex', borderTop: '1px solid #e8e8e6', padding: '5px 0 8px',
        background: '#fafaf8', flexShrink: 0,
      }}>
        {[
          { label: 'Özet', active: true },
          { label: 'İzin', active: false },
          { label: 'Bordro', active: false },
          { label: 'Profil', active: false },
        ].map((tab, i) => (
          <div key={i} style={{
            flex: 1, textAlign: 'center', fontSize: 6,
            color: tab.active ? '#0d9488' : '#999',
            fontWeight: tab.active ? 600 : 400,
          }}>
            <div style={{
              width: 4, height: 4, borderRadius: '50%', margin: '0 auto 2px',
              background: tab.active ? '#0d9488' : '#d4d4d0',
            }}></div>
            {tab.label}
          </div>
        ))}
      </div>
    </div>
  );
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT DEVICE FRAMES
   ═══════════════════════════════════════════════════════════════ */

function LightLaptopFrame({ children, scale = 1 }) {
  return (
    <div style={{ transform: `scale(${scale})`, transformOrigin: 'center center' }}>
      <div style={{
        background: '#e0e0de', borderRadius: '10px 10px 0 0',
        border: '2px solid #c8c8c4', borderBottom: 'none',
        overflow: 'hidden', padding: '3px 3px 0',
      }}>
        <div style={{ display: 'flex', justifyContent: 'center', padding: '3px 0', background: '#d8d8d4' }}>
          <div style={{ width: 5, height: 5, borderRadius: '50%', background: '#bbb' }}></div>
        </div>
        <div style={{ borderRadius: '4px 4px 0 0', overflow: 'hidden', boxShadow: '0 2px 12px rgba(0,0,0,.08)' }}>
          {children}
        </div>
      </div>
      <div style={{
        width: 'calc(100% + 30px)', height: 10, marginLeft: -15,
        background: 'linear-gradient(180deg, #d0d0cc 0%, #bbbbb7 100%)',
        borderRadius: '0 0 4px 4px',
      }}></div>
      <div style={{
        width: 'calc(100% + 50px)', height: 6, marginLeft: -25, marginTop: -1,
        background: 'linear-gradient(180deg, #c8c8c4 0%, #b0b0ac 100%)',
        borderRadius: '0 0 8px 8px',
      }}></div>
    </div>
  );
}

function LightTabletFrame({ children, scale = 1 }) {
  return (
    <div style={{ transform: `scale(${scale})`, transformOrigin: 'center center' }}>
      <div style={{
        background: '#e4e4e0', borderRadius: 14, padding: '10px 6px',
        border: '2px solid #d0d0cc',
        boxShadow: '0 12px 40px rgba(0,0,0,.10)',
      }}>
        <div style={{ display: 'flex', justifyContent: 'center', marginBottom: 4 }}>
          <div style={{ width: 4, height: 4, borderRadius: '50%', background: '#c0c0bc' }}></div>
        </div>
        <div style={{ borderRadius: 6, overflow: 'hidden', boxShadow: '0 1px 4px rgba(0,0,0,.06)' }}>
          {children}
        </div>
      </div>
    </div>
  );
}

function LightPhoneFrame({ children, scale = 1 }) {
  return (
    <div style={{ transform: `scale(${scale})`, transformOrigin: 'center center' }}>
      <div style={{
        background: '#e4e4e0', borderRadius: 20, padding: '8px 4px',
        border: '2px solid #d0d0cc',
        boxShadow: '0 12px 40px rgba(0,0,0,.10)',
      }}>
        <div style={{ display: 'flex', justifyContent: 'center', marginBottom: 3 }}>
          <div style={{
            width: 40, height: 8, borderRadius: 10, background: '#c8c8c4',
          }}></div>
        </div>
        <div style={{ borderRadius: 12, overflow: 'hidden', boxShadow: '0 1px 4px rgba(0,0,0,.06)' }}>
          {children}
        </div>
        <div style={{ display: 'flex', justifyContent: 'center', marginTop: 4 }}>
          <div style={{
            width: 36, height: 3, borderRadius: 10, background: '#c0c0bc',
          }}></div>
        </div>
      </div>
    </div>
  );
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT OPTION A: Composed Overlap
   ═══════════════════════════════════════════════════════════════ */
function LightComposedOverlap() {
  return (
    <div style={{
      position: 'relative', width: 600, height: 580,
      display: 'flex', alignItems: 'center', justifyContent: 'center',
    }}>
      {/* Glow */}
      <div style={{
        position: 'absolute', width: '70%', height: '60%',
        borderRadius: '50%', top: '15%', left: '15%',
        background: 'radial-gradient(circle, rgba(13,148,136,.08) 0%, transparent 70%)',
        filter: 'blur(50px)', pointerEvents: 'none',
      }}></div>

      {/* Desktop */}
      <div style={{
        position: 'absolute', left: 10, top: 60, zIndex: 1,
        transform: 'perspective(1200px) rotateY(8deg) rotateX(-2deg)',
      }}>
        <LightLaptopFrame>
          <LightDesktopScreen w={360} h={230} />
        </LightLaptopFrame>
      </div>

      {/* Tablet */}
      <div style={{ position: 'absolute', right: 80, top: 30, zIndex: 2 }}>
        <LightTabletFrame>
          <LightTabletScreen w={180} h={250} />
        </LightTabletFrame>
      </div>

      {/* Mobile */}
      <div style={{ position: 'absolute', right: 20, bottom: 40, zIndex: 3 }}>
        <LightPhoneFrame>
          <LightMobileScreen w={130} h={260} />
        </LightPhoneFrame>
      </div>

      <div style={{
        position: 'absolute', bottom: 12, left: 20, zIndex: 4,
        fontFamily: "'Geist Mono', monospace", fontSize: 10,
        color: 'rgba(255,255,255,.4)', textTransform: 'uppercase',
        letterSpacing: '0.12em',
      }}>her cihazda ik-işleri.tr</div>
    </div>
  );
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT OPTION B: Fan / Yelpaze
   ═══════════════════════════════════════════════════════════════ */
function LightComposedFan() {
  return (
    <div style={{
      position: 'relative', width: 600, height: 580,
      display: 'flex', alignItems: 'center', justifyContent: 'center',
    }}>
      <div style={{
        position: 'absolute', width: '80%', height: '70%',
        borderRadius: '50%',
        background: 'radial-gradient(circle, rgba(13,148,136,.06) 0%, transparent 70%)',
        filter: 'blur(40px)', pointerEvents: 'none',
      }}></div>

      <div style={{
        position: 'absolute', left: -10, top: 100, zIndex: 1,
        transform: 'rotate(-6deg) scale(0.88)', opacity: 0.9,
      }}>
        <LightLaptopFrame>
          <LightDesktopScreen w={340} h={220} />
        </LightLaptopFrame>
      </div>

      <div style={{
        position: 'absolute', left: '50%', top: '50%', zIndex: 2,
        transform: 'translate(-50%, -50%)',
      }}>
        <LightTabletFrame>
          <LightTabletScreen w={200} h={275} />
        </LightTabletFrame>
      </div>

      <div style={{
        position: 'absolute', right: 30, top: 100, zIndex: 3,
        transform: 'rotate(6deg)',
      }}>
        <LightPhoneFrame>
          <LightMobileScreen w={130} h={260} />
        </LightPhoneFrame>
      </div>

      <div style={{
        position: 'absolute', bottom: 24, left: 0, right: 0, zIndex: 4,
        display: 'flex', justifyContent: 'center', gap: 32,
      }}>
        {['Masaüstü', 'Tablet', 'Mobil'].map((label, i) => (
          <div key={i} style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
            <span style={{ width: 6, height: 6, borderRadius: '50%', background: '#0d9488' }}></span>
            <span style={{
              fontFamily: "'Geist Mono', monospace", fontSize: 9,
              color: 'rgba(255,255,255,.5)', textTransform: 'uppercase',
              letterSpacing: '0.1em',
            }}>{label}</span>
          </div>
        ))}
      </div>
    </div>
  );
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT OPTION C: Perspective Sıralı
   ═══════════════════════════════════════════════════════════════ */
function LightComposedPerspective() {
  return (
    <div style={{
      position: 'relative', width: 600, height: 580,
      display: 'flex', alignItems: 'center', justifyContent: 'center',
    }}>
      <div style={{
        position: 'absolute', bottom: 80, left: '10%', right: '10%', height: 120,
        background: 'radial-gradient(ellipse, rgba(13,148,136,.06) 0%, transparent 70%)',
        filter: 'blur(30px)', pointerEvents: 'none',
      }}></div>

      <div style={{
        display: 'flex', alignItems: 'flex-end', gap: 20,
        transform: 'perspective(1400px) rotateX(6deg) rotateY(-12deg)',
        transformStyle: 'preserve-3d',
      }}>
        <div style={{ transform: 'translateZ(0px)' }}>
          <LightLaptopFrame scale={0.82}>
            <LightDesktopScreen w={340} h={220} />
          </LightLaptopFrame>
        </div>
        <div style={{ transform: 'translateZ(30px)' }}>
          <LightTabletFrame scale={0.85}>
            <LightTabletScreen w={170} h={240} />
          </LightTabletFrame>
        </div>
        <div style={{ transform: 'translateZ(60px)' }}>
          <LightPhoneFrame scale={0.9}>
            <LightMobileScreen w={120} h={240} />
          </LightPhoneFrame>
        </div>
      </div>

      <div style={{ position: 'absolute', top: 30, left: 30, zIndex: 4 }}>
        <div style={{
          fontFamily: "'Geist Mono', monospace", fontSize: 9,
          color: '#5eead4', textTransform: 'uppercase',
          letterSpacing: '0.12em', marginBottom: 4,
        }}>RESPONSİVE</div>
        <div style={{
          fontFamily: "'Instrument Serif', serif", fontSize: 20,
          color: '#e6e8eb', lineHeight: 1.2,
        }}>Her ekranda<br/>aynı güç.</div>
      </div>
    </div>
  );
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT OPTION D: 3D Carousel
   ═══════════════════════════════════════════════════════════════ */
function LightAnimatedCarousel() {
  const [active, setActive] = useState(0);
  const devices = ['desktop', 'tablet', 'mobile'];
  const labels = ['Masaüstü', 'Tablet', 'Mobil'];

  useEffect(() => {
    const timer = setInterval(() => setActive(a => (a + 1) % 3), 3000);
    return () => clearInterval(timer);
  }, []);

  const getTransform = (index) => {
    const diff = ((index - active) + 3) % 3;
    if (diff === 0) return { x: 0, z: 60, scale: 1, opacity: 1, rot: 0 };
    if (diff === 1) return { x: 200, z: -40, scale: 0.7, opacity: 0.4, rot: 15 };
    return { x: -200, z: -40, scale: 0.7, opacity: 0.4, rot: -15 };
  };

  const renderDevice = (type) => {
    if (type === 'desktop') return <LightLaptopFrame><LightDesktopScreen w={360} h={230} /></LightLaptopFrame>;
    if (type === 'tablet') return <LightTabletFrame><LightTabletScreen w={190} h={265} /></LightTabletFrame>;
    return <LightPhoneFrame><LightMobileScreen w={135} h={265} /></LightPhoneFrame>;
  };

  return (
    <div style={{
      position: 'relative', width: 600, height: 580,
      display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center',
    }}>
      <div style={{
        position: 'absolute', width: '60%', height: '50%', borderRadius: '50%',
        background: 'radial-gradient(circle, rgba(13,148,136,.08) 0%, transparent 70%)',
        filter: 'blur(50px)', pointerEvents: 'none',
      }}></div>

      <div style={{ position: 'relative', width: 500, height: 380, perspective: '1200px' }}>
        {devices.map((dev, i) => {
          const t = getTransform(i);
          return (
            <div key={dev} style={{
              position: 'absolute', left: '50%', top: '50%',
              transform: `translate(-50%, -50%) translateX(${t.x}px) translateZ(${t.z}px) scale(${t.scale}) rotateY(${t.rot}deg)`,
              opacity: t.opacity,
              transition: 'all 0.8s cubic-bezier(0.4, 0, 0.2, 1)',
              zIndex: t.z > 0 ? 10 : 1,
            }}>
              {renderDevice(dev)}
            </div>
          );
        })}
      </div>

      <div style={{
        display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 12,
        position: 'relative', zIndex: 20, marginTop: 8,
      }}>
        <div style={{
          fontFamily: "'Instrument Serif', serif", fontSize: 18,
          color: '#e6e8eb', transition: 'all 0.4s ease',
        }}>{labels[active]}</div>
        <div style={{ display: 'flex', gap: 8 }}>
          {devices.map((_, i) => (
            <button key={i} onClick={() => setActive(i)} style={{
              width: i === active ? 24 : 8, height: 8,
              borderRadius: 999, border: 'none',
              background: i === active ? '#2dd4bf' : '#243040',
              transition: 'all 0.4s ease', cursor: 'pointer',
            }}></button>
          ))}
        </div>
      </div>
    </div>
  );
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT OPTION E: Crossfade
   ═══════════════════════════════════════════════════════════════ */
function LightAnimatedCrossfade() {
  const [active, setActive] = useState(0);
  const labels = ['Masaüstü', 'Tablet', 'Mobil'];

  useEffect(() => {
    const timer = setInterval(() => setActive(a => (a + 1) % 3), 3500);
    return () => clearInterval(timer);
  }, []);

  return (
    <div style={{
      position: 'relative', width: 600, height: 580,
      display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center',
    }}>
      <div style={{
        position: 'absolute', width: '60%', height: '50%', borderRadius: '50%',
        background: 'radial-gradient(circle, rgba(13,148,136,.06) 0%, transparent 70%)',
        filter: 'blur(40px)', pointerEvents: 'none',
      }}></div>

      {/* Tab selector */}
      <div style={{
        display: 'flex', gap: 4, marginBottom: 24,
        background: '#1a1f2a', border: '1px solid #243040',
        borderRadius: 999, padding: 4, position: 'relative', zIndex: 10,
      }}>
        {labels.map((label, i) => (
          <button key={i} onClick={() => setActive(i)} style={{
            padding: '6px 16px', fontSize: 11, borderRadius: 999, border: 'none',
            background: active === i ? '#2dd4bf' : 'transparent',
            color: active === i ? '#042f2e' : '#7a8290',
            fontFamily: "'Geist Mono', monospace",
            textTransform: 'uppercase', letterSpacing: '0.06em',
            cursor: 'pointer', fontWeight: active === i ? 600 : 400,
            transition: 'all 0.3s ease',
          }}>{label}</button>
        ))}
      </div>

      {/* Device display */}
      <div style={{
        position: 'relative', width: 500, height: 400,
        display: 'flex', alignItems: 'center', justifyContent: 'center',
      }}>
        <div style={{
          position: 'absolute',
          opacity: active === 0 ? 1 : 0,
          transform: active === 0 ? 'scale(1) translateY(0)' : 'scale(0.9) translateY(20px)',
          transition: 'all 0.6s cubic-bezier(0.4, 0, 0.2, 1)',
          pointerEvents: active === 0 ? 'auto' : 'none',
        }}>
          <LightLaptopFrame>
            <LightDesktopScreen w={400} h={260} />
          </LightLaptopFrame>
        </div>

        <div style={{
          position: 'absolute',
          opacity: active === 1 ? 1 : 0,
          transform: active === 1 ? 'scale(1) translateY(0)' : 'scale(0.9) translateY(20px)',
          transition: 'all 0.6s cubic-bezier(0.4, 0, 0.2, 1)',
          pointerEvents: active === 1 ? 'auto' : 'none',
        }}>
          <LightTabletFrame>
            <LightTabletScreen w={230} h={320} />
          </LightTabletFrame>
        </div>

        <div style={{
          position: 'absolute',
          opacity: active === 2 ? 1 : 0,
          transform: active === 2 ? 'scale(1) translateY(0)' : 'scale(0.9) translateY(20px)',
          transition: 'all 0.6s cubic-bezier(0.4, 0, 0.2, 1)',
          pointerEvents: active === 2 ? 'auto' : 'none',
        }}>
          <LightPhoneFrame>
            <LightMobileScreen w={155} h={310} />
          </LightPhoneFrame>
        </div>
      </div>

      <div style={{
        display: 'flex', alignItems: 'center', gap: 8,
        position: 'relative', zIndex: 10, marginTop: 12,
      }}>
        <span style={{
          width: 6, height: 6, borderRadius: '50%',
          background: '#2dd4bf', boxShadow: '0 0 8px rgba(45,212,191,.5)',
        }}></span>
        <span style={{
          fontFamily: "'Geist Mono', monospace", fontSize: 10,
          color: 'rgba(255,255,255,.5)', textTransform: 'uppercase',
          letterSpacing: '0.1em',
        }}>her platformda tam deneyim</span>
      </div>
    </div>
  );
}

// Export all light components
Object.assign(window, {
  LightDesktopScreen, LightTabletScreen, LightMobileScreen,
  LightLaptopFrame, LightTabletFrame, LightPhoneFrame,
  LightComposedOverlap, LightComposedFan, LightComposedPerspective,
  LightAnimatedCarousel, LightAnimatedCrossfade,
});
