/* ==========================================================
   carryover.css - 이월수 & 이웃수(±1) 전용 스타일시트
   (HTML 인라인 CSS 전면 분리 및 반응형 최적화)
   ========================================================== */

/* 카드 헤더 컨트롤 */
.carryover-header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* 색상 범례 아이템 */
.carryover-legend-items {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.legend-badge {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-badge.legend-carry {
  background: #F59E0B;
  color: #000000;
  font-weight: 800;
}

.legend-badge.legend-neighbor {
  background: #10B981;
  color: #000000;
  font-weight: 800;
}

.legend-badge.legend-bonus {
  background: linear-gradient(135deg, #A855F7 0%, #7C3AED 100%);
  color: #FFFFFF;
  font-weight: 800;
}

.legend-badge.legend-win {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93C5FD;
}

/* 상단 가로 스크롤 동기화 바 */
.carryover-top-scroll-wrap {
  overflow-x: auto;
  width: 100%;
  height: 16px;
  margin-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 4px;
}

.carryover-top-scroll-dummy {
  height: 1px;
}

/* 모눈종이 1~45 격자 테이블 스크롤 컨테이너 */
.carryover-scroll-container {
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.carryover-table-inner-wrap {
  width: 100%;
}

.carryover-grid-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1050px;
}

.carryover-grid-table th,
.carryover-grid-table td {
  padding: 4px 2px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.grid-numbers-head {
  color: #93C5FD;
  font-weight: 700;
  font-size: 13px;
  background: rgba(15, 23, 42, 0.9);
}

.grid-head-num {
  font-size: 11px;
  color: #94A3B8;
  width: 20px;
  background: rgba(15, 23, 42, 0.75);
}

.col-fixed.col-round {
  width: 70px;
  background: rgba(15, 23, 42, 0.95);
  font-weight: 700;
}

.col-fixed.col-stats {
  width: 75px;
  background: rgba(15, 23, 42, 0.95);
  font-weight: 700;
}

.grid-num-cell {
  width: 20px;
  height: 28px;
  padding: 2px !important;
}

.grid-empty-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

/* 격자 볼 칩 (원래 네모 형태) */
.grid-ball-chip {
  width: 20px;
  height: 22px;
  line-height: 22px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 3px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chip-normal {
  background: rgba(59, 130, 246, 0.25);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #93C5FD;
}

.chip-carryover {
  background: #F59E0B;
  color: #000000;
  font-weight: 800;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.chip-neighbor {
  background: #10B981;
  color: #000000;
  font-weight: 800;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.chip-bonus-normal {
  background: linear-gradient(135deg, #A855F7 0%, #7C3AED 100%);
  color: #FFFFFF;
}

.chip-bonus-repeat {
  background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%);
  color: #FFFFFF;
  font-weight: 800;
  box-shadow: 0 0 8px rgba(236, 72, 153, 0.7);
}

/* 추가 로딩 인디케이터 */
.carryover-scroll-loader {
  padding: 16px 0;
  text-align: center;
  color: #93C5FD;
  font-size: 13px;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.carryover-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2.5px solid rgba(147, 197, 253, 0.3);
  border-top-color: #60A5FA;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
