
/* Main styles */
body {
  font-family: 'Hind Siliguri', sans-serif;
  background-color: #f8fafc;
}

/* Simulation cards */
.simulation-card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.simulation-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.section-title {
  color: #4f46e5;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

/* Control buttons */
.control-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #4f46e5;
  color: white;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: background-color 0.2s;
}

.control-btn:hover {
  background-color: #4338ca;
}

/* Slider styles */
input[type="range"] {
  -webkit-appearance: none;
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4f46e5;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #4f46e5;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Spring-mass system improvements */
.spring-container-wrapper {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
}

/* Add to your existing CSS file */

/* Spring layout improvements */
/* Add this to hide springs by default */
.springs-visualization {
  position: relative;
  margin-top: 1.5rem;
  display: none; /* Hidden by default */
}

/* Add transition for smooth appearance */
.springs-visualization.visible {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.springs-layout {
  display: grid;
  grid-template-columns: 80px 1fr;
  grid-template-rows: 1fr 80px;
  grid-template-areas: 
    "y-spring circle"
    "empty x-spring";
  gap: 5px;
}

/* Spring containers */
.spring-container {
  position: relative;
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spring-container.vertical {
  grid-area: y-spring;
  height: 100%;
  width: 80px;
  flex-direction: column;
}

.spring-container.horizontal {
  grid-area: x-spring;
  height: 80px;
  width: 100%;
  flex-direction: row;
}

/* Spring walls */
.spring-wall {
  background: linear-gradient(90deg, #64748b, #94a3b8, #64748b);
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.spring-container.vertical .spring-wall {
  width: 40px;
  height: 10px;
  background: linear-gradient(0deg, #64748b, #94a3b8, #64748b);
}

.spring-container.horizontal .spring-wall {
  width: 10px;
  height: 40px;
}

/* Realistic spring coil design */
.spring {
  position: relative;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.spring.vertical {
  width: 16px;
  height: 100px;
  margin-top: 8px;
  background-color: transparent;
  background-image: 
    linear-gradient(to bottom, #64748b 1px, transparent 1px),
    linear-gradient(to right, #64748b 1px, transparent 1px);
  background-size: 100% 8px, 100% 100%;
  position: relative;
  overflow: visible;
}

.spring.vertical::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    repeating-linear-gradient(
      45deg,
      #64748b,
      #64748b 2px,
      transparent 2px,
      transparent 8px
    ),
    repeating-linear-gradient(
      -45deg,
      #64748b,
      #64748b 2px,
      transparent 2px,
      transparent 8px
    );
  border-radius: 4px;
}

.spring.horizontal {
  height: 16px;
  width: 100px;
  margin-left: 8px;
  background-color: transparent;
  background-image: 
    linear-gradient(to right, #64748b 1px, transparent 1px),
    linear-gradient(to bottom, #64748b 1px, transparent 1px);
  background-size: 8px 100%, 100% 100%;
  position: relative;
  overflow: visible;
}

.spring.horizontal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    repeating-linear-gradient(
      45deg,
      #64748b,
      #64748b 2px,
      transparent 2px,
      transparent 8px
    ),
    repeating-linear-gradient(
      -45deg,
      #64748b,
      #64748b 2px,
      transparent 2px,
      transparent 8px
    );
  border-radius: 4px;
}

/* Spring mass */
.spring-mass {
  position: absolute;
  width: 24px;
  height: 24px;
  background: radial-gradient(circle at 30% 30%, #6366f1, #4338ca);
  border-radius: 50%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), inset 2px 2px 4px rgba(255, 255, 255, 0.3);
  z-index: 5;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.spring-container.vertical .spring-mass {
  left: 50%;
  transform: translateX(-50%);
  bottom: 15px;
}

.spring-container.horizontal .spring-mass {
  top: 50%;
  transform: translateY(-50%);
  right: 15px;
}

/* Projection arrows */
.projection-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  z-index: 4;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.projection-arrow.x {
  border-width: 6px 0 6px 12px;
  border-color: transparent transparent transparent #EF4444;
  top: 50%;
  transform: translateY(-50%);
  right: 10px;
}

.projection-arrow.y {
  border-width: 12px 6px 0 6px;
  border-color: #3B82F6 transparent transparent transparent;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
}

/* Spring labels */
.spring-label {
  position: absolute;
  font-size: 0.85rem;
  color: #4b5563;
  font-weight: 500;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 2px 5px;
  border-radius: 4px;
  text-align: center;
}

.spring-container.vertical .spring-label {
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
}

.spring-container.horizontal .spring-label {
  right: -25px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: left center;
}

/* Improved physics values display */
.physics-values {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
  padding: 15px;
  background-color: #f1f5f9;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.physics-value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 8px 12px;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.physics-value i {
  color: #4f46e5;
  font-size: 1.1rem;
}

.physics-value-label {
  font-weight: 500;
  color: #4b5563;
}

/* Enhanced control buttons */
.control-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background-color: #4f46e5;
  color: white;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
  border: none;
  outline: none;
}

.control-btn:hover {
  background-color: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(79, 70, 229, 0.4);
}

.control-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.3);
}

/* Improved slider styles */
.slider-container {
  margin: 15px 0;
  background-color: white;
  padding: 12px 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.slider-label {
  display: flex;
  align-items: center;
  font-weight: 500;
  color: #4b5563;
  margin-bottom: 8px;
}

.slider-label i {
  color: #4f46e5;
  margin-right: 8px;
}

input[type="range"] {
  -webkit-appearance: none;
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
  margin: 10px 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4f46e5;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4f46e5;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.slider-value {
  display: inline-block;
  min-width: 40px;
  text-align: center;
  font-weight: 600;
  color: #4f46e5;
  background-color: #f1f5f9;
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: 10px;
}

/* Skeleton loader improvements */
.skeleton-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.chart-skeleton, .circle-skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 20px;
}

.skeleton-box {
  background: #e2e8f0;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin-bottom: 20px;
}

.skeleton-line {
  height: 12px;
}

/* Make sure the chart container is visible */
#shmChartContainer {
  position: relative;
  z-index: 10;
}

.skeleton-loader::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: skeleton-shine 1.5s infinite;
}

@keyframes skeleton-shine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.skeleton-box {
  background: #e2e8f0;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-circle {
  border-radius: 50%;
}

.skeleton-line {
  height: 12px;
}

/* Circle skeleton specific styles */
.circle-skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 20px;
}

.circle-skeleton .skeleton-circle {
  width: 200px;
  height: 200px;
  margin-bottom: 20px;
}

.w-32 {
  width: 8rem;
}

.w-48 {
  width: 12rem;
}

.w-40 {
  width: 10rem;
}

.chart-skeleton {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 20px;
}

.chart-skeleton .skeleton-chart {
  width: 100%;
  height: 200px;
  margin-bottom: 15px;
}

.chart-skeleton .skeleton-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
}

.chart-skeleton .skeleton-legend-item {
  width: 80px;
  height: 20px;
  border-radius: 4px;
  background: #e2e8f0;
}

.controls-skeleton {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 10px;
}

.controls-skeleton .skeleton-slider {
  width: 100%;
  height: 40px;
  margin-bottom: 15px;
  border-radius: 4px;
  background: #e2e8f0;
}

.controls-skeleton .skeleton-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.controls-skeleton .skeleton-button {
  width: 100px;
  height: 40px;
  border-radius: 8px;
  background: #e2e8f0;
}

.physics-skeleton {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 10px;
}

.physics-skeleton .skeleton-value {
  width: 120px;
  height: 40px;
  border-radius: 6px;
  background: #e2e8f0;
}

/* Fade-in animation for content */
.content-loaded {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Add or update these styles */
.slider-track {
  @apply h-2 rounded-lg bg-gray-200;
  -webkit-appearance: none;
}

.slider-track::-webkit-slider-thumb {
  -webkit-appearance: none;
  @apply w-4 h-4 rounded-full bg-indigo-600 cursor-pointer;
  transition: transform 0.1s;
}

.slider-track::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.control-btn {
  @apply px-4 py-2 rounded-lg text-white transition-all duration-200 flex items-center gap-2;
}

.control-btn:hover {
  transform: translateY(-1px);
  @apply shadow-md;
}

.control-btn:active {
  transform: translateY(0);
  @apply shadow-sm;
}

.physics-values {
  @apply grid grid-cols-2 gap-4 mt-4 p-4 bg-gray-50 rounded-lg;
}

.physics-value {
  @apply flex items-center gap-2 text-sm;
}

.physics-value-label {
  @apply font-medium text-gray-700;
}

/* Add legend for the graph */
.graph-legend {
  @apply flex items-center gap-4 justify-center mt-2;
}

.legend-item {
  @apply flex items-center gap-2 text-sm;
}

.legend-color {
  @apply w-3 h-3 rounded-full;
}
/* Add these styles for tabs */
.tab-btn {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  color: #4B5563;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
  cursor: pointer;
}

.tab-btn:hover {
  color: #4F46E5;
}

.tab-btn.active {
  color: #4F46E5;
  border-bottom-color: #4F46E5;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
  display: block;
}

.equation {
  padding: 1rem;
  background: #F8FAFC;
  border-radius: 0.5rem;
  margin: 0.5rem 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#circlePreloader {
  transition: opacity 0.3s ease-out;
}

.skeleton-content {
  padding: 1rem;
}

#physicsExplanationSkeleton {
  transition: opacity 0.3s ease-out;
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.7;
  }
}
@supports (backdrop-filter: blur(12px)) {
  header {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}