/* Mission Control - Mars Society Operations Management */
/* Design System: Mars-themed dark UI with glassmorphism */

:root {
  /* Mars Theme Colors */
  --color-background: #0a0e27; /* Deep space navy */
  --color-foreground: #e0e0e0; /* Light grey */
  --color-card: #1a1f3a; /* Panel dark grey-blue */
  --color-secondary: #2d3748; /* Lighter grey for cards */
  --color-primary: #C1440E; /* Mars Red */
  --color-primary-hover: #9e3609;
  --color-muted: #a3b3cc; /* Secondary text */
  --color-border: #263359;
  
  /* Priority Colors */
  --color-high: #ef4444;
  --color-medium: #eab308;
  --color-low: #22c55e;
  --color-in-progress: #ed8936;
  
  /* Status Column Indicators */
  --color-current: #f56565;
  --color-progress: #ed8936;
  --color-review: #ecc94b;
  --color-completed: #48bb78;
  
  /* Typography */
  --font-display: 'Rajdhani', sans-serif;
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Spacing */
  --radius: 12px;
}

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

body {
  font-family: var(--font-sans);
  background: var(--color-background);
  color: var(--color-foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Background Effects */
.background-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.noise-texture {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48ZmlsdGVyIGlkPSJnIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iMC42NSIgbnVtT2N0YXZlcz0iMyIgc3RpdGNoVGlsZXM9InN0aXRjaCI+PC9mZVR1cmJ1bGVuY2U+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI2cpIiBvcGFjaXR5PSIwLjUiPjwvcmVjdD48L3N2Zz4=');
}

.atmosphere-glow-1 {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 60%;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.1;
  filter: blur(120px);
}

.atmosphere-glow-2 {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40%;
  height: 40%;
  border-radius: 50%;
  background: #1e3a8a;
  opacity: 0.1;
  filter: blur(100px);
}

.horizon-line {
  position: absolute;
  top: 80px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(38, 51, 89, 0.4);
  background: rgba(26, 31, 58, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-logo {
  width: 40px;
  height: 32px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-title-group {
  display: flex;
  flex-direction: column;
}

.header-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: white;
}

.header-subtitle {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  display: none;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-stats {
  display: none;
  align-items: center;
  gap: 1rem;
  margin-right: 1rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--color-muted);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.stats-divider {
  padding-left: 1rem;
  border-left: 1px solid rgba(38, 51, 89, 0.5);
}

/* Buttons */
.btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: rgba(26, 31, 58, 0.5);
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn:hover {
  background: rgba(45, 55, 72, 0.5);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: rgba(193, 68, 14, 0.5);
  box-shadow: 0 0 15px rgba(193, 68, 14, 0.4);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 0 25px rgba(193, 68, 14, 0.6);
  color: white;
}

.btn-icon {
  padding: 0.5rem;
  width: 36px;
  height: 36px;
  justify-content: center;
}

/* Main Content */
.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
  position: relative;
  z-index: 10;
}

.kanban-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* Kanban Column */
.kanban-column {
  display: flex;
  flex-direction: column;
  min-height: 500px;
  border-radius: var(--radius);
  background: rgba(26, 31, 58, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

.kanban-column.drag-over {
  background: rgba(193, 68, 14, 0.1);
  border-color: var(--color-primary);
  box-shadow: 0 0 20px rgba(193, 68, 14, 0.3);
}

.kanban-column.drag-over .column-indicator {
  animation: pulse 1s infinite;
}

.kanban-column.drag-over .column-empty {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.column-header {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(26, 31, 58, 0.3);
  border-radius: var(--radius) var(--radius) 0 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 64px;
  z-index: 10;
}

.column-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.column-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.column-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(224, 224, 224, 0.9);
}

.column-count {
  background: rgba(10, 14, 39, 0.4);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--color-muted);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.column-content {
  flex: 1;
  padding: 0.75rem;
}

.column-empty {
  height: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(163, 179, 204, 0.3);
  border: 2px dashed rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.column-empty-text {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Task Card */
.task-card {
  position: relative;
  background: rgba(45, 55, 72, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid transparent;
  border-left: 4px solid;
  border-radius: 8px;
  padding: 1rem;
  cursor: grab;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.task-card:active {
  cursor: grabbing;
}

.task-card.dragging {
  opacity: 0.5;
  transform: scale(0.95);
  cursor: grabbing;
}

.task-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.task-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(193, 68, 14, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

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

.task-card.priority-high {
  border-left-color: var(--color-high);
  box-shadow: inset 2px 0 0 0 rgba(239, 68, 68, 0.6);
}

.task-card.priority-medium {
  border-left-color: var(--color-medium);
  box-shadow: inset 2px 0 0 0 rgba(234, 179, 8, 0.6);
}

.task-card.priority-low {
  border-left-color: var(--color-low);
  box-shadow: inset 2px 0 0 0 rgba(34, 197, 94, 0.6);
}

.task-card:hover .task-title {
  color: var(--color-primary);
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.5rem;
}

.task-id {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  color: rgba(163, 179, 204, 0.6);
}

.task-priority-icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.task-title {
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.4;
  color: rgba(224, 224, 224, 0.9);
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.task-description {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--color-muted);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-meta {
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.task-project {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-muted);
}

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

.task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.task-tag {
  padding: 0.125rem 0.375rem;
  height: 20px;
  border-radius: 4px;
  background: rgba(10, 14, 39, 0.5);
  color: var(--color-muted);
  font-size: 0.625rem;
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Loading State */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  font-size: 1.125rem;
  color: var(--color-muted);
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Error State */
.error {
  background: rgba(116, 42, 42, 0.3);
  color: #feb2b2;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  text-align: center;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Responsive Design */
@media (min-width: 768px) {
  .header-logo {
    width: 56px;
    height: 40px;
  }
  
  .header-title {
    font-size: 2rem;
  }
  
  .header-subtitle {
    display: block;
  }
  
  .header-stats {
    display: flex;
  }
  
  .kanban-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .task-title {
    font-size: 1rem;
  }
}

@media (min-width: 1200px) {
  .kanban-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-background);
}

::-webkit-scrollbar-thumb {
  background: rgba(163, 179, 204, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}
