/* TaskFlow - Main Styles */

/* Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 107, 71, 0.3) transparent;
}
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 71, 0.3);
  border-radius: 3px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 107, 71, 0.5);
}

/* Glass Effects */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.dark .glass {
  background: rgba(30, 20, 40, 0.8);
}

.glass-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.dark .glass-card {
  background: rgba(40, 30, 55, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Mesh Background */
.gradient-mesh {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(255, 148, 116, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 0%, rgba(248, 213, 175, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(192, 132, 252, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 0% 100%, rgba(255, 184, 163, 0.3) 0%, transparent 50%),
    linear-gradient(135deg, #fef7ee 0%, #fff5f2 50%, #faf5ff 100%);
}
.dark .gradient-mesh {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(199, 58, 27, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 0%, rgba(180, 68, 24, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(126, 34, 206, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 0% 100%, rgba(163, 50, 27, 0.15) 0%, transparent 50%),
    linear-gradient(135deg, #1a0f1f 0%, #150d18 50%, #0f0a12 100%);
}

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

/* Checkbox */
.checkbox-custom {
  transition: all 0.2s ease;
}
.checkbox-custom.checked {
  background: linear-gradient(135deg, #ff6b47, #ed4a26);
}

/* Confetti */
.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  pointer-events: none;
  z-index: 9999;
}

/* Drag & Drop */
.drag-over {
  background: rgba(255, 107, 71, 0.1);
  border: 2px dashed rgba(255, 107, 71, 0.5);
}
.dragging {
  opacity: 0.5;
  transform: rotate(3deg);
}

/* Date Input */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.5);
  cursor: pointer;
}
.dark input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
}

/* Noise Overlay */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.015;
  z-index: 9998;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Login Page Specific */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.login-logo {
  animation: float 6s ease-in-out infinite;
}

/* Form Styles */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  padding-left: 2.75rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(209, 213, 219, 0.5);
  outline: none;
  transition: all 0.2s;
}
.form-input:focus {
  border-color: #ff6b47;
  box-shadow: 0 0 0 3px rgba(255, 107, 71, 0.1);
}
.dark .form-input {
  background: rgba(55, 65, 81, 0.5);
  border-color: rgba(75, 85, 99, 0.5);
  color: #f3f4f6;
}
.dark .form-input:focus {
  border-color: #ff6b47;
}

.form-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

/* Button Styles */
.btn-primary {
  width: 100%;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #ff6b47, #ed9249);
  color: white;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(255, 107, 71, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 107, 71, 0.4);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  background: rgba(243, 244, 246, 0.8);
  color: #374151;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover {
  background: rgba(229, 231, 235, 0.9);
}
.dark .btn-secondary {
  background: rgba(55, 65, 81, 0.8);
  color: #d1d5db;
}
.dark .btn-secondary:hover {
  background: rgba(75, 85, 99, 0.9);
}

/* Loading Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes glow {
  0% { box-shadow: 0 0 20px rgba(255, 107, 71, 0.3); }
  100% { box-shadow: 0 0 40px rgba(255, 107, 71, 0.6); }
}

@keyframes slideUp {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
  0% { transform: translateY(-20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes scaleIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes confetti {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-500px) rotate(720deg); opacity: 0; }
}

@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(3px); }
}

@keyframes check {
  0% { stroke-dashoffset: 100; }
  100% { stroke-dashoffset: 0; }
}

/* Utility Classes */
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite alternate; }
.animate-slide-up { animation: slideUp 0.3s ease-out; }
.animate-slide-down { animation: slideDown 0.3s ease-out; }
.animate-fade-in { animation: fadeIn 0.3s ease-out; }
.animate-scale-in { animation: scaleIn 0.2s ease-out; }
.animate-confetti { animation: confetti 1s ease-out forwards; }
.animate-bounce-in { animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.animate-shake { animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; }
.animate-check { animation: check 0.4s ease-out forwards; }

/* Alert Styles */
.alert {
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #dc2626;
}
.dark .alert-error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}
.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #059669;
}
