:root {
  --bg: #0f1115;
  --text: #f9fafb;
  --accent: #1f2937;
}

body.light {
  --bg: #f3f4f6;
  --text: #1f2937;
  --accent: #e5e7eb;
}

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

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

header {
  background: rgba(15, 17, 21, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.light header {
  background: rgba(255, 255, 255, 0.8);
  color: #1f2937;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
body.light .theme-toggle { background: rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.1); }
.theme-toggle:hover { transform: rotate(15deg) scale(1.1); }

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
  padding: 40px 20px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto auto auto;
}

/* KREDİ KARTI KONSEPTİ */
.card {
  border-radius: 20px;
  padding: 24px;
  position: relative;
  min-height: 240px;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* Standart Arkaplan (Eğer banka rengi eşleşmezse) */
  background: linear-gradient(135deg, #2b2e33 0%, #15171a 100%);
}

.card::before {
  content: ""; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg); transition: 0.5s; z-index: 1; pointer-events: none;
}
.card:hover::before { left: 200%; }
.card:hover { transform: translateY(-8px) rotateX(2deg) rotateY(1deg); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4); }

/* Banka Renkleri (Premium Gradyanlar) */
.bank-ziraat-bankası { background: linear-gradient(135deg, #e30a17 0%, #990000 100%); }
.bank-garanti-bbva { background: linear-gradient(135deg, #008751 0%, #004d2e 100%); }
.bank-i̇s-bankası, .bank-is-bankasi { background: linear-gradient(135deg, #00509d 0%, #002b5e 100%); }
.bank-qnb-finansbank { background: linear-gradient(135deg, #6a1b9a 0%, #38006b 100%); }
.bank-yapı-kredi { background: linear-gradient(135deg, #1e4f9b 0%, #0a2552 100%); }
.bank-akbank { background: linear-gradient(135deg, #c40032 0%, #75001c 100%); }
.bank-burgan-bank { background: linear-gradient(135deg, #0099cc 0%, #00597a 100%); }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}
.bank-name { font-weight: 700; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.logo-box { width: 45px; height: 45px; background: white; border-radius: 8px; padding: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.logo-box img { width: 100%; height: 100%; object-fit: contain; }

.card-chip-row { display: flex; align-items: center; gap: 15px; margin-top: -5px; z-index: 2; }
.chip { width: 45px; height: 32px; background: linear-gradient(135deg, #e2c073 0%, #b88a44 100%); border-radius: 6px; position: relative; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.chip::after { content: ""; position: absolute; border: 1px solid rgba(0,0,0,0.2); width: 100%; height: 100%; border-radius: 6px; }
.contactless svg { width: 24px; height: 24px; color: rgba(255,255,255,0.7); }

/* Tıklanabilir IBAN Alanı */
.iban-container {
  z-index: 2; cursor: pointer; padding: 10px; margin: 0 -10px; border-radius: 8px;
  transition: background 0.2s, transform 0.2s; position: relative;
}
.iban-container:hover { background: rgba(255, 255, 255, 0.1); transform: scale(1.02); }
.iban-container:active { transform: scale(0.98); }
.iban-text {
  font-family: 'Courier New', Courier, monospace; font-size: 1.25rem; font-weight: 700;
  letter-spacing: 2px; text-shadow: -1px -1px 1px rgba(255,255,255,0.2), 2px 2px 4px rgba(0,0,0,0.6);
  word-break: break-word; line-height: 1.4;
}

.card-footer { display: flex; justify-content: space-between; align-items: flex-end; z-index: 2; }
.account-info { display: flex; flex-direction: column; }
.label { font-size: 0.65rem; color: rgba(255,255,255,0.7); letter-spacing: 1px; margin-bottom: 2px; }
.account-name { font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }

.qr-btn {
  background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.3);
  color: white; padding: 6px 12px; border-radius: 8px; font-size: 0.85rem; cursor: pointer;
  backdrop-filter: blur(4px); transition: all 0.2s ease;
}
.qr-btn:hover { background: rgba(255, 255, 255, 0.3); transform: translateY(-2px); }

/* QR Modal */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center;
  visibility: hidden; opacity: 0; transition: all 0.3s ease; z-index: 999;
}
.modal.active { visibility: visible; opacity: 1; }
.modal-content {
  background: var(--bg); color: var(--text); padding: 30px; border-radius: 20px;
  text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.3); transform: scale(0.8);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); border: 1px solid rgba(255,255,255,0.1);
}
body.light .modal-content { border: 1px solid rgba(0,0,0,0.1); }
.modal.active .modal-content { transform: scale(1); }
#qrcode { display: flex; justify-content: center; background: white; padding: 15px; border-radius: 12px; margin: 20px 0; }
#qrcode img { margin: 0 auto; display: block; }
.close-btn { background: #ef4444; color: white; border: none; padding: 10px 20px; border-radius: 10px; cursor: pointer; font-weight: 600; width: 100%; }

/* Toast Bildirimi */
.toast-notification {
  position: fixed; bottom: -60px; left: 50%; transform: translateX(-50%);
  background: #10b981; color: white; padding: 12px 24px; border-radius: 50px;
  font-weight: 600; box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 1000; pointer-events: none;
}
.toast-notification.show { bottom: 30px; }

footer { text-align: center; padding: 20px; color: #6b7280; font-size: 0.9rem; margin-top: auto; }