@import "tailwindcss";

/* Modern CSS Variables for Theming */
:root {
  /* Base Colors */
  --color-primary: #8b5cf6;
  --color-primary-light: #a78bfa;
  --color-primary-dark: #7c3aed;
  --color-secondary: #ec4899;
  --color-secondary-light: #f472b6;
  --color-secondary-dark: #db2777;
  --color-accent: #0ea5e9;
  --color-accent-light: #38bdf8;
  --color-accent-dark: #0369a1;

  /* Status Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;

  /* Priority Colors */
  --color-priority-high: #f87171;
  --color-priority-medium: #fbbf24;
  --color-priority-low: #60a5fa;

  /* Light Theme */
  --color-bg: #f9fafb;
  --color-bg-secondary: #f3f4f6;
  --color-bg-tertiary: #e5e7eb;
  --color-text: #1f2937;
  --color-text-secondary: #4b5563;
  --color-text-tertiary: #6b7280;
  --color-border: #d1d5db;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Gradients */
  --gradient-primary: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-secondary) 100%
  );
  --gradient-secondary: linear-gradient(
    135deg,
    var(--color-accent) 0%,
    var(--color-primary) 100%
  );
  --gradient-success: linear-gradient(
    135deg,
    var(--color-success) 0%,
    #34d399 100%
  );
  --gradient-priority-high: linear-gradient(
    135deg,
    var(--color-error) 0%,
    #fca5a5 100%
  );
  --gradient-priority-medium: linear-gradient(
    135deg,
    var(--color-warning) 0%,
    #fcd34d 100%
  );
  --gradient-priority-low: linear-gradient(
    135deg,
    var(--color-info) 0%,
    #93c5fd 100%
  );

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  /* Animation */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme */
.dark-theme,
[data-theme="dark"] {
  --color-bg: #1f2937;
  --color-bg-secondary: #374151;
  --color-bg-tertiary: #4b5563;
  --color-text: #f9fafb;
  --color-text-secondary: #e5e7eb;
  --color-text-tertiary: #d1d5db;
  --color-border: #6b7280;
}

/* Base Styles */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--tg-theme-bg-color, var(--color-bg));
  color: var(--tg-theme-text-color, var(--color-text));
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  transition: background-color var(--transition-normal),
    color var(--transition-normal);
}

/* Cute Patterns */
.pattern-dots {
  background-image: radial-gradient(
    var(--color-text-tertiary) 1px,
    transparent 1px
  );
  background-size: 20px 20px;
  background-position: 0 0;
  opacity: 0.05;
}

.pattern-lines {
  background-image: linear-gradient(
    var(--color-text-tertiary) 1px,
    transparent 1px
  );
  background-size: 100% 20px;
  opacity: 0.05;
}

/* Enhanced Component Styles */
.task-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.task-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn {
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* Enhanced Form Elements */
input,
select,
textarea {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 0.75rem 1rem;
  transition: all var(--transition-fast);
  background-color: var(
    --tg-theme-secondary-bg-color,
    var(--color-bg-secondary)
  );
  color: var(--tg-theme-text-color, var(--color-text));
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Cute Animations */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

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

.animate-bounce {
  animation: bounce 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Enhanced Cards and Containers */
.card {
  background-color: var(--tg-theme-bg-color, var(--color-bg));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

/* Status Badge Styles */
.badge {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-success {
  background: var(--gradient-success);
  color: white;
}

.badge-priority-high {
  background: var(--gradient-priority-high);
  color: white;
}

.badge-priority-medium {
  background: var(--gradient-priority-medium);
  color: #7c2d12;
}

.badge-priority-low {
  background: var(--gradient-priority-low);
  color: white;
}
