/* Final Version: 11.5 (Info Panel Styles Removed) */
:root {
  --pc-primary-color: #0073aa;
  --pc-success-color: #27ae60;
  --pc-text-color: #333;
  --pc-light-gray-bg: #f9f9f9;
  --pc-border-color: #e0e0e0;
  --pc-medium-gray-bg: #f0f0f0;
  --pc-slider-track-color: #d3d3d3;
  --pc-border-light-color: #ccc;
}
.pc-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  align-items: stretch;
}
.pc-module {
  background-color: var(--pc-light-gray-bg);
  border: 1px solid var(--pc-border-color);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.pc-controls-container {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pc-graph-container {
  flex: 1.5;
  min-width: 350px;
  display: flex;
  flex-direction: column;
}
.pc-control-item {
  display: flex;
  flex-direction: column;
}
.pc-control-item label {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--pc-text-color);
}
.pc-select,
.pc-slider {
  width: 100%;
}
.pc-select {
  padding: 10px;
  border-radius: 5px;
  border: 1px solid var(--pc-border-light-color);
  font-size: 16px;
}
.pc-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  background: var(--pc-slider-track-color);
  outline: none;
  opacity: 0.9;
  transition: opacity 0.2s;
  border-radius: 5px;
  margin-top: 5px;
}
.pc-slider:hover {
  opacity: 1;
}
.pc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--pc-primary-color);
  cursor: pointer;
  border-radius: 50%;
}
.pc-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--pc-primary-color);
  cursor: pointer;
  border-radius: 50%;
  border: 0;
}
.pc-result {
  font-size: 1.2em;
  font-weight: bold;
  color: var(--pc-text-color);
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
#final-result {
  color: var(--pc-success-color);
  background-color: var(--pc-success-bg-color, #eaf6ec);
  padding: 5px 10px;
  border-radius: 5px;
}
.pc-chart-wrapper {
  position: relative;
  flex-grow: 1;
  min-height: 0;
}
.pc-graph-switcher {
  display: flex;
  margin-bottom: 15px;
  border: 1px solid var(--pc-border-color);
  border-radius: 5px;
  overflow: hidden;
}
.pc-switch-button {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background-color: var(--pc-medium-gray-bg);
  cursor: pointer;
  transition: background-color 0.2s;
  font-weight: 600;
  color: var(--pc-text-color);
}
.pc-switch-button:not(:last-child) {
  border-right: 1px solid var(--pc-border-color);
}
.pc-switch-button.active {
  background-color: var(--pc-primary-color);
  color: #fff;
}
.pc-switch-button:hover:not(.active) {
  background-color: #e0e0e0;
}
#real-chart-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#real-chart-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
#no-image-text {
  font-style: italic;
  color: #888;
}
.pc-period-labels {
  display: none;
}
.strategy-block {
  border: 1px solid #ddd;
  padding: 15px;
  margin-bottom: 15px;
  background: #fdfdfd;
}
.instrument-block {
  border: 1px dashed #ccc;
  padding: 10px;
  margin-top: 10px;
  background: #fff;
}
.instrument-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0f0f0;
  padding: 5px 10px;
  margin: -10px -10px 10px -10px;
}
.coefficient-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.strategy-block .button-link-delete {
  color: #d63638;
  border: none;
  background: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
@media (max-width: 800px) {
  .pc-wrapper {
    align-items: flex-start;
  }
  .pc-controls-container,
  .pc-graph-container {
    flex-basis: 100%;
    min-width: 0;
  }
  .pc-graph-container {
    min-height: 400px;
  }
  .pc-result {
    margin-top: 15px;
  }
}
