/* 로또 추천번호 페이지 반응형 스타일 */

/* 전체 페이지 오버플로우 방지 */
body {
    overflow-x: hidden;
}

#layout-wrapper {
    overflow-x: hidden;
}

/* 로또 번호 스타일 - recommendation.css에서 lotto-number-badge-large 사용 */
.lotto-number {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0.25rem;
}

/* recommendation.css에서 lotto-number-badge-large 스타일 추가 */
.lotto-number-badge-large {
    width: 2.5rem !important;
    height: 2.5rem !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 1.375rem !important;
    flex-shrink: 0 !important;
    min-width: 2.5rem !important;
    min-height: 2.5rem !important;
    max-width: 2.5rem !important;
    max-height: 2.5rem !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    border: none !important;
    text-align: center !important;
    vertical-align: middle !important;
}

/* 모바일에서 번호 배지 크기 조정 (한 줄에 맞게) */
@media (max-width: 767.98px) {
    .lotto-number-badge-large {
        width: 2.2rem !important;
        height: 2.2rem !important;
        font-size: 1.1rem !important;
        min-width: 2.2rem !important;
        min-height: 2.2rem !important;
        max-width: 2.2rem !important;
        max-height: 2.2rem !important;
    }
    
    .lotto-number-container {
        gap: 0.4rem !important;
    }
}

@media (max-width: 480px) {
    .lotto-number-badge-large {
        width: 2rem !important;
        height: 2rem !important;
        font-size: 1rem !important;
        min-width: 2rem !important;
        min-height: 2rem !important;
        max-width: 2rem !important;
        max-height: 2rem !important;
    }
    
    .lotto-number-container {
        gap: 0.3rem !important;
    }
}

@media (max-width: 360px) {
    .lotto-number-badge-large {
        width: 1.8rem !important;
        height: 1.8rem !important;
        font-size: 0.9rem !important;
        min-width: 1.8rem !important;
        min-height: 1.8rem !important;
        max-width: 1.8rem !important;
        max-height: 1.8rem !important;
    }
    
    .lotto-number-container {
        gap: 0.25rem !important;
    }
}

/* 로또 번호를 가로 배열 */
.d-flex.gap-1.flex-wrap {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem !important;
    flex-wrap: wrap;
}

.d-flex.gap-1.flex-wrap .lotto-number {
    margin: 0.1rem;
}

/* 통계 카드 텍스트 색상 */
.card.bg-primary *,
.card.bg-success *,
.card.bg-info * {
    color: white !important;
}

.card.bg-primary .card-title,
.card.bg-success .card-title,
.card.bg-info .card-title {
    color: white !important;
}

.card.bg-primary h4,
.card.bg-success h4,
.card.bg-info h4 {
    color: white !important;
}

.card.bg-primary h6,
.card.bg-success h6,
.card.bg-info h6 {
    color: white !important;
}

/* 로또 번호 카드 간격 조정 */
.card.border-primary {
    margin-bottom: 1rem;
}

/* 추천번호 컨테이너 패딩 제거 */
#defaultRecommendations .row {
    margin-left: 0;
    margin-right: 0;
}

/* 5개일 때 완전히 꽉 차게 */
#defaultRecommendations .row.five-items {
    display: flex;
    justify-content: space-between;
}

#defaultRecommendations .row.five-items .col-xl-2 {
    flex: 1;
    max-width: calc(20% - 0.5rem);
}

#defaultRecommendations .col-xl-2,
#defaultRecommendations .col-lg-3,
#defaultRecommendations .col-md-4,
#defaultRecommendations .col-sm-6,
#defaultRecommendations .col-12 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

/* 로또 번호 카드 내부 패딩 조정 */
#defaultRecommendations .card-body {
    padding: 1.5rem 1rem !important;
}

/* 모바일에서 카드 패딩 조정 */
@media (max-width: 767.98px) {
    #defaultRecommendations .card-body {
        padding: 1.25rem 0.75rem !important;
    }
}

@media (max-width: 576px) {
    #defaultRecommendations .card-body {
        padding: 1rem 0.5rem !important;
    }
}

/* 로또 번호 간격 조정 */
#defaultRecommendations .d-flex.gap-1 {
    gap: 0.25rem !important;
}

/* 모바일에서 로또 번호 크기 조정 */
@media (max-width: 576px) {
    .lotto-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
        margin: 0.2rem;
    }
}

/* 카드 패딩 조정 */
.card-body {
    padding: 1.5rem 1rem !important;
}

@media (max-width: 768px) {
    .card-body {
        padding: 1.25rem 0.75rem !important;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1rem 0.5rem !important;
    }
}

/* 버튼 그룹 반응형 */
.btn-group .btn-sm {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
    min-width: 40px;
}

.btn-group .btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
}

@media (max-width: 576px) {
    .btn-group .btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .btn-group .btn-sm {
        padding: 0.25rem 0.375rem;
        font-size: 0.75rem;
        min-width: 35px;
    }
}

/* 헤더 반응형 */
@media (max-width: 768px) {
    .page-header {
        padding: 1rem 0;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}

/* 통계 카드 반응형 */
@media (max-width: 768px) {
    .card-body h4 {
        font-size: 1.25rem;
    }
    
    .card-body h6 {
        font-size: 0.875rem;
    }
}

/* 생성 컨트롤 반응형 */
.d-flex.justify-content-md-end {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center !important;
    gap: 1rem;
    height: 100%;
    padding: 1rem 0;
}

/* 카드 헤더 수직 수평 정가운데 정렬 */
.card-header {
    padding: 0 !important;
}

.card-header .row {
    align-items: center;
    min-height: 60px;
    margin: 0;
    padding: 1rem;
}

/* 카드 헤더 중앙 정렬 */
.card-header.text-center {
    padding: 10px !important;
}

/* 개수 텍스트 스타일 */
.card-header .text-muted {
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    margin-right: 0.5rem;
}

/* 버튼 그룹 스타일 */
.card-header .btn-group {
    white-space: nowrap;
}

.card-header .btn-group .btn {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
}

.card-header .btn-group #countDisplay {
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 60px;
}

/* 생성 버튼 스타일 */
.card-header .btn-warning {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    white-space: nowrap;
}

.d-flex.justify-content-md-end .btn-group {
    flex-shrink: 0;
}

.d-flex.justify-content-md-end .btn {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .d-flex.justify-content-md-end {
        flex-direction: column;
        align-items: center !important;
        gap: 0.75rem;
        padding: 0.75rem 0;
    }
    
    .d-flex.justify-content-md-end > div {
        margin-bottom: 0;
        margin-right: 0 !important;
    }
    
    .d-flex.justify-content-md-end .btn {
        width: auto;
        min-width: 120px;
    }
    
    /* 모바일에서 카드 헤더 조정 */
    .card-header.text-center {
        padding: 10px !important;
    }
    
    .card-header .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.75rem !important;
    }
    
    .card-header .text-muted {
        font-size: 1rem;
    }
    
    .card-header .btn-group #countDisplay {
        font-size: 1.1rem;
        min-width: 50px;
    }
    
    .card-header .btn-warning {
        font-size: 1rem;
        padding: 0.5rem 1.2rem;
    }
}

/* 로딩 스피너 반응형 */
@media (max-width: 576px) {
    .spinner-border {
        width: 2rem;
        height: 2rem;
    }
}

/* 알림 박스 반응형 */
@media (max-width: 576px) {
    .alert {
        font-size: 0.875rem;
        padding: 0.75rem;
    }
}

/* 그리드 간격 조정 */
.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-md-4 {
    margin-bottom: 1.5rem !important;
}

@media (max-width: 576px) {
    .mb-3 {
        margin-bottom: 0.75rem !important;
    }
    
    .mb-md-4 {
        margin-bottom: 1rem !important;
    }
}

/* 카드 높이 통일 */
.card.h-100 {
    min-height: 120px;
}

@media (max-width: 576px) {
    .card.h-100 {
        min-height: auto;
    }
    
    #defaultRecommendations .card {
        margin-bottom: 0.75rem;
    }
}

/* 번호 배지 간격 조정 */
.d-flex.gap-1 {
    gap: 0.25rem !important;
}

@media (max-width: 576px) {
    .d-flex.gap-1 {
        gap: 0.125rem !important;
    }
}

/* 텍스트 크기 조정 */
@media (max-width: 576px) {
    .text-muted small {
        font-size: 0.75rem;
    }
}

/* 버튼 크기 조정 */
@media (max-width: 576px) {
    .btn-warning {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* 카드 테두리 조정 */
@media (max-width: 576px) {
    .card {
        border-width: 1px;
    }
}

/* Footer 스타일 */
.footer {
    margin-top: auto;
    background-color: #f8f9fa !important;
    border-top: 1px solid #dee2e6 !important;
    position: sticky;
    bottom: 0;
    z-index: 10;
    padding: 1rem 0 !important;
    margin-left: 0 !important; /* 좌측 마진 제거 */
    margin-right: 0 !important; /* 우측 마진 제거 */
}

.footer .container {
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Footer 컨테이너 너비 설정 - 메인과 동일 */
@media (min-width: 1200px) {
    .footer .container {
        max-width: 1400px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .footer .container {
        max-width: 1200px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .footer .container {
        max-width: 1000px;
    }
}

@media (max-width: 767px) {
    .footer .container {
        max-width: 100%;
        padding: 0 1rem;
    }
}

/* 레이아웃 조정 */
#layout-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-main {
    flex: 1;
    padding-bottom: 0;
}

/* 전체 컨테이너 조정 */
.container {
    margin: 0 auto;
    padding: 0 2rem;
}

/* PC 버전 컨테이너 너비 */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 1200px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 1000px;
    }
}

/* 메인 콘텐츠 패딩 */
.app-main {
    padding: 0 0 2rem 0;
}

/* 페이지 헤더 패딩 */
.page-header {
    padding: 1.5rem 0;
    margin-bottom: 1rem;
}

/* 카드 섹션 패딩 */
.card {
    margin-bottom: 1.5rem;
}

/* 통계 카드 섹션 */
.row.mb-4 {
    margin-bottom: 2rem !important;
}

/* 모바일 버전 컨테이너 너비 */
@media (max-width: 767px) {
    .container {
        max-width: 100%;
        padding: 0 1rem;
    }
}

/* 모바일 패딩 조정 */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .app-main {
        padding: 1.5rem 0;
    }
    
    .page-header {
        padding: 1rem 0;
        margin-bottom: 0.75rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .row.mb-4 {
        margin-bottom: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .app-main {
        padding: 1rem 0;
    }
    
    .page-header {
        padding: 0.75rem 0;
    }
}

/* Footer 반응형 */
@media (max-width: 768px) {
    .footer {
        padding: 1rem 0 !important;
    }
    
    .footer .container {
        padding: 0 1rem;
    }
}