/* ==========================================================
   regression.css - 주기별 회귀 분석 전용 스타일시트
   (1~500회귀 탐색기 & 연속 출현(Streak) 랭킹 대시보드)
   ========================================================== */

/* 대시보드 2단 독립 카드 그리드 레이아웃 */
.regression-dashboard-grid {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  width: 100%;
}

/* [좌측 카드] 회귀 추적 타임라인 카드 */
.regression-left-card {
  flex: 0 0 510px;
  max-width: 530px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1240px) {
  .regression-dashboard-grid {
    flex-direction: column;
  }

  .regression-left-card {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

.regression-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.regression-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.regression-target-badge {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60A5FA;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
}

.regression-left-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
}

/* 1~500회귀 탐색 컨트롤 바 (중앙 정렬) */
.cycle-control-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  border-radius: 12px;
}

.cycle-nav-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-cycle-nav {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-cycle-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

.cycle-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 3px 12px;
}

.cycle-number-input {
  width: 64px;
  background: transparent;
  border: none;
  color: var(--accent-gold);
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  outline: none;
}

.cycle-number-input::-webkit-inner-spin-button,
.cycle-number-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cycle-input-unit {
  font-size: 14px;
  font-weight: 700;
  color: #94A3B8;
}

/* 보너스 번호 포함/미포함 토글 라벨 */
.bonus-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  border-radius: 8px;
  user-select: none;
  transition: all 0.2s;
  height: 36px;
  box-sizing: border-box;
}

.bonus-toggle-label:hover {
  background: rgba(51, 65, 85, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
}

.bonus-toggle-checkbox {
  width: 15px;
  height: 15px;
  accent-color: #3B82F6;
  cursor: pointer;
  margin: 0;
}

.bonus-toggle-text {
  font-size: 12.5px;
  font-weight: 700;
  color: #CBD5E1;
  white-space: nowrap;
}

.bonus-toggle-checkbox:checked + .bonus-toggle-text {
  color: #60A5FA;
}

/* 회귀 타임라인 테이블 */
.regression-table-scroll-wrap {
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.regression-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}

.regression-table th,
.regression-table td {
  text-align: center !important;
  vertical-align: middle !important;
  padding: 8px 4px;
  white-space: nowrap;
}

.regression-table th {
  background: rgba(30, 41, 59, 0.95);
  position: sticky;
  top: 0;
  z-index: 5;
  font-size: 12.5px;
  color: #94A3B8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.col-reg-round { width: 78px; font-weight: 700; color: #60A5FA; }
.col-reg-balls { width: calc(100% - 218px); min-width: 200px; }
.col-reg-hits { width: 140px; }

.reg-balls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.reg-balls-row .mini-ball {
  width: 25px;
  height: 25px;
  font-size: 11.5px;
}

.reg-balls-row .bonus-plus {
  font-size: 12px;
  margin: 0 1px;
}

.reg-hit-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.reg-hit-badge.hit-yes {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ADE80;
}

.reg-hit-badge.hit-no {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #F87171;
}

/* [우측 카드] 연속 출현 회귀선 탐색기 카드 */
.regression-right-card {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.regression-right-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.regression-right-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.regression-right-title {
  margin-bottom: 0;
  font-size: 17px;
  color: #F59E0B;
}

.regression-right-desc {
  font-size: 12.5px;
  color: #94A3B8;
}

.regression-right-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

/* 연속 주 필터 바 (select 드롭다운) */
.streak-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 16px;
  border-radius: 12px;
}

.streak-select-wrap {
  display: flex;
  align-items: center;
}

.streak-filter-select {
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  height: 36px;
  min-width: 135px;
  transition: all 0.2s;
}

.streak-filter-select:hover,
.streak-filter-select:focus {
  border-color: #F59E0B;
}

/* 정렬 버튼 그룹 */
.streak-sort-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-streak-sort {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94A3B8;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-streak-sort:hover {
  background: rgba(51, 65, 85, 0.85);
  color: #F8FAFC;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-streak-sort.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3B82F6;
  color: #60A5FA;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

.btn-streak-sort .sort-icon {
  font-size: 10px;
  opacity: 0.8;
}

.btn-streak-sort.active .sort-icon {
  opacity: 1;
  color: #93C5FD;
}

.streak-match-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-left: auto;
}

/* 연속 출현 테이블 */
.streak-table-scroll-wrap {
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.streak-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}

.streak-table th,
.streak-table td {
  text-align: center !important;
  vertical-align: middle !important;
  padding: 8px 4px;
  white-space: nowrap;
}

.streak-table th {
  background: rgba(30, 41, 59, 0.95);
  position: sticky;
  top: 0;
  z-index: 5;
  font-size: 12px;
  color: #94A3B8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.col-streak-cycle { width: 68px; }
.col-streak-round { width: 60px; font-weight: 700; color: #CBD5E1; }
.col-streak-last { width: 184px; }
.col-streak-len { width: 80px; }
.col-streak-max-len { width: 80px; }
.col-streak-action { width: 50px; }

.streak-table .reg-balls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5px;
}

.streak-table .reg-balls-row .mini-ball {
  width: 24px;
  height: 24px;
  font-size: 11.5px;
}

.streak-table .reg-balls-row .bonus-plus {
  font-size: 11px;
  margin: 0 1px;
}

.badge-streak-fire {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #FBBF24;
  font-size: 11px;
  font-weight: 800;
  padding: 2.5px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.badge-streak-max {
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.45);
  color: #C4B5FD;
  font-size: 11px;
  font-weight: 800;
  padding: 2.5px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.btn-streak-jump {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid #3B82F6;
  color: #93C5FD;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-streak-jump:hover {
  background: #3B82F6;
  color: #FFFFFF;
}
