* {
  box-sizing: border-box;
}

html, body {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f5f6f8;
  font-family: -apple-system, BlinkMacSystemFont;
  font-size: 13px;
}

.app {
  /* max-width: 420px; */
  max-width: 750px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  padding-bottom: 38px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  position: relative;
}

/* 상단 */
.top-bar {
  display: flex;
  padding: 12px 0 12px 12px;
  justify-content: flex-end;
  position: relative;
  /* align-items: center; */
}

.tabs {
  display: flex;
  position: absolute;
  left: 50%; 
  transform: translateX(-50%);
  /* gap: 6px; */
}

.tabs span {
  margin-right: 4px;
  /* color: #888; */

  color: #0A3688;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 3px 12px;
  font-size: 14px;
}

.icons {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.icons a {
  margin-top: 5px;  
  text-decoration: none;
}

.icons img{
  max-width: 17px;
  margin-right: 10px;
  display: block;
}

.tabs span:hover {
  background: rgba(10, 54, 136, 0.08);
}

.tabs .active {
  font-weight: bold;
  background: #0A3688;
  color: #fff;
}

/* 검색 */
.search-box {
  padding: 6px 4px;
  border-bottom: 1px solid #0A3688;
  color: #0A3688;
  display: flex;
  align-items: center;
  gap: 2px;
}

.search-box input {
  flex: 1;
  width:100%;
  border:0 !important;
  padding:0 !important;
  color: #0A3688 !important;
  outline: none;
  background: transparent;
  appearance: none;
}

.search-box svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0; /* 찌그러짐 방지 */
}

.search-box input::placeholder {
  color: #0A3688;
  font-size: 14px;
}

/* 요약 */
.summary {
  display: flex;
  justify-content: space-around;
  padding: 10px;
  background-color: #f9f9f9;
  border-top: 1.5px solid #0A3688;
}

.summary .item {
  display: flex;
  flex-direction: column;
  /* gap: 4px; */
  flex: 1;
}

.summary .item-part {
  display: flex;
  justify-content: space-between;
}

.summary .label {
  font-size: 12px;
  color: #888;
}

.summary .value {
  font-size: 12px;
  font-weight: 400;
  color: #000;
}

.value.negative {
  color: #2b6ef3;
}

/* 탭 */
.tab-menu {
  display: flex;
  width: 100%;
  padding: 10px;
  border-bottom: 1px solid #eee;
  font-weight: 500;
  color: #565D6A;
  font-size: 13px;
}

.tab-menu span {
  min-width: 44px;
  padding: 4px 4px;
  background: #fff;
  display: flex;
  justify-content: center;
  border: 1px solid #D7D8DC;
  border-collapse: collapse;
  border-left: none;
}

.tab-menu span:first-child {
  border-left: 1px solid #D7D8DC;
}

.tab-menu span:active {
  transform: scale(0.95);
}

.tab-menu .active {
  /* border: 1px solid #2b6ef3;
  color: #2b6ef3; */
  border: 0px;
  outline: 1px solid #0A3688;
  color: #0A3688;
  position: relative;
  z-index: 1;
}

.radius-left {
  border-top-left-radius: 8px 8px;
  border-bottom-left-radius: 8px 8px;
}

.radius-right {
  border-top-right-radius: 8px 8px;
  border-bottom-right-radius: 8px 8px;
}

/* 리스트 헤더 */
.coin-header {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr 1fr;
  font-size: 12px;
  padding: 8px;
  color: #888;
}

.coin-header span{
  margin: auto;
}

/* 리스트 */
.coin-item {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr 1fr;
  padding: 8px 2px;
  border-bottom: 1px solid #eee;
  /* 기존->탭전환 */
  /* transition: background 0.2s; */
  transition: all 0.25s ease;
}

.coin-item:active {
  background: #f1f3f5;
}

.coin-item.hide {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* 변동폭 그래프 */
.change-bar {
  width: 9px;
  height: 34px;
  margin: 5px 8px 0;
  position: relative;
  background: #EEEEEE;
}

.change-bar::before {
  content: '';
  position: absolute;
  top: 50%;
  height: 1px;
  background: #bbb;
}

.fill.down {
  width: 9px;
  position: absolute;
  top: 50%;
  background: #2673DD;
}

.fill.up {
  width: 8px;
  position: absolute;
  bottom: 50%;
  background: #D84040;
}
/* 변동폭 그래프 끝 */

.coin-item .name {
  display:flex;
  flex-direction: row;
}

.coin-item .title {
  font-weight: 400;
}

.coin-item .sub {
  font-size: 12px;
  color: #999;
}

.price {
  /* color: #2b6ef3; */
  display: flex;
  justify-content: end;
  transition: color 0.2s;
  border: 1px solid transparent;
}

.change {
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.change.negative {
  color: #2b6ef3;
}

.change.positive {
  color: #e74c3c;
}

.change .amount {
  display: flex;
  justify-content: end;
  font-size: 12px;
}

.change .percent {
  display: flex;
  justify-content: end;
}

.volume {
  display: flex;
  justify-content: end;
  margin-right: 10px;
}

.price.up {
  animation: flashUp 0.5s;
}

.price.down {
  animation: flashDown 0.5s;
}

.up {
  color: #e74c3c;
}

.down {
  color: #2b6ef3;
}

.flash-up {
  background: rgba(231,76,60,0.15);
}

.flash-down {
  background: rgba(43,110,243,0.15);
}

@keyframes flashUp {
  0% { 
    /* background: rgba(231,76,60,0.2);  */
    border-color: rgba(231,76,60,0.8);
  }
  100% { 
    /* background: transparent;  */
    border-color: transparent;
  }
}

@keyframes flashDown {
  0% { 
    /* background: rgba(43,110,243,0.2);  */
    border-color: rgba(43,110,243,0.8);
  }
  100% { 
    /* background: transparent;  */
    border-color: transparent;
  }
}

.pr-10 {
  padding-right: 10px;
}

.pl-10 {
  padding-left: 10px;
}

/* 하단 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 750px;
  display: flex;
  justify-content: space-around;
  background: #0A3688;
  color: #fff;
  padding: 0;
}

.bottom-menu1 {
  display: flex;
  align-items: center;
  padding: 6px 0 2px 0;
}

.bottom-menu2 {
  display: flex;
  align-items: center;
  padding: 8px 0 0 0;
}

.bottom-menu3 {
  display: flex;
  align-items: center;
  padding: 9px 0 0 0;
}

.bottom-menu4 {
  display: flex;
  align-items: center;
  padding: 8px 0 0 0;
}

.bottom-menu5 {
  display: flex;
  align-items: center;
  padding: 9px 0 0 0;
}

.bottom-nav a {
  -webkit-tap-highlight-color: transparent;
}

.bottom-menu1 img {
  width: 32px;
  /* height: 35px; */
}

.bottom-menu2 img {
  width: 42px;
}

.bottom-menu3 img {
  width: 42px;
}

.bottom-menu4 img {
  width: 31px;
}

.bottom-menu5 img {
  width: 32px;
}