/* ---------------------------
   Global Container Styling
----------------------------*/
#gcp-container {
  font-family: 'Inter', 'Poppins', sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  color: #1c1c1c;
  background: #f9fafc;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

/* Headings & Subtitles */
#gcp-container h2,
#gcp-container h3 {
  text-align: center;
  margin-bottom: 20px;
  color: #111;
  letter-spacing: -0.3px;
  font-weight: 600;
}

/* ---------------------------
   Input & Control Section
----------------------------*/
.gcp-control-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

#gcp-coin-filter,
#gcp-coin-select,
#gcp-period-select {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease-in-out;
}

#gcp-coin-filter:focus,
#gcp-coin-select:focus,
#gcp-period-select:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* ---------------------------
   Run Button
----------------------------*/
#gcp-run-prediction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #007bff, #0056d2);
  color: #fff;
  padding: 12px 28px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 3px 12px rgba(0, 123, 255, 0.3);
}

#gcp-run-prediction:hover:not(:disabled) {
  background: linear-gradient(90deg, #0056d2, #0041a8);
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(0, 91, 234, 0.35);
}

#gcp-run-prediction:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  background: #ccc;
  box-shadow: none;
}

/* Small circular spinner in button */
.gcp-btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: gcp-spin 0.8s linear infinite;
}
@keyframes gcp-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------------------
   Chart Panel
----------------------------*/
#gcp-chart-panel {
  position: relative;
  margin-top: 20px;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
}

#gcp-prediction-plot {
  height: 420px;
}

/* ---------------------------
   Loader Overlay (Glassmorphism)
----------------------------*/
#gcp-loader-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  border-radius: 16px;
}

.gcp-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.gcp-loader-ring-bg {
  stroke: rgba(0, 0, 0, 0.1);
}

.gcp-loader-ring-fg {
  stroke: #007bff;
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.3s ease;
}

.gcp-loader-text {
  margin-top: 10px;
}

.gcp-loader-msg {
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.gcp-loader-count {
  font-size: 13px;
  color: #555;
  margin-top: 3px;
}

/* ---------------------------
   Summary Panel
----------------------------*/
.gcp-panel-bg {
  background: #ffffff;
  padding: 20px 24px;
  border-radius: 16px;
  margin-top: 24px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.06);
}

/* Stat Cards */
.gcp-stat-cards {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.gcp-stat-card {
  flex: 1 1 28%;
  background: #f6f8fc;
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.gcp-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.gcp-stat-card-title {
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.gcp-price-value {
  font-size: 18px;
  font-weight: 600;
  color: #007bff;
}

/* ---------------------------
   AI Analysis Box
----------------------------*/
.gcp-analysis-box {
  background: #f9fbfe;
  border: 1px solid #e3ebf7;
  border-radius: 14px;
  padding: 18px;
  position: relative;
}

.gcp-analysis-header {
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  color: #222;
}

.gcp-analysis-body {
  margin-bottom: 16px;
}

.gcp-analysis-text {
  color: #444;
  font-size: 15px;
  line-height: 1.6;
}

.gcp-small-meta {
  font-size: 12px;
  color: #777;
}

/* Confidence Bar */
.gcp-confidence-visual {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.gcp-confidence-left {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.gcp-confidence-right {
  flex: 1;
}

.gcp-confidence-bar {
  height: 8px;
  background: #e8e8e8;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 4px;
}

.gcp-confidence-fill {
  width: 0%;
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.gcp-confidence-percent {
  font-size: 13px;
  color: #444;
  text-align: right;
}

/* Footer */
.gcp-analysis-footer {
  text-align: right;
  font-size: 12px;
  color: #888;
}

.gcp-cache-note {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
}

/* ---------------------------
   Error Message
----------------------------*/
.gcp-error {
  color: #c0392b;
  background: #fbeaea;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  margin-top: 14px;
}

/* ---------------------------
   Animations / Transitions
----------------------------*/
@keyframes gcp-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gcp-stat-card {
  animation: gcp-fade-in 0.5s ease both;
}

/* Responsive */
@media (max-width: 600px) {
  .gcp-stat-cards {
    flex-direction: column;
  }
  .gcp-stat-card {
    flex: 1 1 100%;
  }
  #gcp-prediction-plot {
    height: 360px;
  }
}
