/*---GLOBAL STYLES---*/
:root {
  --primary-color: #2c3e50;
  --accent-color: #e74c3c;
  --big-color: #f8f9fa;
  --plank-width: 400px;
}

body {
  background-color: var(--big-color);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: 900px;
  text-align: center;
  height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 10px;
}

/*---INFO PANEL STYLES---*/
.info-panel {
  display: flex;
  justify-content: space-around;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.label {
  font-size: 0.75rem;
  color: #95a5a6;
  font-weight: bold;
  text-transform: uppercase;
}

.value {
  font-size: 1.5rem;
  color: var(--primary-color);
  font-weight: bold;
}
/* Highlight for the "Next Weight" feature to improve UX */
.highlighted .value {
  color: #2980b9;
}
/*---SIMULATION AREA STYLES---*/
.simulation-area {
  position: relative;
  height: 300px;
  display: flex;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
}
/*The pivot [cite: 16,35]*/
.pivot {
  width: 0;
  height: 0;
  border-left: 25px solid transparent;
  border-right: 25px solid transparent;
  border-bottom: 45px solid var(--accent-color);
  position: absolute;
  bottom: 105px; /* Adjusted to sit on top of the plank */
  z-index: 1;
}
/*The plank [cite: 34]*/
.plank {
  width: var(--plank-width);
  height: 12px;
  background: var(--primary-color);
  position: relative;
  transform-origin: center center; /* Pivot point for rotation */
  transition: transform 0.45s cubic-bezier(0.23, 0.84, 0.41, 1); /* Smooth rotation */
  border-radius: 6px;
  z-index: 2;
  cursor: pointer;
}
.plank:hover {
  background: linear-gradient(90deg, #7a563b, #9b7451);
}

/*The weight boxes [cite: 36]*/
#weights-container {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  top: 0;
  left: 0;
}
.weight-box {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ff735a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  animation: dropBall 0.35s ease-out forwards;
}

@keyframes dropBall {
  from {
    transform: translate(-50%, -150%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}
/* preview ball */
#preview-ball {
  position: absolute;
  transform: translate(-50%, -100%);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.45;
  mix-blend-mode: multiply;
  transition:
    width 0.15s,
    height 0.15s,
    opacity 0.15s;
  z-index: 3;
}

/*---CONTROL BUTTON STYLES---*/
.reset-button {
  margin-top: 20px;
  padding: 10px 30px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition:
    background 0.3s,
    transform 0.2s;
}

.reset-button:hover {
  background: #c0392b;
  transform: scale(1.05);
}

.log-area {
  flex-grow: 1;
  flex-shrink: 0;
  max-height: 70px;
  overflow-y: auto;
  background: #f1f5f9;
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  color: #000000;
  border: 1px solid #e0e0e0;
  margin-top: 20px;
  font-family: "Inter", sans-serif;
  margin-bottom: 25px;
}

.log-entry {
  padding: 20px 20px;
  margin-bottom: 6px;
  background: #f8fafc;
  border-left: 4px solid #3498db; /* Mavi bir çizgi profesyonel durur */
  border-radius: 4px;
  font-size: 13px;
  color: #475569;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideIn 0.3s ease-out forwards;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}
.log-entry.heavy {
  border-left-color: #e74c3c;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-5px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.log-time {
  color: #888;
  margin-right: 8px;
  font-family: monospace;
}

.stats-panel {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  font-family: "Inter", sans-serif;
}

.stat-item {
  background: #ffffff;
  padding: 10px 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
  text-align: center;
}

.stat-item .label {
  display: block;
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.stat-item span:not(.label) {
  font-weight: bold;
  color: #2c3e50;
}

.status-balanced {
  color: #27ae60 !important;
}
.status-tilting {
  color: #e67e22 !important;
}
