/* 최근 10회차 당첨 결과 */
.layout-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 20px auto;
}

.history-section,
.analysis-wrapper {
  margin-top: 50px;

  display: flex;
  flex-direction: column;
  gap: 10px;

  h2 {
    font-size: 35px;
  }
}

.history-box,
.analysis-container {
  flex: 1;
  height: 100%;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  padding: 5px;
  margin: 20px 0;
  background: #fff;
}

.history-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ten-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.history-row {
  width: 90%;
  margin: 5px auto;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  border: 1px solid #eee;
  padding: 7px 10px;
  border-radius: 15px;
  transition: transform 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.history-row:hover {
  transform: translateY(-2px);
}

.round-badge {
  font-size: 18px;
  font-weight: bold;
  color: #555;
  border: 1px solid #999;
  padding: 7px 10px;
  border-radius: 10px;
  margin-right: 8px;
  white-space: nowrap;
}

.balls-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
}

.plus-sign {
  font-size: 14px;
  color: #bbb;
  margin: 0 2px;
}

/* 번호 통계 데이터 */
.analysis-container {
  flex: 1;
  height: 100%;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  padding: 5px;
  margin: 20px 0;
  border: 1px solid #e0e0e0;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.layout-wrapper .analysis-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  gap: 50px;
  width: 80%;
  margin: 0 auto;
}

.analysis-item {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  padding: 15px 10px;
  border-radius: 10px;
  text-align: center;
}

.analysis-item h3 {
  font-size: 27px; /* 제목 크기 살짝 줄임 */
  margin-bottom: 15px;
  color: #333;
}

.number-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* 번호별 출현 빈도 분석  */
.analysis-section {
  width: 100%;
  margin: 70px auto;
  border-radius: 15px;
  h2 {
    font-size: 35px;
  }
}

.chart-container {
  width: 100%;
  margin: 20px auto;
  background: #fff;
  border-radius: 10px;
}

.simple-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 18px;
  padding: 10px;
}

.number-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  font-size: 20px;
}
.ball-10 {
  background-color: #fbc400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
} /* 1~10 */
.ball-20 {
  background-color: #69c8f2;
} /* 11~20 */
.ball-30 {
  background-color: #ff7272;
} /* 21~30 */
.ball-40 {
  background-color: #aaa;
} /* 31~40 */
.ball-50 {
  background-color: #b0d840;
} /* 41~45 */

.frequency-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}

.frequency-text {
  margin-top: 15px;
  font-size: 16px;
  color: #555;
  font-weight: 600;
}

/* 모달창 */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

/* 모달창 */
.modal-content {
  background: #222529;
  margin-top: 130px;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  width: 100%;
  max-width: 450px;
  border: 1px solid #444;
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.5),
    0 10px 10px rgba(0, 0, 0, 0.5);

  dt {
    margin: 10px auto;
    color: #eee;
    font-size: 30px;
    font-weight: bold;
    text-align: center;
  }

  dd {
    text-align: center;
    margin: 10px auto;
    color: #eee;
    font-size: 20px;
    font-weight: bold;
    line-height: 2rem;
  }
}

.btn1 {
  background: linear-gradient(45deg, #1a237e, #0d47a1);
  color: #fff;
  border: none;
  padding: 10px 17px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 10px 0;
}

/* 후원 카카오페이 송금 */

.pc-wing-banner {
  display: block;
  position: fixed;
  top: 125px;
  right: 5px;
  width: 200px;
  background: #fff;
  padding: 20px 15px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  border: 2px solid #f0f0f0;
  z-index: 100;
}

/* PC용 내용물 스타일 */
.pc-wing-banner h3 {
  text-align: center;
  font-size: 18px;
  margin: 0 0 10px;
  color: #333;
}
.wing-msg {
  font-size: 13px;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.4;
}
.qr-box img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #eee;
}
.qr-box p {
  font-size: 12px;
  color: #999;
  margin: 5px 0 10px 0;
}
.wing-bank {
  font-size: 12px;
  background: #f8f9fa;
  padding: 8px;
  line-height: 1.5em;
  border-radius: 6px;
  margin-bottom: 10px;
  color: #555;
}
.btn-close {
  background: none;
  border: none;
  font-size: 13px;
  color: #aaa;
  cursor: pointer;
  text-decoration: underline;
}

/* 모바일용 박스: PC에서는 숨김 (display: none) */
.mobile-donation {
  display: none;
}

/* ******************************************************* */

@media (max-width: 1900px) {
  /* 최근 10회차 당첨 결과 */
  .layout-wrapper {
    width: 95%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 50px auto;
  }

  .history-section,
  .analysis-wrapper {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    gap: 10px;

    h2 {
      font-size: 33px;
    }
  }

  .history-box,
  .analysis-container {
    flex: 1;
    height: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 5px;
    margin: 20px 0;
  }

  .history-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .ten-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1px;
  }

  .history-row {
    width: 100%;
    margin: 5px auto;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    border: 1px solid #eee;
    padding: 7px 10px;
    border-radius: 15px;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }

  .ten-ball {
    width: 47px;
    height: 47px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 18px;
  }

  .history-row:hover {
    transform: translateY(-2px);
  }

  .round-badge {
    font-size: 14px;
    font-weight: bold;
    color: #555;
    border: 1px solid #999;
    padding: 7px;
    border-radius: 10px;
    margin-right: 5px;
    white-space: nowrap;
  }

  .balls-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .plus-sign {
    font-size: 14px;
    color: #bbb;
    margin: 0 2px;
  }

  /* 번호 통계 데이터 */
  .analysis-container {
    flex: 1;
    height: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 5px;
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .layout-wrapper .analysis-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 20px;
    width: 99%;
    margin: 0 auto;
  }

  .analysis-item {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    padding: 15px 10px;
    border-radius: 10px;
    text-align: center;
  }

  .analysis-item h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
  }

  .number-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }

  /* 번호별 출현 빈도번호 */
  .analysis-section {
    width: 90%;
    margin: 70px auto;
    border-radius: 15px;
  }
}

/**************************************************************************************/
@media (max-width: 768px) {
  /* 최근 10회차 당첨결과 */

  .layout-wrapper {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 20px auto;
  }

  .history-section,
  .analysis-wrapper {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;

    h2 {
      font-size: 30px;
    }
  }

  .history-box,
  .analysis-container {
    flex: 1;
    height: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 5px;
    margin: 10px 0;
  }

  .history-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .history-row {
    width: 98%;
    margin: 5px auto;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    border: 1px solid #eee;
    padding: 5px;
    border-radius: 15px;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }

  .history-row:hover {
    transform: translateY(-2px);
  }

  .round-badge {
    font-size: 13px;
    font-weight: bold;
    color: #555;
    border: 1px solid #999;
    padding: 5px;
    border-radius: 10px;
    margin-right: 0;
    white-space: nowrap;
  }

  .balls-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .ten-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
  }

  .plus-sign {
    font-size: 14px;
    color: #bbb;
    margin: 0 2px;
  }

  /* 번호 통계 데이터 */
  .analysis-container {
    flex: 1;
    height: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 5px;
    margin: 10px 0;
    border: 1px solid #e0e0e0;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .layout-wrapper .analysis-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 10px;
    width: 99%;
    margin: 0 auto;
  }

  .analysis-item {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
  }

  .analysis-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
  }

  .number-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
  }

  /* 번호빈도 분석 */
  .analysis-section {
    width: 100%;
    border-radius: 15px;
    padding: 5px;
    margin: 30px auto 0;

    h2 {
      font-size: 28px;
    }
  }

  .simple-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 1px;
    padding: 1px;
    border-radius: 1px;
  }

  .number-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 16px;
  }

  /* 모달 배경 */
  .modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
  }

  /* 모달창 */
  .modal-content {
    margin-top: 130px;
    padding: 20px 10px;
    border-radius: 15px;
    text-align: center;
    width: 100%;
    max-width: 350px;

    dt {
      margin: 10px auto;
      font-size: 24px;
      font-weight: bold;
      text-align: center;
    }

    dd {
      text-align: center;
      margin: 15px auto 10px;
      font-size: 16px;
      font-weight: bold;
      line-height: 1.6rem;
    }
  }

  .btn1 {
    background: linear-gradient(45deg, #1a237e, #0d47a1);
    color: #fff;
    border: none;
    padding: 7px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px 0;
  }

  /* 후원 카카오페이 송금 */
  .pc-wing-banner {
    display: none;
  }

  .mobile-donation {
    display: block;
    width: 95%;
    margin: 30px auto;
    padding: 30px 20px;
    background: #ffffff;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
  }

  .mobile-donation h2 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
  }
  .mobile-donation .message {
    margin-bottom: 25px;
    line-height: 1.6;
    color: #666;
    font-size: 15px;
  }
  .mobile-donation .highlight {
    color: #ff9f43;
    font-weight: bold;
  }

  .btn-kakao-mobile {
    display: block;
    width: 100%;
    padding: 15px 0;
    background-color: #f7e600;
    color: #3a1d1d;
    font-weight: bold;
    text-decoration: none;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(247, 230, 0, 0.3);
  }

  .bank-info {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
  }
}
