/* ---------- Global Styles ---------- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1a1a1a, #0d1b2a);
    color: #f0f0f0;
    overflow: hidden;
}

h3 {
    margin-top: 0;
    color: #ffb703;
}

button {
    background: #00b4d8;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 14px;
    transition: background 0.2s;
}

button:hover {
    background: #0096c7;
}

/* ---------- Header ---------- */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #00d4ff;
    letter-spacing: 0.5px;
}

#headerButtons {
    display: flex;
    align-items: center;
    gap: 10px;
}

#searchBox {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    background: #2a2a3a;
    color: #fff;
    outline: none;
    width: 160px;
}

/* ---------- Main Layout ---------- */
main {
    display: flex;
    flex: 1;
    height: calc(100vh - 60px);
    /* Adjust for header height */
    overflow: hidden;
}

#leftPanel, #rightPanel {
  padding: 15px;
  overflow-y: auto;
  background: rgba(20, 20, 30, 0.5);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

#rightPanel {
  border-right: none;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}


#rightPanel {
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* #viewer {
    flex: 1;
    position: relative;
    background: radial-gradient(circle at center, #0f2027, #203a43, #2c5364);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
} */

#viewer canvas {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* #dimensionDisplay {
  text-align: center;
  font-size: 0.95rem;
  color: #ffb703;
  padding: 8px 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
} */

#centerPanel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle at center, #0f2027, #203a43, #2c5364);
}

#viewer {
  flex: 1;
  width: 100%;
  background: radial-gradient(circle at center, #0f2027, #203a43, #2c5364);
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

#dimensionDisplay {
  width: 100%;
  text-align: center;
  font-size: 0.95rem;
  color: #ffb703;
  padding: 8px 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sustainability Metrics Display */
#sustainabilityDisplay {
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  padding: 10px 0;
  background: rgba(34, 197, 94, 0.15);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(74, 222, 128, 0.3);
  color: #4ade80;
  position: relative;
}

.metric-row {
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.metric-label {
  color: #86efac;
  font-weight: 500;
}

.metric-value {
  color: #ffffff;
  font-weight: 700;
}

.info-icon-btn {
  background: transparent;
  border: none;
  color: #4ade80;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  /* margin-left: 8px; */
  transition: all 0.2s;
  line-height: 1;
}

.info-icon-btn:hover {
  color: #86efac;
  transform: scale(1.15);
}

/* Sustainability Tooltip */
.sustainability-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 30, 0.98);
  border: 1px solid rgba(74, 222, 128, 0.4);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  min-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.sustainability-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: rgba(20, 20, 30, 0.98);
}

.sustainability-tooltip.show {
  display: block;
  animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.tooltip-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 4px 0;
  border-bottom: 1px solid rgba(74, 222, 128, 0.1);
}

.tooltip-row:last-child {
  border-bottom: none;
}

.tooltip-label {
  color: #86efac;
  font-weight: 500;
}

.tooltip-value {
  color: #ffffff;
  font-weight: 700;
}

.section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.slider-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.slider-container label {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

input[type="range"] {
    width: 100%;
    accent-color: #00d4ff;
}

input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
}

input[type="number"] {
  width: 100%;
  padding: 5px;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  color: #fff;
  text-align: center;
}
