@charset "utf-8";

.bb-wrap {
    max-width: 800px; margin: 0 auto; box-sizing: border-box; font-family: 'Pretendard', sans-serif;
}

/* 1. 게임 정보 카드 */
.bb-header-card {
    background: #fff; border: 2px solid #e2e8f0; border-radius: 16px;
    padding: 30px; text-align: center; margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
}
.bb-status {
    display: inline-block; padding: 6px 15px; border-radius: 30px;
    font-size: 14px; font-weight: 800; color: #fff; margin-bottom: 15px;
}
.st-play { background: #2563eb; box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3); }
.st-end { background: #64748b; }

.bb-prize { font-size: 16px; color: #555; margin-bottom: 5px; }
.bb-prize strong { font-size: 24px; color: #e11d48; }

.bb-winner {
    background: #fff7ed; border: 2px solid #fdba74; color: #c2410c;
    padding: 15px; border-radius: 10px; margin-top: 20px; font-weight: bold;
    animation: bounce 1s infinite;
}
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* 2. 입력 영역 */
.bb-input-box {
    background: #f8fafc; padding: 25px; border-radius: 12px; border: 1px solid #e2e8f0;
    text-align: center; margin-bottom: 20px;
}
.input-row { display: flex; justify-content: center; gap: 8px; margin-bottom: 15px; }
.bb-num-in {
    width: 50px; height: 60px; font-size: 28px; text-align: center; font-weight: 800;
    border: 2px solid #cbd5e1; border-radius: 8px; outline: none; background: #fff;
    color: #333;
}
.bb-num-in:focus { border-color: #2563eb; }
/* 스피너 제거 */
.bb-num-in::-webkit-outer-spin-button, .bb-num-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.bb-btn-throw {
    background: #2563eb; color: #fff; border: none; padding: 12px 40px;
    font-size: 18px; font-weight: 800; border-radius: 8px; cursor: pointer;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2); transition: 0.2s;
}
.bb-btn-throw:hover { background: #1d4ed8; transform: translateY(-2px); }

/* 3. 기록 테이블 */
.bb-history-wrap { display: flex; gap: 20px; }
.bb-col { flex: 1; background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 20px; }
.bb-col h3 { font-size: 16px; margin: 0 0 15px 0; border-bottom: 2px solid #333; padding-bottom: 10px; }

.bb-table { width: 100%; border-collapse: collapse; }
.bb-table th { padding: 8px; font-size: 12px; color: #888; background: #f9f9f9; }
.bb-table td { padding: 10px 5px; font-size: 14px; text-align: center; border-bottom: 1px solid #f1f5f9; }

.res-s { color: #f59e0b; font-weight: bold; }
.res-b { color: #10b981; font-weight: bold; }
.res-o { color: #ef4444; font-weight: bold; }
.res-h { color: #2563eb; font-weight: 900; }

/* 모바일 */
@media (max-width: 768px) {
    .bb-history-wrap { flex-direction: column; }
    .bb-num-in { width: 18%; height: 50px; font-size: 22px; }
}
/* --- ⚾ 리스트 화면 전용 스타일 (추가) --- */

/* 상단 헤더 (전광판 느낌) */
.bb-scoreboard-header {
    background: #1e293b; /* 어두운 전광판 배경 */
    color: #fff;
    padding: 25px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.bb-total-count {
    font-size: 16px; color: #94a3b8;
}
.bb-total-count strong {
    font-size: 24px; color: #facc15; /* 노란색 강조 */
    font-family: 'Pretendard', sans-serif;
}
.btn-write-new {
    background: #2563eb; color: #fff;
    padding: 12px 24px; border-radius: 8px;
    font-weight: 800; text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px;
    transition: 0.2s; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.btn-write-new:hover { background: #1d4ed8; transform: translateY(-2px); }

/* 그리드 레이아웃 */
.bb-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 30px;
    background: #f1f5f9; /* 배경색 추가 */
    border-radius: 0 0 16px 16px;
}

/* 게임 카드 디자인 */
.bb-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
}
.bb-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #bfdbfe;
}
.bb-card a { text-decoration: none; color: inherit; display: block; height: 100%; }

/* 카드 내부 요소 */
.bb-card-top {
    padding: 20px 20px 15px;
    display: flex; justify-content: space-between; align-items: flex-start;
}
.bb-card-title {
    font-size: 18px; font-weight: 800; color: #1e293b;
    margin: 15px 20px;
    line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bb-card-info {
    padding: 15px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex; justify-content: space-between; align-items: center;
    color: #64748b; font-size: 14px;
}
.try-count-badge {
    background: #e2e8f0; color: #475569;
    padding: 4px 10px; border-radius: 20px; font-weight: bold; font-size: 13px;
}

/* 상태 뱃지 (리스트용 재정의) */
.st-badge {
    padding: 6px 12px; border-radius: 8px;
    font-size: 12px; font-weight: 800; text-transform: uppercase;
}
.st-play { background: #dbeafe; color: #2563eb; }
.st-end { background: #fee2e2; color: #e11d48; }
.st-win { background: #dcfce7; color: #16a34a; } /* 승리 상태 추가 */

/* --- [수정됨] 관리자 체크박스 스타일 --- */
.admin-check {
    position: absolute;
    top: 15px;
    right: 15px; /* 왼쪽(left)에서 오른쪽(right)으로 이동 */
    z-index: 50;
    width: 20px;
    height: 20px;
    accent-color: #2563eb;
    cursor: pointer;
    margin: 0;
}

/* 날짜 텍스트가 체크박스에 가려지지 않도록 여백 추가 */
.bb-card-top span:last-child {
    margin-right: 25px; /* 체크박스 공간 확보 */
}

/* 하단 '전체 선택' 체크박스도 사이즈 조정 */
#chkall {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    accent-color: #2563eb;
    cursor: pointer;
}