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

:root {
  --bg: #f2f3f5;
  --card: #ffffff;
  --card2: #f7f7f9;
  --border: rgba(0,0,0,0.09);
  --accent: #fe2c55;
  --accent2: #ff6b8a;
  --text: #111111;
  --muted: #888899;
  --radius: 18px;
  --ease: cubic-bezier(0.4,0,0.2,1);
  --shadow: 0 2px 16px rgba(0,0,0,0.07);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  overflow-x: hidden;
}

/* ===== PAGES ===== */
.page { display: none; min-height: 100vh; padding: 20px 0 40px; animation: fadeIn 0.3s var(--ease); }
.page.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.container { max-width: 480px; margin: 0 auto; padding: 0 22px; }
.center-page { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }

/* ===== BACK ===== */
.back-top { background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; padding: 14px 0; font-family: 'Inter', sans-serif; transition: color .2s; display: block; }
.back-top:hover { color: var(--text); }

/* ===== LOGO ===== */
.logo-wrap { display: flex; align-items: center; gap: 12px; padding: 32px 0 26px; }
.logo-icon { font-size: 34px; }
.logo-text { font-size: 24px; font-weight: 800; color: var(--text); }

/* ===== TITLES ===== */
.page-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; letter-spacing: -.5px; }
.page-sub { font-size: 14px; color: var(--muted); margin-bottom: 22px; line-height: 1.6; }
.section-title { font-size: 18px; font-weight: 700; margin: 18px 0 14px; }

/* ===== USERNAME INPUT ===== */
.input-wrap {
  display: flex; align-items: center;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color .2s;
  margin-bottom: 14px;
}
.input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(254,44,85,0.1); }
.input-prefix { padding: 0 10px 0 18px; font-size: 18px; color: var(--muted); font-weight: 600; }
.main-input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 17px; font-weight: 600; font-family: 'Inter', monospace; padding: 18px 0; }
.main-input::placeholder { color: #ccc; font-weight: 400; }
.paste-btn { background: var(--card2); border: none; border-left: 1px solid var(--border); color: var(--text); font-size: 18px; padding: 0 16px; height: 58px; cursor: pointer; transition: background .2s; }
.paste-btn:hover { background: #eee; }

/* ===== LOADING ===== */
.profile-loading {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  margin-bottom: 14px; font-size: 13px; color: var(--muted);
  box-shadow: var(--shadow);
}
.profile-loading.hidden { display: none; }
.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(254,44,85,.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== TIKTOK PROFİL KARTI ===== */
.tt-profile-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  animation: fadeIn .3s var(--ease);
}
.tt-profile-card.hidden { display: none; }

/* üst bar */
.tt-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 6px;
  border-bottom: 1px solid var(--border);
}
.tt-topbar-logo { display: flex; align-items: center; gap: 6px; }
.tt-live-pill {
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 800; padding: 3px 10px;
  border-radius: 100px; letter-spacing: .4px;
}
.tt-live-pill.hidden { display: none; }

/* avatar + isim */
.tt-profile-top {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 16px 10px;
}
.tt-avatar-wrap { flex-shrink: 0; }
.tt-avatar-ring {
  width: 68px; height: 68px; border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, #fe2c55, #ff6b6b, #ff4d8d);
}
.tt-avatar {
  width: 100%; height: 100%; border-radius: 50%;
  background: linear-gradient(135deg, #1a1a2e, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: #fff;
  border: 2.5px solid var(--card);
  box-sizing: border-box;
}
.tt-name-block { flex: 1; min-width: 0; }
.tt-display-name {
  font-size: 17px; font-weight: 800; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tt-handle { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* istatistikler */
.tt-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 0; padding: 10px 16px 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.tt-stat { flex: 1; text-align: center; }
.tt-stat-num { font-size: 18px; font-weight: 800; color: var(--text); line-height: 1.1; }
.tt-stat-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tt-stat-divider { width: 1px; height: 28px; background: var(--border); }

/* bio */
.tt-bio {
  font-size: 13px; color: var(--text); padding: 10px 16px 6px;
  line-height: 1.5;
}

/* video küçük resimleri */
.tt-videos {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 2px;
  padding: 8px 0 0;
}
.tt-video-thumb {
  aspect-ratio: 9/16; background: #e8e8e8;
  position: relative; overflow: hidden; cursor: pointer;
}
.tt-video-thumb::after {
  content: '▶';
  position: absolute; bottom: 5px; left: 6px;
  font-size: 10px; color: rgba(255,255,255,.9);
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.tt-video-count {
  position: absolute; bottom: 5px; right: 6px;
  font-size: 10px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.tt-video-bg {
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
  filter: brightness(.9);
}

/* kaynak etiketi */
.tt-source-label {
  text-align: center; font-size: 10px; color: #bbb;
  padding: 6px 0 10px; letter-spacing: .3px;
}

/* ===== HISTORY CHIPS ===== */
.history-section { margin-bottom: 18px; }
.history-section.hidden { display: none; }
.history-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px; }
.history-chips { display: flex; gap: 8px; overflow: hidden; }
.chip {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 100px; padding: 8px 16px;
  font-size: 13px; font-weight: 600; color: var(--text);
  cursor: pointer; transition: all .2s; white-space: nowrap;
  box-shadow: var(--shadow);
}
.chip:hover { border-color: var(--accent); color: var(--accent); background: rgba(254,44,85,0.05); }

/* ===== PRIMARY BUTTON ===== */
.btn-primary {
  width: 100%; background: linear-gradient(135deg, var(--accent) 0%, #ff6b6b 100%);
  color: #fff; border: none; border-radius: var(--radius); padding: 18px;
  font-size: 16px; font-weight: 700; cursor: pointer; font-family: 'Inter', sans-serif;
  transition: all .25s var(--ease); letter-spacing: .2px; margin-top: 6px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(254,44,85,0.3); }
.btn-primary:active { transform: translateY(0); }

/* ===== RECIPIENT CARD ===== */
.recipient-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1.5px solid rgba(254,44,85,.25);
  border-radius: var(--radius); padding: 16px 18px;
  margin-bottom: 4px; margin-top: 6px; box-shadow: var(--shadow);
}
.recv-avatar {
  width: 46px; height: 46px; background: linear-gradient(135deg, var(--accent), #7c3aed);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.recv-info { flex: 1; }
.recv-name { font-size: 17px; font-weight: 700; }
.recv-stats { font-size: 12px; color: var(--muted); margin-top: 3px; }
.recv-check {
  width: 26px; height: 26px; background: rgba(76,175,80,.1);
  border: 1.5px solid #4CAF50; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #4CAF50; font-size: 13px; font-weight: 800;
}

/* ===== PACKAGES ===== */
.packages { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 16px; }
.pkg {
  position: relative; background: var(--card); border: 2px solid var(--border);
  border-radius: 16px; padding: 14px 10px; cursor: pointer; text-align: center;
  transition: all .22s var(--ease); display: flex; flex-direction: column;
  align-items: center; gap: 5px; box-shadow: var(--shadow);
}
.pkg:hover { border-color: rgba(254,44,85,.4); background: rgba(254,44,85,.03); }
.pkg.selected { border-color: var(--accent); background: rgba(254,44,85,.07); box-shadow: 0 0 0 1px var(--accent), 0 4px 20px rgba(254,44,85,.15); }
/* TikTok altın jeton ikonu */
.tt-coin-img { width: 38px; height: 38px; flex-shrink: 0; filter: drop-shadow(0 2px 5px rgba(180,100,0,.4)); }
.tt-coin-wrap { display: none; }
.tt-coin { display: none; }
.pkg-num { font-size: 13px; font-weight: 700; color: var(--text); }
.pkg-price { font-size: 11px; color: var(--muted); font-weight: 500; }
.pkg-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), #ff6b6b);
  color: #fff; font-size: 9px; font-weight: 800; padding: 3px 8px;
  border-radius: 100px; white-space: nowrap; letter-spacing: .3px;
}

/* ===== CUSTOM INPUT ===== */
.divider-text {
  text-align: center; font-size: 12px; color: var(--muted); margin: 4px 0 12px; position: relative;
}
.divider-text::before, .divider-text::after {
  content: ''; position: absolute; top: 50%; width: 28%; height: 1px; background: var(--border);
}
.divider-text::before { left: 0; }
.divider-text::after { right: 0; }
.custom-row {
  display: flex; align-items: center; background: var(--card);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 16px; transition: border-color .2s;
  box-shadow: var(--shadow);
}
.custom-row:focus-within { border-color: var(--accent); }
.custom-inp { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 16px; font-weight: 600; padding: 16px 18px; font-family: 'Inter', sans-serif; }
.custom-inp::placeholder { color: #bbb; font-weight: 400; }
.custom-unit { padding: 0 18px 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* ===== SUMMARY BAR ===== */
.summary-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 18px; margin-bottom: 6px; box-shadow: var(--shadow);
}
.sum-label { font-size: 14px; color: var(--muted); }
.sum-label b { color: var(--text); }
.sum-price { font-size: 18px; font-weight: 800; color: var(--accent); }

/* ===== SAVED CARD - GERCEK KART TASARIMI ===== */
.saved-card-wrap { margin-bottom: 8px; }
.saved-card-label { font-size: 11px; color: var(--muted); font-weight: 600; text-align: right; margin-top: 5px; text-transform: uppercase; letter-spacing: .5px; }
.saved-card {
  position: relative;
  background: linear-gradient(135deg, #1a3a5c 0%, #0f2540 50%, #1a3a5c 100%);
  border-radius: 20px; padding: 0; cursor: pointer;
  border: 2.5px solid transparent; transition: all .2s;
  box-shadow: 0 8px 32px rgba(15,37,64,.35);
  overflow: hidden;
}
.saved-card::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(255,255,255,.07) 0%, transparent 70%);
  border-radius: 50%;
}
.saved-card.selected { border-color: var(--accent); }

/* Kart iç düzeni */
.bank-card-inner { padding: 18px 20px 16px; }
.bank-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }

/* Ziraat logosu */
.ziraat-logo { display: flex; align-items: center; gap: 8px; }
.ziraat-emblem {
  width: 28px; height: 28px; border-radius: 50%;
  background: #e30613; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}
.ziraat-name { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.9); letter-spacing: .3px; }

/* Visa text */
.visa-text {
  font-family: 'Arial', sans-serif; font-weight: 900; font-size: 18px;
  color: #fff; letter-spacing: -0.5px; font-style: italic;
}

/* EMV Chip */
.emv-chip {
  width: 38px; height: 28px;
  background: linear-gradient(135deg, #e8c84a, #c9a227, #f0d060);
  border-radius: 6px; padding: 3px; margin-bottom: 14px;
  box-shadow: inset 0 0 4px rgba(0,0,0,.2);
}
.emv-chip-inner {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #d4a820, #e8c84a);
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,.15);
}

/* Kart numarası */
.card-number-row {
  font-family: 'Courier New', monospace; font-size: 18px;
  font-weight: 700; color: #fff; letter-spacing: 3px;
  margin-bottom: 14px;
}

/* Alt satır */
.card-bottom-row { display: flex; justify-content: space-between; align-items: flex-end; }
.card-label { font-size: 9px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 3px; }
.card-holder { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.9); letter-spacing: .5px; }
.card-exp { font-size: 14px; font-weight: 700; color: rgba(255,255,255,.9); }

.sc-check {
  position: absolute; top: 14px; right: 14px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
}
.saved-card:not(.selected) .sc-check { display: none; }

/* ===== PAYMENT METHODS ===== */
.methods { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 16px; }
.method {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 2px solid var(--border);
  border-radius: 16px; padding: 14px 18px; cursor: pointer;
  font-size: 14px; font-weight: 600; transition: all .2s; box-shadow: var(--shadow);
}
.method-icon-wrap {
  width: 40px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: #f5f5f5; border-radius: 10px; flex-shrink: 0;
}
.gpay-icon { background: #fff; border: 1px solid #eee; width: auto; min-width: 80px; padding: 0 10px; }
.gpay-text { font-family: 'Arial', sans-serif; font-weight: 700; font-size: 14px; white-space: nowrap; }
.method-label { flex: 1; }
.method:hover { border-color: rgba(254,44,85,.3); background: rgba(254,44,85,.02); }
.method.active { border-color: var(--accent); background: rgba(254,44,85,.05); }
.mcheck { display: flex; align-items: center; }
.mcheck.gone { display: none; }

/* ===== NEW CARD FORM ===== */
#newCardForm { margin-bottom: 16px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.field input {
  width: 100%; background: var(--card); border: 1.5px solid var(--border);
  border-radius: 13px; padding: 14px 16px; color: var(--text);
  font-size: 15px; font-family: 'Inter', monospace; outline: none;
  transition: border-color .2s; box-shadow: var(--shadow);
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(254,44,85,.1); }
.field input::placeholder { color: #bbb; }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }

/* ===== ORDER BOX ===== */
.order-box { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin-bottom: 4px; box-shadow: var(--shadow); }
.orow { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); padding: 7px 0; border-bottom: 1px solid rgba(0,0,0,.05); }
.orow:last-child { border-bottom: none; }
.orow.total { font-size: 16px; font-weight: 700; color: var(--text); padding-top: 12px; margin-top: 4px; }
.secure-note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 12px; }

/* ===== FACE ID ===== */
.faceid-box {
  width: 130px; height: 130px;
  position: relative; margin-bottom: 28px;
  display: flex; align-items: center; justify-content: center;
}

/* SVG tarama wrap */
.faceid-scan-wrap {
  width: 120px; height: 120px;
  position: relative; overflow: hidden;
  border-radius: 4px;
}
.faceid-svg {
  width: 120px; height: 120px;
  color: #1c1c1e;
  transition: color 0.4s ease;
}

/* Mavi tarama ışını */
.scan-beam {
  position: absolute; left: 8%; width: 84%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #32ade6 25%, #00c7be 50%, #32ade6 75%, transparent);
  box-shadow: 0 0 10px rgba(50,173,230,.9), 0 0 20px rgba(0,199,190,.4);
  border-radius: 2px;
  top: 5%; opacity: 1;
  animation: beamScan 1.3s ease-in-out 0.1s forwards;
}
@keyframes beamScan {
  0%   { top: 5%; opacity: 1; }
  80%  { top: 88%; opacity: 1; }
  100% { top: 88%; opacity: 0; }
}

/* Yeşil tik - başta gizli */
.faceid-tick {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.5);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.faceid-tick.show {
  opacity: 1; transform: scale(1);
}
.tick-svg { width: 80px; height: 80px; }

/* Başarı durumunda Face ID SVG yeşile döner */
.faceid-box.success .faceid-svg { color: #34c759; }
.faceid-box.success .scan-beam { display: none; }

.faceid-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.faceid-amount { font-size: 36px; font-weight: 900; color: var(--accent); margin-bottom: 8px; letter-spacing: -0.5px; }
.faceid-hint { font-size: 13px; color: var(--muted); }

/* ===== SUCCESS ===== */
.success-ring {
  width: 90px; height: 90px; background: linear-gradient(135deg, #4CAF50, #66BB6A);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px; box-shadow: 0 0 40px rgba(76,175,80,.3);
  animation: popIn .5s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes popIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-check { font-size: 40px; color: #fff; font-weight: 800; line-height: 1; }
.success-title { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.success-sub { font-size: 14px; color: var(--muted); margin-bottom: 28px; }

.receipt { width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 20px; text-align: left; margin-bottom: 6px; box-shadow: var(--shadow); }
.receipt-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 14px; }
.rrow { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,.05); }
.rrow:last-child { border-bottom: none; }
.rrow span:last-child { font-weight: 600; color: var(--text); }
