/**
 * TÜMBET DOĞUM GÜNÜ BONUS PANELİ — ÖZEL STİL DOSYASI (style.css)
 * TümBet Orijinal Renk Paleti:
 * - Üst Bar: #ffffff (Temiz Beyaz)
 * - Ana Lacivert/Mavi (Royal Blue): #0a548c, #0b5e9e
 * - Açık Mavi / Cyan Vurgu: #00a3e0
 * - Altın / Hardal Buton Rengi (Kayıt & Kazananlar Kulübü): #c8973b, #d4a347, #b88328
 * - Sayfa Arka Planı: #072244 -> #0b396b (TümBet Canlı Spor/Casino Atmosferi)
 * - Kart Kutusu: #0c2b50 (Premium Lacivert) / Kenarlık: rgba(0, 163, 224, 0.25)
 */

:root {
  --tb-blue-dark: #0d3a6d; /* %50 Açılmış Ferah Lacivert */
  --tb-blue-mid: #154c8c;
  --tb-blue-primary: #1b5ba6;
  --tb-blue-light: #00a3e0;
  --tb-gold-primary: #c8973b;
  --tb-gold-hover: #d4a347;
  --tb-gold-glow: rgba(200, 151, 59, 0.35);
  --tb-card-bg: rgba(18, 62, 115, 0.95);
  --tb-card-surface: #1c5e9e;
  --tb-input-bg: #0e345e;
  --tb-border-color: rgba(0, 163, 224, 0.35);
  --tb-border-focus: #00a3e0;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --success-color: #10b981;
  --error-color: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.12);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background: #0d3a6d url('background.jpg') no-repeat center center fixed;
  background-size: cover;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 24px 16px;
  line-height: 1.5;
}

/* ============================================================================
   ANA GÖVDE VE FORM KARTI
   ============================================================================ */
.main-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}

.bonus-card {
  background: var(--tb-card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 163, 224, 0.4);
  border-radius: 18px;
  padding: 34px 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 163, 224, 0.25);
  position: relative;
  overflow: hidden;
}

/* Üst Vurgu Çizgisi: TümBet Cyan & Gold */
.bonus-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00a3e0, #1b5ba6, #d4a347, #c8973b);
}

/* Başlık Bölümü */
.header-section {
  text-align: center;
  margin-bottom: 24px;
}

.brand-logo-container {
  margin-bottom: 12px;
}

.brand-logo-img {
  max-height: 62px;
  max-width: 220px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 163, 224, 0.18);
  border: 1px solid rgba(0, 163, 224, 0.45);
  padding: 6px 16px;
  border-radius: 50px;
  color: #38bdf8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.header-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.header-subtitle {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.5;
}

/* Hata ve Başarı Bildirimleri */
.alert {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-error {
  background: var(--error-bg);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

/* Form Satırları (Yan Yana Alanlar) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Form Alanları */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 7px;
}

.form-label .required {
  color: var(--tb-gold-primary);
  margin-left: 2px;
  font-weight: 900;
}

.form-input {
  width: 100%;
  background: var(--tb-input-bg);
  border: 1px solid rgba(0, 163, 224, 0.25);
  border-radius: 10px;
  padding: 13px 16px;
  color: #ffffff;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.25s ease;
  outline: none;
  min-height: 48px;
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: #475569;
}

.form-input:focus {
  border-color: var(--tb-border-focus);
  box-shadow: 0 0 0 3px rgba(0, 163, 224, 0.3);
  background: #092444;
}

/* Hatalı Alan Kırmızı Vurgulama */
.form-input.input-error,
.form-input.is-invalid {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35) !important;
  color: #ffffff !important;
}

.checkbox-card.checkbox-error,
.checkbox-card.is-invalid {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.16) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35) !important;
}

.field-error-hint {
  display: block;
  font-size: 11.5px;
  color: #f87171;
  font-weight: 600;
  margin-top: 5px;
  line-height: 1.4;
}

/* Modal Hata Listesi */
.modal-error-list {
  text-align: left;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 8px;
  padding: 12px 14px 12px 28px;
  margin: 12px 0 18px;
  font-size: 13px;
  color: #fca5a5;
  line-height: 1.6;
}

.modal-error-list li {
  margin-bottom: 5px;
}
.modal-error-list li:last-child {
  margin-bottom: 0;
}

/* Tarih Inputu İkon Özelleştirmesi */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8) sepia(100%) saturate(300%) hue-rotate(180deg);
  cursor: pointer;
}

/* Checkbox Alanı (Mobil Uyumlu Geniş Dokunma Kartı) */
.checkbox-group {
  margin-top: 22px;
  margin-bottom: 20px;
}

.checkbox-card, .checkbox-label {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
  font-size: 13.5px;
  color: #e2e8f0;
  line-height: 1.4;
  background: rgba(7, 28, 54, 0.7);
  border: 1px solid rgba(0, 163, 224, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  min-height: 52px;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.checkbox-card:hover, .checkbox-card:active {
  border-color: rgba(0, 163, 224, 0.55);
  background: rgba(11, 41, 78, 0.85);
}

.checkbox-text {
  flex: 1;
  font-weight: 500;
}

.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(0, 163, 224, 0.55);
  border-radius: 6px;
  background: var(--tb-input-bg);
  cursor: pointer;
  display: grid;
  place-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.custom-checkbox:checked {
  background: var(--tb-gold-primary);
  border-color: var(--tb-gold-primary);
  box-shadow: 0 0 10px rgba(200, 151, 59, 0.5);
}

.custom-checkbox:checked::after {
  content: "✔";
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

/* Cloudflare Turnstile Widget Alanı */
.turnstile-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 18px;
  margin-bottom: 24px;
  padding: 14px;
  background: rgba(7, 28, 54, 0.85);
  border: 1px dashed rgba(0, 163, 224, 0.4);
  border-radius: 12px;
  min-height: 75px;
}

/* TümBet Altın Gönder Butonu */
.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, #d4a347 0%, #c8973b 50%, #b88328 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 15px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(200, 151, 59, 0.35);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #e0b054 0%, #d4a347 50%, #c8973b 100%);
  box-shadow: 0 10px 30px rgba(200, 151, 59, 0.5);
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: translateY(1px);
  box-shadow: 0 4px 15px rgba(200, 151, 59, 0.3);
}

/* Alt Bilgi */
.footer-note {
  text-align: center;
  margin-top: 22px;
  font-size: 12px;
  color: #64748b;
}

.footer-note a {
  color: var(--tb-gold-primary);
  text-decoration: none;
  font-weight: 600;
}

.footer-note a:hover {
  text-decoration: underline;
  color: #d4a347;
}

/* ============================================================================
   ORTAK MODAL SİSTEMİ (UYARI, BİLGİLENDİRME, ONAY)
   ============================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 18, 36, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog-box {
  background: #0c2b50;
  border: 1px solid rgba(0, 163, 224, 0.4);
  border-radius: 18px;
  width: 100%;
  max-width: 440px;
  padding: 30px 24px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 163, 224, 0.2);
  position: relative;
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-dialog-box {
  transform: scale(1);
}

.modal-icon-wrapper {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: rgba(0, 163, 224, 0.15);
  border: 1px solid rgba(0, 163, 224, 0.4);
  box-shadow: 0 0 20px rgba(0, 163, 224, 0.25);
}

.modal-icon-wrapper.error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
}

.modal-icon-wrapper.success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.modal-title-text {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
}

.modal-body-text {
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-actions-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-actions-bar .btn-modal-close {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #d4a347 0%, #c8973b 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-actions-bar .btn-modal-close:hover {
  background: linear-gradient(135deg, #e0b054 0%, #d4a347 100%);
  box-shadow: 0 4px 15px rgba(200, 151, 59, 0.4);
}

/* ============================================================================
   MOBİL %100 UYUMLULUK VE ERGONOMİK DOKUNMATİK DENEYİM
   ============================================================================ */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (max-width: 640px) {
  body {
    padding: 16px 12px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    align-items: flex-start;
  }
  
  .container {
    max-width: 100%;
  }

  .bonus-card {
    padding: 24px 16px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  }

  .header-section {
    margin-bottom: 20px;
  }

  .logo-badge {
    font-size: 11.5px;
    padding: 5px 14px;
    margin-bottom: 10px;
  }

  .header-title {
    font-size: 20px;
    line-height: 1.28;
  }

  .header-subtitle {
    font-size: 12.5px;
  }

  /* Mobil yan yana alanlar */
  .form-row {
    gap: 10px;
  }

  .form-group {
    margin-bottom: 15px;
  }

  .form-label {
    font-size: 12.5px;
    margin-bottom: 5px;
  }

  /* iOS Safari otomatik zoom'u engellemek için font-size mutlaka 16px olmalıdır */
  .form-input {
    min-height: 48px;
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 10px;
  }

  /* Mobilde parmakla tek dokunuşta rahatça işaretlenebilir onay kutusu */
  .checkbox-group {
    margin-top: 16px;
    margin-bottom: 18px;
  }

  .checkbox-card, .checkbox-label {
    padding: 13px 14px;
    min-height: 52px;
    font-size: 13.5px;
    gap: 12px;
  }

  .custom-checkbox {
    width: 24px;
    height: 24px;
  }

  /* Mobilde baş parmakla basması çok kolay geniş ve belirgin buton */
  .btn-submit {
    min-height: 54px;
    padding: 15px;
    font-size: 15px;
    font-weight: 800;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(200, 151, 59, 0.4);
  }

  /* Cloudflare Turnstile kutusunun taşmasını önle */
  .turnstile-container {
    overflow-x: auto;
    padding: 10px;
    margin-top: 14px;
    margin-bottom: 18px;
  }
}

@media (max-width: 380px) {
  .bonus-card {
    padding: 20px 12px;
  }
  .header-title {
    font-size: 18.5px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ============================================================================
   FLATPICKR TÜMBET KOYU & ALTIN TEMASI
   ============================================================================ */
.flatpickr-calendar {
  background: #0d3a6d !important;
  border: 1px solid rgba(0, 163, 224, 0.45) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 163, 224, 0.2) !important;
  border-radius: 14px !important;
  color: #ffffff !important;
  overflow: hidden;
}
.flatpickr-months {
  background: linear-gradient(135deg, #0a548c 0%, #154c8c 100%) !important;
  padding: 6px 0 !important;
}
.flatpickr-month {
  color: #ffffff !important;
  fill: #ffffff !important;
}
.flatpickr-current-month select {
  background: #071c36 !important;
  color: #ffffff !important;
  border: 1px solid rgba(0, 163, 224, 0.35) !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  padding: 3px 6px !important;
}
.flatpickr-current-month input.cur-year {
  color: #fcd34d !important;
  font-weight: 800 !important;
}
span.flatpickr-weekday {
  color: #38bdf8 !important;
  font-weight: 700 !important;
}
.flatpickr-day {
  color: #e2e8f0 !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}
.flatpickr-day:hover, .flatpickr-day:focus {
  background: rgba(0, 163, 224, 0.3) !important;
  border-color: rgba(0, 163, 224, 0.5) !important;
  color: #ffffff !important;
}
.flatpickr-day.today {
  border-color: #c8973b !important;
}
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange {
  background: linear-gradient(135deg, #d4a347 0%, #c8973b 100%) !important;
  border-color: #c8973b !important;
  color: #071c36 !important;
  font-weight: 900 !important;
  box-shadow: 0 2px 10px rgba(200, 151, 59, 0.5) !important;
}
.flatpickr-day.flatpickr-disabled, .flatpickr-day.flatpickr-disabled:hover {
  color: rgba(148, 163, 184, 0.3) !important;
}

