@charset "UTF-8";

/* 초기화 */
root, 
[data-bs-theme=light] {


}

[data-bs-theme=dark] {


}

.rules { 
    font-family: sans-serif;
    text-align: center;
    margin: 0;
    line-height: 1.9;
    padding: 10px;
    background: #fff;
    font-size: 14px;
}
#grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(24px, 1fr));
  grid-gap: 3px;
  max-width: 1000px;
  margin: 10px auto;
}
.tile {
  width: 100%;
  aspect-ratio: 1;
  background: green;
  color: white;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 4px;
}
.tile.opened {
  background: gray;
  pointer-events: none;
}

.game-wrap {
    background-color: var(--na-sub-bg); /* 테마 배경색 */
    color: var(--bs-body-color); /* 테마 글자색 */
    padding: 20px 10px;
    border-radius: var(--na-menu-border-radius);
    max-width: 1000px;
    margin: 0 auto;
}

/* 상단 정보 대시보드 */
.game-header {
    text-align: center;
    margin-bottom: 20px;
}
.game-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--na-title-color);
}

/* 포인트 및 비용 카드 */
.info-card {
    background-color: var(--na-footer-bg); /* 연한 배경 */
    border: 1px solid var(--na-line-color);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
}
.info-item {
    font-size: 1rem;
}
.point-highlight {
    color: #e74c3c; /* 포인트 강조색 (붉은 계열) */
    font-weight: bold;
    font-size: 1.2rem;
}

/* 보상 목록 (가로 배치) */
.reward-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}
.reward-badge {
    background-color: var(--na-nav-bg);
    border: 1px solid var(--na-line-color);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 5px;
}
.reward-badge.sold-out {
    opacity: 0.5;
    text-decoration: line-through;
}
.badge-cnt {
    background: var(--bs-primary, #0d6efd);
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 5px;
}

/* 그리드 레이아웃 (반응형) */
#grid {
    display: grid;
    /* 모바일에서는 최소 32px, PC에서는 1fr */
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    grid-gap: 6px;
    width: 100%;
}

/* 종이 뽑기 타일 디자인 */
.tile {
    aspect-ratio: 1;
    background: #2ecc71; /* 기본: 초록색 */
    /* 종이 질감 느낌을 위한 그라디언트 */
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 3px 0 #1e8449; /* 입체감 (그림자) */
    transition: transform 0.1s, margin-top 0.1s;
    user-select: none;
}

/* 타일 눌렀을 때 효과 */
.tile:active {
    transform: translateY(3px); /* 눌리는 효과 */
    box-shadow: none;
}

/* 열린 타일 (다크모드 대응) */
.tile.opened {
    background: var(--na-bar-sm-color); /* 비활성 색상 */
    box-shadow: none;
    color: var(--bs-body-color);
    border: 1px solid var(--na-line-color);
    pointer-events: none;
    cursor: default;
    transform: none;
    font-size: 1rem;
}

/* 다크모드일 때 타일 색상 미세 조정 (선택 사항) */
[data-bs-theme=dark] .tile:not(.opened) {
    box-shadow: 0 3px 0 #145a32;
}

/* 관리자 초기화 버튼 */
.admin-reset-box {
    text-align: center;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
}
.btn-reset {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}


.rules {
    background-color: var(--na-sub-bg); /* 테마 배경 */
    border: 1px solid var(--na-line-color); /* 테마 라인색 */
    border-radius: 12px;
    padding: 25px 15px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    color: var(--bs-body-color);
}

/* 제목 스타일 */
.rules h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 20px 0;
    color: var(--na-title-color);
    letter-spacing: -0.5px;
}

/* 내 포인트 박스 */
.point-box {
    display: inline-block;
    background-color: var(--na-footer-bg);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 1rem;
    margin-bottom: 20px;
    font-weight: 500;
    border: 1px solid var(--na-line-color);
}
.point-box span {
    color: #e74c3c; /* 포인트 강조색 */
    font-weight: 800;
    font-size: 1.1rem;
    margin-left: 5px;
}

/* 보상 리스트 컨테이너 */
.reward-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 한 줄에 2개씩 */
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 10px 0 20px 0;
    text-align: left;
}

/* 개별 보상 아이템 */
.reward-item {
    background-color: var(--na-nav-bg);
    border: 1px solid var(--na-line-color);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 꽝 아이템은 꽉 차게 */
.reward-item.fail {
    grid-column: span 2; /* 2칸 차지 */
    justify-content: center;
    background-color: rgba(125, 125, 125, 0.05);
    color: var(--na-menu-color);
}

/* 남은 수량 뱃지 */
.cnt-badge {
    background: var(--bs-primary, #0d6efd);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    margin-right: 5px;
}
.cnt-badge.zero {
    background: #999;
    text-decoration: line-through;
    opacity: 0.6;
}

/* 참가비 안내 */
.entry-fee {
    font-size: 0.9rem;
    color: var(--na-menu-color);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--na-line-color);
}
.entry-fee strong {
    color: var(--bs-body-color);
}