:root {
  --bg-dark: #0f1115;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --accent-color: #38bdf8; /* Sky Blue */
  --accent-secondary: #818cf8; /* Indigo */
  --danger: #ef4444;
  --success: #22c55e;
  --sidebar-width: 280px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
}

h1, h2, h3, .logo {
  font-family: 'Outfit', sans-serif;
}

#app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(15, 17, 21, 0.8);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--card-border);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--accent-color);
  white-space: nowrap;
}

.nav-links {
  list-style: none;
}

.nav-links li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-links li:hover, .nav-links li.active {
  background: var(--card-bg);
  color: var(--text-primary);
}

.nav-links li.active i {
  color: var(--accent-color);
}

/* Main Content */
.content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem;
  max-width: 1400px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  gap: 2rem;
}

.search-container {
  flex: 1;
  position: relative;
  max-width: 500px;
}

.search-container i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  width: 18px;
}

.search-container input {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 0.75rem 1rem 0.75rem 3rem;
  border-radius: 12px;
  color: white;
  outline: none;
  transition: var(--transition);
}

.search-container input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.filter-group {
  display: flex;
  justify-content: center;
  background: var(--card-bg);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
}

.filter-btn.active {
  background: var(--accent-color);
  color: var(--bg-dark);
}

/* Views */
.view {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-header {
  margin-bottom: 2rem;
}

.view-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.updated-time {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Watchlist Grid */
.filter-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.sort-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.sort-select:focus {
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.1);
}

.sort-select option {
  background: #1e293b;
  color: white;
}

.tab-group {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 12px;
  width: fit-content;
}

.tab-btn {
  padding: 8px 24px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: var(--accent-color);
  color: white;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.landings-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}


.fish-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.25rem;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fish-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.08);
}

.fish-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: var(--accent-color);
  opacity: 0;
  transition: var(--transition);
}

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

.fish-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.fish-name-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fish-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.fish-sparkline-container {
  width: 100%;
  height: 120px;
  margin: 0.5rem 0 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 4px;
}

.fish-sparkline {
  width: 100%;
  height: 100% !important;
  opacity: 1;
}

.category-badge {
  text-align: right;
}

.fish-price-info {
  text-align: right;
}

.latest-price {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  line-height: 1;
}

.heatmap-row-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px; /* Explicit height for alignment */
}
.price-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  display: block;
}

.price-change {
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 2px;
}

.price-change.up { color: var(--success); }
.price-change.down { color: var(--danger); }

.fish-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--card-border);
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.metric-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.stars {
  color: #fbbf24; /* Gold */
}

.status-badge {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--card-border);
  font-size: 0.75rem;
}

.mini-chart {
  height: 60px;
  margin: 0.5rem 0;
}

/* Detail View Components */
.detail-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.back-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateX(-4px);
  box-shadow: 0 10px 15px -3px rgba(56, 189, 248, 0.2);
  color: var(--accent-color);
}

.back-btn i {
  transition: transform 0.3s ease;
}

.back-btn:hover i {
  transform: translateX(-2px);
}

.fish-title-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.correl-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--card-bg);
  color: var(--text-secondary);
}

.correl-badge.strong { background: var(--success); color: var(--bg-dark); }
.correl-badge.moderate { background: var(--accent-secondary); color: white; }

.detail-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6rem;
}
.chart-full {
  grid-column: 1 / -1;
  height: 400px;
  position: relative;
  margin-bottom: 4rem; /* Significant safe margin below chart */
}

/* Heatmap */
.heatmap {
  margin-top: 1rem;
}

/* Seasonality Heatmap Grid */
.heatmap-year-row {
  display: grid;
  grid-template-columns: 80px repeat(12, 1fr);
  gap: 4px;
  margin-bottom: 4px;
  align-items: center;
}

.heatmap-cell {
  position: relative;
  aspect-ratio: 1.6; /* Rectangular as requested */
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  white-space: nowrap;
}

.heatmap-cell.top-month {
  background: var(--accent-color);
  color: white;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.heatmap-year-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.heatmap-header-row {
  display: grid;
  grid-template-columns: 80px repeat(12, 1fr);
  gap: 4px;
  margin-bottom: 8px;
  text-align: center;
}

/* Consolidated Detail Heatmap Styles */
.heatmap-header-row.details-header {
  grid-template-columns: 50px 40px 1fr;
  width: 100%;
  margin-bottom: 12px;
}

.heatmap-year-group-detail {
  display: grid;
  grid-template-columns: 50px 40px 1fr;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 8px;
  width: 100%;
}

.heatmap-year-label-col {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--accent-secondary);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.heatmap-row-label-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.heatmap-row-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  height: 28px; /* Increased from 24px */
  display: flex;
  align-items: center;
  justify-content: center;
}

.heatmap-data-rows-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  width: 100%;
}

.heatmap-row-detail {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  width: 100%;
  height: 28px; /* Fixed height to match label row */
}

.heatmap-cell {
  height: 100%; /* Fill the row height */
  aspect-ratio: auto; /* REMOVED aspect-ratio to prevent overflow */
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.9);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.heatmap-header-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Original Heatmap Headers (adjust if needed) */
.heatmap-header-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Stats List */
.stats-list {
  list-style: none;
  margin-top: 0;
}

.stats-list li {
  margin-bottom: 0.75rem; /* Reduced back */
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.stats-list li:last-child {
  border-bottom: none;
}

.stat-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
  gap: 1.25rem;
}

/* Card Tabs */
.card-header-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

.card-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.card-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.card-tab.active {
  background: var(--accent-color);
  color: white;
}

.stat-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.stat-metrics {
  display: flex;
  gap: 1.5rem;
}

.stat-val {
  font-size: 0.85rem;
  font-weight: 600;
}

.stat-val.amt { color: var(--accent-color); }
.stat-val.qty { color: var(--accent-secondary); }

.stat-bar-container-double {
  height: 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}

.stat-bar-combined {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 2px;
  padding: 3px 0;
}

.stat-bar {
  height: 3px;
  border-radius: 0 4px 4px 0;
  transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-bar.amt { background: var(--accent-color); }
.stat-bar.qty { background: var(--accent-secondary); }

/* Card Header with Toggle */
.card-header-with-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.toggle-group {
  display: flex;
  background: var(--card-bg);
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
}

.toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition);
}

.toggle-btn.active {
  background: var(--accent-secondary);
  color: white;
}

/* Big Number */
.big-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-top: 0.5rem;
}

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

.chart-full, .chart-container {
  height: 400px;
  position: relative;
}

/* Pulse animation for dummy sparkline */
@keyframes pulse {
  0% { opacity: 0.3; }
  50% { opacity: 0.6; }
  100% { opacity: 0.3; }
}

/* Mobile Nav */.detail-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: nowrap; /* Prevent wrapping */
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap; /* Prevent button text from wrapping */
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-color);
}
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 17, 21, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--card-border);
  padding: 0.75rem 0;
  justify-content: space-around;
  z-index: 1001;
}

.nav-item {
  color: var(--text-secondary);
  padding: 0.5rem;
}

.nav-item.active {
  color: var(--accent-color);
}

@media (max-width: 1024px) {
  .sidebar {
    display: none;
  }
  .content {
    margin-left: 0;
    padding-bottom: 80px;
  }
  .mobile-nav {
    display: flex;
  }
  .detail-grid, .overview-cards {
    grid-template-columns: 1fr;
  }
  .top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 2rem;
  }
  .search-container {
    max-width: none;
  }
  .content {
    padding: 1.5rem;
  }
  .view-header h1 {
    font-size: 1.5rem;
  }
}
/* Landings Page Specifics */
.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 600px) {
  .view-header {
    flex-direction: column;
    align-items: stretch;
  }
  .big-number {
    font-size: 2rem;
  }
  .correl-badge {
    align-self: flex-start;
  }
}

.view-subtitle {
  color: var(--text-secondary);
  margin-top: -0.5rem;
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* Heatmap Legend */
.heatmap-legend-container {
  display: flex;
  flex-direction: row; /* Horizontal as requested implicitly for layout */
  gap: 1rem;
  flex-wrap: wrap;
}

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

@media (max-width: 600px) {
  .heatmap-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.4rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--card-border);
}

.legend-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.legend-label.highlight-qty { color: var(--accent-secondary); }
.legend-label.highlight-price { color: #f59e0b; } /* Amber */

.legend-steps {
  display: flex;
  gap: 2px;
}

.legend-step {
  width: 14px;
  height: 14px;
  border-radius: 2px;
}

.heatmap-row.price-row {
  margin-top: -2px;
  padding-top: 0;
  cursor: default;
}

.heatmap-fish-label.sub-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-align: right;
  font-weight: 400;
}

/* Price intensity colors (Orange / Amber) */
.intensity-p-1 { background: rgba(245, 158, 11, 0.15); }
.intensity-p-2 { background: rgba(245, 158, 11, 0.35); }
.intensity-p-3 { background: rgba(245, 158, 11, 0.6); }
.intensity-p-4 { background: rgba(245, 158, 11, 0.8); }
.intensity-p-5 { background: rgba(245, 158, 11, 1); box-shadow: 0 0 10px rgba(245, 158, 11, 0.3); }

/* Removed duplicate landings-grid-layout */

.landings-heatmap-card {
  padding: 1.5rem;
  overflow-x: auto;
}

.heatmap-grid-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Default Desktop Layout */
.heatmap-header-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.heatmap-header-spacer {
  width: 120px;
}

.heatmap-header-months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
}

.heatmap-header-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-align: center;
}

.heatmap-fish-group {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.2s;
}

.heatmap-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
}

/* Mobile Responsive Layout (6x2 Grid) */
@media (max-width: 600px) {
  .landings-heatmap-card {
    padding: 1rem;
    overflow-x: hidden; /* No scroll! */
  }

  .heatmap-header-row {
    display: flex;
    flex-direction: column;
    border-bottom: none;
    margin-bottom: 0;
  }
  .heatmap-header-spacer {
    display: none;
  }
  .heatmap-header-months {
    grid-template-columns: repeat(12, 1fr);
    margin-bottom: 2px;
    gap: 1px; /* Minimal gap */
  }
  .heatmap-header-label {
    font-size: 0.5rem;
    text-align: center;
  }

  .heatmap-fish-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px 0;
  }
  .heatmap-label-block {
    text-align: left;
  }
  .heatmap-fish-label {
    font-size: 0.85rem;
  }
  .heatmap-row {
    grid-template-columns: repeat(12, 1fr);
    gap: 1px;
  }
  .heatmap-cell-main {
    aspect-ratio: 1;
    min-width: 0; /* Allow shrinking */
  }
}

.heatmap-fish-group:hover {
  background: rgba(255, 255, 255, 0.03);
}

.heatmap-label-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.heatmap-fish-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.heatmap-sublabel-hint {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.heatmap-data-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.heatmap-cell-main {
  aspect-ratio: 1.5;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  transition: transform 0.2s, background 0.2s;
}

.heatmap-fish-group:hover .heatmap-cell-main {
  transform: scale(0.96);
}

/* Intensity Colors (Quantity: Indigo) */
.intensity-1 { background: rgba(129, 140, 248, 0.2); }
.intensity-2 { background: rgba(129, 140, 248, 0.45); }
.intensity-3 { background: rgba(129, 140, 248, 0.7); }
.intensity-4 { background: rgba(129, 140, 248, 0.85); }
.intensity-5 { background: rgba(129, 140, 248, 1); box-shadow: 0 0 10px rgba(129, 140, 248, 0.3); }

/* Price intensity colors (Value: Amber) - Inside fill boosted */
.intensity-p-1 { background: rgba(245, 158, 11, 0.25); }
.intensity-p-2 { background: rgba(245, 158, 11, 0.5); }
.intensity-p-3 { background: rgba(245, 158, 11, 0.75); }
.intensity-p-4 { background: rgba(245, 158, 11, 0.9); }
.intensity-p-5 { background: rgba(245, 158, 11, 1); box-shadow: 0 0 10px rgba(245, 158, 11, 0.4); }

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.rank-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-secondary);
}

.rank-number {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-secondary);
  width: 30px;
}

.rank-info {
  flex: 1;
}

.rank-name {
  font-weight: 700;
  font-size: 1rem;
}

.rank-val {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.landings-grid-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2rem;
}

@media (max-width: 1024px) {
  .landings-grid-layout {
    grid-template-columns: 1fr;
  }
}

#detail-landings-chart-card {
  margin-bottom: 2rem;
}

.drilldown-filter-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.drilldown-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.drilldown-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.drilldown-tab {
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drilldown-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.drilldown-tab.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
  font-weight: 600;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

@media (max-width: 600px) {
  .heatmap-year-group-detail {
    grid-template-columns: 50px 30px 1fr;
    gap: 4px;
  }
  .heatmap-year-label-col {
    font-size: 0.7rem;
  }
}
.heatmap-sort-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sort-select {
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
}

.sort-btn {
  padding: 0.4rem 1.25rem;
  border-radius: 8px;
  background: var(--accent-color);
  color: white;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.sort-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.sort-btn:active {
  transform: translateY(0);
}

@media (max-width: 600px) {
  .heatmap-sort-controls {
    gap: 0.4rem;
    padding: 8px;
  }
}

/* Opening / Loading Screen Styles */
#app-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
}

body.loaded #app-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  max-width: 320px;
  width: 90%;
}

.loader-logo-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
}

.loader-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: logo-pulse 3s infinite ease-in-out;
  position: relative;
  z-index: 2;
}

.loader-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  animation: glow-pulse 3s infinite ease-in-out;
}

.loader-text {
  text-align: center;
  width: 100%;
}

.loader-message {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 1.25rem;
  letter-spacing: 0.1em;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.05);
  border-top-color: #38bdf8;
  border-right-color: #818cf8;
  border-radius: 50%;
  animation: spin 1s infinite linear;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
  margin: 0 auto;
}

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

@keyframes logo-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(56, 189, 248, 0)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.4)); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}


#app {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

body.loaded #app {
  opacity: 1;
}
