* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  touch-action: manipulation;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #1e293b;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.sahne {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 720px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* ---- Üstten yaklaşan ürün ---- */
.urun {
  position: absolute;
  top: -120px;
  left: 50%;
  font-size: 90px;
  transform: translateX(-50%) scale(0.4);
  opacity: 0;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.45));
}

.urun.aktif { animation: urunYaklas 0.9s ease-in forwards; }

@keyframes urunYaklas {
  0% { top: -120px; transform: translateX(-50%) scale(0.4) rotate(-8deg); opacity: 0; }
  60% { opacity: 1; }
  80% { top: 150px; transform: translateX(-50%) scale(1.15) rotate(4deg); opacity: 1; }
  100% { top: 130px; transform: translateX(-50%) scale(1) rotate(0deg); opacity: 0; }
}

/* ---- Kamera "yaklaştır" göstergesi ---- */
.yaklastir {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 240px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 6;
  pointer-events: none;
}

.yaklastir.aktif { display: flex; }

.yaklastir-ikon {
  font-size: 70px;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
  z-index: 2;
}

.dalga {
  position: absolute;
  top: 60px;
  width: 90px;
  height: 90px;
  border: 4px solid #38bdf8;
  border-radius: 50%;
  opacity: 0;
  animation: dalgaYay 2s ease-out infinite;
}

.yaklastir.kart .dalga { border-color: #34d399; }
.dalga:nth-of-type(3) { animation-delay: 1s; }

@keyframes dalgaYay {
  0% { transform: scale(0.5); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

.el {
  position: absolute;
  bottom: 6px;
  font-size: 54px;
  animation: elGitGel 1.6s ease-in-out infinite;
  z-index: 3;
}

@keyframes elGitGel {
  0%, 100% { transform: translateY(40px) scale(0.85); }
  50% { transform: translateY(-6px) scale(1.05); }
}

.yaklastir-yazi {
  position: absolute;
  bottom: -34px;
  width: 260px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.85);
  padding: 8px 12px;
  border-radius: 12px;
}

/* ---- Nümerik tuş takımı ---- */
.pinpad {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px) scale(0.96);
  width: 270px;
  background: #334155;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.55);
  z-index: 7;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.pinpad.aktif {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

.pinpad-baslik {
  text-align: center;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.pinpad-ekran {
  background: #0f172a;
  color: #4ade80;
  font-family: "Courier New", monospace;
  font-size: 30px;
  letter-spacing: 10px;
  text-align: center;
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 14px;
}

.pinpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tus {
  border: none;
  background: #475569;
  color: #f1f5f9;
  font-size: 26px;
  font-weight: 700;
  padding: 18px 0;
  border-radius: 12px;
  box-shadow: 0 4px 0 #1e293b;
  cursor: pointer;
  transition: transform 0.06s;
}

.tus:active { transform: translateY(3px); box-shadow: 0 1px 0 #1e293b; }
.tus.iptal { background: #b91c1c; }
.tus.onay { background: #15803d; }

.tus.basili {
  background: #facc15;
  color: #1e293b;
  transform: translateY(3px);
  box-shadow: 0 0 0 #1e293b, 0 0 14px 2px rgba(250, 204, 21, 0.7);
}

/* ---- Dinamik fiş ---- */
.fis {
  position: absolute;
  bottom: 500px;
  left: 50%;
  width: 160px;
  transform: translateX(-50%) translateY(120%);
  background: #fdfdf7;
  padding: 12px 10px 10px;
  border-radius: 2px 2px 0 0;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.25);
  opacity: 0;
  z-index: 2;
  transform-origin: bottom center;
  overflow: hidden;
}

.fis::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, #fdfdf7 0 6px, transparent 6px 12px);
}

.fis.cikiyor { animation: fisCik 1.8s steps(16) forwards; }

@keyframes fisCik {
  0% { transform: translateX(-50%) translateY(120%); opacity: 0; }
  6% { opacity: 1; }
  100% { transform: translateX(-50%) translateY(-10%); opacity: 1; }
}

.fis.yirtiliyor { animation: fisYirt 0.45s ease-in forwards; }

@keyframes fisYirt {
  0% { transform: translateX(-50%) translateY(-10%) rotate(0deg); opacity: 1; }
  100% { transform: translateX(60%) translateY(40%) rotate(22deg); opacity: 0; }
}

/* Fiş içi elementler */
.fis-baslik {
  font-family: "Courier New", monospace;
  font-size: 8px;
  font-weight: 700;
  text-align: center;
  color: #222;
  letter-spacing: 1px;
  margin-bottom: 3px;
}

.fis-tarih {
  font-family: "Courier New", monospace;
  font-size: 7px;
  text-align: center;
  color: #666;
  margin-bottom: 5px;
}

.fis-cizgi {
  height: 5px;
  background: #c9c9bd;
  border-radius: 3px;
  margin: 5px 0;
}

.fis-cizgi.kisa { width: 55%; }

.fis-satir {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 3px 0;
  gap: 4px;
}

.fis-urun-ad {
  font-family: "Courier New", monospace;
  font-size: 7.5px;
  color: #333;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fis-urun-fiyat {
  font-family: "Courier New", monospace;
  font-size: 7.5px;
  font-weight: 700;
  color: #111;
  flex-shrink: 0;
}

.fis-ara-bilgi {
  font-family: "Courier New", monospace;
  font-size: 6.5px;
  color: #999;
  text-align: right;
  margin: 1px 0 3px;
}

.fis-ara .fis-urun-ad,
.fis-ara .fis-urun-fiyat {
  font-size: 7px;
  color: #555;
}

.fis-indirim .fis-urun-ad { font-size: 7px; color: #888; }
.fis-indirim .fis-urun-fiyat { font-size: 7px; color: #16a34a; }

.fis-toplam-satir {
  display: flex;
  justify-content: space-between;
  margin: 4px 0 3px;
}

.fis-toplam-satir span:first-child {
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: 700;
  color: #111;
}

.fis-toplam-satir span:last-child {
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: 700;
  color: #111;
}

.fis-tesekkur {
  font-family: "Courier New", monospace;
  font-size: 7.5px;
  text-align: center;
  color: #555;
  margin-top: 5px;
  padding-top: 4px;
}

/* ---- Kasa ---- */
.kasa {
  position: relative;
  background: #f8fafc;
  border-radius: 20px;
  padding: 16px 26px 20px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  z-index: 3;
}

.ekran {
  background: #0f172a;
  color: #4ade80;
  font-family: "Courier New", monospace;
  font-size: 18px;
  text-align: center;
  padding: 20px 14px;
  border-radius: 12px;
  margin-bottom: 22px;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
}

/* ---- Tarayıcı bandı ---- */
.tarayici {
  position: relative;
  height: 54px;
  background: #0b1220;
  border-radius: 10px;
  margin-bottom: 22px;
  overflow: hidden;
}

.tarayici .yarik {
  position: absolute;
  top: 50%;
  left: 14px;
  right: 14px;
  height: 3px;
  background: #1e293b;
  transform: translateY(-50%);
  border-radius: 2px;
}

.tarayici .lazer {
  position: absolute;
  top: 50%;
  left: 14px;
  right: 14px;
  height: 3px;
  background: #ef4444;
  box-shadow: 0 0 12px 2px #ef4444;
  transform: translateY(-50%);
  opacity: 0.25;
}

.tarayici.tarama .lazer { animation: lazerYanip 0.5s ease-in-out 2; }

@keyframes lazerYanip {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

/* ---- Butonlar ---- */
.btn {
  position: relative;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 22px;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.08s, filter 0.2s, box-shadow 0.2s;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.btn:active { transform: scale(0.96); }
.btn:disabled { filter: grayscale(0.7) brightness(0.85); cursor: not-allowed; }

.btn-ic {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.ikon { font-size: 24px; }

.btn-barkod {
  background: #2563eb;
  box-shadow: 0 6px 0 #1d4ed8;
}

.tarama-arka {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 70%
  );
  background-size: 220% 100%;
}

.btn.kamera-acik {
  background: transparent;
  border: 3px solid #60a5fa;
  box-shadow: 0 0 16px 2px rgba(96, 165, 250, 0.7);
  color: #1e293b;
}

.btn.btn-kart.kamera-acik {
  border-color: #4ade80;
  box-shadow: 0 0 16px 2px rgba(74, 222, 128, 0.7);
}

.btn.kamera-acik .btn-yazi { color: #1e293b; }
.btn.kamera-acik .tarama-arka {
  opacity: 1;
  animation: taramaKay 1.4s linear infinite;
}

@keyframes taramaKay {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

.ayrac {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 4px 14px;
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ayrac::before,
.ayrac::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }

.odeme-bolge { text-align: center; }

.btn-kart {
  background: #16a34a;
  padding: 14px;
  font-size: 15px;
  width: auto;
  margin: 0 auto;
  opacity: 0.92;
}

.btn-kart .ikon { font-size: 19px; }
.btn-kart.kamera-acik { background: transparent; padding: 14px 22px; }

.not {
  margin-top: 8px;
  font-size: 11px;
  color: #94a3b8;
}

/* ---- Mod link (kasanın altında küçük link) ---- */
.mod-link-alani {
  text-align: center;
  margin-top: 14px;
}

.mod-link {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  letter-spacing: 0.5px;
}

.mod-link:hover {
  color: #475569;
  background: #e2e8f0;
}

/* ---- Mod seçim modalı ---- */
.modal-arka {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  padding: 20px;
}

.modal-arka.aktif {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: #1e293b;
  border-radius: 20px;
  padding: 28px 22px 22px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(8px);
  transition: transform 0.2s;
}

.modal-arka.aktif .modal {
  transform: translateY(0);
}

.modal-baslik {
  text-align: center;
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.modal-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: none;
  border-radius: 14px;
  padding: 18px 16px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s, filter 0.15s;
}

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

.modal-kamera {
  background: #2563eb;
  color: #fff;
}

.modal-dokunma {
  background: #334155;
  color: #e2e8f0;
}

.modal-aciklama {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
}
