body {
margin: 0;
font-family: "Segoe UI", sans-serif;
background: #f4f6fb;
}

.container {
display: flex;
height: 100vh;
}

.sidebar {
width: 220px;
background: white;
border-right: 1px solid #ddd;
padding: 10px;
}

.sidebar div {
padding: 10px;
cursor: pointer;
border-radius: 8px;
}

.sidebar div:hover {
background: #eef3ff;
}

.main {
flex: 1;
padding: 20px;
}

.cards {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 12px;
}

.card {
background: white;
padding: 14px;
border-radius: 14px;
cursor: pointer;
transition: 0.2s;
box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.card:hover {
transform: translateY(-3px);
}

.stock {
font-size: 18px;
font-weight: bold;
}

.light {
font-size: 20px;
}

.green { color: #22c55e; }
.yellow { color: #eab308; }
.blue { color: #3b82f6; }

.detail {
position: fixed;
right: -400px;
top: 0;
width: 400px;
height: 100%;
background: white;
box-shadow: -4px 0 12px rgba(0,0,0,0.1);
padding: 20px;
transition: 0.3s;
}

.detail.open {
right: 0;
}

#closeBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: #eee;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.25);
  display: none;
}

.overlay.show {
  display: block;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.25);
  display: none;
  z-index: 10;
}

.overlay.show {
  display: block;
}

.detail {
  z-index: 20;
}

#closeBtn {
  z-index: 30;
}

.logo-badge {
  width: 130px;
  height: 130px;
  margin: 0 auto 34px;
  border-radius: 28px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-badge img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
}

.percent {
  font-size: 20px;
  font-weight: bold;
  margin-top: 4px;
}

.mini-chart {
  margin-top: 10px;
  width: 100%;
  height: 44px;
}

.mini-chart svg {
  width: 100%;
  height: 44px;
  overflow: visible;
}

.mini-chart path {
  fill: none;
  stroke: #2563eb;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-chart .base-line {
  stroke: #e5e7eb;
  stroke-width: 2;
}

/* ===== CARD GLOW ===== */
.card {
  position: relative;
  transition: all 0.25s ease;
}

.card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 10px 25px rgba(0,0,0,0.08),
    0 0 12px rgba(37, 99, 235, 0.15);
}

/* ===== SIGNAL LIGHT GLOW ===== */
.light.green {
  text-shadow: 0 0 10px rgba(34,197,94,0.6);
}

.light.yellow {
  text-shadow: 0 0 10px rgba(234,179,8,0.6);
}

.light.blue {
  text-shadow: 0 0 10px rgba(59,130,246,0.6);
}

/* ===== PERCENT COLOR ===== */
.percent {
  font-size: 20px;
  font-weight: bold;
}

.percent.positive {
  color: #16a34a;
}

.percent.negative {
  color: #dc2626;
}

/* ===== DETAIL PANEL UPGRADE ===== */
.detail {
  backdrop-filter: blur(6px);
}

body {
  background: linear-gradient(180deg, #f7f9ff 0%, #eef3ff 100%);
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    display: flex;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid #ddd;
  }

  .sidebar div {
    flex: 0 0 auto;
    margin-right: 8px;
    white-space: nowrap;
  }

  .main {
    padding: 10px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .detail {
    width: 100%;
  }

}


.sidebar div {
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 8px;
  margin: 4px;
  transition: all 0.2s ease;
}

.sidebar div:hover {
  background: #eef3ff;
}

.sidebar .active {
  background: #2563eb;
  color: white;
  font-weight: bold;
}

.yt-btn {
  margin-top: 8px;
  padding: 6px 10px;
  background: #ff0000;
  color: #fff;
  border-radius: 6px;
  text-align: center;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.yt-btn:hover {
  background: #cc0000;
}
.guide-box {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.guide-title {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 8px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.guide-section {
  margin-bottom: 4px;
}

.guide-warning {
  margin-top: 8px;
  color: #ef4444;
  font-size: 12px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
}

.dot.yellow { background: #facc15; }
.dot.green { background: #22c55e; }
.dot.blue { background: #3b82f6; }

@media (max-width: 768px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
}

.summary {
  display: flex;
  gap: 12px;
  margin: 14px 0 16px 0;
  padding: 12px 14px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  font-weight: 700;
}

.summary div {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f1f3f5;
  color: #111;
}

.summary .green {
  background: #dff7e6;
  color: #16833a;
}

.summary .yellow {
  background: #fff3bf;
  color: #9a6a00;
}

.summary .blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.more-week-btn {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef2ff;
  color: #334155;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.more-week-btn:hover {
  background: #dbeafe;
}

.badge.ended_timeout,
.badge.ended {
  background: #e5e7eb;
  color: #374151;
}
