/* ═══════════════════════════════════════════
   gate.css — Şifre Ekranı + TOS Modal
═══════════════════════════════════════════ */

/* ── Ortak overlay ── */
.gate-overlay,
.tos-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #080808;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gate-overlay.visible,
.tos-overlay.visible {
  opacity: 1;
}

.gate-overlay.hidden,
.tos-overlay.hidden {
  display: none;
}

.gate-overlay.gate-success {
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

/* ── Arka plan grid ── */
.gate-overlay::before,
.tos-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(220,38,38,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220,38,38,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* ════════════════════════════════
   ŞİFRE KUTUSU
════════════════════════════════ */
.gate-box {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: rgba(12, 12, 18, 0.98);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.8), 0 0 40px rgba(220,38,38,0.08);
  animation: gateSlideUp 0.5s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes gateSlideUp {
  from { opacity: 0; transform: translateY(32px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Logo */
.gate-logo {
  width: 64px; height: 64px;
  background: rgba(220,38,38,0.12);
  border: 1px solid rgba(220,38,38,0.35);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #dc2626;
  margin: 0 auto 20px;
  box-shadow: 0 0 24px rgba(220,38,38,0.2);
}

/* Başlık */
.gate-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #f1f1f1;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}
.gate-title span { color: #dc2626; }

.gate-desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Input */
.gate-input-wrap {
  position: relative;
  margin-bottom: 8px;
}
.gate-input-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.25);
  font-size: 0.85rem;
  pointer-events: none;
}
.gate-input {
  width: 100%;
  padding: 13px 16px 13px 40px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #f1f1f1;
  font-size: 1rem;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
  letter-spacing: 0.12em;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gate-input::placeholder {
  color: rgba(255,255,255,0.2);
  letter-spacing: 0;
  font-family: 'Inter', sans-serif;
}
.gate-input:focus {
  border-color: rgba(220,38,38,0.5);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

/* Hata */
.gate-error {
  min-height: 20px;
  font-size: 0.8rem;
  color: #ef4444;
  margin-bottom: 12px;
  text-align: left;
}

/* Giriş Butonu */
.gate-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px;
  background: #dc2626;
  color: #fff;
  border: none; border-radius: 10px;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(220,38,38,0.4);
  transition: all 0.2s ease;
  margin-bottom: 16px;
}
.gate-btn:hover:not(:disabled) {
  background: #ef4444;
  box-shadow: 0 4px 28px rgba(220,38,38,0.6);
  transform: translateY(-1px);
}
.gate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* İpucu */
.gate-hint {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.gate-hint i { color: #7289da; }

/* Shake */
.shake-anim {
  animation: shake 0.4s ease;
}

/* ════════════════════════════════
   TOS MODAL
════════════════════════════════ */
.tos-overlay {
  background: rgba(5,5,8,0.95);
  backdrop-filter: blur(8px);
  align-items: flex-end;
}

@media (min-width: 600px) {
  .tos-overlay { align-items: center; }
}

.tos-box {
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  background: rgba(12,12,18,0.99);
  border: 1px solid rgba(220,38,38,0.25);
  border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: tosSlideUp 0.45s cubic-bezier(0.16,1,0.3,1) both;
  box-shadow: 0 -8px 48px rgba(0,0,0,0.6);
}

@media (min-width: 600px) {
  .tos-box {
    border-radius: 20px;
    animation: gateSlideUp 0.45s cubic-bezier(0.16,1,0.3,1) both;
  }
}

@keyframes tosSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.tos-closing {
  animation: tosSlideDown 0.4s ease forwards !important;
}
@keyframes tosSlideDown {
  to { transform: translateY(100%); opacity: 0; }
}

/* TOS başlık */
.tos-header {
  display: flex; align-items: center; gap: 12px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.tos-header i {
  font-size: 1.3rem; color: #dc2626;
}
.tos-header h2 {
  font-size: 1.15rem; font-weight: 700;
  color: #f1f1f1;
}

/* TOS içerik */
.tos-body {
  padding: 20px 28px;
  overflow-y: auto;
  flex: 1;
  line-height: 1.75;
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
}
.tos-body h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1f1f1;
  margin: 20px 0 8px;
  display: flex; align-items: center; gap: 8px;
}
.tos-body h3 .fa-circle-check { color: #22c55e; }
.tos-body h3 .fa-circle-xmark { color: #ef4444; }
.tos-body h3 .fa-triangle-exclamation { color: #f59e0b; }
.tos-body ul {
  padding-left: 20px; margin-bottom: 4px;
}
.tos-body ul li {
  margin-bottom: 6px;
}
.tos-body p { margin-bottom: 10px; }
.tos-footer-note {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(220,38,38,0.08);
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
}

/* TOS scrollbar */
.tos-body::-webkit-scrollbar { width: 4px; }
.tos-body::-webkit-scrollbar-thumb { background: rgba(220,38,38,0.3); border-radius: 2px; }

/* TOS butonlar */
.tos-actions {
  display: flex; gap: 10px;
  padding: 16px 28px 24px;
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.tos-btn-reject {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem; font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.tos-btn-reject:hover {
  border-color: #ef4444;
  color: #ef4444;
}
.tos-btn-accept {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  background: #dc2626;
  border: none; border-radius: 10px;
  color: #fff;
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(220,38,38,0.35);
  transition: all 0.2s;
}
.tos-btn-accept:hover {
  background: #ef4444;
  box-shadow: 0 4px 24px rgba(220,38,38,0.5);
  transform: translateY(-1px);
}

/* Mobil */
@media (max-width: 480px) {
  .gate-box { padding: 36px 24px; }
  .tos-actions { flex-direction: column; }
  .tos-btn-reject { justify-content: center; }
}