/* 파일명: theme-v2.css | 위치: /p/lotto/assets/css/ | 기능: 기존 번호·통계 컴포넌트와 새 테마 결합 | 작성일: 2026-09-21 */
@layer lotto-theme, lotto-bootstrap, lotto-legacy;
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css') layer(lotto-bootstrap);
@layer lotto-theme {
    .hv2-page :where(.shadow-sm, .shadow, .shadow-lg) { box-shadow: none !important; }
}
@layer lotto-legacy {
/*
 * 파일명: style.css
 * 위치: /p/lotto/assets/css/
 * 수정일: 2026-01-04
 * 
 * PageSpeed 최적화:
 * - CLS(Cumulative Layout Shift) 방지
 * - 동적 컨텐츠 영역 최소 높이 지정
 */

/* ==========================================
   CLS 방지 스타일 (최우선 적용)
   ========================================== */

/* 메인 레이아웃 컨테이너 */
main.flex-grow-1.py-4 {
    min-height: 600px;
}

/* 히어로 섹션 */
.hero-header {
    min-height: 200px;
}

.hero-header.hero-compact {
    min-height: 180px;
}

/* 카드 컴포넌트 */
.card.shadow-sm {
    min-height: 100px;
}

/* 로또 번호 표시 영역 */
.lotto-preview,
#lottoNumbers {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 번호 히스토리 */
.number-history,
#numberHistory {
    min-height: 100px;
}

/* 실시간 로그 */
.public-log,
#publicLog {
    min-height: 200px;
}

/* 검색 결과 */
.search-results,
#searchResults {
    min-height: 50px;
}

/* 당첨 정보 섹션 */
#currentLottoInfo {
    min-height: 120px;
}

/* 주간 통계 */
#weeklyRankStats {
    min-height: 150px;
}

/* 다가올 추첨 통계 */
#upcomingDrawStats {
    min-height: 200px;
}

/* 통계 컨텐츠 */
#statsContent {
    min-height: 100px;
}

/* 로또 볼 크기 고정 (레이아웃 이동 방지) */
.lotto-ball,
.ball,
.number-ball {
    width: 45px;
    height: 45px;
    min-width: 45px;
    min-height: 45px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 플로팅 볼 (히어로 섹션) */
.floating-ball {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
}

/* 테이블 컨테이너 */
.table-responsive {
    min-height: 50px;
}

/* 아코디언 아이템 */
.accordion-item {
    min-height: 48px;
}

/* 인사이트 카드 */
.insight-card {
    min-height: 200px;
}


/* ===================================
 * CSS 변수 및 전역 스타일
 * =================================== */

/* CSS 변수 정의 */
:root {
    /* 기본 색상 - 카키/올리브 그린 계열 */
    --primary-color: #6B7C3E;
    --primary-color-light: #8A9E54;
    --primary-color-dark: #4A5A28;
    --secondary-color: #2C3320;
    --light-bg: #F4F1E8;
    --card-shadow: 0 1px 6px rgba(0,0,0,0.06);
    --transition-speed: 0.3s;
    --gradient-start: #6B7C3E;
    --gradient-end: #4A5A28;
    
    /* 로또볼 색상 */
    --lotto-gold: #fbc400;
    --lotto-blue: #69c8f2;
    --lotto-red: #ff7272;
    --lotto-gray: #aaa;
    --lotto-green: #b0d840;
    
    /* 볼 사이즈 변수 */
    --main-ball-size: 60px;
    --main-ball-font: 24px;
    --medium-ball-size: 48px;
    --medium-ball-font: 20px;
    --small-ball-size: 36px;
    --small-ball-font: 16px;
    --mini-ball-size: 32px;
    --mini-ball-font: 14px;
    --micro-ball-size: 28px;
    --micro-ball-font: 13px;
    --tiny-ball-size: 24px;
    --tiny-ball-font: 12px;
}

/* 기본 스타일 */
body {
    font-family: 'Noto Sans KR', 'Malgun Gothic', '맑은 고딕', 'Apple SD Gothic Neo', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #F4F1E8;
    color: var(--secondary-color);
    line-height: 1.6;
}

main {
    flex: 1;
}


/* ===================================
 * 로또볼 사이즈별 클래스
 * =================================== */

/* 메인 볼 (60px) - 번호 생성 결과용 */
.lotto-ball {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: all 0.2s ease-in-out;
    position: relative;
    flex-shrink: 0;
    flex-grow: 0;
    margin: 2px;
    width: var(--main-ball-size);
    height: var(--main-ball-size);
    font-size: var(--main-ball-font);
    margin: 0 8px;
}

/* 미디움 볼 (48px) - 히스토리용 */
.lotto-medium-ball {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: all 0.2s ease-in-out;
    position: relative;
    flex-shrink: 0;
    flex-grow: 0;
    margin: 2px;
    width: var(--medium-ball-size);
    height: var(--medium-ball-size);
    min-width: var(--medium-ball-size);
    min-height: var(--medium-ball-size);
    font-size: var(--medium-ball-font);
}

/* 스몰 볼 (36px) - 검색 결과용 */
.lotto-small-ball {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: all 0.2s ease-in-out;
    position: relative;
    flex-shrink: 0;
    flex-grow: 0;
    margin: 2px;
    width: var(--small-ball-size);
    height: var(--small-ball-size);
    min-width: var(--small-ball-size);
    min-height: var(--small-ball-size);
    font-size: var(--small-ball-font);
}

/* 미니 볼 (32px) - 공개 로그용 */
.lotto-mini-ball {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: all 0.2s ease-in-out;
    position: relative;
    flex-shrink: 0;
    flex-grow: 0;
    margin: 2px;
    width: var(--mini-ball-size);
    height: var(--mini-ball-size);
    min-width: var(--mini-ball-size);
    min-height: var(--mini-ball-size);
    font-size: var(--mini-ball-font);
}

/* 마이크로 볼 (28px) - 추첨 통계용 */
.lotto-micro-ball {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: all 0.2s ease-in-out;
    position: relative;
    flex-shrink: 0;
    flex-grow: 0;
    margin: 1px;
    width: var(--micro-ball-size);
    height: var(--micro-ball-size);
    min-width: var(--micro-ball-size);
    min-height: var(--micro-ball-size);
    font-size: var(--micro-ball-font);
}

/* 타이니 볼 (24px) - 최소 사이즈 */
.lotto-tiny-ball {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: all 0.2s ease-in-out;
    position: relative;
    flex-shrink: 0;
    flex-grow: 0;
    margin: 1px;
    width: var(--tiny-ball-size);
    height: var(--tiny-ball-size);
    min-width: var(--tiny-ball-size);
    min-height: var(--tiny-ball-size);
    font-size: var(--tiny-ball-font);
}

/* 공통 하이라이트 효과 */
.lotto-ball::before,
.lotto-medium-ball::before,
.lotto-small-ball::before,
.lotto-mini-ball::before,
.lotto-micro-ball::before,
.lotto-tiny-ball::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 25%;
    width: 25%;
    height: 25%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    border-radius: 50%;
}

/* 공통 호버 효과 */
.lotto-ball:hover,
.lotto-medium-ball:hover,
.lotto-small-ball:hover,
.lotto-mini-ball:hover,
.lotto-micro-ball:hover,
.lotto-tiny-ball:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ===================================
 * 로또볼 색상 시스템
 * =================================== */

/* 번호별 색상 (모든 볼 사이즈에 적용) */
.number-1-10 { 
    background: linear-gradient(135deg, var(--lotto-gold) 0%, #ffcd3c 100%); 
}

.number-11-20 { 
    background: linear-gradient(135deg, var(--lotto-blue) 0%, #4fa8d8 100%); 
}

.number-21-30 { 
    background: linear-gradient(135deg, var(--lotto-red) 0%, #ff5252 100%); 
}

.number-31-40 { 
    background: linear-gradient(135deg, var(--lotto-gray) 0%, #9e9e9e 100%); 
}

.number-41-45 { 
    background: linear-gradient(135deg, var(--lotto-green) 0%, #8bc34a 100%); 
}

/* 보너스 볼 스타일 */
.bonus {
    border: 3px solid #ffd700 ;
    box-shadow: 0 3px 8px rgba(255,215,0,0.4) ;
}

/* ===================================
 * 특수 효과 및 상태
 * =================================== */

/* 당첨 번호 하이라이트 */
.winning-number {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%) ;
    border: 2px solid #ff6b6b ;
    animation: winningPulse 1.5s ease-in-out infinite;
    position: relative;
}

.winning-number::after {
    content: '✨';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 10px;
    animation: sparkle 1s ease-in-out infinite;
}

@keyframes winningPulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    }
    50% { 
        transform: scale(1.1); 
        box-shadow: 0 0 16px rgba(255, 215, 0, 0.8);
    }
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: rotate(0deg); }
    50% { opacity: 1; transform: rotate(180deg); }
}

/* 매칭 하이라이트 */
.matching-highlight {
    background: linear-gradient(135deg, #28a745, #20c997) ;
    box-shadow: 0 0 12px rgba(40, 167, 69, 0.6) ;
    animation: matchPulse 1.5s ease-in-out infinite;
}

@keyframes matchPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 번호 변경 애니메이션 */
.number-changing {
    animation: numberFlip 0.6s ease-in-out;
}

@keyframes numberFlip {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(90deg); }
    100% { transform: rotateY(0deg); }
}

/* ===================================
 * 모바일 반응형 로또볼
 * =================================== */

/* 태블릿 (768px 이하) */
@media (max-width: 768px) {
    :root {
        --main-ball-size: 50px;
        --main-ball-font: 20px;
        --medium-ball-size: 40px;
        --medium-ball-font: 18px;
        --small-ball-size: 32px;
        --small-ball-font: 14px;
        --mini-ball-size: 28px;
        --mini-ball-font: 13px;
        --micro-ball-size: 26px;
        --micro-ball-font: 12px;
        --tiny-ball-size: 22px;
        --tiny-ball-font: 11px;
    }

    .lotto-ball {
        margin: 0 4px;
    }

    /* 생성 영역은 gap 기준으로만 간격 적용 (오버플로우 방지) */
    .lotto-preview {
        gap: 6px;
    }
    .lotto-preview .lotto-ball {
        margin: 0;
    }
}

/* 모바일 (480px 이하) */
@media (max-width: 480px) {
    :root {
        --main-ball-size: 45px;
        --main-ball-font: 18px;
        --medium-ball-size: 36px;
        --medium-ball-font: 16px;
        --small-ball-size: 30px;
        --small-ball-font: 13px;
        --mini-ball-size: 26px;
        --mini-ball-font: 12px;
        --micro-ball-size: 24px;
        --micro-ball-font: 11px;
        --tiny-ball-size: 20px;
        --tiny-ball-font: 10px;
    }

    .lotto-ball {
        margin: 0 2px;
    }

    .lotto-preview {
        gap: 4px;
    }
}

/* 초소형 모바일 (360px 이하) */
@media (max-width: 360px) {
    :root {
        --main-ball-size: 40px;
        --main-ball-font: 16px;
        --medium-ball-size: 32px;
        --medium-ball-font: 14px;
        --small-ball-size: 28px;
        --small-ball-font: 12px;
        --mini-ball-size: 24px;
        --mini-ball-font: 11px;
        --micro-ball-size: 22px;
        --micro-ball-font: 10px;
        --tiny-ball-size: 18px;
        --tiny-ball-font: 9px;
    }

    .lotto-preview {
        gap: 3px;
    }
}

/* ===================================
 * 히스토리 전용 스타일
 * =================================== */

/* 히스토리 로또볼 (미디움 사이즈 사용) */
.history-lotto-ball {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: all 0.2s ease-in-out;
    position: relative;
    flex-shrink: 0;
    flex-grow: 0;
    margin: 2px;
    width: var(--medium-ball-size);
    height: var(--medium-ball-size);
    min-width: var(--medium-ball-size);
    min-height: var(--medium-ball-size);
    font-size: var(--medium-ball-font);
}

.history-lotto-ball::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 25%;
    width: 25%;
    height: 25%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    border-radius: 50%;
}

.history-lotto-ball:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.history-lotto-ball.matching {
    border: 2px solid #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.4);
}

/* ===================================
 * 당첨 상세 모달 전용 스타일
 * =================================== */

/* 당첨자 상세 모달의 번호 배지 */
.number-badge {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: all 0.2s ease-in-out;
    position: relative;
    flex-shrink: 0;
    flex-grow: 0;
    margin: 2px;
    width: var(--small-ball-size);
    height: var(--small-ball-size);
    min-width: var(--small-ball-size);
    min-height: var(--small-ball-size);
    font-size: var(--small-ball-font);
    background-color: #6c757d;
}

.number-badge::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 25%;
    width: 25%;
    height: 25%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    border-radius: 50%;
}

.number-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.number-badge.matched {
    background-color: #28a745 ;
    border: 2px solid #20c997;
}

.number-badge.bonus-matched {
    background-color: #fd7e14 ;
    border: 2px solid #ffc107;
}

/* ===================================
 * 이번 주 추첨 통계 전용 스타일
 * =================================== */

/* 추첨 통계 미니 볼 (마이크로 사이즈 사용) */
.upcoming-mini-ball {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: all 0.2s ease-in-out;
    position: relative;
    flex-shrink: 0;
    flex-grow: 0;
    margin: 1px;
    width: var(--micro-ball-size);
    height: var(--micro-ball-size);
    min-width: var(--micro-ball-size);
    min-height: var(--micro-ball-size);
    font-size: var(--micro-ball-font);
}

.upcoming-mini-ball::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 25%;
    width: 25%;
    height: 25%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    border-radius: 50%;
}

.upcoming-mini-ball:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* 추첨 통계 번호별 색상 (기존과 동일하되 클래스명 변경) */
.upcoming-mini-ball.upcoming-1-10 {
    background: linear-gradient(135deg, #fbc400 0%, #ffcd3c 100%);
}

.upcoming-mini-ball.upcoming-11-20 {
    background: linear-gradient(135deg, #69c8f2 0%, #4fa8d8 100%);
}

.upcoming-mini-ball.upcoming-21-30 {
    background: linear-gradient(135deg, #ff7272 0%, #ff5252 100%);
}

.upcoming-mini-ball.upcoming-31-40 {
    background: linear-gradient(135deg, #aaa 0%, #9e9e9e 100%);
}

.upcoming-mini-ball.upcoming-41-45 {
    background: linear-gradient(135deg, #b0d840 0%, #8bc34a 100%);
}

/* 미선택 번호 투명도 */
.upcoming-mini-ball.upcoming-unselected {
    opacity: 0.4;
    filter: grayscale(50%);
}

/* 빈도수 표시 배지 */
.frequency-badge {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    margin-top: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    white-space: nowrap;
}

.frequency-badge.popular {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    animation: popularBadgePulse 2s ease-in-out infinite;
}

.frequency-badge.unpopular {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
}

@keyframes popularBadgePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(0.95); }
}

/* ===================================
 * 헤더 스타일
 * =================================== */

/* 히어로 헤더 */
.hero-header {
    background: linear-gradient(135deg, #3D4A22 0%, #6B7C3E 100%);
    min-height: 60vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* 컴팩트 버전 기본 설정 */
.hero-header.hero-compact {
    min-height: auto;
    padding: 1.25rem 0;
}

.hero-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(180, 200, 100, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(140, 160, 80, 0.12) 0%, transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite;
}

@keyframes backgroundMove {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-20px) translateY(-10px); }
    50% { transform: translateX(20px) translateY(10px); }
    75% { transform: translateX(-10px) translateY(20px); }
}

/* 히어로 컨텐츠 */
.hero-content {
    color: white;
    z-index: 2;
    position: relative;
}

.hero-compact .hero-content {
    padding: 0.5rem 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.18);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-compact .hero-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.85rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-compact .hero-title {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.hero-compact .hero-subtitle {
    font-size: 1rem;
    margin-top: 0.25rem;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 500px;
}

.hero-compact .hero-description {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

/* 히어로 통계 */
.hero-stats {
    margin-top: 2rem;
}

.hero-compact .hero-stats {
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-compact .stat-item {
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffd700;
}

.hero-compact .stat-number {
    font-size: 1.25rem;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.hero-compact .stat-label {
    font-size: 0.7rem;
    margin-top: 0.15rem;
}

/* 히어로 비주얼 */
.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual-compact {
    height: 280px;
    transform: scale(0.8);
    transform-origin: center center;
}

.hero-icon {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.1);
    position: absolute;
    z-index: 1;
}

.hero-visual-compact .hero-icon {
    font-size: 5rem;
}

/* 플로팅 볼 애니메이션 */
.floating-numbers {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-ball {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    animation: float 6s ease-in-out infinite;
}

.hero-visual-compact .floating-ball {
    width: 45px;
    height: 45px;
    font-size: 14px;
}

.ball-1 { 
    background: linear-gradient(135deg, #fbc400 0%, #ffcd3c 100%);
    top: 10%; left: 20%;
    animation-delay: 0s;
}

.ball-2 { 
    background: linear-gradient(135deg, #69c8f2 0%, #4fa8d8 100%);
    top: 25%; right: 15%;
    animation-delay: 1s;
}

.ball-3 { 
    background: linear-gradient(135deg, #ff7272 0%, #ff5252 100%);
    top: 50%; left: 10%;
    animation-delay: 2s;
}

.ball-4 { 
    background: linear-gradient(135deg, #aaa 0%, #9e9e9e 100%);
    top: 70%; right: 25%;
    animation-delay: 3s;
}

.ball-5 { 
    background: linear-gradient(135deg, #b0d840 0%, #8bc34a 100%);
    bottom: 20%; left: 30%;
    animation-delay: 4s;
}

.ball-6 {
    background: linear-gradient(135deg, #8A9E54 0%, #6B7C3E 100%);
    bottom: 10%; right: 10%;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(90deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
    75% { transform: translateY(-15px) rotate(270deg); }
}

/* ===================================
 * 반응형 헤더
 * =================================== */

/* 태블릿 (768px ~ 991px) */
@media (max-width: 991.98px) {
    .hero-header {
        min-height: 70vh;
        text-align: center;
    }
    
    .hero-header.hero-compact {
        min-height: auto;
        padding: 2rem 0;
        text-align: left;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-compact .hero-title {
        font-size: 1.85rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-compact .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-visual {
        height: 300px;
        margin-top: 2rem;
    }
    
    .hero-icon {
        font-size: 6rem;
    }
    
    .floating-ball {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
}

/* 모바일 (767px 이하) */
@media (max-width: 767.98px) {
    .hero-header.hero-compact {
        padding: 1.5rem 0;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-compact .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-compact .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-compact .hero-badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.7rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .hero-compact .stat-item {
        padding: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .hero-compact .stat-number {
        font-size: 1.1rem;
    }
    
    .hero-compact .stat-label {
        font-size: 0.65rem;
    }
}

/* ===================================
 * 카드 스타일
 * =================================== */

/* 카드 컨테이너 */
.card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* 카드 바디 */
.card-body {
    padding: 2rem;
}

/* ===================================
 * 동적 번호 애니메이션
 * =================================== */

/* 초기 로딩 애니메이션 */
.lotto-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 1rem 0;
    min-height: 80px;
}

.lotto-preview .lotto-ball {
    animation: floatNumbers 2s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.1s);
}

@keyframes floatNumbers {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* 번호 생성 애니메이션 */
.lotto-current .lotto-ball {
    opacity: 0;
    transform: scale(0);
    animation: ballPop 0.6s ease forwards;
}

@keyframes ballPop {
    0% { opacity: 0; transform: scale(0) rotate(180deg); }
    60% { transform: scale(1.2) rotate(360deg); }
    100% { opacity: 1; transform: scale(1) rotate(360deg); }
}

/* 각 볼의 애니메이션 딜레이 */
.lotto-current .lotto-ball:nth-child(1) { animation-delay: 0.1s; }
.lotto-current .lotto-ball:nth-child(2) { animation-delay: 0.2s; }
.lotto-current .lotto-ball:nth-child(3) { animation-delay: 0.3s; }
.lotto-current .lotto-ball:nth-child(4) { animation-delay: 0.4s; }
.lotto-current .lotto-ball:nth-child(5) { animation-delay: 0.5s; }
.lotto-current .lotto-ball:nth-child(6) { animation-delay: 0.6s; }

/* ===================================
 * 버튼 스타일
 * =================================== */

/* 기본 버튼 */
.btn-primary {
    background: var(--primary-color);
    border: none;
    color: white;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.2rem;
    transition: background 0.2s ease;
    box-shadow: 0 2px 8px rgba(107, 124, 62, 0.25);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-color-dark);
    color: white;
}

.btn-primary:active {
    background: var(--primary-color-dark);
}

/* 보조 버튼 */
.btn-outline-danger {
    border: 2px solid #dc3545;
    color: #dc3545;
    background: transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* ===================================
 * 매칭 섹션 스타일
 * =================================== */

/* 번호 매칭 섹션 */
.number-match-section {
    display: flex;
    align-items: center;
    margin-top: 20px;
    padding: 20px;
    background: rgba(107, 124, 62, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(107, 124, 62, 0.12);
}

/* 매칭된 번호 강조 */
.matching-numbers {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(107, 124, 62, 0.08);
    border-radius: 8px;
    margin: 0 15px;
    border: 2px solid var(--primary-color);
}

/* 매칭 정보 */
.match-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    text-align: center;
    min-width: 120px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.match-info:hover {
    background: rgba(107, 124, 62, 0.08);
}

/* ===================================
 * 히스토리 섹션 스타일
 * =================================== */

/* 히스토리 아이템 */
.number-history-item {
    padding: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    animation: slideIn 0.5s ease forwards;
    background: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.number-history-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(5px);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 히스토리 헤더 */
.history-header {
    margin-bottom: 12px;
}

.history-first-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.history-separator {
    color: #6c757d;
    font-weight: normal;
    font-size: 0.9rem;
}

.history-second-line {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.history-second-line .btn-link {
    font-size: 0.85rem;
    text-decoration: none;
    padding: 0;
}

.history-second-line .btn-link:hover {
    text-decoration: underline;
}

/* 히스토리 번호 컨테이너 */
.history-numbers-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

/* ===================================
 * 통계 섹션 스타일
 * =================================== */

/* 통계 배지 */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    margin: 0.25rem;
    transition: all 0.3s ease;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%) ;
}

/* ===================================
 * FAQ 섹션 스타일
 * =================================== */

/* FAQ 아코디언 */
.accordion-button {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 12px ;
    font-weight: 600;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    color: white;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(16, 163, 127, 0.25);
}

/* ===================================
 * 관련 자료 섹션 스타일
 * =================================== */

/* 관련 자료 컨테이너 */
.related-content-section {
    background: linear-gradient(135deg, #3D4A22 0%, #5A6B35 100%);
    padding: 3rem 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.related-content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M20 20c0-11.046-8.954-20-20-20v40c11.046 0 20-8.954 20-20z'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

/* 관련 자료 카드 */
.insight-card {
    background: #fff;
    color: var(--secondary-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.insight-card:hover {
    background: #fafaf6;
}

/* ===================================
 * 플로팅 버튼 스타일
 * =================================== */

/* 플로팅 버튼 컨테이너 */
.floating-buttons {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

/* 플로팅 버튼 */
.floating-button {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #495057 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.floating-button:hover {
    transform: translateX(-8px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.scroll-top-button {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.share-button {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

/* ===================================
 * 푸터 스타일
 * =================================== */

/* 푸터 컨테이너 */
footer {
    background: #2C3320;
    color: white;
    padding: 1.5rem 0;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

/* ===================================
 * 공개 로그 스타일
 * =================================== */

/* 공개 로그 컨테이너 */
.public-log {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    background: #f8f9fa;
}

/* 로그 아이템 기본 스타일 */
.log-item {
    background: white;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(0,0,0,0.07);
    animation: slideInLog 0.5s ease forwards;
}

.log-item:hover {
    background: #f9f8f4;
}


/* 첫 번째 줄: 사용자명, 시간, 당첨 정보 */
.log-first-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

/* 당첨 배지 */
.log-first-line .badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 4px;
}

/* 두 번째 줄: 번호들 */
.log-second-line {
    display: flex;
    justify-content: center;
}


@keyframes winningGlow {
    0%, 100% { 
        box-shadow: 0 0 8px rgba(255, 193, 7, 0.4);
    }
    50% { 
        box-shadow: 0 0 12px rgba(255, 193, 7, 0.7);
    }
}


@keyframes slideInLog {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 로그 헤더 */
.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* 색상 대비 개선 (접근성) */
.user-initial {
    color: #1a1a1a; /* 어두운 색으로 변경 */
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2px 8px;
    border-radius: 4px;
}

.log-item .user-initial {
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.7);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 로그 번호 표시 */
.log-numbers {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 당첨 아이템 스타일 */
.log-item.winning-item {
    background: linear-gradient(135deg, #fff3cd 0%, #ffffff 100%);
    border-left-color: #ffc107;
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.2);
}

.log-item.winning-item:hover {
    transform: translateX(5px) scale(1.01);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

/* 당첨 번호 하이라이트 */
.log-numbers .winning-number {
    border: 2px solid #ffc107;
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.4);
    animation: winningGlow 1.5s ease-in-out infinite;
}

/* 당첨 정보 섹션 */
.winning-info {
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 193, 7, 0.2);
}


/* 태블릿 반응형 (768px 이하) */
@media (max-width: 768px) {
    .log-item {
        padding: 8px 10px;
        margin-bottom: 6px;
    }
    
    .log-first-line {
        margin-bottom: 5px;
        font-size: 0.8rem;
    }
    
    .user-initial {
        font-size: 0.75rem;
        padding: 1px 5px;
    }
    
    .log-time {
        font-size: 0.7rem;
    }
    
    .log-first-line .badge {
        font-size: 0.65rem;
        padding: 1px 4px;
    }
    
    .log-numbers {
        gap: 2px;
    }
}

/* 모바일 반응형 (480px 이하) */
@media (max-width: 480px) {
    .log-item {
        padding: 6px 8px;
        margin-bottom: 5px;
    }
    
    .log-first-line {
        margin-bottom: 4px;
        font-size: 0.75rem;
    }
    
    .user-initial {
        font-size: 0.7rem;
        padding: 1px 4px;
    }
    
    .log-time {
        font-size: 0.65rem;
    }
    
    .log-first-line .badge {
        font-size: 0.6rem;
        padding: 1px 3px;
        margin-left: 2px;
    }
    
    .log-numbers {
        gap: 1px;
    }
    
    /* 작은 화면에서 시간과 당첨 정보가 길 경우 줄바꿈 */
    .log-first-line {
        flex-wrap: wrap;
        gap: 4px;
    }
}

/* 초소형 모바일 (360px 이하) */
@media (max-width: 360px) {
    .log-first-line {
        font-size: 0.7rem;
    }
    
    .user-initial {
        font-size: 0.65rem;
    }
    
    .log-time {
        font-size: 0.6rem;
    }
    
    .log-first-line .badge {
        font-size: 0.55rem;
    }
}




/* ===================================
 * 당첨번호 섹션 스타일
 * =================================== */

/* 당첨결과 섹션 스타일 */
.winning-results-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid #dee2e6;
}

.round-title h4 {
    color: #dc3545 ;
    font-size: 1.5rem;
}

/* 당첨번호 표시 스타일 */
.winning-numbers-display .numbers-container {
    align-items: flex-start;
}

.winning-group,
.bonus-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.winning-group .numbers-row,
.bonus-group .numbers-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.label-row {
    text-align: center;
}

.label-row small {
    font-size: 0.85rem;
    color: #6c757d;
}

.plus-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 15px;
}

.plus-symbol {
    color: #6c757d;
    font-weight: bold;
    font-size: 1.5rem;
}

/* ===========================
 * 1등 당첨 정보 모바일 반응형 스타일
 * =========================== */
/* 당첨번호 표시 기본 스타일 */
.winning-numbers-display .lotto-ball {
    width: var(--main-ball-size);
    height: var(--main-ball-size);
    font-size: var(--main-ball-font);
    margin: 0 4px;
}


.first-prize-header h6 {
    color: #f39c12 ;
    font-size: 1.1rem;
}

.first-prize-card {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 2px solid #ffc107;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

.prize-left, .prize-right {
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
}

.prize-left {
    border-right: 1px solid #ffc107;
}

.prize-value {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    word-break: keep-all;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    font-variant-numeric: tabular-nums;
    display: block;
    text-align: center;
}

.prize-label {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 호버 효과 */
.first-prize-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;
}

/* 태블릿 반응형 (768px 이하) */
@media (max-width: 768px) {
    .first-prize-header h6 {
        font-size: 1rem;
    }
    
    .first-prize-card {
        border-radius: 12px;
        border-width: 1px;
    }
    
    .winning-numbers-display .lotto-ball {
        width: var(--medium-ball-size);
        height: var(--medium-ball-size);
        min-width: var(--medium-ball-size);
        min-height: var(--medium-ball-size);
        font-size: var(--medium-ball-font);
        margin: 0 3px;
    }
    
    .winning-numbers-display .numbers-row {
        gap: 4px ;
    }
    
    .plus-symbol {
        font-size: 1.2rem ;
    }
	
	.prize-left, .prize-right {
        padding: 1.5rem 1rem;
    }
    
    .prize-left {
        border-right: none;
        border-bottom: 1px solid #ffc107;
    }
    
    .prize-value {
        font-size: 1.8rem;
        margin-bottom: 0.3rem;
        line-height: 1.1;
    }
    
    .prize-label {
        font-size: 0.85rem;
        letter-spacing: 0.3px;
    }
}

/* 모바일 반응형 (480px 이하) */
@media (max-width: 480px) {
    .prize-info-section {
        margin-top: 1.5rem ;
    }
    
    .winning-numbers-display .lotto-ball {
        width: var(--small-ball-size);
        height: var(--small-ball-size);
        min-width: var(--small-ball-size);
        min-height: var(--small-ball-size);
        font-size: var(--small-ball-font);
        margin: 0 2px;
    }
    
    .winning-numbers-display .numbers-row {
        gap: 2px ;
        margin-bottom: 6px ;
    }
    
    .plus-container {
        margin: 0 8px ;
    }
    
    .plus-symbol {
        font-size: 1rem ;
    }
    
    .label-row small {
        font-size: 0.75rem ;
    }
	
	.first-prize-header {
        margin-bottom: 1rem ;
    }
    
    .first-prize-header h6 {
        font-size: 0.95rem;
    }
    
    .first-prize-card {
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(255, 193, 7, 0.15);
    }
    
    .prize-left, .prize-right {
        padding: 1.2rem 0.8rem;
    }
    
    .prize-value {
        font-size: 1.4rem;
        font-weight: 700;
        margin-bottom: 0.25rem;
        line-height: 1.1;
        /* 긴 텍스트 감지 및 크기 조정 */
        container-type: inline-size;
    }
    
    /* 컨테이너 쿼리로 텍스트 길이에 따른 크기 조정 */
    @container (max-width: 200px) {
        .prize-value {
            font-size: 1.2rem;
        }
    }
    
    @container (max-width: 150px) {
        .prize-value {
            font-size: 1.1rem;
        }
    }
    
    .prize-label {
        font-size: 0.8rem;
        letter-spacing: 0.2px;
        color: #495057;
    }

    
    /* 컬럼을 세로로 배치 */
    .first-prize-card .row.g-0 {
        flex-direction: column;
    }
    
    .first-prize-card .col-6 {
        flex: none;
        width: 100%;
    }
    
    .prize-left {
        border-right: none;
        border-bottom: 1px solid #ffc107;
    }
    
    .prize-right {
        border-bottom: none;
    }
}

/* 초소형 모바일 (360px 이하) */
@media (max-width: 360px) {
    .first-prize-header h6 {
        font-size: 0.9rem;
    }
    
    .winning-numbers-display .lotto-ball {
        width: var(--mini-ball-size);
        height: var(--mini-ball-size);
        min-width: var(--mini-ball-size);
        min-height: var(--mini-ball-size);
        font-size: var(--mini-ball-font);
        margin: 0 1px;
    }
    
    .winning-numbers-display .numbers-row {
        gap: 1px ;
    }
    
    .plus-container {
        margin: 0 6px ;
    }
    
    .plus-symbol {
        font-size: 0.9rem ;
    }
    
    .label-row small {
        font-size: 0.7rem ;
    }
	
	.prize-left, .prize-right {
        padding: 1rem 0.6rem;
    }
    
    .prize-value {
        font-size: 1.2rem;
        font-weight: 600;
        line-height: 1.05;
    }
    
    .prize-label {
        font-size: 0.75rem;
    }
    
    /* 아이콘 크기 조정 */
    .first-prize-header .bi-trophy-fill {
        font-size: 0.9rem;
    }
}

/* 세로 배치 시 애니메이션 효과 */
@media (max-width: 480px) {
    .first-prize-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
    }
}

/* 텍스트 길이가 긴 경우 대응 */
.prize-value {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* 한국어 숫자 표시 최적화 */
.prize-value {
    font-variant-numeric: tabular-nums;
}


/* JavaScript 없이 텍스트 길이 감지 대안 방법 */
.prize-value[data-length="long"] {
    font-size: 1.2rem ;
}

.prize-value[data-length="very-long"] {
    font-size: 1.1rem ;
}

/* 특정 길이의 텍스트에 대한 스타일 */
@media (max-width: 480px) {
    /* 10자 이상의 텍스트 */
    .prize-value:where([title*="억"], [title*="조"]) {
        font-size: 1.2rem;
    }
    
    /* 매우 긴 당첨금액 (15자 이상) */
    .prize-value:where([title*="1,000"], [title*="10,000"]) {
        font-size: 1.1rem;
    }
}

/* 반응형 폰트 크기 유틸리티 클래스 */
.prize-value-responsive {
    font-size: clamp(1.1rem, 4vw, 2.2rem);
}

@media (max-width: 480px) {
    .prize-value-responsive {
        font-size: clamp(1rem, 3.5vw, 1.4rem);
    }
}

@media (max-width: 360px) {
    .prize-value-responsive {
        font-size: clamp(0.9rem, 3vw, 1.2rem);
    }
}



/* 당첨금액이 길 경우 폰트 크기 자동 조정 */
@media (max-width: 480px) {
    .prize-value:has-text(길이가 긴 텍스트) {
        font-size: 1.2rem;
    }
}

/* 접근성 개선 */
.first-prize-card:focus-within {
    outline: 2px solid #ffc107;
    outline-offset: 2px;
}

/* ===================================
 * 당첨 통계 카드
 * =================================== */

/* 당첨 통계 카드 */
.winning-stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.winning-stats-card .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #ffd700;
}

.winning-stats-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===================================
 * 당첨자 상세 보기 스타일
 * =================================== */

/* 당첨자 상세 보기 스타일 */
.winner-item {
    transition: background-color 0.2s;
}

.winner-item:hover {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin: -10px;
}

.winner-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* 당첨 하이라이트 */
.winning-highlight {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
    transform: scale(1.05);
}

/* 보너스번호 하이라이트 */
.bonus-highlight {
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.5);
    transform: scale(1.05);
}

/* 보너스볼 스타일 */
.bonus-ball {
    border: 2px solid #ffc107;
    font-weight: bold;
}

/* 일치 정보 스타일 */
.matching-info {
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

/* 명예의 전당 스타일 */
.winner-hall .winner-item {
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.winner-hall .winner-item:hover {
    background-color: #e3f2fd ;
    border-color: #2196f3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
}

.winner-hall .winner-item:hover .text-primary {
    color: #1976d2 ;
}

/* 당첨자 상세 팝업 스타일 */
.winner-profile {
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.winning-details {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

.congratulations {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffeaa7;
}

/* 당첨번호 섹션 스타일 */
.winning-numbers-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

/* ===================================
 * 이번 주 추첨 통계 특수 스타일
 * =================================== */

/* 추첨 통계 카드 그리드 */
.upcoming-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* 추첨 통계 카드 */
.upcoming-stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid rgba(107, 124, 62, 0.12);
}

.upcoming-stat-card:hover {
    background: #f9f8f4;
}

.upcoming-stat-card h3 {
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.upcoming-stat-card p {
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.upcoming-stat-card small {
    color: #6c757d;
    font-size: 0.85rem;
}

/* D-day 배지 특별 스타일 */
.d-day-badge {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) ;
    animation: dDayPulse 2s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

@keyframes dDayPulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
    }
    50% { 
        opacity: 0.9; 
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(0, 123, 255, 0);
    }
}

/* 추첨 완료 배지 */
.draw-complete-badge {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) ;
    animation: drawCompletePulse 3s ease-in-out infinite;
}

@keyframes drawCompletePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* 번호 분석 섹션 */
.number-analysis-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
}

.number-analysis-section h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* 번호 그룹 컨테이너 */
.number-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
}

.number-group-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 4px;
}

/* PC에서 번호 분석 볼 크기 확대 */
@media (min-width: 768px) {
    .number-analysis-section .upcoming-mini-ball {
        width: 46px;
        height: 46px;
        min-width: 46px;
        min-height: 46px;
        font-size: 15px;
    }
    .number-analysis-section .number-group {
        gap: 14px;
    }
    .number-analysis-section .frequency-badge {
        font-size: 12px;
        padding: 3px 8px;
    }
}

/* 미선택 번호 섹션 */
.unselected-section {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.1) 0%, rgba(173, 181, 189, 0.1) 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px dashed #dee2e6;
}

.unselected-section h6 {
    color: #6c757d;
    font-weight: 600;
}

/* ===================================
 * 광고 영역 스타일
 * =================================== */

/* 광고 컨테이너 */
.ad-container {
    text-align: center;
    min-height: 100px;
    width: 100%;
    padding: 0.5rem 0;
}

/* ===================================
 * 모바일 전용 반응형 스타일
 * =================================== */

/* 태블릿 (768px 이하) */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .card-body {
        padding: 1.5rem;
    }

    .number-match-section {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .floating-buttons {
        right: 15px;
    }

    .floating-button {
        width: 45px;
        height: 45px;
    }
    
    .upcoming-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .upcoming-stat-card {
        padding: 1rem;
    }
    
    .upcoming-stat-card h3 {
        font-size: 1.5rem;
    }
    
    .number-group {
        justify-content: center;
    }
    
    .d-day-badge {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .log-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .log-numbers {
        justify-content: center;
    }
    
    .prize-left {
        border-right: none;
        border-bottom: 1px solid #ffc107;
    }
    
    .prize-left, .prize-right {
        padding: 1.5rem 1rem;
    }
    
    .prize-value {
        font-size: 1.8rem;
    }

    .number-history-item {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .history-first-line {
        gap: 6px;
    }
    
    .history-second-line {
        gap: 8px;
    }
    
    .history-second-line .btn-link {
        font-size: 0.8rem;
        margin-top: 2px;
    }
    
    .history-numbers-container {
        gap: 4px;
        justify-content: center;
    }
}

/* 모바일 (480px 이하) */
@media (max-width: 480px) {
    .card {
        margin-bottom: 15px;
    }

    .upcoming-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .number-analysis-section {
        padding: 1rem;
    }
    
    .unselected-section {
        padding: 1rem;
    }

    .number-history-item {
        padding: 10px;
    }
    
    .history-first-line {
        gap: 4px;
    }
    
    .history-first-line small {
        font-size: 0.8rem;
    }
    
    .history-second-line {
        gap: 6px;
    }
    
    .history-second-line small {
        font-size: 0.75rem;
    }
    
    .history-numbers-container {
        gap: 3px;
    }
}

/* ===================================
 * 로딩 및 에러 상태
 * =================================== */

/* 로딩 상태 스타일 */
.upcoming-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.upcoming-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 에러 상태 스타일 */
.upcoming-error {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(248, 249, 250, 1) 100%);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.upcoming-error .btn-link {
    color: #dc3545;
    font-weight: 500;
}

.upcoming-error .btn-link:hover {
    color: #c82333;
    text-decoration: underline;
}

/* ===================================
 * 아이폰 노치 대응
 * =================================== */

@supports (padding-top: env(safe-area-inset-top)) {
    .container {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
}



/* =========================
 * 회차 정보 모달 전용 스타일 
 * ========================= */

/* 모달 내 당첨번호 기본 스타일 */
#roundInfoModal .lotto-ball {
    width: var(--medium-ball-size);
    height: var(--medium-ball-size);
    min-width: var(--medium-ball-size);
    min-height: var(--medium-ball-size);
    font-size: var(--medium-ball-font);
    margin: 0 6px;
}

#roundInfoModal .winner-numbers {
    margin-bottom: 2rem;
}

#roundInfoModal .winner-numbers .d-flex {
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

#roundInfoModal .mx-2 {
    margin: 0 8px ;
}

#roundInfoModal .bi-plus-circle-fill {
    font-size: 1.2rem;
}

/* 태블릿 (768px 이하) */
@media (max-width: 768px) {
    #roundInfoModal .lotto-ball {
        width: var(--small-ball-size);
        height: var(--small-ball-size);
        min-width: var(--small-ball-size);
        min-height: var(--small-ball-size);
        font-size: var(--small-ball-font);
        margin: 0 4px;
    }
    
    #roundInfoModal .mx-2 {
        margin: 0 6px ;
    }
    
    #roundInfoModal .bi-plus-circle-fill {
        font-size: 1rem;
    }
    
    #roundInfoModal .winner-numbers .d-flex {
        gap: 2px;
    }
}

/* 모바일 (480px 이하) */
@media (max-width: 480px) {
    #roundInfoModal .lotto-ball {
        width: var(--mini-ball-size);
        height: var(--mini-ball-size);
        min-width: var(--mini-ball-size);
        min-height: var(--mini-ball-size);
        font-size: var(--mini-ball-font);
        margin: 0 2px;
    }
    
    #roundInfoModal .mx-2 {
        margin: 0 4px ;
    }
    
    #roundInfoModal .bi-plus-circle-fill {
        font-size: 0.9rem;
    }
    
    #roundInfoModal .winner-numbers {
        margin-bottom: 1.5rem;
    }
    
    #roundInfoModal .winner-numbers .d-flex {
        gap: 1px;
        padding: 0 10px;
    }
    
    /* 모달 제목 크기 조정 */
    #roundInfoModal .modal-title {
        font-size: 1.1rem;
    }
    
    /* 모달 패딩 조정 */
    #roundInfoModal .modal-body {
        padding: 1rem;
    }
    
    /* 당첨 정보 섹션 조정 */
    #roundInfoModal .winner-info {
        padding: 1rem;
        margin-top: 1rem;
    }
    
    #roundInfoModal .winner-info h6 {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
    
    #roundInfoModal .winner-info p {
        margin-bottom: 0.5rem;
    }
    
    #roundInfoModal .winner-info small {
        font-size: 0.8rem;
    }
}

/* 초소형 모바일 (360px 이하) */
@media (max-width: 360px) {
    #roundInfoModal .lotto-ball {
        width: var(--micro-ball-size);
        height: var(--micro-ball-size);
        min-width: var(--micro-ball-size);
        min-height: var(--micro-ball-size);
        font-size: var(--micro-ball-font);
        margin: 0 1px;
    }
    
    #roundInfoModal .mx-2 {
        margin: 0 3px ;
    }
    
    #roundInfoModal .bi-plus-circle-fill {
        font-size: 0.8rem;
    }
    
    #roundInfoModal .winner-numbers .d-flex {
        gap: 0px;
        padding: 0 5px;
    }
    
    #roundInfoModal .modal-title {
        font-size: 1rem;
    }
    
    #roundInfoModal .winner-info {
        padding: 0.75rem;
    }
    
    #roundInfoModal .winner-info h6 {
        font-size: 0.9rem;
    }
    
    #roundInfoModal .winner-info small {
        font-size: 0.75rem;
    }
}

/* 모달 다이얼로그 크기 조정 */
@media (max-width: 576px) {
    #roundInfoModal .modal-dialog {
        margin: 1rem 0.5rem;
        max-width: none;
        width: auto;
    }
}

/* 모달 내용이 잘리지 않도록 조정 */
#roundInfoModal .modal-content {
    overflow: hidden;
}

#roundInfoModal .modal-body {
    overflow-x: auto;
    overflow-y: visible;
}

/* 번호가 한 줄에 안 들어갈 경우 줄바꿈 */
@media (max-width: 320px) {
    #roundInfoModal .winner-numbers .d-flex {
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px;
        row-gap: 4px;
    }
    
    #roundInfoModal .mx-2 {
        width: 100%;
        text-align: center;
        margin: 2px 0 ;
        order: 10;
    }
}



/* ===================================
 * 당첨금액 (녹색) 모바일 폰트 크기 조정 (추가)
 * =================================== */

/* 당첨금액 (text-success) 기본 스타일 */
.prize-value.text-success {
    font-size: 2.2rem ;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    word-break: keep-all;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    font-variant-numeric: tabular-nums;
}

/* 태블릿 (768px 이하) - 당첨금액 크기 조정 */
@media (max-width: 768px) {
    .prize-value.text-success {
        font-size: 1.6rem ;
        line-height: 1.1;
    }
}

/* 모바일 (480px 이하) - 당첨금액 더 작게 */
@media (max-width: 480px) {
    .prize-value.text-success {
        font-size: 1.2rem ;
        font-weight: 700;
        line-height: 1.05;
        margin-bottom: 0.3rem;
    }
    
    /* 매우 긴 당첨금액의 경우 더 작게 */
    .prize-value.text-success[title*="억"] {
        font-size: 1.1rem ;
    }
    
    .prize-value.text-success[title*="조"] {
        font-size: 1rem ;
    }
}

/* 초소형 모바일 (360px 이하) - 당첨금액 최소 크기 */
@media (max-width: 360px) {
    .prize-value.text-success {
        font-size: 1.1rem ;
        font-weight: 600;
        line-height: 1;
    }
    
    .prize-value.text-success[title*="억"] {
        font-size: 1rem ;
    }
    
    .prize-value.text-success[title*="조"] {
        font-size: 0.95rem ;
    }
}

/* 매우 작은 화면 (320px 이하) */
@media (max-width: 320px) {
    .prize-value.text-success {
        font-size: 1rem ;
        font-weight: 600;
    }
    
    .prize-value.text-success[title*="억"],
    .prize-value.text-success[title*="조"] {
        font-size: 0.9rem ;
    }
}


/* ===================================
 * 명예의 전당 모바일 반응형 스타일 (추가)
 * =================================== */

/* 등급별 당첨 현황 기본 스타일 */
.rank-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 1rem;
}

.rank-stat-card {
    background: #EEF0E6;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid rgba(107, 124, 62, 0.15);
}

.rank-stat-card:hover {
    background: #E5E8DA;
}

.rank-stat-card .rank-title {
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.rank-stat-card .rank-count {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 2px;
    color: #333;
}

.rank-stat-card .rank-percentage {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 4px;
}

.rank-stat-card .rank-action {
    margin-top: 4px;
	font-size: 0.9rem;
}

.rank-stat-card .btn-link {
    font-size: 0.9rem;
    padding: 0;
    text-decoration: none;
}

.rank-stat-card .small {
    font-size: 0.65rem;
    color: #6c757d;
    display: block;
    margin-top: 2px;
}

/* 전체 통계 요약 스타일 */
.total-stats-summary {
    background: var(--primary-color);
    border-radius: 8px;
    padding: 1rem;
    color: white;
    margin-top: 1rem;
}

.total-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

.total-stat-item .stat-number {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 2px;
}

.total-stat-item .stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* 태블릿 반응형 (768px 이하) */
@media (max-width: 768px) {
    .rank-stats-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
    
    .rank-stat-card {
        padding: 10px 6px;
    }
    
    .rank-stat-card .rank-title {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }
    
    .rank-stat-card .rank-count {
        font-size: 1.1rem;
    }
    
    .rank-stat-card .rank-percentage {
        font-size: 0.7rem;
    }
    
    .rank-stat-card .btn-link {
        font-size: 0.65rem;
    }
    
    .rank-stat-card .small {
        font-size: 0.6rem;
    }
    
    .total-stats-grid {
        gap: 0.75rem;
    }
    
    .total-stat-item .stat-number {
        font-size: 1.2rem;
    }
    
    .total-stat-item .stat-label {
        font-size: 0.75rem;
    }
}

/* 모바일 반응형 (480px 이하) */
@media (max-width: 480px) {
    .rank-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-bottom: 1rem;
    }
    
    .rank-stat-card {
        padding: 12px 8px;
        border-radius: 10px;
    }
    
    .rank-stat-card .rank-title {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .rank-stat-card .rank-count {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }
    
    .rank-stat-card .rank-percentage {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }
    
    .rank-stat-card .btn-link {
        font-size: 0.9rem;
    }
    
    .rank-stat-card .small {
        font-size: 0.65rem;
        margin-top: 4px;
    }
    
    /* 4,5등을 두 번째 줄에 배치 */
    .rank-stats-grid .rank-stat-card:nth-child(4),
    .rank-stats-grid .rank-stat-card:nth-child(5) {
        grid-column: span 1;
    }
    
    /* 4,5등 카드를 중앙 정렬 */
    .rank-stats-second-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        justify-content: center;
        margin-top: 8px;
    }
    
    .total-stats-summary {
        padding: 0.75rem;
    }
    
    .total-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: center;
    }
    
    .total-stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.25rem 0;
    }
    
    .total-stat-item .stat-number {
        font-size: 1.1rem;
    }
    
    .total-stat-item .stat-label {
        font-size: 0.8rem;
    }
}

/* 초소형 모바일 (360px 이하) */
@media (max-width: 360px) {
    .rank-stats-grid {
        gap: 6px;
    }
    
    .rank-stat-card {
        padding: 10px 6px;
    }
    
    .rank-stat-card .rank-title {
        font-size: 0.8rem;
    }
    
    .rank-stat-card .rank-count {
        font-size: 1.2rem;
    }
    
    .rank-stat-card .rank-percentage {
        font-size: 0.7rem;
    }
    
    .rank-stat-card .btn-link {
        font-size: 0.65rem;
    }
    
    .rank-stat-card .small {
        font-size: 0.6rem;
    }
    
    .total-stat-item .stat-number {
        font-size: 1rem;
    }
    
    .total-stat-item .stat-label {
        font-size: 0.75rem;
    }
}

/* 이모지 크기 조정 */
@media (max-width: 480px) {
    .rank-stat-card .rank-title {
        line-height: 1.2;
    }
    
    /* 이모지가 있는 경우 폰트 크기 조정 */
    .rank-stat-card .rank-title:contains("🥇"),
    .rank-stat-card .rank-title:contains("🥈"),
    .rank-stat-card .rank-title:contains("🥉"),
    .rank-stat-card .rank-title:contains("🏅"),
    .rank-stat-card .rank-title:contains("🎖️") {
        font-size: 0.8rem;
    }
}

/* 당첨자 없음 표시 스타일 개선 */
.rank-stat-card .no-winner {
    color: #6c757d;
    font-style: italic;
}

.rank-stat-card.no-winner-card {
    opacity: 0.7;
    background: #f8f9fa;
}

.rank-stat-card.no-winner-card:hover {
    transform: none;
    box-shadow: none;
}

/* ===================================
   SEO 및 접근성 최적화 스타일
   =================================== */

/* 시각적으로 숨기지만 스크린리더와 검색엔진에는 노출 */
.visually-hidden {
    position: absolute ;
    width: 1px ;
    height: 1px ;
    padding: 0 ;
    margin: -1px ;
    overflow: hidden ;
    clip: rect(0, 0, 0, 0) ;
    white-space: nowrap ;
    border: 0 ;
}

/* 포커스 시에만 표시 (접근성) */
.visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute ;
    width: 1px ;
    height: 1px ;
    padding: 0 ;
    margin: -1px ;
    overflow: hidden ;
    clip: rect(0, 0, 0, 0) ;
    white-space: nowrap ;
    border: 0 ;
}

/* ===================================
 * 회차별 당첨 사례 섹션 스타일
 * =================================== */

/* 당첨 사례 테이블 반응형 */
.winners-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.winners-table-wrap table {
    min-width: 480px;
}

/* 당첨 사례 배지 */
.winner-rank-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

.winner-rank-1 { background: #c9a200; }
.winner-rank-2 { background: #69c8f2; color: #333; }
.winner-rank-3 { background: #ff7272; }
.winner-rank-4 { background: #aaa; }
.winner-rank-5 { background: #b0d840; color: #333; }

/* 아이디 입력 안내 강조 박스 */
.id-tip-box {
    background: #F0F2E8;
    border: 1px solid rgba(107, 124, 62, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.88rem;
    color: #4A5A28;
}

.id-tip-box .tip-icon {
    font-size: 1rem;
    margin-right: 4px;
}

/* 안내 박스 내 검색 링크 */
.tip-search-link {
    color: #6B7C3E;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.tip-search-link:hover {
    color: #4A5A28;
    text-decoration: underline;
}

/* 녹색 계열 input-group 테두리 */
.input-group-green .form-control,
.input-group-green .input-group-text {
    border-color: #8aad3f;
}
.input-group-green .form-control:focus {
    border-color: #6B7C3E;
    box-shadow: 0 0 0 0.2rem rgba(107, 124, 62, 0.18);
}

/* 모바일 테이블 카드형 */
@media (max-width: 576px) {
    .winners-table-wrap table {
        min-width: 0;
    }
    .winners-table-wrap table thead {
        display: none;
    }
    .winners-table-wrap table tr {
        display: block;
        background: #fff;
        border: 1px solid #e0ddd5;
        border-radius: 8px;
        margin-bottom: 10px;
        padding: 10px;
    }
    .winners-table-wrap table td {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
        border: none;
        font-size: 0.85rem;
    }
    .winners-table-wrap table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6B7C3E;
        min-width: 60px;
    }
}


        /* Bootstrap Icons font-display 오버라이드 */
        @font-face {
            font-family: 'bootstrap-icons';
            src: url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/fonts/bootstrap-icons.woff2?2ab2cbb") format("woff2"),
                 url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/fonts/bootstrap-icons.woff?2ab2cbb") format("woff");
            font-display: swap;
        }
    

        /* 글꼴 표시 최적화 */
        @font-face {
            font-family: 'bootstrap-icons';
            font-display: swap;
        }
        
        /* 초기 로딩 최적화 CSS */
        *,*::before,*::after{box-sizing:border-box}
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            margin: 0;
            padding: 0;
            background: #F4F1E8;
            min-height: 100vh;
        }
        
        /* CLS 방지 - 주요 컨테이너 최소 높이 지정 */
        .hero-header { min-height: 200px; }
        .hero-compact { min-height: 180px; }
        main.flex-grow-1 { min-height: 500px; }
        .card { min-height: 100px; }
        .card-body { min-height: 80px; }
        .lotto-preview { min-height: 80px; display: flex; align-items: center; justify-content: center; }
        .number-history { min-height: 100px; }
        .public-log { min-height: 200px; }
        .search-results { min-height: 50px; }
        #currentLottoInfo { min-height: 120px; }
        #weeklyRankStats { min-height: 150px; }
        #upcomingDrawStats { min-height: 200px; }
        #statsContent { min-height: 100px; }
        
        /* 로또 번호 볼 기본 스타일 (CLS 방지) */
        .lotto-ball, .ball {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: #fff;
            margin: 0 3px;
        }
        
        /* 광고 컨테이너 최소 높이 */
        .ad-container { min-height: 100px; }
        
        /* 히어로 섹션 기본 스타일 */
        .hero-header {
            background: linear-gradient(135deg, #3D4A22 0%, #6B7C3E 100%);
            color: #fff;
            padding: 1.25rem 0;
        }
        .hero-title { font-size: 1.5rem; margin: 0; font-weight: 700; }
        .hero-subtitle { font-size: 0.9rem; opacity: 0.9; }
        .hero-stats .stat-item { text-align: center; }
        .stat-number { font-size: 1.25rem; font-weight: 700; }
        .stat-label { font-size: 0.7rem; opacity: 0.8; }
        
		
		/* 무료/비회원 강조 배지 */
		.hero-free-badge {
			margin-top: 0.6rem;
			display: flex;
			align-items: center;
			justify-content: flex-start;       /* PC: 왼쪽 정렬 */
			gap: 0;
			flex-wrap: wrap;
			font-size: 0.8rem;
			line-height: 1;
		}

		/* 모바일: 가운데 정렬 */
		@media (max-width: 991.98px) {
			.hero-free-badge {
				justify-content: center;
			}
		}

		.hero-free-badge .badge-no-signup,
		.hero-free-badge .badge-no-pay,
		.hero-free-badge .badge-instant {
			display: inline-block;
			background: rgba(255, 255, 255, 0.15);
			border: 1px solid rgba(255, 255, 255, 0.35);
			color: #fff;
			padding: 0.3em 0.7em;
			border-radius: 50px;
			font-weight: 600;
			letter-spacing: 0.02em;
			backdrop-filter: blur(4px);
			-webkit-backdrop-filter: blur(4px);
		}

		.hero-free-badge .badge-separator {
			color: rgba(255, 255, 255, 0.4);
			margin: 0 0.4rem;
			font-weight: 300;
		}

		/* 강조 효과: 회원가입 없음, 결제 없음에 아이콘 느낌 */
		.hero-free-badge .badge-no-signup::before {
			content: "✓ ";
			opacity: 0.85;
		}

		.hero-free-badge .badge-no-pay::before {
			content: "✓ ";
			opacity: 0.85;
		}

		.hero-free-badge .badge-instant::before {
			content: "⚡ ";
			opacity: 0.85;
		}

        /* 카드 기본 스타일 */
        .card {
            background: #fff;
            border-radius: 0.5rem;
            border: 1px solid rgba(0,0,0,.125);
        }
        .shadow-sm { box-shadow: 0 .125rem .25rem rgba(0,0,0,.075); }
        
        /* 버튼 기본 스타일 */
        .btn-primary {
            background: #6B7C3E;
            border: none;
            color: #fff;
            padding: 0.75rem 1.5rem;
            border-radius: 0.5rem;
            cursor: pointer;
        }
        
        /* 로딩 스피너 */
        .loading-spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid #f3f3f3;
            border-radius: 50%;
            border-top-color: #10a37f;
            animation: spin 1s ease-in-out infinite;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        /* Flexbox 유틸리티 */
        .d-flex { display: flex; }
        .flex-column { flex-direction: column; }
        .min-vh-100 { min-height: 100vh; }
        .flex-grow-1 { flex-grow: 1; }
        .text-center { text-align: center; }
        .mb-4 { margin-bottom: 1.5rem; }
        .py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
        .container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
    
}
.hv2-page { --primary-color: var(--band); --primary-dark: var(--heading); --secondary-color: var(--accent); --bs-primary-rgb: 40, 66, 67; --bs-success-rgb: 31, 122, 61; --bs-link-color: var(--accent-ink); background: var(--bg); }
.wt-lotto :where(.container) { width: 100%; max-width: none; padding-inline: 0; }
.wt-lotto :where(.card, .insight-card, .feature-card, .stat-card) { border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: none; background: var(--surface); }
.wt-lotto :where(.card-body) { padding: 24px; }
.wt-lotto :where(.card-title, h2, h3, h4, h5, h6) { color: var(--heading); }
.wt-lotto :where(.btn-primary) { --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: var(--accent-deep); --bs-btn-hover-border-color: var(--accent-deep); color: #fff; background: var(--accent); border-color: var(--accent); }
.wt-lotto :where(.btn-outline-primary) { color: var(--heading); border-color: var(--border-strong); background: transparent; }
.wt-lotto :where(.btn) { min-height: 44px; border-radius: var(--r-field); box-shadow: none; transform: none; }
.wt-lotto :where(.btn-link) { color: var(--accent-ink); }
.wt-lotto :where(.form-control) { min-height: 46px; border-color: var(--border-strong); border-radius: var(--r-field); }
.wt-lotto :where(.input-group-text) { border-color: var(--border-strong); }
.wt-lotto :where(.id-tip-box, .alert-info, .accordion-button:not(.collapsed)) { background: var(--alt); border: 1px solid var(--border); color: var(--heading); }
.wt-lotto :where(.tip-icon, .tip-search-link, .text-primary) { color: var(--heading); }
.wt-lotto :where(.accordion-button) { color: var(--heading); background: var(--surface); min-height: 48px; }
.wt-lotto :where(.accordion-button:focus) { box-shadow: 0 0 0 3px var(--accent-soft); }
.wt-lotto :where(.accordion-item) { border-color: var(--border); background: var(--surface); }
.wt-lotto :where(.shadow-sm, .shadow, .shadow-lg) { box-shadow: none; }
.wt-lotto :where(.bg-primary, .bg-gradient-primary, .cta-section) { background: var(--band); color: #fff; }
.wt-lotto :where(.bg-primary, .bg-gradient-primary, .cta-section) :where(h2, h3) { color: #fff; }
.wt-lotto :where(.ad-container:empty) { display: none; }
.wt-lotto :where(.generated-numbers, .matching-numbers, .lotto-preview) { flex-wrap: wrap; }
.wt-lotto :where(.card:hover, .insight-card:hover, .btn:hover) { transform: none; box-shadow: none; }
.hv2-page :where(.modal-content) { color: var(--text); border-radius: var(--r-lg); }
.hv2-page :where(.modal-header) { color: var(--heading); background: var(--alt); }
.hv2-page :where(.modal-title) { color: var(--heading); }
.wt-lotto :where(.rank-stat-card, .rank-stat-card:hover) { background: var(--alt); border-color: var(--border); }
.wt-lotto :where(.rank-count, .rank-title) { color: var(--heading); }
.hv2-page :where(.modal .btn-primary) { background: var(--accent); border-color: var(--accent); color: #fff; }
.hv2-page :where(.modal .btn-primary:hover) { background: var(--accent-deep); border-color: var(--accent-deep); }
.hv2-page :where(.modal .card) { background: var(--surface); border-color: var(--border); box-shadow: none; }
@media (max-width: 767px) {
    .wt-lotto :where(.card-body) { padding: 16px; }
    .wt-lotto :where(.d-flex.justify-content-between) { flex-wrap: wrap; gap: 8px; }
    .wt-lotto :where(.lotto-ball) { width: 36px; height: 36px; font-size: 18px; flex: 0 0 36px; }
    .wt-lotto :where(.table-responsive) { overflow-x: auto; }
    .hv2-page :where(.position-fixed.alert-dismissible) { min-width: 0 !important; width: calc(100% - 32px); right: 16px !important; }
}
@media (prefers-reduced-motion: reduce) { .wt-lotto :where(*) { animation: none; transition: none; } }

/* 입력 그룹의 외곽선은 부모 한 곳에서 그린다. */
.wt-lotto .lotto-input-group { display: flex; flex-wrap: nowrap; align-items: stretch; border: 1px solid var(--border-strong); border-radius: var(--r-field); background: var(--surface); overflow: hidden; }
.wt-lotto .lotto-input-group:focus-within { border-color: var(--heading); outline: 0; box-shadow: 0 0 0 3px rgb(40 66 67 / 14%); }
.wt-lotto .lotto-input-group .input-group-text { border: 0; border-radius: 0; background: transparent; padding-inline: 14px 0; color: var(--muted); }
.wt-lotto .lotto-input-group .form-control { flex: 1 1 0; width: 0; min-width: 0; min-height: 48px; border: 0; border-radius: 0; margin: 0; padding: 12px 14px; box-shadow: none; }
.wt-lotto .lotto-input-group .form-control:focus, .wt-lotto .lotto-input-group .form-control:focus-visible { border: 0; outline: 0; box-shadow: none; }
.wt-lotto .lotto-input-group .btn { margin: 4px; min-height: 40px; padding: 8px 16px; border: 0; border-radius: var(--r-field); white-space: nowrap; }
.wt-lotto .id-tip-box { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid rgb(209 69 21 / 24%); border-left: 4px solid var(--accent); border-radius: var(--r-md); background: var(--accent-soft); color: var(--text); }
.wt-lotto .tip-icon-wrap { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; }
.wt-lotto .tip-icon-wrap .tip-icon { margin: 0; color: #fff; font-size: 18px; line-height: 1; }
.wt-lotto .id-tip-content { display: grid; flex: 1 1 auto; gap: 3px; min-width: 0; }
.wt-lotto .id-tip-title { color: var(--heading); font-size: 15px; font-weight: 800; line-height: 1.5; }
.wt-lotto .id-tip-description { color: var(--text); font-size: 13px; line-height: 1.6; }
.wt-lotto .id-tip-box .tip-search-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto; min-height: 40px; padding: 9px 14px; border-radius: var(--r-field); background: var(--heading); color: #fff; font-size: 14px; font-weight: 700; line-height: 1.4; text-decoration: none; white-space: nowrap; }
.wt-lotto .id-tip-box .tip-search-link:hover { background: var(--band); color: #fff; text-decoration: none; }
.wt-lotto .id-tip-box .tip-search-link:focus-visible { outline: 2px solid var(--heading); outline-offset: 3px; }
.wt-lotto .lotto-history-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wt-lotto .lotto-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--r-field); background: var(--surface); color: var(--heading); font-size: 19px; cursor: pointer; }
.wt-lotto .lotto-icon-button:hover { background: var(--alt); border-color: var(--heading); }
.wt-lotto .lotto-icon-button-danger { color: var(--danger); }
.wt-lotto .lotto-icon-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wt-lotto .accordion-item { margin-bottom: 10px; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.wt-lotto .accordion-header { margin: 0; padding: 0; }
.wt-lotto .accordion-button { min-height: 56px; padding: 16px 18px; border: 0; border-radius: 0; font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.5; box-shadow: none; }
.wt-lotto .accordion-button:not(.collapsed) { border: 0; border-bottom: 1px solid var(--border); background: var(--alt); color: var(--heading); box-shadow: none; }
.wt-lotto .accordion-button:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; box-shadow: none; }
.wt-lotto .accordion-body { padding: 20px; line-height: 1.8; }
.wt-lotto .lotto-original-content { margin-top: 28px; }
.wt-lotto .lotto-original-content .related-content-section { background: var(--alt); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 32px 24px; margin-top: 24px; }
.wt-lotto .lotto-original-content .related-content-section::before { content: none; }
.wt-lotto .lotto-original-content .insight-card { height: 100%; padding: 24px; color: var(--text); }
.wt-lotto .lotto-original-content .insight-card :where(strong, .wt-guide-link) { color: var(--accent-ink); }
.wt-lotto .lotto-original-content .insight-card .wt-guide-list li::marker { color: var(--heading); }
.wt-lotto .lotto-original-content .insight-card:hover { transform: none; background: var(--surface); }
.wt-lotto .lotto-original-content .table { --bs-table-color: var(--text); --bs-table-bg: var(--surface); --bs-table-border-color: var(--border); font-size: 14px; }
.wt-lotto .lotto-original-content .table :where(th, td) { padding: 12px; vertical-align: middle; }
.wt-lotto .lotto-original-content :where(p, li, td, th) { overflow-wrap: anywhere; }
.wt-lotto .lotto-original-content .alert { border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text); background: var(--alt); }
.wt-lotto .lotto-original-content .progress { display: flex; flex-wrap: wrap; height: auto; min-height: 32px; background: var(--alt); }
.wt-lotto .lotto-original-content .progress-bar { min-width: 72px; min-height: 32px; flex-grow: 1; white-space: nowrap; }
@media (max-width: 767px) {
    .wt-lotto .id-tip-box { align-items: flex-start; flex-wrap: wrap; gap: 10px 12px; padding: 14px; }
    .wt-lotto .id-tip-content { flex-basis: calc(100% - 50px); }
    .wt-lotto .id-tip-box .tip-search-link { width: 100%; }
}
@layer lotto-theme {
    .wt-lotto .lotto-original-content .text-white { color: var(--heading) !important; }
    .wt-lotto .lotto-original-content .bg-light { background: var(--alt) !important; }
    .wt-lotto .lotto-original-content > .bg-light { background: transparent !important; padding-block: 0 !important; }
}
@media (max-width: 767px) {
    .wt-lotto .lotto-original-content .related-content-section { padding: 20px 12px; }
    .wt-lotto .lotto-original-content .insight-card { padding: 20px 16px; }
    .wt-lotto .accordion-button { padding: 14px 16px; }
    .wt-lotto .accordion-body { padding: 16px; }
    .wt-lotto .lotto-original-content .table { min-width: 440px; }
    .wt-lotto #currentLottoInfo .winning-results-container { padding: 20px 12px; }
    .wt-lotto #currentLottoInfo .numbers-container { flex-wrap: wrap; }
    .wt-lotto #currentLottoInfo .winning-group { flex-basis: 100%; width: 100%; min-width: 0; }
    .wt-lotto #currentLottoInfo .numbers-row { grid-template-columns: repeat(6, minmax(0, 1fr)); width: 100%; max-width: 246px; }
    .wt-lotto #currentLottoInfo .numbers-row .lotto-ball { width: 100%; height: auto; max-width: 36px; aspect-ratio: 1; font-size: 16px; }
    @layer lotto-theme {
        .wt-lotto #currentLottoInfo .numbers-row { display: grid !important; gap: 6px !important; }
    }
}

/* ===================================
 * 2026-09-27 모바일 리팩토링
 * 기존 규칙과 우선순위를 다투지 않도록 새 구조 전용 클래스와 #id 기준으로만 쓴다.
 * =================================== */

/* 번호 생성 결과: 6개를 항상 한 줄에 둔다 */
.wt-lotto #lottoNumbers .lotto-preview,
.wt-lotto #lottoNumbers .generated-numbers { display: grid; grid-template-columns: repeat(6, minmax(0, 60px)); justify-content: center; gap: 12px; width: 100%; margin: 0; flex-wrap: nowrap; }
.wt-lotto #lottoNumbers .lotto-preview .lotto-ball,
.wt-lotto #lottoNumbers .generated-numbers .lotto-ball { width: 100%; height: auto; min-width: 0; min-height: 0; aspect-ratio: 1; margin: 0; font-size: clamp(15px, 4.6vw, 22px); }
.wt-lotto #lottoNumbers .number-match-section { width: 100%; }

/* 당첨번호: 번호 6개 + 보너스를 한 줄로 */
.wt-lotto .lotto-draw { padding: 20px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); text-align: center; }
.wt-lotto .lotto-draw-compact { padding: 16px 12px; background: var(--alt); }
.wt-lotto .lotto-draw-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 10px; margin-bottom: 16px; }
.wt-lotto .lotto-draw-round { color: var(--heading); font-size: 26px; font-weight: 800; line-height: 1.2; }
.wt-lotto .lotto-draw-date { color: var(--muted); font-size: 14px; }
.wt-lotto .lotto-draw-balls { display: grid; grid-template-columns: repeat(6, minmax(0, 48px)) auto minmax(0, 48px); align-items: center; justify-content: center; gap: 8px; }
.wt-lotto .lotto-draw-balls .lotto-ball { width: 100%; height: auto; min-width: 0; min-height: 0; aspect-ratio: 1; margin: 0; font-size: clamp(12px, 3.8vw, 19px); opacity: 1; transform: none; animation: none; }
.wt-lotto .lotto-draw-balls .lotto-draw-bonus { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--heading); }
.wt-lotto .lotto-draw-plus { color: var(--muted); font-size: 18px; font-weight: 700; line-height: 1; }
.wt-lotto .lotto-draw-legend { display: flex; justify-content: center; gap: 16px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.wt-lotto .lotto-draw-legend span + span::before { content: "+ "; }
.wt-lotto .lotto-draw-prize { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--border); }
.wt-lotto .lotto-draw-prize-title { margin-bottom: 12px; color: var(--accent-ink); font-size: 14px; font-weight: 700; }
.wt-lotto .lotto-draw-prize-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 10px; max-width: 560px; margin: 0 auto; }
.wt-lotto .lotto-draw-prize-item { min-width: 0; padding: 14px 12px; border-radius: var(--r-md); background: var(--alt); }
.wt-lotto .lotto-draw-prize-item dt { margin-bottom: 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.wt-lotto .lotto-draw-prize-item dd { margin: 0; color: var(--heading); font-size: 22px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.wt-lotto .lotto-draw-prize-item dd small { margin-left: 2px; font-size: 14px; font-weight: 700; }
.wt-lotto .lotto-draw-prize-item .lotto-draw-prize-amount { color: var(--accent-ink); font-size: clamp(16px, 4.4vw, 22px); }
.wt-lotto .lotto-draw-pending { margin: 16px 0 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--alt); color: var(--text); font-size: 14px; }

/* 이 사이트 당첨 사례: 회차별 카드 */
.wt-lotto .site-winners { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.wt-lotto .site-winner-round { min-width: 0; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.wt-lotto .site-winner-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--alt); }
.wt-lotto .site-winner-head strong { color: var(--heading); font-size: 16px; }
.wt-lotto .site-winner-head span { color: var(--muted); font-size: 13px; }
.wt-lotto .site-winner-rows { margin: 0; padding: 0; list-style: none; }
.wt-lotto .site-winner-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 6px 10px; padding: 10px 14px; }
.wt-lotto .site-winner-row + .site-winner-row { border-top: 1px solid var(--border); }
.wt-lotto .site-winner-count { color: var(--heading); font-size: 14px; font-weight: 700; white-space: nowrap; }
.wt-lotto .site-winner-sample { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 2px 6px; min-width: 0; }
.wt-lotto .site-winner-balls { display: inline-flex; flex-wrap: nowrap; }
.wt-lotto .site-winner-initial { color: var(--muted); font-size: 12px; }

/* 당첨금 수령 안내: 표 대신 카드 목록 */
.wt-lotto .lotto-claim-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.wt-lotto .lotto-claim-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: start; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.wt-lotto .lotto-claim-rank { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 4px 8px; border-radius: 999px; background: var(--alt); color: var(--heading); font-size: 14px; font-weight: 800; white-space: nowrap; }
.wt-lotto .lotto-claim-rank-top { background: var(--heading); color: #fff; }
.wt-lotto .lotto-claim-detail { display: grid; gap: 6px; margin: 0; }
.wt-lotto .lotto-claim-detail > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; }
.wt-lotto .lotto-claim-detail dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.wt-lotto .lotto-claim-detail dd { margin: 0; color: var(--text); font-size: 14px; font-weight: 600; }

/* 페이지 끝 안내 문구 */
.wt-lotto .lotto-closing-note { margin: 24px 0 0; }

@media (max-width: 767px) {
    .wt-lotto #lottoNumbers .lotto-preview,
    .wt-lotto #lottoNumbers .generated-numbers { gap: 8px; }
    .wt-lotto .lotto-draw { padding: 16px 12px; }
    .wt-lotto .lotto-draw-round { font-size: 22px; }
    .wt-lotto .lotto-draw-balls { gap: 5px; }
    .wt-lotto .lotto-draw-plus { font-size: 15px; }
    .wt-lotto .upcoming-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .wt-lotto .upcoming-stat-card { padding: 14px 10px; }
    .wt-lotto #upcomingDrawStats .alert .col-md-4 { margin-top: 10px; text-align: left !important; }
    .wt-lotto .lotto-original-content .table-sm { min-width: 0; }
}
@media (max-width: 400px) {
    .wt-lotto .card-body { padding-inline: 12px; }
    .wt-lotto #lottoNumbers .lotto-preview,
    .wt-lotto #lottoNumbers .generated-numbers { gap: 6px; }
    .wt-lotto .lotto-draw { padding: 14px 8px; }
    .wt-lotto .lotto-draw-balls { gap: 4px; }
    .wt-lotto .lotto-draw-prize-grid { grid-template-columns: minmax(0, 1fr); }
    .wt-lotto .lotto-draw-prize-item .lotto-draw-prize-amount { overflow-wrap: normal; white-space: nowrap; }
    .wt-lotto .site-winner-row { grid-template-columns: auto minmax(0, 1fr); }
    .wt-lotto .site-winner-sample { grid-column: 1 / -1; justify-content: flex-start; }
    .wt-lotto .lotto-claim-item { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .wt-lotto .lotto-claim-rank { justify-self: start; }
}

/* 2026-09-27 후속: 당첨 사례 3x2 · 작은 번호 확대 · 한 줄 정리 */
.wt-lotto .site-mini-ball { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 26px; height: 26px; margin: 0 1px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; text-shadow: 0 1px 1px rgb(0 0 0 / 25%); }
.wt-lotto .lotto-best-match-numbers { display: grid; grid-template-columns: repeat(6, minmax(0, 48px)); gap: 8px; }
.wt-lotto .lotto-best-match-numbers .badge { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 8px 0; font-size: 15px; }
@media (min-width: 992px) {
    .wt-lotto .site-winners { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .wt-lotto .site-mini-ball { width: 30px; height: 30px; font-size: 13px; }
    .wt-lotto .site-winner-row { grid-template-columns: auto minmax(0, 1fr); }
    .wt-lotto .site-winner-sample { grid-column: 1 / -1; justify-content: flex-start; }
    .wt-lotto .number-analysis-section .number-group { display: grid; grid-template-columns: repeat(5, minmax(0, 48px)); justify-content: center; gap: 10px; }
    .wt-lotto .number-analysis-section .number-group-item { margin: 0; gap: 6px; }
    .wt-lotto .number-analysis-section .upcoming-mini-ball { width: 100%; height: auto; min-width: 0; min-height: 0; aspect-ratio: 1; margin: 0; font-size: 16px; }
    .wt-lotto .number-analysis-section .frequency-badge { font-size: 12px; padding: 3px 7px; }
    .wt-lotto .lotto-best-match-numbers { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
    .wt-lotto #statsInfo { white-space: nowrap; }
}
@media (max-width: 400px) {
    .wt-lotto .site-mini-ball { width: 28px; height: 28px; font-size: 12px; }
    .wt-lotto .number-analysis-section .number-group { gap: 6px; }
    .wt-lotto .number-analysis-section .upcoming-mini-ball { font-size: 14px; }
}
