/* ============================================
   TOSANG - A Mind-Blowing Task Manager
   ============================================ */

:root {
  /* Colors */
  --bg-deep: #050508;
  --bg-dark: #0a0a0f;
  --bg-card: rgba(15, 15, 25, 0.8);
  --bg-card-hover: rgba(25, 25, 40, 0.9);
  --bg-elevated: rgba(30, 30, 50, 0.6);

  --text-primary: #f0f0f5;
  --text-secondary: #8888a0;
  --text-muted: #555570;

  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-tertiary: #06b6d4;
  --accent-glow: rgba(99, 102, 241, 0.5);

  --priority-low: #22c55e;
  --priority-medium: #eab308;
  --priority-high: #f97316;
  --priority-urgent: #ef4444;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-aurora: linear-gradient(135deg, #6366f1 0%, #8b5cf6 25%, #06b6d4 50%, #10b981 75%, #6366f1 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);

  /* Dimensions */
  --nav-height: 64px;
  --column-width: 320px;
  --border-radius: 12px;
  --border-radius-sm: 8px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

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

/* ============================================
   AURORA BACKGROUND
   ============================================ */

.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-deep);
}

.aurora {
  position: absolute;
  width: 150%;
  height: 150%;
  filter: blur(100px);
  opacity: 0.4;
  animation: aurora-drift 20s ease-in-out infinite;
}

.aurora-1 {
  background: radial-gradient(ellipse at 20% 50%, #6366f1 0%, transparent 50%);
  top: -50%;
  left: -25%;
  animation-delay: 0s;
}

.aurora-2 {
  background: radial-gradient(ellipse at 80% 50%, #8b5cf6 0%, transparent 50%);
  top: -30%;
  right: -25%;
  animation-delay: -7s;
  animation-duration: 25s;
}

.aurora-3 {
  background: radial-gradient(ellipse at 50% 80%, #06b6d4 0%, transparent 50%);
  bottom: -50%;
  left: 25%;
  animation-delay: -14s;
  animation-duration: 30s;
}

@keyframes aurora-drift {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(5%, -5%) rotate(3deg) scale(1.05);
  }
  50% {
    transform: translate(-3%, 5%) rotate(-2deg) scale(0.95);
  }
  75% {
    transform: translate(-5%, -3%) rotate(2deg) scale(1.02);
  }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.noise-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  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");
}

/* Particles */
#particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float-particle 15s linear infinite;
}

@keyframes float-particle {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) scale(1);
    opacity: 0;
  }
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */

.page {
  display: none;
  min-height: 100vh;
}

.page.active {
  display: block;
  animation: page-enter 0.6s var(--transition-slow);
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm), 0 0 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 30px rgba(99, 102, 241, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.btn-glow {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
}

.btn-glow:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-glow:hover .btn-shine {
  left: 100%;
}

.btn-large {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-arrow {
  transition: transform var(--transition-normal);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ============================================
   LANDING PAGE
   ============================================ */

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(15, 10, 30, 0.85), transparent);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  height: 100%;
  width: auto;
}

.logo {
  height: 44px;
}

.landing-nav .logo {
  height: 64px;
}


.logo-icon {
  font-size: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.landing-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: 100vh;
  padding: 120px 60px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.title-line {
  display: block;
}

.gradient-text {
  background: var(--gradient-aurora);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 5s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 48px;
}

.cta-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.feature-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all var(--transition-normal);
}

.feature-pill:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.feature-pill svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent-primary);
}

/* Mock Board Visual */
.hero-visual {
  perspective: 1000px;
}

.mock-board {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  backdrop-filter: blur(20px);
  transform: rotateY(-5deg) rotateX(5deg);
  transition: transform 0.5s ease;
  box-shadow: var(--shadow-lg);
}

.mock-board:hover {
  transform: rotateY(0) rotateX(0);
}

.mock-column {
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mock-column-header {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 0;
}

.mock-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  padding: 14px;
  transition: all var(--transition-normal);
  animation: card-float 4s ease-in-out infinite;
}

.mock-card:nth-child(2) { animation-delay: -1s; }
.mock-card:nth-child(3) { animation-delay: -2s; }
.mock-card:nth-child(4) { animation-delay: -3s; }

@keyframes card-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.mock-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.mock-card.completed {
  opacity: 0.5;
}

.mock-card.completed .mock-card-title {
  text-decoration: line-through;
}

.mock-card.priority-high {
  border-left: 3px solid var(--priority-high);
}

.mock-card.priority-medium {
  border-left: 3px solid var(--priority-medium);
}

.mock-card-title {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.mock-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mock-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  background: color-mix(in srgb, var(--tag-color) 20%, transparent);
  color: var(--tag-color);
  border-radius: 4px;
  font-weight: 500;
}

.mock-due {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.landing-footer {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   APP NAVIGATION
   ============================================ */

.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  padding: 0 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.board-selector {
  position: relative;
}

.board-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.board-dropdown-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.board-dropdown-btn svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.board-selector.open .board-dropdown-btn svg {
  transform: rotate(180deg);
}

.board-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-normal);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
}

.board-selector.open .board-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.board-list {
  max-height: 300px;
  overflow-y: auto;
}

.board-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.board-item:hover {
  background: var(--bg-elevated);
}

.board-item.active {
  background: var(--accent-primary);
  color: white;
}

.board-item-name {
  font-size: 0.9rem;
}

.board-item-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.board-item:hover .board-item-actions {
  opacity: 1;
}

.board-item-btn {
  padding: 4px;
  color: var(--text-muted);
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.board-item-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.board-item-btn svg {
  width: 14px;
  height: 14px;
}

.new-board-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  margin-top: 8px;
  border-top: 1px solid var(--border-subtle);
  color: var(--accent-primary);
  font-size: 0.9rem;
  transition: background var(--transition-fast);
}

.new-board-btn:hover {
  background: var(--bg-elevated);
}

.new-board-btn svg {
  width: 16px;
  height: 16px;
}

.nav-btn {
  padding: 10px;
  color: var(--text-secondary);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.nav-btn svg {
  width: 20px;
  height: 20px;
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-btn {
  padding: 0;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  transition: box-shadow var(--transition-fast);
}

.user-btn:hover .user-avatar {
  box-shadow: var(--shadow-glow);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-normal);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
}

.user-menu.open .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-info {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.user-info span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.dropdown-item svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   APP MAIN CONTENT
   ============================================ */

.app-main {
  height: calc(100vh - var(--nav-height));
  overflow-x: auto;
  overflow-y: hidden;
  padding: 24px;
}

.no-board-message {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.empty-state {
  text-align: center;
  max-width: 400px;
}

.empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-icon svg {
  width: 40px;
  height: 40px;
  stroke: var(--text-muted);
}

.empty-state h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.board-container {
  display: flex;
  gap: 20px;
  height: 100%;
}

.board-container.hidden {
  display: none;
}

.columns-container {
  display: flex;
  gap: 20px;
  height: 100%;
}

/* ============================================
   COLUMNS
   ============================================ */

.column {
  width: var(--column-width);
  min-width: var(--column-width);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
  transition: border-color var(--transition-fast);
}

.column:hover {
  border-color: var(--border-light);
}

.column.drag-over {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.column-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.column-count {
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 500;
}

.column-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.column:hover .column-actions {
  opacity: 1;
}

.column-btn {
  padding: 6px;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.column-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.column-btn svg {
  width: 16px;
  height: 16px;
}

.column-tasks {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.add-task-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.add-task-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.add-task-btn svg {
  width: 16px;
  height: 16px;
}

.add-column-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 200px;
  height: 200px;
  background: var(--bg-card);
  border: 2px dashed var(--border-light);
  border-radius: var(--border-radius);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition-normal);
}

.add-column-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.05);
}

.add-column-btn svg {
  width: 24px;
  height: 24px;
}

/* ============================================
   TASKS
   ============================================ */

.task-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  padding: 14px;
  cursor: grab;
  transition: all var(--transition-normal);
  position: relative;
}

.task-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.task-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.task-card.completed {
  opacity: 0.6;
}

.task-card.completed .task-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Priority indicator */
.task-card[data-priority="low"] { border-left: 3px solid var(--priority-low); }
.task-card[data-priority="medium"] { border-left: 3px solid var(--priority-medium); }
.task-card[data-priority="high"] { border-left: 3px solid var(--priority-high); }
.task-card[data-priority="urgent"] {
  border-left: 3px solid var(--priority-urgent);
  animation: urgent-pulse 2s ease-in-out infinite;
}

@keyframes urgent-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0); }
}

.task-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.task-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-light);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  margin-top: 2px;
}

.task-checkbox:hover {
  border-color: var(--accent-primary);
}

.task-card.completed .task-checkbox {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.task-card.completed .task-checkbox::after {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
}

.task-title {
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
  word-break: break-word;
}

.task-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.task-card:hover .task-actions {
  opacity: 1;
}

.task-action-btn {
  padding: 4px;
  color: var(--text-muted);
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.task-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.task-action-btn.delete:hover {
  color: var(--priority-urgent);
}

.task-action-btn svg {
  width: 14px;
  height: 14px;
}

.task-description {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.task-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.task-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  background: color-mix(in srgb, var(--tag-color, #6366f1) 20%, transparent);
  color: var(--tag-color, #6366f1);
  border-radius: 4px;
  font-weight: 500;
}

.task-due {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.task-due svg {
  width: 12px;
  height: 12px;
}

.task-due.overdue {
  color: var(--priority-urgent);
}

.task-due.soon {
  color: var(--priority-high);
}

/* ============================================
   MODALS
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(20px);
  transition: transform var(--transition-slow);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal:not(.hidden) {
  transform: scale(1) translateY(0);
}

.modal.hidden {
  display: none;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.5rem;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group select {
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Tag selector */
.tag-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag-option:hover {
  border-color: var(--border-light);
}

.tag-option.selected {
  border-color: var(--tag-color, var(--accent-primary));
  background: color-mix(in srgb, var(--tag-color, var(--accent-primary)) 20%, transparent);
}

.tag-option-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tag-color, var(--accent-primary));
}

/* Tags modal */
.tags-modal {
  max-width: 400px;
}

.tags-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.tag-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: var(--border-radius-sm);
}

.tag-item-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.tag-item-name {
  flex: 1;
  font-size: 0.9rem;
}

.tag-item-delete {
  padding: 4px;
  color: var(--text-muted);
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.tag-item-delete:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--priority-urgent);
}

.tag-item-delete svg {
  width: 14px;
  height: 14px;
}

.new-tag-form {
  display: flex;
  gap: 8px;
}

.new-tag-form input[type="text"] {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
}

.new-tag-form input[type="color"] {
  width: 42px;
  height: 42px;
  padding: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
}

/* Confirm modal */
.confirm-modal {
  max-width: 360px;
}

.confirm-modal .modal-body {
  text-align: center;
}

.confirm-modal p {
  margin-bottom: 24px;
  color: var(--text-secondary);
}

.confirm-modal .modal-footer {
  justify-content: center;
}

/* ============================================
   SCROLLBARS
   ============================================ */

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

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

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .landing-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 100px 24px 40px;
  }

  .hero-content {
    max-width: 600px;
    margin: 0 auto;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-features {
    justify-content: center;
  }

  .hero-visual {
    display: none;
  }
}

@media (max-width: 768px) {
  .landing-nav {
    padding: 16px 20px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-features {
    flex-direction: column;
    align-items: center;
  }

  .app-nav {
    padding: 0 16px;
  }

  .nav-left .logo {
    display: none;
  }

  .app-main {
    padding: 16px;
  }

  .column {
    width: 280px;
    min-width: 280px;
  }

  .modal {
    width: 95%;
    margin: 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   BOARD SHARING
   ============================================ */

/* Notification badge */
.nav-btn {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  background: var(--accent-error);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Share modal */
.share-modal {
  max-width: 480px;
}

.share-description {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.current-shares {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.current-shares h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.share-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: var(--border-radius-sm);
  margin-bottom: 8px;
}

.share-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-item-email {
  font-size: 0.9rem;
}

.share-item-status {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 10px;
  background: var(--bg-card);
}

.share-item-status.pending {
  color: var(--accent-warning);
  background: rgba(245, 158, 11, 0.15);
}

.share-item-status.accepted {
  color: var(--accent-success);
  background: rgba(16, 185, 129, 0.15);
}

.share-remove-btn {
  padding: 6px;
  color: var(--text-muted);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.share-remove-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-error);
}

.share-remove-btn svg {
  width: 16px;
  height: 16px;
}

/* Invitations modal */
.invitations-modal {
  max-width: 500px;
}

.invitations-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.invitation-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius);
  padding: 16px;
  transition: all var(--transition-fast);
}

.invitation-item:hover {
  border-color: var(--border-light);
}

.invitation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.invitation-board-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.invitation-from {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.invitation-from strong {
  color: var(--accent-primary);
}

.invitation-actions {
  display: flex;
  gap: 8px;
}

.invitation-actions .btn {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.empty-message {
  text-align: center;
  color: var(--text-muted);
  padding: 32px;
}

/* Shared board indicator */
.board-shared-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--accent-secondary);
  padding: 2px 8px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 10px;
  margin-left: 8px;
}

.board-shared-badge svg {
  width: 12px;
  height: 12px;
}

/* ============================================
   COLOR THEMES
   ============================================ */

/* Theme: Sunset - Warm oranges, pinks, and reds */
body.theme-sunset {
  --accent-primary: #f97316;
  --accent-secondary: #ec4899;
  --accent-tertiary: #fbbf24;
  --accent-glow: rgba(249, 115, 22, 0.5);
  --gradient-primary: linear-gradient(135deg, #f97316, #ec4899);
  --gradient-aurora: linear-gradient(135deg, #f97316 0%, #ec4899 25%, #fbbf24 50%, #f43f5e 75%, #f97316 100%);
}

body.theme-sunset .aurora-1 {
  background: radial-gradient(ellipse at 20% 50%, #f97316 0%, transparent 50%);
}

body.theme-sunset .aurora-2 {
  background: radial-gradient(ellipse at 80% 50%, #ec4899 0%, transparent 50%);
}

body.theme-sunset .aurora-3 {
  background: radial-gradient(ellipse at 50% 80%, #fbbf24 0%, transparent 50%);
}

/* Theme: Ocean - Cool blues and teals */
body.theme-ocean {
  --accent-primary: #0ea5e9;
  --accent-secondary: #06b6d4;
  --accent-tertiary: #3b82f6;
  --accent-glow: rgba(14, 165, 233, 0.5);
  --gradient-primary: linear-gradient(135deg, #0ea5e9, #06b6d4);
  --gradient-aurora: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 25%, #3b82f6 50%, #0891b2 75%, #0ea5e9 100%);
}

body.theme-ocean .aurora-1 {
  background: radial-gradient(ellipse at 20% 50%, #0ea5e9 0%, transparent 50%);
}

body.theme-ocean .aurora-2 {
  background: radial-gradient(ellipse at 80% 50%, #06b6d4 0%, transparent 50%);
}

body.theme-ocean .aurora-3 {
  background: radial-gradient(ellipse at 50% 80%, #3b82f6 0%, transparent 50%);
}

/* Theme: Forest - Natural greens and earth tones */
body.theme-forest {
  --accent-primary: #22c55e;
  --accent-secondary: #84cc16;
  --accent-tertiary: #14b8a6;
  --accent-glow: rgba(34, 197, 94, 0.5);
  --gradient-primary: linear-gradient(135deg, #22c55e, #84cc16);
  --gradient-aurora: linear-gradient(135deg, #22c55e 0%, #84cc16 25%, #14b8a6 50%, #10b981 75%, #22c55e 100%);
}

body.theme-forest .aurora-1 {
  background: radial-gradient(ellipse at 20% 50%, #22c55e 0%, transparent 50%);
}

body.theme-forest .aurora-2 {
  background: radial-gradient(ellipse at 80% 50%, #84cc16 0%, transparent 50%);
}

body.theme-forest .aurora-3 {
  background: radial-gradient(ellipse at 50% 80%, #14b8a6 0%, transparent 50%);
}

/* Theme: Midnight - Deep blues and purples */
body.theme-midnight {
  --accent-primary: #4f46e5;
  --accent-secondary: #7c3aed;
  --accent-tertiary: #2563eb;
  --accent-glow: rgba(79, 70, 229, 0.5);
  --gradient-primary: linear-gradient(135deg, #4f46e5, #7c3aed);
  --gradient-aurora: linear-gradient(135deg, #4f46e5 0%, #7c3aed 25%, #2563eb 50%, #6366f1 75%, #4f46e5 100%);
}

body.theme-midnight .aurora-1 {
  background: radial-gradient(ellipse at 20% 50%, #4f46e5 0%, transparent 50%);
}

body.theme-midnight .aurora-2 {
  background: radial-gradient(ellipse at 80% 50%, #7c3aed 0%, transparent 50%);
}

body.theme-midnight .aurora-3 {
  background: radial-gradient(ellipse at 50% 80%, #2563eb 0%, transparent 50%);
}

/* Theme: Rose - Soft pinks and magentas */
body.theme-rose {
  --accent-primary: #f43f5e;
  --accent-secondary: #ec4899;
  --accent-tertiary: #d946ef;
  --accent-glow: rgba(244, 63, 94, 0.5);
  --gradient-primary: linear-gradient(135deg, #f43f5e, #ec4899);
  --gradient-aurora: linear-gradient(135deg, #f43f5e 0%, #ec4899 25%, #d946ef 50%, #db2777 75%, #f43f5e 100%);
}

body.theme-rose .aurora-1 {
  background: radial-gradient(ellipse at 20% 50%, #f43f5e 0%, transparent 50%);
}

body.theme-rose .aurora-2 {
  background: radial-gradient(ellipse at 80% 50%, #ec4899 0%, transparent 50%);
}

body.theme-rose .aurora-3 {
  background: radial-gradient(ellipse at 50% 80%, #d946ef 0%, transparent 50%);
}

/* Aurora is the default theme - no class needed */

/* ============================================
   SETTINGS MODAL
   ============================================ */

.settings-modal {
  max-width: 520px;
}

.settings-section {
  margin-bottom: 28px;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

/* Logo Upload */
.logo-upload-area {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-preview {
  width: 64px;
  height: 64px;
  background: var(--bg-elevated);
  border: 2px dashed var(--border-light);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-preview-placeholder {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
}

.logo-preview-placeholder svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

.logo-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.logo-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.logo-upload-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
}

.logo-upload-btn svg {
  width: 16px;
  height: 16px;
}

.logo-upload-btn input {
  display: none;
}

.logo-remove-btn {
  padding: 6px 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.logo-remove-btn:hover {
  color: var(--priority-urgent);
}

.logo-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Theme Picker */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.theme-option {
  position: relative;
  padding: 16px 12px;
  background: var(--bg-elevated);
  border: 2px solid var(--border-subtle);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.theme-option:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.theme-option.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px var(--accent-glow);
}

.theme-option.active::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: var(--accent-primary);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-colors {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 10px;
}

.theme-color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.theme-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Custom logo in nav */
.logo-custom {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
}

.logo-icon.has-custom {
  display: none;
}

/* ============================================
   BOARD PROPERTIES MODAL
   ============================================ */

.board-props-modal,
.board-create-modal {
  max-width: 520px;
}

.board-props-shares {
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.board-props-shares .empty-message {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
}

.share-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: var(--border-radius-sm);
  margin-bottom: 8px;
}

.share-row:last-child {
  margin-bottom: 0;
}

.share-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.share-email {
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-status {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.share-status.accepted {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.share-status.pending {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.share-revoke-btn {
  padding: 6px 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  margin-left: 8px;
}

.share-revoke-btn:hover {
  color: var(--priority-urgent);
  background: rgba(239, 68, 68, 0.1);
}

.share-add-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  margin-top: 8px;
}

.share-add-section .form-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.share-add-section input,
.share-add-section select {
  padding: 8px 12px;
  font-size: 0.85rem;
}

/* Compact logo upload for board creation */
.logo-upload-area.compact {
  gap: 12px;
}

.logo-upload-area.compact .logo-preview {
  width: 48px;
  height: 48px;
}

.logo-upload-area.compact .logo-actions {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.logo-upload-btn.btn-sm,
.logo-remove-btn.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Checkbox label for share toggle */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.share-fields {
  margin-top: 12px;
  padding: 16px;
  background: var(--bg-elevated);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-subtle);
}

.share-fields.hidden {
  display: none;
}

/* Form row improvements */
.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-row .flex-1 {
  flex: 1;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
