/* 구글폰트 권장 (index.html에 추가)
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+KR:400,700&display=swap" rel="stylesheet">
*/

body {
  background: #f5f7fa;
  font-family: 'Noto Sans KR', 'Roboto', Arial, sans-serif;
  margin: 0;
  color: #1e325d;
}

.main-container {
  max-width: 600px;
  margin: 40px auto 32px auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 6px 32px rgba(35,50,100,0.10), 0 1.5px 8px rgba(0,0,0,0.02);
  padding: 32px 24px 38px 24px;
}

/* 상단 타이틀/설명 */
h1 {
  color: #174176;
  margin-bottom: 8px;
  font-size: 2.2em;
  letter-spacing: -2px;
  font-weight: 800;
}
.desc-text {
  color: #6b7894;
  margin-bottom: 24px;
  font-size: 1.1em;
}

/* 검색폼 */
form#search-form {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}
#ticker-input {
  flex: 1;
  font-size: 1.08em;
  padding: 12px 15px;
  border: 1.5px solid #adc8df;
  border-radius: 10px;
  outline: none;
  transition: border .18s;
}
#ticker-input:focus {
  border-color: #417efb;
}
button[type="submit"] {
  font-size: 1.11em;
  background: #1e63de;
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 12px 26px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(30,80,220,0.08);
  transition: background .18s;
}
button[type="submit"]:hover {
  background: #1b448e;
}

/* 카드 박스 (점수+추천) */
.card-section {
  background: #f8fbfd;
  border-radius: 13px;
  box-shadow: 0 3px 12px rgba(30,50,100,0.05);
  padding: 26px 20px 20px 20px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gauge-center-box {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}
.gauge-wrap {
  position: relative;
  display: inline-block;
  width: 140px;
  height: 140px;
}
.gauge-label {
  position: absolute;
  top: 51%;
  left: 50%;
  transform: translate(-50%, -54%);
  font-size: 2.2em;
  font-weight: bold;
  color: #194d77;
  pointer-events: none;
  user-select: none;
  z-index: 2;
  letter-spacing: -2px;
  text-align: center;
}
#score-label {
  margin-top: 0px;
  font-size: 1.25em;
  font-weight: bold;
  color: #194d77;
  text-align: center;
}

/* 분석결과 안내문구 (티커/날짜) */
#score-meta {
  font-size: 1.02em;
  color: #3a4a5d;
  margin-bottom: 7px;
  text-align: center;
  line-height: 1.5;
}

/* 추천 코멘트 박스 */
.recommend-box {
  background: #fff8e7;
  color: #b18700;
  border-left: 6px solid #ffd26a;
  border-radius: 10px;
  margin: 18px 0 12px 0;
  padding: 15px 22px 15px 18px;
  font-size: 1.13em;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(240,180,30,0.06);
  text-align: left;
}
.recommend-box.warn {
  background: #fff7e6;
  color: #ad7000;
  border-left-color: #ffd26a;
}
.recommend-box.danger {
  background: #f8e5e8;
  color: #b00020;
  border-left-color: #ed6060;
}

/* 상세(항목별 분석) */
.details-section {
  margin-top: 32px;
  padding: 0;
}
.section-title {
  font-size: 1.28em;
  font-weight: bold;
  color: #194d77;
  letter-spacing: -1px;
  margin-bottom: 7px;
  padding-left: 2px;
  border-left: 5px solid #194d77;
  background: linear-gradient(90deg,#f5f8fd 60%,transparent);
  border-radius: 4px;
}

/* 종합 코멘트 */
#summary-comment {
  background: #f0f6ff;
  border-left: 4px solid #417efb;
  padding: 17px 18px 12px 18px;
  border-radius: 8px;
  font-size: 1.11em;
  color: #225388;
  font-weight: 500;
  margin: 16px 0 19px 0;
  box-shadow: 0 1.5px 6px rgba(50,100,200,0.05);
  text-align: left;
}

/* 항목별 코멘트 (가독성 강조, 박스화) */
.item-comment {
  margin: 0 0 17px 0;
  font-size: 1.10em;
  padding: 13px 14px 10px 14px;
  border-radius: 7px;
  background: #f5f7fb;
  box-shadow: 0 1.5px 5px rgba(30,60,100,0.04);
  color: #223f5d;
  border-left: 5px solid #4079ea;
  line-height: 1.7;
}
.item-comment b {
  color: #174176;
  font-weight: 700;
}

/* 미니 라인차트 박스 */
#mini-charts {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
  justify-content: flex-start;
}
.mini-chart-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 120px;
  min-width: 100px;
  background: #f3f8fa;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(90,120,150,0.06);
  padding: 9px 6px 9px 6px;
  margin: 0 10px 18px 0;
}
.mini-chart-title {
  font-size: 1em;
  color: #3171d5;
  font-weight: bold;
  margin-bottom: 6px;
  letter-spacing: -1px;
}

/* 반응형 (모바일) */
@media (max-width: 700px) {
  .main-container {
    padding: 9vw 3vw 6vw 3vw;
    max-width: 98vw;
  }
  .card-section, .details-section {
    padding: 7vw 3vw 4vw 3vw !important;
  }
  .mini-chart-block {
    width: 92vw !important;
    min-width: 0 !important;
    margin: 0 0 14px 0;
  }
  .gauge-wrap {
    width: 28vw;
    height: 28vw;
    min-width: 100px;
    min-height: 100px;
    max-width: 170px;
    max-height: 170px;
  }
  .gauge-label {
    font-size: 6vw !important;
  }
}


.welcome-visual {
  width: 100%;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-top: 40px;
  margin-bottom: 10px;
  animation: fadein 1.1s;
}
@keyframes fadein {
  from { opacity: 0;}
  to { opacity: 1;}
}
.ai-anim-chart {
  text-align: center;
}
.ai-title {
  font-size: 1.38em;
  color: #174176;
  font-weight: 800;
  letter-spacing: -1.3px;
  margin-top: 18px;
  margin-bottom: 8px;
}
.ai-sub {
  font-size: 1.06em;
  color: #3c5e82;
  line-height: 1.6;
  font-weight: 500;
}
.anim-line {
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
  animation: dashmove 1.2s ease-out forwards;
}
@keyframes dashmove {
  to { stroke-dashoffset: 0;}
}
@media (max-width:700px) {
  .welcome-visual { min-height: 180px; margin-top: 19vw;}
  .ai-anim-chart svg { width: 80vw; height: 54vw; }
  .ai-title { font-size: 1.08em;}
  .ai-sub { font-size: 0.93em;}
}

#pdf-download-btn {
  font-size: 1.09em;
  background: #174176;
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 11px 30px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(30,80,220,0.08);
  transition: background .18s;
  margin: 8px auto 14px auto;
  display: block;
}
/* #pdf-download-btn:hover {
  background: #1e63de;
} */
#item-rows { margin-top: 6px; }
.item-row {
  display: flex;
  align-items: stretch;
  margin-bottom: 18px;
  gap: 18px;
}
.item-row .item-comment {
  flex: 1 1 0;
  min-width: 0;
  font-size: 1.10em;
  color: #22334d;
  background: #f9fbfe;
  border-radius: 9px;
  padding: 13px 17px 11px 15px;
  box-shadow: 0 1px 3px rgba(20,35,60,0.05);
  margin-right: 0;
  word-break: keep-all;
  display: flex;
  align-items: center;
  border-left: 5px solid #4079ea;
}
.item-row .item-chart {
  flex: 1 1 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.item-row .item-chart canvas {
  width: 220px !important;
  height: 90px !important;
  max-width: 95vw;
  max-height: 120px;
  background: #fff;
  border-radius: 7px;
  box-shadow: 0 1px 4px rgba(30,30,80,0.04);
}
/* 모바일: 코멘트-차트 세로 쌍 & 차트 더 크게 */
@media (max-width: 700px) {
  #item-rows { margin-top: 10vw; }
  .item-row { flex-direction: column; gap: 6px; margin-bottom: 22px;}
  .item-row .item-comment { font-size: 1.13em; padding: 14px 11px 10px 12px;}
  .item-row .item-chart canvas {
    width: 99vw !important;
    max-width: 98vw;
    min-width: 210px;
    height: 120px !important;
    max-height: 180px;
    margin: 0 auto;
  }
}
