/* 🌐 Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #e0e5ec;
  color: #333;
  padding: 10px;
  min-height: 100vh;
}

/* 🏷 Title */
h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
  color: #2c3e50;
  text-shadow: 2px 2px 4px rgba(163, 177, 198, 0.4);
  padding: 10px;
  line-height: 1.3;
}

/* 📦 Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

/* 🥛 Neumorphic Card */
.card {
  background: #e0e5ec;
  border-radius: 15px;
  padding: 15px;
  
  /* Enhanced neumorphism */
  box-shadow:
    6px 6px 12px rgba(163, 177, 198, 0.5),
    -6px -6px 12px rgba(255, 255, 255, 0.9);
  
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:active {
  box-shadow:
    inset 3px 3px 6px rgba(163, 177, 198, 0.4),
    inset -3px -3px 6px rgba(255, 255, 255, 0.7);
}

/* Inner glow effect */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 15px;
  padding: 1px;
  background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(163, 177, 198, 0.1));
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* 📊 Chart Title */
.title {
  text-align: center;
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 12px;
  color: #2c3e50;
  letter-spacing: 0.3px;
  
  /* Subtle neumorphic text effect */
  text-shadow: 
    1px 1px 2px rgba(255, 255, 255, 0.8),
    -1px -1px 2px rgba(163, 177, 198, 0.3);
}

/* 📉 Canvas Container */
.chart-container {
  position: relative;
  width: 100%;
  height: 280px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 5px;
}

canvas {
  width: 100% !important;
  height: 100% !important;
}

/* 📱 Small Mobile (< 375px) */
@media (max-width: 374px) {
  body {
    padding: 8px;
  }
  
  h1 {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }
  
  .card {
    padding: 12px;
    border-radius: 12px;
  }
  
  .title {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }
  
  .chart-container {
    height: 240px;
  }
}

/* 📱 Mobile (375px - 599px) */
@media (min-width: 375px) and (max-width: 599px) {
  h1 {
    font-size: 1.5rem;
  }
  
  .chart-container {
    height: 300px;
  }
}

/* 📱 Tablet (≥600px) */
@media (min-width: 600px) {
  body {
    padding: 20px;
  }
  
  h1 {
    font-size: 1.8rem;
    margin-bottom: 25px;
  }
  
  .container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .card {
    padding: 20px;
    border-radius: 16px;
  }
  
  .card:hover {
    box-shadow:
      10px 10px 18px rgba(163, 177, 198, 0.6),
      -10px -10px 18px rgba(255, 255, 255, 1);
    transform: translateY(-2px);
  }
  
  .title {
    font-size: 1.15rem;
    margin-bottom: 15px;
  }
  
  .chart-container {
    height: 280px;
  }
}

/* 💻 Desktop (≥1024px) */
@media (min-width: 1024px) {
  body {
    padding: 30px;
  }
  
  h1 {
    font-size: 2rem;
    margin-bottom: 35px;
  }
  
  .container {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }
  
  .card {
    padding: 25px;
    border-radius: 18px;
  }
  
  .title {
    font-size: 1.2rem;
  }
  
  .chart-container {
    height: 300px;
  }
}

/* 🖥 Large Desktop (≥1440px) */
@media (min-width: 1440px) {
  .container {
    gap: 30px;
  }
  
  .card {
    padding: 30px;
    border-radius: 20px;
  }
  
  .chart-container {
    height: 320px;
  }
}

/* 🎨 Loading state (optional) */
.card.loading {
  opacity: 0.6;
  pointer-events: none;
}

.card.loading::after {
  content: 'Loading...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #5a6c7d;
  font-weight: 600;
}