/* ==========================================================
   effects.css — "Aurora cam" görsel katmanı
   Hareketli arka plan, cam yüzeyler, ışıltılı butonlar.
   Bu dosya en son yüklenir ve önceki stillerin üzerine yazar.
   index.html'deki <link> satırını kaldırırsan sade görünüme dönersin.
   ========================================================== */

/* ---------- 1. Arka plan katmanları ---------- */

/* Dalgaları background.js bu canvas'a çizer */
.bg-canvas {
  position: fixed; inset: 0;
  z-index: -1;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* Dalgaların arkasında yavaşça süzülen renk bulutları */
body::before {
  content: "";
  position: fixed; inset: -20%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38% 38% at 18% 22%, var(--blob-1), transparent 70%),
    radial-gradient(34% 34% at 82% 14%, var(--blob-2), transparent 70%),
    radial-gradient(40% 40% at 68% 84%, var(--blob-3), transparent 70%);
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) rotate(0deg); }
  to { transform: translate3d(3%, 3%, 0) rotate(8deg); }
}

/* ---------- 2. Cam yüzeyler ---------- */
.sidebar, .topbar, .card, .stat, .placeholder, .modal {
  background: var(--glass);
  border-color: var(--glass-border);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
}

.modal::backdrop {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* Sayfa açılırken bölümler aşağıdan yumuşakça gelir */
.view > * { animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.view > *:nth-child(2) { animation-delay: 0.06s; }
.view > *:nth-child(3) { animation-delay: 0.12s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 3. Marka ve menü ---------- */
/* Logo artık bir resim; arkasına renk geçişi koymuyoruz. */
img.brand__logo { background: none; }
.brand__logo {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 18px -4px var(--glow);
}
.brand__name {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav__link { transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.nav__link:hover { transform: translateX(2px); }
.nav__link.is-active {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 20%, transparent), transparent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.app.is-collapsed .nav__link:hover { transform: none; }

/* ---------- 4. Işıltılı ana buton ---------- */
.btn--primary {
  position: relative;
  overflow: hidden;
  border: 0;
  color: #fff;
  background: var(--grad);
  background-size: 200% 100%;
  box-shadow: 0 8px 22px -6px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-position 0.5s ease;
}
.btn--primary:hover {
  filter: none;
  transform: translateY(-1px);
  background-position: 100% 0;
  box-shadow: 0 14px 30px -6px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn--primary:active { transform: scale(0.97); }

/* Küçük yıldız parıltıları */
.btn--primary::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 28%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 86% 70%, #fff 0 1.2px, transparent 2.4px),
    radial-gradient(circle at 68% 22%, #fff 0 0.8px, transparent 1.8px);
  animation: twinkle 2.4s ease-in-out infinite alternate;
}

/* Butonun üzerinden geçen ışık şeridi */
.btn--primary::after {
  content: "";
  position: absolute; top: -20%; bottom: -20%; left: 0;
  width: 40%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: shimmer 3.6s ease-in-out infinite;
}
.btn--primary:hover::after { animation-duration: 1.4s; }

@keyframes twinkle {
  from { opacity: 0.15; }
  to { opacity: 0.9; }
}
@keyframes shimmer {
  0%, 55% { transform: translateX(-160%) skewX(-20deg); }
  100% { transform: translateX(360%) skewX(-20deg); }
}

/* ---------- 5. Kartlar ---------- */
.stat { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.stat:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -16px var(--glow); }

.stat--accent .stat__icon {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 16px -6px var(--glow);
}

/* Pomodoro kartı: renkleri yavaşça akan geçiş */
.card--accent {
  border-color: transparent;
  background: var(--grad);
  background-size: 220% 220%;
  box-shadow: 0 16px 36px -14px var(--glow);
  animation: pan 9s ease-in-out infinite alternate;
}
@keyframes pan {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

/* İlerleme halkası: ortası artık saydam (cam kartla uyumlu), rengi geçişli */
.ring {
  background: none;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 35%, transparent));
}
.ring::before {
  inset: 0;
  background: conic-gradient(var(--accent), var(--accent-2) calc(var(--p) * 1%), var(--surface-2) 0);
  /* --ring-w: halkanın kalınlığı (büyük zamanlayıcı halkası bunu değiştirir) */
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--ring-w, 12px)), #000 calc(100% - var(--ring-w, 12px) + 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--ring-w, 12px)), #000 calc(100% - var(--ring-w, 12px) + 1px));
}

.goal .bar__fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.segmented__btn { transition: background 0.2s ease, color 0.2s ease; }
.task { transition: background 0.15s ease; }

/* ---------- 6. Performans ve erişilebilirlik ---------- */

/* Telefonda çok sayıda bulanıklık efekti kaydırmayı yavaşlatır; kartlarda kapatıyoruz */
@media (max-width: 860px) {
  .card, .stat {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--glass-solid);
  }
  .card--accent { background: var(--grad); background-size: 220% 220%; }
}

/* styles.css'teki "hareketi azalt" kuralı buradaki tüm animasyonları da durdurur. */
