/* ═══════════════════════════════════════════════════════════════
   USDT Traders — Gelişmiş Animasyonlar
   Performans etkisi: ≈0ms (sadece CSS, JavaScript yok)
   ═══════════════════════════════════════════════════════════════ */

/* ── Sayfa Yükleme Fade-In ──────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.page.active {
  animation: fadeInUp .45s ease-out;
}

/* ── İstatistik Kartları Sıralı Giriş ───────────────────────── */
.stats article {
  animation: fadeInUp .5s ease-out both;
}
.stats article:nth-child(1) { animation-delay: .05s; }
.stats article:nth-child(2) { animation-delay: .12s; }
.stats article:nth-child(3) { animation-delay: .19s; }
.stats article:nth-child(4) { animation-delay: .26s; }

/* ── Kart Hover Glow & Lift ─────────────────────────────────── */
.panel, .stats article {
  transition: transform .22s ease, border-color .25s ease, box-shadow .25s ease;
}
.panel:hover, .stats article:hover {
  transform: translateY(-3px);
  border-color: #2a6b8a;
  box-shadow:
    0 20px 50px rgba(0,0,0,.25),
    0 0 30px rgba(40,216,171,.06);
}

/* ── PnL Sayı Pulse Efekti ──────────────────────────────────── */
@keyframes pnlPulse {
  0%, 100% { text-shadow: 0 0 4px currentColor; }
  50%      { text-shadow: 0 0 14px currentColor, 0 0 28px currentColor; }
}
.stats .up, td .up {
  animation: pnlPulse 3s ease-in-out infinite;
}

/* ── Login Kartı Giriş Animasyonu ───────────────────────────── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-card {
  animation: slideUp .55s cubic-bezier(.22,1,.36,1);
}

/* ── Brand Logo Pulse ───────────────────────────────────────── */
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(40,216,171,.25); }
  50%      { box-shadow: 0 0 28px rgba(40,216,171,.45), 0 0 56px rgba(40,216,171,.15); }
}
.brand i {
  animation: logoPulse 4s ease-in-out infinite;
}

/* ── Sidebar Nav Geçiş Efektleri ────────────────────────────── */
nav button {
  transition: all .2s ease;
  position: relative;
  overflow: hidden;
}
nav button::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(var(--aqua), var(--blue));
  transform: scaleY(0);
  transition: transform .25s ease;
}
nav button.active::before,
nav button:hover::before {
  transform: scaleY(1);
}

/* ── Grafik Çizgi Glow ──────────────────────────────────────── */
.graph path:last-child {
  filter: drop-shadow(0 0 8px rgba(40,216,171,.7))
          drop-shadow(0 0 20px rgba(40,216,171,.3));
}
.graph svg {
  animation: fadeIn .8s ease-out;
}

/* ── Donut Chart Dönüş ──────────────────────────────────────── */
@keyframes donutSpin {
  from { transform: rotate(-90deg); opacity: 0; }
  to   { transform: rotate(0deg); opacity: 1; }
}
.donut {
  animation: donutSpin .8s cubic-bezier(.22,1,.36,1);
}

/* ── Tablo Satır Hover ──────────────────────────────────────── */
tbody tr {
  transition: background-color .2s ease, transform .15s ease;
}
tbody tr:hover {
  background-color: rgba(40,216,171,.04);
}
.history-row:hover {
  background: #14263b;
  transform: translateX(3px);
}

/* ── Buton Gradient Animasyonu (mevcut iyileştirme) ──────────── */
.primary {
  background: linear-gradient(105deg, #21c8a1, #3a91e8, #21c8a1);
  background-size: 200% 100%;
  animation: buttonGlow 4s ease infinite;
  transition: transform .15s ease, box-shadow .2s ease;
}
.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(40,216,171,.3);
}
@keyframes buttonGlow {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ── Toast Animasyonu ───────────────────────────────────────── */
@keyframes toastSlide {
  from { transform: translateY(100px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
#toast.show {
  animation: toastSlide .35s cubic-bezier(.22,1,.36,1);
}

/* ── Dialog Modal Animasyonu ────────────────────────────────── */
dialog[open] {
  animation: fadeInUp .3s ease-out;
}
dialog::backdrop {
  animation: fadeIn .25s ease-out;
}

/* ── Notice / Warning Stripe Animasyonu ─────────────────────── */
@keyframes noticeGlow {
  0%, 100% { border-color: #22504f; }
  50%      { border-color: #35a08c; }
}
.notice {
  animation: noticeGlow 4s ease-in-out infinite, fadeInUp .5s ease-out;
}
.warning {
  animation: fadeInUp .5s ease-out .1s both;
}

/* ── Input Focus Efekti ─────────────────────────────────────── */
input:focus, select:focus, textarea:focus {
  border-color: var(--aqua) !important;
  box-shadow: 0 0 0 3px rgba(40,216,171,.12);
  transition: border-color .2s ease, box-shadow .2s ease;
}

/* ── Tag Badge Shimmer ──────────────────────────────────────── */
@keyframes tagShimmer {
  0%   { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}
.tag.long {
  background: linear-gradient(90deg, #123d35 0%, #1a5548 50%, #123d35 100%);
  background-size: 200% 100%;
  animation: tagShimmer 5s ease infinite;
}
.tag.short {
  background: linear-gradient(90deg, #492631 0%, #5e3040 50%, #492631 100%);
  background-size: 200% 100%;
  animation: tagShimmer 5s ease infinite;
}

/* ── Testnet Badge Animasyonu ───────────────────────────────── */
@keyframes testnetPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .6; }
}
.testnet {
  animation: testnetPulse 2.5s ease-in-out infinite;
}

/* ── Event/Sinyal Listesi Animasyonu ────────────────────────── */
.event {
  transition: background-color .2s ease, transform .15s ease;
}
.event:hover {
  background-color: rgba(40,216,171,.04);
  transform: translateX(4px);
}

/* ── Allocation Listesi Animasyonu ──────────────────────────── */
.allocation li {
  transition: padding-left .2s ease, background-color .2s ease;
}
.allocation li:hover {
  padding-left: 14px;
  background-color: rgba(40,216,171,.03);
}

/* ── Scrollbar Stilleri ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a3f55; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3a5570; }

/* ── Light Theme Uyumu ──────────────────────────────────────── */
html[data-theme=light] .panel:hover,
html[data-theme=light] .stats article:hover {
  border-color: #a8d4f0;
  box-shadow: 0 16px 40px rgba(0,0,0,.08), 0 0 20px rgba(40,216,171,.05);
}

/* ── Responsive: Animasyonları Azalt ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
