@import url('https://cdn.jsdelivr.net/npm/tailwindcss@3.4.1/base.min.css');
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@3.4.1/components.min.css');
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@3.4.1/utilities.min.css');

* {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #111827;
  color: white;
  margin: 0;
  padding: 0;
}

/* Utility Classes */
.min-h-screen { min-height: 100vh; }
.bg-gray-900 { background-color: #111827; }
.bg-gray-800 { background-color: #1f2937; }
.bg-gray-700 { background-color: #374151; }
.bg-gray-600 { background-color: #4b5563; }
.bg-gray-500 { background-color: #6b7280; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-blue-400 { background-color: #60a5fa; }
.bg-purple-500 { background-color: #8b5cf6; }
.bg-green-500 { background-color: #10b981; }
.bg-yellow-500 { background-color: #eab308; }
.bg-red-500 { background-color: #ef4444; }

.text-white { color: white; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-blue-400 { color: #60a5fa; }
.text-purple-400 { color: #a78bfa; }
.text-green-400 { color: #4ade80; }
.text-yellow-400 { color: #facc15; }
.text-red-400 { color: #f87171; }

.container { max-width: 1200px; margin: 0 auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-16 { margin-top: 4rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-8 > * + * { margin-left: 2rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-12 > * + * { margin-top: 3rem; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.w-2 { width: 0.5rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-12 { width: 3rem; }
.w-20 { width: 5rem; }
.w-full { width: 100%; }
.h-2 { height: 0.5rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-12 { height: 3rem; }
.h-80 { height: 20rem; }
.h-full { height: 100%; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }
.rounded-t-sm { border-top-left-radius: 0.125rem; border-top-right-radius: 0.125rem; }

.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-gray-700 { border-color: #374151; }
.border-gray-600 { border-color: #4b5563; }
.border-blue-500 { border-color: #3b82f6; }
.border-purple-500 { border-color: #8b5cf6; }
.border-green-500 { border-color: #10b981; }
.border-yellow-500 { border-color: #eab308; }

.sticky { position: sticky; }
.top-0 { top: 0; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-50 { z-index: 50; }

.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur-xl { backdrop-filter: blur(24px); }

.transition-colors { transition-property: color, background-color, border-color; transition-duration: 150ms; }
.transition-all { transition-property: all; transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }

.hover\:text-blue-400:hover { color: #60a5fa; }
.hover\:border-blue-500:hover { border-color: #3b82f6; }
.hover\:bg-gray-600:hover { background-color: #4b5563; }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.leading-relaxed { line-height: 1.625; }

.overflow-hidden { overflow: hidden; }

.cursor-pointer { cursor: pointer; }

.outline-none { outline: 2px solid transparent; outline-offset: 2px; }

.focus\:border-purple-500:focus { border-color: #8b5cf6; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2); }

.transform { transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); }
.-translate-x-1\/2 { --tw-translate-x: -50%; }
.-translate-y-1\/2 { --tw-translate-y: -50%; }

.whitespace-nowrap { white-space: nowrap; }

.opacity-0 { opacity: 0; }
.group:hover .group-hover\:opacity-100 { opacity: 1; }

.blur-xl { filter: blur(24px); }

/* Custom Components */
.gas-card {
  background-color: rgba(31, 41, 55, 0.6);
  backdrop-filter: blur(4px);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid rgba(55, 65, 81, 0.5);
  transition: all 0.3s ease;
}

.gas-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.1);
}

.chart-period-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  color: #9ca3af;
  background: transparent;
  border: none;
  cursor: pointer;
}

.chart-period-btn:hover {
  color: white;
  background-color: rgba(75, 85, 99, 0.5);
}

.chart-period-btn.active {
  background-color: #3b82f6;
  color: white;
  box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.25);
}

.insight-card {
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid;
  transition: all 0.2s ease;
}

.insight-card:hover {
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.1);
}

.insight-positive {
  border-color: rgba(16, 185, 129, 0.3);
  background-color: rgba(16, 185, 129, 0.05);
}

.insight-warning {
  border-color: rgba(234, 179, 8, 0.3);
  background-color: rgba(234, 179, 8, 0.05);
}

.insight-tip {
  border-color: rgba(59, 130, 246, 0.3);
  background-color: rgba(59, 130, 246, 0.05);
}

.chart-bar {
  flex: 1;
  background: linear-gradient(to top, #3b82f6, #60a5fa);
  border-radius: 0.125rem 0.125rem 0 0;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  animation: chart-bar-grow 0.8s ease-out;
}

.chart-bar:hover {
  background: linear-gradient(to top, #60a5fa, #93c5fd);
}

.chart-bar .tooltip {
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1f2937;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  color: white;
  opacity: 0;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  pointer-events: none;
}

.chart-bar:hover .tooltip {
  opacity: 1;
}

/* Animations */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-up {
  animation: slide-up 0.6s ease-out;
}

@keyframes chart-bar-grow {
  from {
    height: 0;
  }
  to {
    height: var(--bar-height);
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background-color: #1f2937;
}

::-webkit-scrollbar-thumb {
  background-color: #4b5563;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #6b7280;
}

/* Responsive Design */
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:flex-row { flex-direction: row; }
  .md\:space-y-0 > * + * { margin-top: 0; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:col-span-3 { grid-column: span 3 / span 3; }
  .lg\:flex-row { flex-direction: row; }
  .lg\:items-center { align-items: center; }
  .lg\:space-y-0 > * + * { margin-top: 0; }
}

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Glass effect */
.glass-effect {
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Input styles */
input[type="number"] {
  background-color: rgba(55, 65, 81, 0.5);
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: white;
  transition: all 0.2s ease;
  outline: none;
}

input[type="number"]:focus {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

/* Button styles */
button {
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Link styles */
a {
  text-decoration: none;
  transition: color 0.15s ease;
}

/* Gradient backgrounds */
.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.bg-gradient-to-t {
  background-image: linear-gradient(to top, var(--tw-gradient-stops));
}

.from-purple-500 {
  --tw-gradient-from: #8b5cf6;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(139, 92, 246, 0));
}

.to-blue-500 {
  --tw-gradient-to: #3b82f6;
}

.from-green-500 {
  --tw-gradient-from: #10b981;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(16, 185, 129, 0));
}

.to-yellow-500 {
  --tw-gradient-to: #eab308;
}

.from-blue-500 {
  --tw-gradient-from: #3b82f6;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(59, 130, 246, 0));
}

.to-blue-400 {
  --tw-gradient-to: #60a5fa;
}

/* Opacity utilities */
.bg-opacity-5 { background-color: rgba(var(--tw-bg-opacity-color), 0.05); }
.bg-opacity-10 { background-color: rgba(var(--tw-bg-opacity-color), 0.1); }
.bg-opacity-20 { background-color: rgba(var(--tw-bg-opacity-color), 0.2); }
.bg-opacity-30 { background-color: rgba(var(--tw-bg-opacity-color), 0.3); }
.bg-opacity-40 { background-color: rgba(var(--tw-bg-opacity-color), 0.4); }
.bg-opacity-50 { background-color: rgba(var(--tw-bg-opacity-color), 0.5); }
.bg-opacity-60 { background-color: rgba(var(--tw-bg-opacity-color), 0.6); }

/* Additional utility classes for the specific design */
.max-w-md { max-width: 28rem; }
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.inline-block { display: inline-block; }
.mr-2 { margin-right: 0.5rem; }
.ml-8 { margin-left: 2rem; }
.-ml-8 { margin-left: -2rem; }
.-top-8 { top: -2rem; }
.left-1\/2 { left: 50%; }
.pt-2 { padding-top: 0.5rem; }
.pt-8 { padding-top: 2rem; }
.capitalize { text-transform: capitalize; }
.font-mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace; }