/* Tech Layoff Watch - Custom Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #F1F5F9;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-dark: #0F172A;
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --accent-danger: #F87171;
  --accent-positive: #2DD4BF;
  --accent-primary: #3B82F6;
  --accent-warning: #FBBF24;
  --chart-bar: #FB7185;
  --chart-line: #60A5FA;
  --table-header: #F1F5F9;
  --table-hover: #EFF6FF;
  --border-color: #E2E8F0;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navigation */
.navbar {
  background: white;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.navbar-brand svg {
  width: 28px;
  height: 28px;
  color: var(--accent-danger);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  flex-wrap: wrap;
}

.navbar-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.navbar-nav a:hover {
  color: var(--accent-primary);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language Selector */
.lang-selector {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  background: white;
  color: var(--text-primary);
  cursor: pointer;
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  transition: box-shadow 0.2s;
}

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

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  text-align: center;
  padding: 1.25rem;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-danger);
  display: block;
  margin-bottom: 0.25rem;
}

.stat-card .stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-card.accent-blue .stat-value { color: var(--accent-primary); }
.stat-card.accent-teal .stat-value { color: var(--accent-positive); }
.stat-card.accent-amber .stat-value { color: var(--accent-warning); }

/* Hero / Total Counter */
.hero-counter {
  text-align: center;
  padding: 3rem 1rem;
  margin-bottom: 2rem;
}

.hero-counter h1 {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.hero-counter .total-number {
  font-size: 4rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-danger);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.hero-counter .hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Filters Bar */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.filters-bar label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.year-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.year-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.year-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

/* Charts Section */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-card {
  padding: 1.5rem;
}

.chart-card h2 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.chart-container {
  position: relative;
  width: 100%;
  height: 350px;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Table */
.table-card {
  overflow: hidden;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.table-header h2 {
  font-size: 1.125rem;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-primary);
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn:hover {
  background: var(--table-hover);
  border-color: var(--accent-primary);
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.btn-primary:hover {
  background: #2563EB;
}

.btn-danger {
  background: var(--accent-danger);
  color: white;
  border-color: var(--accent-danger);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead {
  background: var(--table-header);
}

.data-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border-color);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.data-table th:hover {
  color: var(--accent-primary);
}

.data-table th .sort-icon {
  margin-left: 0.25rem;
  opacity: 0.4;
}

.data-table th.sorted .sort-icon {
  opacity: 1;
  color: var(--accent-primary);
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.15s;
}

.data-table tbody tr:hover {
  background: var(--table-hover);
}

.company-name {
  font-weight: 600;
  color: var(--text-primary);
}

.headcount-cell {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--accent-danger);
}

.industry-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #F1F5F9;
  color: var(--text-secondary);
}

.source-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-size: 0.8rem;
}

.source-link:hover {
  text-decoration: underline;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.page-btn {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.page-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

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

.page-info {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.65rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-danger);
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.timeline-content {
  background: white;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.timeline-content h4 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.timeline-content p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.timeline-headcount {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--accent-danger);
}

/* Ad Slots */
.ad-slot {
  background: #F8FAFC;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  margin: 1rem 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  overflow: hidden;
}

.ad-slot-sidebar {
  min-height: 600px;
}

/* Social Sharing */
.social-share {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  color: white;
  text-decoration: none;
  transition: opacity 0.2s;
}

.share-btn:hover {
  opacity: 0.85;
}

.share-btn.twitter { background: #1DA1F2; }
.share-btn.facebook { background: #4267B2; }
.share-btn.linkedin { background: #0077B5; }
.share-btn.reddit { background: #FF4500; }

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: #94A3B8;
  padding: 3rem 1rem 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: white;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.footer-section a {
  color: #94A3B8;
  text-decoration: none;
  font-size: 0.875rem;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #1E293B;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
}

.visitor-counter {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
}

.visitor-counter strong {
  color: white;
  font-family: 'JetBrains Mono', monospace;
}

/* Static Pages */
.page-content {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
}

.page-content h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.page-content h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.page-content h3 {
  font-size: 1.125rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.page-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.page-content ul, .page-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.page-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.page-content a {
  color: var(--accent-primary);
}

.faq-item {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.faq-item h3 {
  margin-top: 0;
  color: var(--text-primary);
}

/* Feedback */
.feedback-bar {
  text-align: center;
  padding: 1.5rem;
  background: var(--table-hover);
  border-radius: var(--radius);
  margin: 2rem 0;
  border: 1px solid var(--border-color);
}

.feedback-bar p {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

/* Table Overflow */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Responsive */
@media (max-width: 1024px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .ad-slot-sidebar {
    min-height: 250px;
  }
}

@media (max-width: 768px) {
  .hero-counter .total-number {
    font-size: 3rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .navbar .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .data-table {
    font-size: 0.8rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem;
  }
}

@media (max-width: 640px) {
  .hero-counter .total-number {
    font-size: 2.5rem;
  }

  .hero-counter {
    padding: 2rem 0.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card .stat-value {
    font-size: 1.5rem;
  }

  .chart-container {
    height: 250px;
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Count-up animation */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-count {
  animation: countUp 0.6s ease-out;
}

/* Loading state */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.loading-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Section spacing */
.section {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* Scroll to top */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: white;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 50;
  transition: opacity 0.2s;
}

.scroll-top.visible {
  display: flex;
}

/* Table responsive helper - hide columns on small screens */
@media (max-width: 640px) {
  .hide-mobile {
    display: none;
  }
}
