* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  background: linear-gradient(135deg, #0a0e17 0%, #0d1b2a 50%, #1a1a2e 100%);
  color: #e8e8e8;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(237, 137, 54, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

#root {
  height: 100%;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.scroll-container {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 100%;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: #06b6d4 #0f172a;
}

.scroll-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scroll-container::-webkit-scrollbar-track {
  background: #0f172a;
  border-radius: 3px;
}

.scroll-container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #06b6d4, #0891b2);
  border-radius: 3px;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #22d3ee, #06b6d4);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #06b6d4, #0891b2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #22d3ee, #06b6d4);
}

input[type="number"],
input[type="text"],
select {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #e8e8e8;
  border-radius: 6px;
  padding: 8px 14px;
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2), 0 0 20px rgba(6, 182, 212, 0.1);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.8);
}

button {
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}

button:hover::before {
  left: 100%;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.card {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(6, 182, 212, 0.15);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.5), transparent);
  border-radius: 12px 12px 0 0;
}

.btn-primary {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  color: #ffffff;
  padding: 10px 20px;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

.btn-secondary {
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
  padding: 10px 20px;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(6, 182, 212, 0.2);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  padding: 8px 14px;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  padding: 10px 20px;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.chart-container {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(6, 182, 212, 0.15);
}

.material-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.material-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.material-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(6, 182, 212, 0.2);
}

.material-card:hover::after {
  opacity: 1;
}

.material-card.selected {
  border-color: #06b6d4;
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.4), 0 8px 30px rgba(6, 182, 212, 0.2);
}

.temperature-gradient {
  background: linear-gradient(90deg, #3b82f6 0%, #10b981 25%, #fbbf24 50%, #f97316 75%, #ef4444 100%);
  height: 4px;
  border-radius: 2px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.active {
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
  animation: status-pulse 2s infinite;
}

.status-dot.warning {
  background: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
}

.status-dot.danger {
  background: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
  animation: danger-pulse 0.5s infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(6, 182, 212, 0.5);
  }
  50% {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.8);
  }
}

.pulse-glow {
  animation: pulse-glow 2s infinite;
}

@keyframes flame-flicker {
  0%, 100% {
    transform: scaleY(1) scaleX(1);
    opacity: 1;
  }
  25% {
    transform: scaleY(1.15) scaleX(0.85);
    opacity: 0.85;
  }
  50% {
    transform: scaleY(0.85) scaleX(1.15);
    opacity: 1;
  }
  75% {
    transform: scaleY(1.1) scaleX(0.9);
    opacity: 0.9;
  }
}

.flame-flicker {
  animation: flame-flicker 0.4s infinite;
}

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

.slide-in {
  animation: slide-in 0.3s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fade-in 0.5s ease-out;
}

@keyframes status-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

@keyframes danger-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

@keyframes scan-line {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

.scan-effect {
  position: relative;
  overflow: hidden;
}

.scan-effect::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.8), transparent);
  animation: scan-line 3s linear infinite;
}

.glow-text {
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.5), 0 0 20px rgba(6, 182, 212, 0.3);
}

.layer-item {
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.layer-item:hover {
  background: rgba(6, 182, 212, 0.08);
  border-left-color: #06b6d4;
}

.layer-item.selected {
  background: rgba(6, 182, 212, 0.15);
  border-left-color: #06b6d4;
}
