:root {
  --bg-dark: #070913;
  --bg-card: rgba(15, 23, 42, 0.75);
  --border-cyan: rgba(34, 211, 238, 0.25);
  --border-light: rgba(255, 255, 255, 0.08);
  --cyan-bright: #22d3ee;
  --purple-glow: #a855f7;
  --gold-glow: #f59e0b;
  --text-main: #f8fafc;
  --text-dim: #94a3b8;
  --font-mono: 'JetBrains Mono', monospace;
  --font-main: 'Outfit', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body.tech-theme {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Cyber Grid */
.cyber-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(34, 211, 238, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

.cyber-grid::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 20%, transparent 20%, #070913 90%);
}

#fireworks-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* Audio Widget - Mobil & Masaüstü Uyumlu Sabit Buton */
.audio-widget {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 999;
}

.synth-btn {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-cyan);
  color: var(--cyan-bright);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
}

.synth-btn:hover {
  background: rgba(34, 211, 238, 0.2);
  border-color: var(--cyan-bright);
  transform: scale(1.03);
}

.synth-btn.playing {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.4), rgba(168, 85, 247, 0.4));
  border-color: var(--cyan-bright);
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.5);
}

/* MAIN WRAPPER */
.main-wrapper {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

/* 1. HEADER */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 18px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.corp-branding .logo-text {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.ai-glow {
  color: var(--cyan-bright);
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
}

.tag-tech {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.status-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

/* 2. TERMINAL BANNER */
.terminal-banner {
  background: rgba(3, 7, 18, 0.85);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 25px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.term-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.term-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.term-dot.red { background: #ef4444; }
.term-dot.yellow { background: #f59e0b; }
.term-dot.green { background: #10b981; }

.term-file {
  color: #64748b;
  font-size: 0.7rem;
  margin-left: 6px;
}

.term-content code {
  display: block;
  color: #94a3b8;
  line-height: 1.6;
}

.p-cyan {
  color: var(--cyan-bright);
  font-weight: 700;
}

/* 3. HERO CARD */
.hero-card {
  text-align: center;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(10, 15, 30, 0.95));
  border: 1px solid var(--border-cyan);
  border-radius: 20px;
  padding: 30px 20px;
  margin-bottom: 30px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.hero-badge {
  display: inline-block;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid var(--border-cyan);
  color: var(--cyan-bright);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero-heading {
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 14px;
}

.gradient-name {
  background: linear-gradient(135deg, #38bdf8 0%, #c084fc 50%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  filter: drop-shadow(0 4px 15px rgba(56, 189, 248, 0.4));
}

.hero-desc {
  font-size: clamp(0.95rem, 2.8vw, 1.1rem);
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 24px;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tech-btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  transition: all 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #fff;
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35);
}

.primary-btn:active {
  transform: scale(0.97);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 4. QUANTUM CAKE */
.cake-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cake-instruction {
  font-size: 0.85rem;
  color: #fde047;
  margin-bottom: 24px;
  font-weight: 600;
}

.cake-container {
  position: relative;
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0 20px;
}

.candles-container {
  display: flex;
  justify-content: center;
  gap: 22px;
  position: relative;
  z-index: 5;
  margin-bottom: -4px;
}

.candle {
  width: 12px;
  height: 44px;
  background: repeating-linear-gradient(45deg, #0ea5e9, #0ea5e9 4px, #38bdf8 4px, #38bdf8 8px);
  border-radius: 4px 4px 0 0;
  position: relative;
  cursor: pointer;
  touch-action: manipulation;
}

.candle.c-2 {
  height: 52px;
  background: repeating-linear-gradient(45deg, #a855f7, #a855f7 4px, #c084fc 4px, #c084fc 8px);
}

.flame {
  width: 16px;
  height: 24px;
  background: radial-gradient(ellipse at bottom, #fff 0%, #38bdf8 30%, #0284c7 80%, transparent 100%);
  border-radius: 50% 50% 35% 35%;
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  animation: flicker 0.15s infinite alternate ease-in-out;
  box-shadow: 0 0 15px #38bdf8;
  cursor: pointer;
}

@keyframes flicker {
  0% { transform: translateX(-50%) rotate(-2deg); }
  100% { transform: translateX(-50%) rotate(2deg); }
}

.flame.extinguished {
  display: none;
}

.smoke {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 20px;
  background: rgba(148, 163, 184, 0.6);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.candle.blown-out .smoke {
  animation: smokeRise 1.2s forwards;
}

@keyframes smokeRise {
  0% { opacity: 0.8; transform: translateX(-50%) translateY(0) scale(0.6); }
  100% { opacity: 0; transform: translateX(-80%) translateY(-35px) scale(2); filter: blur(4px); }
}

.cake-tier {
  position: relative;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.circuit-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, transparent);
  animation: scanCircuit 2s infinite linear;
}

@keyframes scanCircuit {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.tier-top { width: 100px; height: 38px; z-index: 3; }
.tier-middle { width: 145px; height: 44px; z-index: 2; margin-top: -4px; }
.tier-bottom { width: 190px; height: 48px; z-index: 1; margin-top: -4px; }

.cake-plate {
  width: 220px;
  height: 10px;
  background: #334155;
  border-radius: 6px;
  margin-top: -2px;
}

.wish-message {
  margin-top: 18px;
  padding: 12px 16px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #6ee7b7;
  max-width: 520px;
  animation: popIn 0.3s ease;
}

.wish-message.hidden { display: none; }

@keyframes popIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* 5. SECTION CARDS */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 24px 18px;
  margin-bottom: 26px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.section-header.center {
  justify-content: center;
}

.sec-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.sec-icon.cyan { color: var(--cyan-bright); }
.sec-icon.gold { color: var(--gold-glow); }
.sec-icon.purple { color: var(--purple-glow); }

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
}

.sec-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}

/* KPI GRID (Tam Responsive) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.kpi-box {
  background: rgba(3, 7, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px;
  border-radius: 12px;
}

.kpi-title {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.text-green { color: #10b981; }
.text-gold { color: #f59e0b; }
.text-pink { color: #f43f5e; }
.text-cyan { color: var(--cyan-bright); }

.trend-up {
  font-size: 0.75rem;
  color: #10b981;
}

.unit {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
}

.kpi-sub {
  font-size: 0.7rem;
  color: #64748b;
  font-family: var(--font-mono);
}

/* MODEL PARAMS */
.model-params {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.param-row {
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.param-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 4px;
}

.param-info strong {
  font-family: var(--font-mono);
  color: var(--cyan-bright);
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.fill {
  height: 100%;
  border-radius: 999px;
}
.fill-cyan { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.fill-purple { background: linear-gradient(90deg, #7c3aed, #c084fc); }
.fill-gold { background: linear-gradient(90deg, #d97706, #fbbf24); }

/* PREDICTIVE ENGINE */
.predict-console {
  background: rgba(3, 7, 18, 0.8);
  border: 1px solid var(--border-cyan);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
}

.predict-display {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 16px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #38bdf8;
  line-height: 1.5;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.run-model-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #030712;
  margin: 0 auto;
  width: 100%;
  max-width: 320px;
}

/* VIP TECH COUPONS */
.coupons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.tech-coupon {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.8), rgba(3, 7, 18, 0.9));
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  touch-action: manipulation;
}

.coupon-badge {
  display: inline-block;
  background: rgba(34, 211, 238, 0.15);
  border: 1px solid var(--border-cyan);
  color: var(--cyan-bright);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.coupon-icon {
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.tech-coupon h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.tech-coupon p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin-bottom: 16px;
}

.coupon-action {
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

.stamp-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan-bright);
  letter-spacing: 1px;
}

.used-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg) scale(0);
  background: #10b981;
  color: #030712;
  font-family: var(--font-mono);
  border: 2px solid #ffffff;
  padding: 6px 14px;
  font-weight: 900;
  font-size: 0.9rem;
  border-radius: 6px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tech-coupon.redeemed {
  border-color: #10b981;
}

.tech-coupon.redeemed .used-stamp {
  transform: translate(-50%, -50%) rotate(-10deg) scale(1);
  opacity: 1;
}

.tech-coupon.redeemed .stamp-text {
  color: #10b981;
  text-decoration: line-through;
}

/* ENVELOPE / CONFIDENTIAL MEMO */
.envelope-wrapper {
  margin: 20px auto 10px;
  max-width: 440px;
  perspective: 1000px;
}

.tech-envelope {
  position: relative;
  width: 100%;
  height: 200px;
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: transform 0.3s;
}

.tech-envelope .envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 220px solid transparent;
  border-right: 220px solid transparent;
  border-top: 110px solid #1e293b;
  transform-origin: top;
  transition: transform 0.5s ease;
  z-index: 4;
}

.tech-envelope .envelope-seal {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  background: #0284c7;
  border-radius: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.6);
}

.tech-envelope .envelope-pocket {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 220px solid #0f172a;
  border-right: 220px solid #0f172a;
  border-bottom: 100px solid #090d16;
  border-radius: 0 0 10px 10px;
  z-index: 3;
}

.letter-content {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  background: #ffffff;
  color: #0f172a;
  border-radius: 8px;
  padding: 18px 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  z-index: 2;
  transition: all 0.5s ease;
  opacity: 0.95;
  max-height: 180px;
  overflow: hidden;
}

.tech-envelope.open .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.tech-envelope.open .envelope-seal {
  opacity: 0;
}

.tech-envelope.open .letter-content {
  top: -150px;
  max-height: 600px;
  z-index: 6;
  opacity: 1;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.letter-inner {
  text-align: left;
}

.doc-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.letter-inner h3 {
  font-family: 'Caveat', cursive, sans-serif;
  font-size: 1.5rem;
  color: #0284c7;
  margin-bottom: 8px;
}

.letter-inner p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #334155;
  margin-bottom: 10px;
}

.letter-sign {
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  text-align: right;
  line-height: 1.4;
}

.envelope-hint {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 160px;
  text-align: center;
}

.tech-envelope.open ~ .envelope-hint {
  margin-top: 200px;
}

/* FOOTER */
.tech-footer {
  text-align: center;
  padding: 30px 0 10px;
  border-top: 1px solid var(--border-light);
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #64748b;
}

.footer-logo {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.tech-footer .small-note {
  font-size: 0.7rem;
  color: #475569;
  margin-top: 4px;
}

/* MOBİL ÖZEL UYARLAMALARI (iPhone & Android) */
@media (max-width: 480px) {
  .main-wrapper {
    padding: 14px 12px 60px;
  }
  
  .tech-envelope {
    max-width: 300px;
    height: 170px;
  }
  .tech-envelope .envelope-flap {
    border-left-width: 150px;
    border-right-width: 150px;
    border-top-width: 90px;
  }
  .tech-envelope .envelope-pocket {
    border-left-width: 150px;
    border-right-width: 150px;
    border-bottom-width: 85px;
  }
  .tech-envelope.open .letter-content {
    top: -180px;
    width: 96%;
    padding: 14px 12px;
  }
}
