:root {
  --primary-color: #1a73e8;
  --secondary-color: #4285f4;
  --text-color: #202124;
  --light-gray: #f1f3f4;
  --border-color: #dadce0;
  --success-color: #0f9d58;
  --error-color: #d93025;
  --card-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
  --mnc1-color: #0000FF; /* Swisscom - Blue */
  --mnc2-color: #FF0000; /* Sunrise - Red */
  --mnc3-color: #008000; /* Salt - Green */
  --mnc6-color: #FFFFFF; /* SBB - White */
  --filter-width: 300px;
  --chart-blue: #3a86ff;
  --chart-red: #ff3a86;
  --chart-green: #38b000;
  --chart-white: #f8f9fa;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #3a86ff;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --text-color: #e0e0e0;
    --border-color: #333333;
    --shadow-color: rgba(0,0,0,0.3);
  }
}

/* Hamburger menu styles - now available on all devices */
.hamburger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.hamburger-menu:focus {
  outline: none;
}

.hamburger-line {
  width: 2rem;
  height: 0.25rem;
  background: var(--primary-color);
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

.menu-active .hamburger-line:first-child {
  transform: rotate(45deg);
}

.menu-active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.menu-active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  background: white;
  box-shadow: var(--card-shadow);
  position: absolute;
  top: 60px;
  right: 20px;
  border-radius: 8px;
  overflow: hidden;
  transform: translateY(-20px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s linear 0.3s;
  z-index: 9;
}

.nav-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-item {
  padding: 12px 20px;
  text-decoration: none;
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.nav-item:last-child {
  border-bottom: none;
}

.nav-item:hover {
  background-color: var(--light-gray);
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f8f9fa;
  color: var(--text-color);
  line-height: 1.5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

header div {
  display: flex;
  align-items: center;
  gap: 15px;
}

h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
  color: var(--primary-color);
}

h2 {
  margin-top: 0;
  font-size: 20px;
  font-weight: 500;
  color: var(--text-color);
}

h3 {
  margin-top: 0;
  font-size: 16px;
  font-weight: 500;
}

.update-time {
  font-size: 14px;
  color: #5f6368;
}

.card {
  background: var(--surface-color);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px var(--shadow-color);
  border: 1px solid var(--border-color);
}

.card h2 {
  margin-top: 0;
  font-size: 18px;
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.chart-container {
  position: relative;
  height: 300px;
  margin-bottom: 20px;
}

/* Table styling */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  font-weight: 600;
}

/* Button styling */
.button {
  display: inline-flex;
  align-items: center;
  background-color: var(--primary-color);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.button:hover {
  background-color: var(--secondary-color);
}

.refresh-button {
  display: flex;
  gap: 8px;
  align-items: center;
}

.refresh-button svg {
  width: 16px;
  height: 16px;
}

.details-button {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
}

.details-button:hover {
  background-color: rgba(26, 115, 232, 0.08);
}

/* Loading indicator */
.loading {
  display: flex;
  justify-content: center;
  padding: 50px 0;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top: 4px solid var(--primary-color);
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loading-info {
  max-width: 500px;
}

.loading-info h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.loading-steps {
  text-align: left;
  margin: 15px 0;
  padding-left: 20px;
}

.loading-steps li {
  margin-bottom: 8px;
  color: #5f6368;
  position: relative;
}

.loading-steps li.active {
  color: var(--text-color);
  font-weight: 500;
}

.loading-steps li.active::before {
  content: "⟳";
  display: inline-block;
  margin-right: 5px;
  animation: spin 1.5s linear infinite;
}

.loading-steps li.complete {
  color: var(--success-color);
}

.loading-steps li.complete::before {
  content: "✓";
  display: inline-block;
  margin-right: 5px;
}

.loading-note {
  font-size: 14px;
  color: #5f6368;
  font-style: italic;
  margin-top: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Add loading spinner styles */
.loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 5px;
}

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

/* Error message */
.error-message {
  background-color: #fce8e6;
  color: var(--error-color);
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  border-left: 4px solid var(--error-color);
  position: relative;
}

.error-message:before {
  content: "⚠️";
  margin-right: 10px;
}

/* No data message */
.no-data {
  background-color: var(--light-gray);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}

/* Data grid */
.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Stats cards */
.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface-color);
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px var(--shadow-color);
  text-align: center;
}

.stat-card h3 {
  margin: 0 0 5px 0;
  font-size: 14px;
  color: #888;
}

.stat-card .stat-value {
  font-size: 24px;
  font-weight: 600;
}

.positive {
  color: var(--success-color);
}

.negative {
  color: var(--error-color);
}

/* Tab styling for changed cells */
.tabs {
  display: flex;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1px;
}

.tab-button {
  padding: 8px 16px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-bottom: none;
  margin-right: 5px;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 4px 4px 0 0;
}

.tab-button.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.modified {
  color: orange;
}

.change-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: bold;
}

.change {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px;
  border-radius: 4px;
}

.change.positive {
  background-color: rgba(15, 157, 88, 0.1);
}

.change.negative {
  background-color: rgba(217, 48, 37, 0.1);
}

.change.neutral {
  background-color: var(--light-gray);
}

.change-value {
  font-size: 16px;
  font-weight: 600;
}

.change.positive .change-value {
  color: var(--success-color);
}

.change.negative .change-value {
  color: var(--error-color);
}

.change-label {
  font-size: 12px;
  color: #5f6368;
}

#changedCellsList table {
  width: 100%;
  border-collapse: collapse;
}

#changedCellsList th, #changedCellsList td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

#changedCellsList th {
  background-color: var(--background-color);
  font-weight: 600;
}

/* Grid layouts */
.stats-container, .charts-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .charts-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.datasets-grid, .comparisons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Card styles */
.dataset-card, .comparison-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  padding: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dataset-card:hover, .comparison-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dataset-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
}

.stat-label {
  font-size: 12px;
  color: #5f6368;
}

/* Tech distribution */
.dataset-details {
  margin-top: 15px;
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
}

.tech-distribution {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tech-item {
  position: relative;
}

.tech-name {
  font-size: 13px;
  font-weight: 500;
}

.tech-count {
  font-size: 13px;
  color: #5f6368;
  float: right;
}

.tech-bar {
  height: 6px;
  background-color: var(--primary-color);
  border-radius: 3px;
  margin-top: 4px;
}

/* Tech changes */
.tech-changes {
  margin-top: 16px;
}

.tech-change {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  margin-bottom: 4px;
  border-radius: 4px;
  font-size: 13px;
}

.tech-change.positive {
  background-color: rgba(15, 157, 88, 0.1);
}

.tech-change.negative {
  background-color: rgba(217, 48, 37, 0.1);
}

.tech-change.neutral {
  background-color: var(--light-gray);
}

/* Chart styling */
.chart-section {
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  padding: 16px;
}

.chart-wrapper {
  height: 350px;  /* Increased from 300px for better visibility */
  position: relative;
  margin-bottom: 20px;
}

.update-time {
  font-size: 14px;
  color: #5f6368;
}

/* Ensure consistent provider colors */
.provider-1 {
  background-color: var(--mnc1-color);
}

.provider-2 {
  background-color: var(--mnc2-color);
}

.provider-3 {
  background-color: var(--mnc3-color);
}

.provider-0 {
  background-color: #888888;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .chart-wrapper {
    height: 250px;
  }
}

@media (max-width: 768px) {
  .data-grid {
    grid-template-columns: 1fr;
  }
}

/* Toast notifications */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: #fff;
  color: var(--text-color);
  border-left: 4px solid var(--primary-color);
  padding: 12px 20px;
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-width: 300px;
}

.toast-info {
  border-left-color: var(--primary-color);
}

.toast-success {
  border-left-color: var(--success-color);
}

.toast-error {
  border-left-color: var(--error-color);
}

.toast-warning {
  border-left-color: #f9a825;
}

.toast-hide {
  transform: translateX(100%);
  opacity: 0;
}

/* Inline spinner for buttons */
.spinner-inline {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

/* Optimized loading styles for better performance */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Consider using transforms for animations instead of opacity for better performance */
.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

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

/* Add prefers-reduced-motion support */
@media (prefers-reduced-motion: reduce) {
  .spinner, .spinner-inline, .fade-in {
    animation: none;
  }
  
  .toast, .toast-hide {
    transition: none;
  }
}

/* Add better disabled state for buttons */
.button:disabled {
  background-color: #8eaad6;
  cursor: not-allowed;
}

/* Status indicator */
.status-indicator {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
  margin-right: 10px;
}

.status-indicator:before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-online {
  background-color: rgba(15, 157, 88, 0.1);
  color: var(--success-color);
}

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

.status-offline {
  background-color: rgba(244, 180, 0, 0.1);
  color: #f9a825;
}

.status-offline:before {
  background-color: #f9a825;
}

.status-error {
  background-color: rgba(217, 48, 37, 0.1);
  color: var(--error-color);
}

.status-error:before {
  background-color: var(--error-color);
}

.status-loading {
  background-color: rgba(66, 133, 244, 0.1);
  color: var(--primary-color);
}

.status-loading:before {
  background-color: var(--primary-color);
  animation: pulse 1.5s infinite;
}

.status-cached {
  background-color: rgba(100, 100, 100, 0.1);
  color: #5f6368;
}

.status-cached:before {
  background-color: #5f6368;
}

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

/* Enhanced loading indicator for network status */
.network-activity {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  transform: translateX(-100%);
  z-index: 9999;
}

.network-activity.active {
  animation: loading 2s infinite ease-in-out;
}

@keyframes loading {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* Add info panel for offline mode */
.offline-notice {
  background-color: rgba(244, 180, 0, 0.1);
  border-left: 4px solid #f9a825;
  padding: 12px 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.offline-notice:before {
  content: "🔌";
  margin-right: 10px;
  font-size: 20px;
}

/* Modified cells section */
.modified-cells-section {
  margin-top: 30px;
}

#modifiedCellsList table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 15px;
}

#modifiedCellsList th, 
#modifiedCellsList td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

#modifiedCellsList th {
  background-color: var(--light-gray);
  font-weight: 600;
}

#modifiedCellsList tr.added td {
  background-color: rgba(15, 157, 88, 0.05);
}

#modifiedCellsList tr.removed td {
  background-color: rgba(217, 48, 37, 0.05);
}

#modifiedCellsList tr.modified td {
  background-color: rgba(244, 180, 0, 0.05);
}

/* Copyright and Attribution Styles */
.copyright-notice {
  position: fixed;
  bottom: 5px;
  right: 10px;
  font-size: 11px;
  color: rgba(0,0,0,0.6);
  background-color: rgba(255,255,255,0.7);
  padding: 2px 6px;
  border-radius: 3px;
  z-index: 1000;
}

.copyright-notice a {
  color: inherit;
  text-decoration: underline;
}

.attribution-modal .modal-content {
  max-width: 600px;
}

.attribution-content {
  font-size: 14px;
  line-height: 1.5;
}

.attribution-content h3 {
  margin-top: 16px;
  margin-bottom: 8px;
}

.attribution-content ul {
  padding-left: 20px;
}

/* Enhanced styles for interactive update page */
.trends-section,
.provider-comparison-section,
.significant-changes-section {
  margin-bottom: 30px;
}

/* Technology trends controls */
.tech-trends-controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

/* Rest of the CSS implementation remains the same */

/* Responsive adjustments */
@media (max-width: 768px) {
  .tech-trends-controls {
    flex-direction: column;
    gap: 10px;
  }
  
  .tech-filter {
    flex-wrap: wrap;
  }
  
  .changes-list {
    grid-template-columns: 1fr;
  }
  
  .chart-container {
    height: 250px;
  }
  
  .tech-insights {
    grid-template-columns: 1fr;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tech-trends-controls {
    flex-direction: column;
    gap: 10px;
  }
  
  .tech-filter {
    flex-wrap: wrap;
  }
  
  .changes-list {
    grid-template-columns: 1fr;
  }
  
  .chart-container {
    height: 250px;
  }
  
  .tech-insights {
    grid-template-columns: 1fr;
  }
}