/* Google Font Jua - 로컬 폰트 로딩 */
@font-face {
  font-family: 'Jua';
  src: url('../fonts/Jua-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg: #0f1724;
  --card: #0b1320;
  --accent: #46a6ff;
  --muted: #9aa6b2;
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  font-family: 'Jua', Inter, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: #e6eef6;
  min-height: 100vh;
}

body.has-fixed-footer {
  padding-bottom: 42px;
}

.app-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1030;
  min-height: 36px;
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(154, 166, 178, 0.35);
  background: rgba(8, 15, 26, 0.96);
  backdrop-filter: blur(8px);
}

.app-footer-text {
  color: rgba(230, 238, 246, 0.76);
  font-size: 0.875rem;
}

.currency-btn.active {
  background: #ffd166;
  color: #111;
  border-color: rgba(0, 0, 0, 0.08);
}

.balance-box {
  max-width: 400px;
  margin: 0 auto 1.5rem auto;
  padding: 1rem 1.5rem;
  background: rgba(15, 23, 36, 0.6);
  border:gray 3px solid;
  border-radius: 0.75rem;
}

.jav-title-media-col {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
}

.jav-title-image {
  display: block;
  width: 774px;
  min-width: 774px;
  height: 435px;
  object-fit: contain;
  object-position: center;
  background: #05070b;
}

@media (max-width: 991.98px) {
  .jav-title-image {
    min-width: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 774 / 435;
  }
}

.jav-actress-search {
  width: min(100%, 420px);
}

.jav-actress-card {
  overflow: hidden;
  border-radius: 8px;
}

.jav-actress-cover-link {
  display: block;
  color: inherit;
  text-decoration: none;
  background: #05070b;
}

.jav-actress-image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
  background: #05070b;
}

.jav-actress-image-empty {
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.24), rgba(70, 166, 255, 0.16)),
    #05070b;
}

.jav-actress-name {
  display: block;
  min-height: 3.4rem;
  padding: 0.75rem 0.75rem 0.25rem;
  color: #e6eef6;
  line-height: 1.25;
  text-decoration: none;
}

.jav-actress-name:hover,
.jav-actress-name:focus {
  color: #ffd166;
}

.jav-actress-meta {
  padding: 0 0.75rem 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* `usdBalanceWrap` 내부의 모든 텍스트 크기를 90%로 축소 */
#totalBalanceTitle {
  font-size: 1.5rem;
}

.lead {
  font-size: 1.5rem;
}

#total_balance {
  font-size: 1.75rem;
  font-weight: bold;
}

#candleLast {
  color: #ffd166;
}

#candleTitlePrice {
  color: #ffd166;
}

.price {
  color: #ffd166;
}

#percent_change {
  font-size: 1.25rem;
  margin-left: 0.5rem;
}

#candleChange.is-up {
  color: #2ecc89;
}

#candleChange.is-down {
  color: #ff5b73;
}

.candle-panel {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(20, 32, 50, 0.96), rgba(8, 15, 26, 0.98)),
    #0b1320;
  border: 1px solid rgba(255, 209, 102, 0.22);
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.candle-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.candle-toolbar > .text-start {
  min-width: 0;
  flex: 1 1 auto;
}

.candle-eyebrow {
  color: #9aa6b2;
  font-size: 0.8rem;
  letter-spacing: 0;
}

.candle-title {
  color: #f5f7fb;
  font-size: 1.45rem;
  line-height: 1.2;
  max-width: 100%;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  overflow-wrap: anywhere;
  white-space: normal;
}

.candle-title-icon {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
}

.candle-title-main {
  min-width: 0;
  font-size: 1.45rem;
  line-height: 1.1;
}

.candle-title-sub {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  font-size: 1.45rem;
  line-height: 1.15;
  color: #e6eef6;
  white-space: nowrap;
}

.candle-title-separator {
  color: #9aa6b2;
}

.candle-title #candleTitleChange.is-up {
  color: #2ecc89;
}

.candle-title #candleTitleChange.is-down {
  color: #ff5b73;
}

.candle-toolbar-right {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 0 0 auto;
}

.candle-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
}

.candle-control-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  object-fit: contain;
}

.candle-select {
  width: auto;
  color: #e6eef6;
  background-color: #0d1726;
  border-color: rgba(154, 166, 178, 0.35);
}

#candleSymbol {
  min-width: 118px;
}

#candleInterval {
  min-width: 78px;
}

.candle-select:focus {
  color: #fff;
  background-color: #0d1726;
  border-color: #ffd166;
  box-shadow: 0 0 0 0.2rem rgba(255, 209, 102, 0.16);
}

.candle-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 124px;
  min-height: 32px;
  padding: 0.32rem 0.7rem;
  color: #f4f7fb;
  background: rgba(255, 209, 102, 0.15);
  border: 1px solid rgba(255, 209, 102, 0.42);
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.candle-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background: #ffd166;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.14);
}

.candle-status[data-status="loading"] .candle-status-dot,
.candle-status[data-status="connecting"] .candle-status-dot,
.candle-status[data-status="reconnecting"] .candle-status-dot {
  animation: candle-status-pulse 1.15s ease-in-out infinite;
}

.candle-status[data-status="live"] {
  color: #dffbef;
  background: rgba(46, 204, 137, 0.14);
  border-color: rgba(46, 204, 137, 0.48);
}

.candle-status[data-status="live"] .candle-status-dot {
  background: #2ecc89;
  box-shadow: 0 0 0 3px rgba(46, 204, 137, 0.16);
}

.candle-status[data-status="reconnecting"] {
  color: #fff5d6;
  background: rgba(255, 209, 102, 0.14);
  border-color: rgba(255, 209, 102, 0.5);
}

.candle-status[data-status="error"] {
  color: #ffe6ea;
  background: rgba(255, 91, 115, 0.16);
  border-color: rgba(255, 91, 115, 0.56);
}

.candle-status[data-status="error"] .candle-status-dot {
  background: #ff5b73;
  box-shadow: 0 0 0 3px rgba(255, 91, 115, 0.18);
}

@keyframes candle-status-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

.candle-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.candle-stat {
  min-width: 0;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  text-align: left;
}

.candle-stat span {
  display: block;
  color: #9aa6b2;
  font-size: 0.78rem;
}

.candle-stat strong {
  display: block;
  overflow: hidden;
  color: #f5f7fb;
  font-size: 1rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candle-stat strong.is-up {
  color: #2ecc89;
}

.candle-stat strong.is-down {
  color: #ff5b73;
}

.candle-canvas {
  display: block;
  width: 100%;
  height: 430px;
  background: #08111d;
  border: 1px solid rgba(154, 166, 178, 0.18);
  border-radius: 8px;
}

@media (max-width: 768px) {
  .candle-panel {
    padding: 12px;
  }

  .candle-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .candle-toolbar-right {
    align-items: stretch;
    min-width: 0;
  }

  .candle-controls {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .candle-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .candle-canvas {
    height: 340px;
  }
}
