@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Instrument+Sans:ital,wght@0,400..700;1,400..700&family=JetBrains+Mono:wght@400;500;600&display=swap");
@import "tailwindcss";

/* ========================================
   Design System - Productier
   Editorial refinement meets productivity
   ======================================== */

:root {
  color-scheme: light;
  
  /* Background colors - Soft ivory with subtle warmth */
  --bg: #fcfaf7;
  --bg-subtle: #f7f4f0;
  --bg-muted: #efeae3;
  --bg-accent: #fffcf5;
  
  /* Surface colors */
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-overlay: rgba(255, 255, 255, 0.95);
  --surface-tinted: #fffef9;
  
  /* Text colors - Deep charcoal with warmth */
  --text: #1c1917;
  --text-secondary: #44403c;
  --text-muted: #78716c;
  --text-subtle: #a8a29e;
  
  /* Border colors - Refined neutrals */
  --border: #e7e5e4;
  --border-subtle: #f5f5f4;
  --border-strong: #d6d3d1;
  --border-accent: #fef3c7;
  
  /* Accent - Burnt sienna with depth */
  --accent: #ea580c;
  --accent-hover: #c2410c;
  --accent-muted: #fed7aa;
  --accent-subtle: #ffedd5;
  --accent-deep: #7c2d12;
  
  /* Secondary accent - Deep teal */
  --secondary: #0d9488;
  --secondary-hover: #0f766e;
  --secondary-muted: #99f6e4;
  --secondary-subtle: #ccfbf1;
  
  /* Status colors */
  --success: #16a34a;
  --success-muted: #dcfce7;
  --warning: #ea580c;
  --warning-muted: #ffedd5;
  --error: #dc2626;
  --error-muted: #fee2e2;
  --info: #0891b2;
  --info-muted: #cffafe;
  
  /* Shadows - Soft and layered */
  --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-sm: 0 2px 4px rgba(28, 25, 23, 0.05), 0 1px 2px rgba(28, 25, 23, 0.03);
  --shadow-md: 0 4px 8px rgba(28, 25, 23, 0.07), 0 2px 4px rgba(28, 25, 23, 0.04);
  --shadow-lg: 0 8px 16px rgba(28, 25, 23, 0.09), 0 4px 8px rgba(28, 25, 23, 0.05);
  --shadow-xl: 0 16px 32px rgba(28, 25, 23, 0.11), 0 8px 16px rgba(28, 25, 23, 0.07);
  --shadow-2xl: 0 24px 48px rgba(28, 25, 23, 0.14), 0 12px 24px rgba(28, 25, 23, 0.09);
  
  /* Typography - Distinctive editorial pairing */
  --font-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --font-sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
  
  /* Spacing scale (8px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Border radius - Softer curves */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;
  
  /* Transitions - Refined easing */
  --transition-fast: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

html.dark {
  color-scheme: dark;
  
  /* Background colors - Rich charcoal with depth */
  --bg: #0a0908;
  --bg-subtle: #161412;
  --bg-muted: #1f1d1a;
  --bg-accent: #2a2420;
  
  /* Surface colors */
  --surface: #161412;
  --surface-elevated: #1f1d1a;
  --surface-overlay: rgba(22, 20, 18, 0.95);
  --surface-tinted: #2a2420;
  
  /* Text colors - Warm off-whites */
  --text: #fafaf9;
  --text-secondary: #e7e5e4;
  --text-muted: #a8a29e;
  --text-subtle: #78716c;
  
  /* Border colors */
  --border: #292524;
  --border-subtle: #1c1917;
  --border-strong: #3f3f46;
  --border-accent: #44403c;
  
  /* Accent - Vibrant orange for dark mode */
  --accent: #fb923c;
  --accent-hover: #f97316;
  --accent-muted: #7c2d12;
  --accent-subtle: #431407;
  --accent-deep: #fed7aa;
  
  /* Secondary accent - Bright teal */
  --secondary: #2dd4bf;
  --secondary-hover: #14b8a6;
  --secondary-muted: #134e4a;
  --secondary-subtle: #042f2e;
  
  /* Status colors (adjusted for dark) */
  --success: #4ade80;
  --success-muted: #14532d;
  --warning: #fb923c;
  --warning-muted: #7c2d12;
  --error: #f87171;
  --error-muted: #7f1d1d;
  --info: #22d3ee;
  --info-muted: #164e63;
  
  /* Shadows - Deeper for dark mode */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.7), 0 4px 8px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.8), 0 8px 16px rgba(0, 0, 0, 0.7);
  --shadow-2xl: 0 24px 48px rgba(0, 0, 0, 0.9), 0 12px 24px rgba(0, 0, 0, 0.8);
}

/* ========================================
   Base styles
   ======================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  position: relative;
}

/* Subtle texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 25% 35%, rgba(234, 88, 12, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 75% 70%, rgba(13, 148, 136, 0.03) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.015'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent);
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background: var(--accent-muted);
  color: var(--accent-deep);
}

/* Smooth scroll behavior */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ========================================
   Typography - Editorial hierarchy
   ======================================== */

.text-display {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.text-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text-subtitle {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.text-body {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.6;
}

.text-caption {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.005em;
}

.text-overline {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ========================================
   Surface components - Layered depth
   ======================================== */

.surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.surface::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
  opacity: 0.5;
}

.surface-elevated {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.surface-subtle {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.surface-tinted {
  background: var(--surface-tinted);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

/* Legacy aliases for backward compatibility */
.app-surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.app-surface:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-base);
}

.app-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.app-soft {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

/* ========================================
   Button components - Refined interactions
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--text);
}

.btn-icon {
  padding: 0.625rem;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-md);
}

.btn-icon:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--text);
}

/* Legacy button classes */
.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: white;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.2);
}

.button-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
  transform: translateY(-1px);
}

.button-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-xs);
}

.button-secondary:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.button-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   Input components - Refined focus states
   ======================================== */

.input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  outline: none;
  transition: all var(--transition-base);
}

.input::placeholder {
  color: var(--text-subtle);
}

.input:hover:not(:disabled) {
  border-color: var(--border-strong);
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-subtle), var(--shadow-sm);
  background: var(--surface-tinted);
}

.input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-subtle);
}

.input-base {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  outline: none;
  transition: all var(--transition-base);
}

.input-base::placeholder {
  color: var(--text-subtle);
}

.input-base:hover:not(:disabled) {
  border-color: var(--border-strong);
}

.input-base:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-subtle), var(--shadow-sm);
  background: var(--surface-tinted);
}

.input-base:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-subtle);
}

/* ========================================
   Badge components - Refined pills
   ======================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.badge-accent {
  background: var(--accent-subtle);
  color: var(--accent-deep);
  border-color: var(--accent-muted);
}

.badge-success {
  background: var(--success-muted);
  color: var(--success);
  border-color: transparent;
}

.badge-warning {
  background: var(--warning-muted);
  color: var(--warning);
  border-color: transparent;
}

.badge-error {
  background: var(--error-muted);
  color: var(--error);
  border-color: transparent;
}

.badge-info {
  background: var(--info-muted);
  color: var(--info);
  border-color: transparent;
}

/* ========================================
   Utility classes
   ======================================== */

.text-soft {
  color: var(--text-muted);
}

.accent-text {
  color: var(--accent);
}

.accent-bg {
  background: var(--accent);
}

.accent-soft {
  background: var(--accent-subtle);
}

/* ========================================
   Page structure - Editorial layout
   ======================================== */

.page-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Animated page entrance */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-enter {
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Staggered animation for lists */
.stagger-item {
  opacity: 0;
  animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(6) { animation-delay: 0.3s; }

/* ========================================
   Scrollbar - Refined styling
   ======================================== */

.scrollbar-thin {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.scrollbar-thin::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  background-clip: padding-box;
}

/* ========================================
   Legacy utilities (for backward compatibility)
   ======================================== */

.grid-lines {
  background-image: none;
}

.login-noise {
  background-image: none;
}

/* ========================================
   New utility classes - Enhanced design
   ======================================== */

/* Glass morphism effect */
.glass {
  background: var(--surface-overlay);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hover lift effect */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Focus ring */
.focus-ring:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-subtle);
  border-color: var(--accent);
}

/* Shimmer loading effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-subtle) 0%,
    var(--bg-muted) 50%,
    var(--bg-subtle) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
}

/* Pulse animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

/* Slide in from right */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-in-right {
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scale in */
@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.scale-in {
  animation: scaleIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Decorative elements */
.accent-border-top {
  position: relative;
}

.accent-border-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  border-radius: 2px 2px 0 0;
}

.accent-dot {
  position: relative;
  padding-left: 1rem;
}

.accent-dot::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* Interactive states */
.interactive {
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.interactive::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent)/10, var(--secondary)/10);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.interactive:hover::after {
  opacity: 1;
}

.interactive:hover {
  transform: translateY(-1px);
}

.interactive:active {
  transform: scale(0.98);
}

.interactive:active::after {
  opacity: 0.5;
}

/* Divider with text */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.divider::before {
  margin-right: 1rem;
}

.divider::after {
  margin-left: 1rem;
}

/* Status indicators */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-dot.online {
  background: var(--success);
}

.status-dot.offline {
  background: var(--error);
  animation: none;
}

.status-dot.syncing {
  background: var(--warning);
}

/* Skeleton loader */
.skeleton {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(
    90deg,
    transparent,
    var(--bg-muted),
    transparent
  );
  animation: shimmer 2s infinite;
}

/* ========================================
   Enhanced Visual Effects
   ======================================== */

/* Card hover effects */
.card-hover {
  transition: all var(--transition-base);
  position: relative;
}

.card-hover::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card-hover:hover::before {
  opacity: 0.5;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Glow effect */
.glow {
  position: relative;
}

.glow::after {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle at center, var(--accent)/20, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-slow);
  pointer-events: none;
  z-index: -1;
}

.glow:hover::after {
  opacity: 1;
}

/* Gradient border */
.gradient-border {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

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

.float {
  animation: float 3s ease-in-out infinite;
}

/* Bounce on hover */
.bounce-hover {
  transition: transform var(--transition-bounce);
}

.bounce-hover:hover {
  transform: scale(1.05);
}

.bounce-hover:active {
  transform: scale(0.95);
}

/* Shine effect */
@keyframes shine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.shine {
  position: relative;
  overflow: hidden;
}

.shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shine 3s infinite;
}

/* Smooth reveal */
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.reveal {
  animation: reveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Backdrop blur utilities */
.backdrop-blur-sm {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.backdrop-blur-md {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.backdrop-blur-lg {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.backdrop-blur-xl {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Text gradient animation */
@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.gradient-text-animated {
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--secondary),
    var(--accent)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease infinite;
}

/* Magnetic hover effect */
.magnetic {
  transition: transform var(--transition-base);
}

.magnetic:hover {
  transform: scale(1.02);
}

/* Smooth entrance for lists */
.list-enter {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.list-enter:nth-child(1) { animation-delay: 0.05s; }
.list-enter:nth-child(2) { animation-delay: 0.1s; }
.list-enter:nth-child(3) { animation-delay: 0.15s; }
.list-enter:nth-child(4) { animation-delay: 0.2s; }
.list-enter:nth-child(5) { animation-delay: 0.25s; }
.list-enter:nth-child(6) { animation-delay: 0.3s; }
.list-enter:nth-child(7) { animation-delay: 0.35s; }
.list-enter:nth-child(8) { animation-delay: 0.4s; }

/* Subtle border glow on focus */
.focus-glow:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-subtle), 0 0 20px var(--accent)/20;
  border-color: var(--accent);
}

/* Premium card style */
.premium-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-tinted) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.premium-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent)/30, var(--secondary)/30, transparent);
}

.premium-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
  transition: all var(--transition-base);
}

/* Frosted glass effect */
.frosted {
  background: var(--surface-overlay);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
}

/* Subtle pulse for attention */
@keyframes subtle-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.02);
  }
}

.subtle-pulse {
  animation: subtle-pulse 2s ease-in-out infinite;
}

/* Smooth color transition */
.color-transition {
  transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

/* Elevated on hover */
.elevate-hover {
  transition: all var(--transition-base);
}

.elevate-hover:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-xl);
}

/* Ink spread effect */
@keyframes ink-spread {
  0% {
    transform: scale(0);
    opacity: 0.5;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

.ink-effect {
  position: relative;
  overflow: hidden;
}

.ink-effect::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--accent)/30 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  pointer-events: none;
}

.ink-effect:active::after {
  animation: ink-spread 0.6s ease-out;
}
