body {
  font-family: Arial, Helvetica, sans-serif;
  background: #020617;
  color: #e5e7eb;
  margin: 0;
  padding: 12px;
}

input{
  font-size:16px;
}

.container {
  max-width: 420px;
  margin: 0 auto;
}

.card {
  margin-top:60px;
  background: #020617;
  padding: 0 16px;
  /*border-radius: 12px;*/
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

h1.content_name {
  margin-top: 60px !important;
  text-align: center;
  font-size:20px;
  margin: 24px 0;
}

select, button {
  background: #111827;
  border: 1px solid #374151;
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  outline: none;
  transition: border 0.2s ease;
  width: 100%;
  margin:10px 0 14px;
  font-size:16px;
}

button {
  background: #2563eb;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.result {
  /*margin-top: 16px;*/
  padding: 16px 0;
  border-radius: 10px;
  background: #020617;
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.result-label {
  color: #94a3b8;
  min-width: 120px;
}

.direction {
  font-weight: bold;
}

.direction.up {
  color: #22c55e;
}

.direction.down {
  color: #ef4444;
}

.direction.flat {
  color: #9ca3af;
  font-weight: 600;
}

/* Confidence bar */
.confidence-row {
  gap: 8px;
}

.footer {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
}

.trained-box {
  margin: 12px 0 20px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trained-label {
  font-size: 16px;
  opacity: 0.7;
}

.trained-number {
  font-size: 16px;
  font-weight: bold;
}

#symbolSearch {
  background: #111827;
  border: 1px solid #374151;
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  outline: none;
  transition: border 0.2s ease;
  width: 100%;
  margin:10px 0 12px;
  font-size:16px;
}

#symbolSearch::placeholder {
  color: #9ca3af;
}

#symbolSearch:focus {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.6);
}

.nav-button {
  display: block;
  margin: 16px 0 20px;
  padding: 14px;
  text-align: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #22c55e);
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.nav-button:active {
  transform: scale(0.98);
}

.market-snapshot {
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.snapshot-title {
  font-size: 16px;
  margin-bottom: 12px;
  opacity: 0.85;
}

/* =====================
   Trend × Confidence Guide（修正版）
===================== */

.trend-help {
  position: relative;
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  cursor: pointer;
  color: #9ca3af;
}

/* ★ 中央寄せ + 画面内制限 */
.trend-popup {
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;

  width: max-content;
  max-width: 280px;

  padding: 12px 14px;
  border-radius: 12px;

  background: rgba(2, 6, 23, 0.96);
  color: #e5e7eb;

  font-size: 12px;
  line-height: 1.5;

  box-shadow: 0 20px 40px rgba(0,0,0,0.5);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.trend-help:hover .trend-popup {
  opacity: 1;
  pointer-events: auto;
}

.trend-popup strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.trend-popup ul {
  margin: 6px 0;
  padding-left: 18px;
}

.trend-popup li {
  margin-bottom: 6px;
}

.trend-popup small {
  display: block;
  margin-top: 6px;
  opacity: 0.6;
}

/* 📱 モバイルでは下に出す */
@media (max-width: 480px) {
  .trend-popup {
    top: 140%;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90vw;
  }
}

.muted {
  opacity: 0.65;
  font-size: 0.9em;
}

.live-market .result-row {
  align-items: flex-start;
}

.live-market .result-label {
  min-width: 140px;
}

/* =========================
   Live Market - Source
========================= */

.live-source {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 0.85em;
  opacity: 0.6;
}

.live-source-label {
  text-align: left;
}

.live-source-time {
  text-align: right;
  white-space: nowrap;
}

/* 自信度(Confidence)と的中率(Accuracy)の行を同じルールで整列 */
.confidence-row, .accuracy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%; /* 横幅いっぱいに広げる */
}

/* バーの土台（溝の部分）を共通化 */
.confidence-bar, .accuracy-bar {
  flex: 1;            /* 余白をすべて埋める */
  height: 10px;       /* 少し太くして見やすくします */
  background: #1e293b; /* 溝の色 */
  border-radius: 5px;
  overflow: hidden;
  position: relative; /* 子要素の基準点 */
}

/* Confidence の中身（水色） */
.confidence-fill {
  height: 100%;
  width: 0%; /* JSで上書き */
  background: #38bdf8;
  border-radius: 5px;
  transition: width 0.4s ease;
}

/* Accuracy の中身（グラデーション） */
.accuracy-fill {
  height: 100%;
  width: 0%; /* JSで上書き */
  background: linear-gradient(90deg, #ff4d4f, #faad14, #52c41a);
  border-radius: 5px;
  transition: width 0.4s ease;
}

.accuracy-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff4d4f, #faad14, #52c41a);
  width: 0%;
  transition: width 0.4s ease;
}

.symbol-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin:0 0 12px 0;
}

.coin-logo-large {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.symbol-title-text {
  margin: 0;
  padding: 0;
  line-height: 1.1;       /* ← ここ重要 */
  font-size: 24px;
  font-weight: 700;
}

.coin-logo-large {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

