@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: transparent;
  user-select: none;
  overflow: hidden;
}

.dashboard-container {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 280px;
  background: rgba(15, 23, 35, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  color: #ffffff;
  z-index: 9999;
  overflow: hidden;
  will-change: transform;
  transition: width 0.3s ease, height 0.3s ease;
}

.dashboard-container.horizontal {
  width: 560px;
  height: auto;
}

.dashboard-container.horizontal .dashboard-content {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

.dashboard-container.horizontal .inventory-overview,
.dashboard-container.horizontal .bxp-section {
  margin: 0;
  padding: 0;
}

.dashboard-container.horizontal .left-column {
  display: flex;
  flex-direction: column;
  flex: 0 0 140px;
  gap: 0;
}

.dashboard-container.horizontal .ore-grid {
  flex: 1;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dashboard-container.horizontal .performance-section {
  display: none;
}


.bxp-section {
  margin-top: 0;
}

.bxp-card {
  background: rgba(147, 51, 234, 0.1);
  border: 1px solid rgba(147, 51, 234, 0.2);
  border-radius: 6px;
  padding: 6px;
  position: relative;
  overflow: hidden;
}

.bxp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #9333ea;
}

.bxp-simple {
  text-align: center;
}

.bxp-simple .bxp-value {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.bxp-simple .bxp-label {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dashboard-container.minimized {
  height: 40px;
  overflow: hidden;
}

.dashboard-container.horizontal.minimized {
  height: 40px;
  width: 560px;
}

.dashboard-header {
  background: rgba(30, 40, 55, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  cursor: move;
  user-select: none;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #e2e8f0;
}

.header-title i {
  color: #f59e0b;
  font-size: 14px;
}

.header-actions {
  display: flex;
  gap: 6px;
}

.btn-minimize,
.btn-layout {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 4px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 10px;
}

.btn-minimize:hover,
.btn-layout:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.dashboard-content {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-container:not(.horizontal) .left-column {
  display: contents;
}

.dashboard-container.horizontal .left-column {
  display: flex;
  flex-direction: column;
  flex: 0 0 140px;
  gap: 2px; 
}

.inventory-overview {
  margin-bottom: 0;
}

.inventory-card {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 6px;
  padding: 8px;
}

.inventory-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-weight: 600;
  color: #93c5fd;
  font-size: 12px;
}

.inventory-header i {
  font-size: 12px;
}

.inventory-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  border-radius: 3px;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

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

.inventory-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inventory-text {
  font-weight: 600;
  font-size: 13px;
  color: #ffffff;
}

.inventory-capacity {
  font-size: 11px;
  color: #cbd5e1;
}

.ore-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ore-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px;
  position: relative;
  overflow: hidden;
}

.ore-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ore-color);
}

.copper-card {
  --ore-color: #f59e0b;
  --ore-color-light: #fbbf24;
  border-color: rgba(245, 158, 11, 0.2);
}

.iron-card {
  --ore-color: #6b7280;
  --ore-color-light: #9ca3af;
  border-color: rgba(107, 114, 128, 0.2);
}

.ore-card:hover {
  border-color: var(--ore-color);
}

.ore-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.ore-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--ore-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
}

.ore-title h3 {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1px;
}

.ore-subtitle {
  font-size: 9px;
  color: #94a3b8;
}

.ore-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.main-stat {
  text-align: center;
  padding: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.main-stat .stat-value {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1px;
}

.stat-label {
  font-size: 8px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.performance-section {
  margin-top: 4px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-weight: 600;
  color: #e2e8f0;
  font-size: 11px;
}

.section-header i {
  color: #10b981;
  font-size: 11px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.metric-card {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 6px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.metric-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
}

.metric-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  margin-bottom: 4px;
}

.metric-content {
  width: 100%;
}

.metric-value {
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1px;
}

.metric-label {
  font-size: 8px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-indicator {
  position: absolute;
  bottom: 8px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: #94a3b8;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 2s infinite;
}

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

.ore-zero {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.2) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  border-radius: 3px;
  padding: 2px 4px;
  font-weight: 700 !important;
}

@media (max-width: 480px) {
  .dashboard-container {
    width: 260px;
    left: 10px;
    top: 10px;
  }
  
  .dashboard-container.horizontal {
    width: 500px;
  }
  
  .ore-grid {
    grid-template-columns: 1fr;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}
