:root {
  --main-blue: #337ab7;
  --header-blue: #d9edf7;
  --text-blue: #31708f;
  --table-header: #5bc0de;
  --border-color: #ddd;
}

body {
  background-color: #f2f2f2;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
}

/* 사이드바 */
.sidebar {
  background: #fff;
  border-right: 1px solid var(--border-color);
  min-height: 100vh;
}
.sidebar-title {
  background: var(--main-blue);
  color: white;
  padding: 10px;
  font-weight: bold;
  text-align: center;
}
.nav-link {
  color: #333;
  font-weight: 500;
  border-bottom: 1px solid #eee;
  padding: 10px 15px;
  cursor: pointer;
}
.nav-link.active,
.nav-link:hover {
  background: #eee;
  color: var(--main-blue);
}
.nav-link i {
  width: 20px;
  text-align: center;
  margin-right: 5px;
}

/* 컨텐츠 박스 공통 */
.content-box {
  background: #fff;
  border: 1px solid var(--main-blue);
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}
.content-header {
  background: var(--main-blue);
  color: white;
  padding: 8px 15px;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 공 스타일 */
.ball {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 28px;
  border-radius: 50%;
  text-align: center;
  color: white;
  font-weight: bold;
  margin: 2px;
  box-shadow: inset -2px -2px 5px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.5);
  font-size: 13px;
}
.ball-lg {
  width: 42px;
  height: 42px;
  line-height: 38px;
  font-size: 18px;
  margin: 0 4px;
}
.bg-l7 {
  background: radial-gradient(at 30% 30%, #ff9f43, #d35400);
}
.bg-l6 {
  background: radial-gradient(at 30% 30%, #54a0ff, #2e86de);
}
.bg-mini {
  background: radial-gradient(at 30% 30%, #1dd1a1, #10ac84);
}
.bg-bonus {
  background: radial-gradient(at 30% 30%, #fff, #bdc3c7);
  color: #333;
  border-color: #95a5a6;
}

/* Top 15 테이블 */
.stat-table {
  width: 100%;
  font-size: 12px;
  text-align: center;
}
.stat-table th {
  background: #5bc0de;
  color: white;
  padding: 4px;
  border: 1px solid #46b8da;
}
.stat-table td {
  border: 1px solid #ddd;
  padding: 4px;
}
.stat-table tr:nth-child(even) {
  background: #f9f9f9;
}

/* 예측 분석 테이블 */
.pred-header {
  background-color: #4682b4;
  color: white;
  text-align: center;
  font-weight: bold;
}

/* 히스토리 테이블 */
.history-table {
  width: 100%;
  font-size: 12px;
  text-align: center;
  border-collapse: collapse;
}
.history-table th {
  background-color: #5bc0de;
  color: white;
  padding: 6px;
  white-space: nowrap;
  border: 1px solid #46b8da;
}
.history-table td {
  padding: 6px;
  border: 1px solid #ccc;
  vertical-align: middle;
}
.history-table tr:nth-child(odd) {
  background-color: #f2fcf8;
}

/* 유틸 */
.text-blue {
  color: #337ab7;
  font-weight: bold;
}
/* 기본 공 스타일 (기존 유지하되 배경만 제거) */
.ball {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 26px;
  border-radius: 50%;
  text-align: center;
  color: white;
  font-weight: bold;
  margin: 1px;
  box-shadow: inset -2px -2px 5px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 12px;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

/* 번호 대역별 색상 (그라데이션 적용) */
.ball-y {
  background: radial-gradient(circle at 30% 30%, #fbc531, #e1b12c);
} /* 1-10: Yellow */
.ball-b {
  background: radial-gradient(circle at 30% 30%, #0097e6, #0086cc);
} /* 11-20: Blue */
.ball-r {
  background: radial-gradient(circle at 30% 30%, #e84118, #c23616);
} /* 21-30: Red */
.ball-g {
  background: radial-gradient(circle at 30% 30%, #7f8fa6, #718093);
} /* 31-40: Grey */
.ball-gr {
  background: radial-gradient(circle at 30% 30%, #4cd137, #44bd32);
} /* 41+: Green */

/* 모달 오버레이 (검은 배경) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1050;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 모달 창 */
.modal-window {
  background: white;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: slideDown 0.3s ease-out;
}

.modal-header {
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 적중(hit) / 꽝(miss) 스타일 재확인 (없으면 추가) */
.ball.miss {
  background: #eee;
  color: #bbb;
  border: 1px solid #ddd;
  box-shadow: none;
}
.ball.hit {
  transform: scale(1.1);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  font-weight: 900;
}
