/* StudyFlow Welcome Page Styles */
/* Using system fonts for better performance */

:root {
  --primary-bg: #0f1419;
  --text-color: #e7eaee;
  --accent-color: #64ffda;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--primary-bg);
  color: var(--text-color);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom animations for lo-fi feel */
@keyframes pulse-slow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes bounce-slow {
  0%, 100% { transform: translate3d(0,0,0); }
  50%     { transform: translate3d(0,-12px,0); }
}

.animate-pulse-slow {
  animation: pulse-slow 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce-slow {
  animation: bounce-slow 3s ease-in-out infinite;
  will-change: transform; /* GPU hint for smoother animation */
  transform: translateZ(0);
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animate-bounce-slow, .animate-pulse-slow, .animate-pulse { animation: none !important; }
}

/* Critical utility classes */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.mb-10 { margin-bottom: 2.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-12 { margin-top: 3rem; }
.p-6 { padding: 1.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.font-black { font-weight: 900; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-8xl { font-size: 6rem; line-height: 1; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-amber-300 { color: #fcd34d; }
.text-amber-500 { color: #f59e0b; }
.text-white { color: #ffffff; }
.bg-amber-600 { background-color: rgba(217, 119, 6, 0.7); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.border-b-4 { border-bottom-width: 4px; }
.border-r-2 { border-right-width: 2px; }
.border-amber-800 { border-color: rgba(146, 64, 14, 0.8); }
.cursor-pointer { cursor: pointer; }
.opacity-90 { opacity: 0.9; }
.opacity-70 { opacity: 0.7; }
.inline-block { display: inline-block; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-4xl { max-width: 56rem; }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.bg-black { background-color: rgba(0, 0, 0, 0.4); }

/* Allow Tailwind-like arithmetic class used in HTML: bg-black/40 */
.bg-black\/40 { background-color: rgba(0, 0, 0, 0.4); }
.rounded-3xl { border-radius: 1.5rem; }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* Hover states - Fixed CSS naming */
.hover-bg-amber-500:hover { background-color: rgba(245, 158, 11, 0.8); }
.active-scale-98:active { transform: scale(0.98); }
.hover-scale-102:hover { transform: scale(1.02); }

/* Responsive - Fixed CSS naming */
@media (min-width: 768px) {
  .md-text-8xl { font-size: 6rem; line-height: 1; }
  .md-text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .md-text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .md-p-12 { padding: 3rem; }
}

/* Page transitions */
.page-container {
  transition: all 0.5s ease-in-out;
}

.page-hidden {
  opacity: 0;
  transform: scale(0.95);
}

.page-visible {
  opacity: 1;
  transform: scale(1);
}

/* Additional utility classes to replace Tailwind */
.p-8 { padding: 2rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-indigo-500 { color: #6366f1; }
.text-green-500 { color: #10b981; }
.text-red-500 { color: #ef4444; }
.bg-indigo-500 { background-color: #6366f1; }
.bg-green-500 { background-color: #10b981; }
.bg-red-500 { background-color: #ef4444; }
.space-x-4 > * + * { margin-left: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.rounded-lg { border-radius: 0.5rem; }
.absolute { position: absolute; }
.bottom-4 { bottom: 1rem; }
.right-4 { right: 1rem; }
.relative { position: relative; }
.z-10 { z-index: 10; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.bg-cover { background-size: cover; }
.bg-center { background-position: center; }
.min-h-screen { min-height: 100vh; }
.bg-gray-900 { background-color: #111827; }
.antialiased { -webkit-font-smoothing: antialiased; }
.overflow-hidden { overflow: hidden; }
.font-inter { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; }

/* Hover states */
.hover-bg-amber-500:hover { background-color: rgba(245, 158, 11, 0.8); }
.hover-bg-indigo-600:hover { background-color: #4f46e5; }
.hover-bg-green-600:hover { background-color: #059669; }
.hover-bg-red-600:hover { background-color: #dc2626; }
.active-scale-98:active { transform: scale(0.98); }
.hover-scale-102:hover { transform: scale(1.02); }

/* content-visibility: let the browser skip layout/paint for hidden screens */
#timer-screen, #calendar-screen { content-visibility: auto; contain-intrinsic-size: 800px 600px; }

/* Duplicate responsive block removed - using corrected version above */

/* Soft pan for background to give a subtle sense of motion */
@keyframes soft-pan {
  0%   { background-position: 50% 50%; }
  50%  { background-position: 55% 45%; }
  100% { background-position: 50% 50%; }
}

/* Fade-in-up for main content */
@keyframes fade-in-up {
  0% { opacity: 0; transform: translateY(20px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

#background-container { animation: soft-pan 60s ease-in-out infinite alternate; transition: opacity 1000ms ease-in-out, filter 1000ms ease-in-out; }
#content-container { animation: fade-in-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; opacity: 0; }
#timer-screen, #calendar-screen { animation: none !important; }

/* Ready button styles: add a pseudo-element checkmark when ready */
.ready-with-check { position: relative; padding-right: 3.5rem; }
.ready-with-check::after { content: '✅'; position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 1.25rem; line-height: 1; }