/* ========================================
   Eda's Study Planner - Custom Styles
   ======================================== */

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d6d3d1; border-radius: 999px; }
.dark ::-webkit-scrollbar-thumb { background: #57534e; }

/* --- Glass Card --- */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}
.dark .glass {
    background: rgba(41, 37, 36, 0.8);
    border-color: rgba(255, 255, 255, 0.08);
}

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes slideRight {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes confettiBounce {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(1.3); }
}
@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.6; }
}

.animate-fade-in-up  { animation: fadeInUp 0.5s ease-out both; }
.animate-scale-in    { animation: scaleIn 0.4s ease-out both; }
.animate-slide-right { animation: slideRight 0.4s ease-out both; }
.animate-bounce-once { animation: confettiBounce 0.5s ease both; }
.animate-float       { animation: float 3s ease-in-out infinite; }
.animate-gradient    { background-size: 400% 400%; animation: gradientShift 15s ease infinite; }
.animate-sparkle     { animation: sparkle 2s ease-in-out infinite; }
.animate-pulse-soft  { animation: pulse-soft 2s ease-in-out infinite; }

/* Stagger children */
.stagger > :nth-child(1) { animation-delay: 0.05s; }
.stagger > :nth-child(2) { animation-delay: 0.10s; }
.stagger > :nth-child(3) { animation-delay: 0.15s; }
.stagger > :nth-child(4) { animation-delay: 0.20s; }
.stagger > :nth-child(5) { animation-delay: 0.25s; }
.stagger > :nth-child(6) { animation-delay: 0.30s; }
.stagger > :nth-child(7) { animation-delay: 0.35s; }

/* --- Task Card --- */
.task-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}
.task-card:hover {
    transform: translateY(-4px);
}

/* --- Left stripe on cards --- */
.card-stripe {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}

/* --- Progress ring transition --- */
.progress-ring-circle {
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Toggle button --- */
.toggle-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.toggle-btn:active {
    transform: scale(0.9);
}

/* --- Toast --- */
.toast-enter {
    animation: fadeInUp 0.4s ease-out both;
}
.toast-exit {
    animation: fadeInUp 0.3s ease-in reverse both;
}

/* --- Week selector horizontal scroll on mobile --- */
.week-scroll {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.week-scroll::-webkit-scrollbar { display: none; }

/* --- Input focus glow --- */
.input-glow:focus {
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25);
}
.dark .input-glow:focus {
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.35);
}

/* --- Login background --- */
.login-bg {
    background: linear-gradient(-45deg, #c084fc, #f472b6, #60a5fa, #34d399);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* --- Collapse transition (Alpine) --- */
/* --- Quote fade transition --- */
.quote-tr, .quote-en {
    transition: opacity 0.2s ease;
}

[x-cloak] { display: none !important; }
