/* --- 기본 & 테마 설정 --- */

html {
    font-size: 14px; /* 기본값 16px에서 약 10% 줄임 */
}

:root {
    --primary-color: #ffa000;
    --highlight-color: #ec4899;
    --font-family-base: 'Noto Sans KR', sans-serif;
    --font-family-display: 'Poppins', sans-serif;
    --border-radius: 12px;
}

body {
    font-family: var(--font-family-base);
    margin: 0;
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s, color 0.3s;
}

/* 라이트 모드 변수 */
body.light-mode {
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
	--icon-color: #000000;
    --text-color: #1e293b;
    --text-muted-color: #1e293b;
    --border-color: #e2e8f0;
    --shadow-color: rgba(100, 116, 139, 0.1);
    --header-bg: rgba(255, 255, 255, 0.85);
}

/* 다크 모드 변수 */
body.dark-mode {
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --text-color: #e2e8f0;
	--icon-color: #ffffff;
    --text-muted-color: #e2e8f0;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --header-bg: rgba(15, 23, 42, 0.85);
}

/* --- 공통 요소 --- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.content-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-family-display);
    color: var(--text-color);
    margin: 0 0 0.5rem;
    line-height: 1.3;
}
.section-title p {
    color: var(--text-muted-color);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}
.section-title .highlight {
    background: linear-gradient(45deg, var(--primary-color), var(--highlight-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- 상단 띠 --- */
.top-bar {
    background: var(--primary-color);
    color: #000;
    text-align: center;
    padding: 0.6rem 0;
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- 헤더 --- */
.main-header {
    background-color: var(--header-bg);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-top {
    border-bottom: 1px solid var(--border-color);
    padding: 0.2rem 0;
    background: rgba(0,0,0,0.02);
}
.dark-mode .header-top { background: rgba(255,255,255,0.02); }

.user-nav ul {
    margin: 0; padding: 0; list-style: none; display: flex; gap: 1.5rem;
}

.user-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}
.user-nav {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.user-nav a:hover { color: var(--primary-color); }

.header-main .container, .header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-top .container { justify-content: flex-end; }
.header-main .container { padding: 0.8rem 24px; }


.logo a { display: flex; align-items: center; }
.logo img { height: 50px; width: auto; }

.main-nav ul {
    margin: 0; padding: 0; list-style: none; display: flex; gap: 2.5rem;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    position: relative;
    padding-bottom: 5px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--highlight-color));
    transition: width 0.3s ease;
    border-radius: 2px;
}
.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* --- 테마 전환 토글 --- */
.theme-switcher { display: flex; align-items: center; gap: 0.5rem; color: var(--primary-color); }
.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .4s; }
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(24px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* --- ✨ 메인 콘텐츠 영역 (Z-index 수정) ✨ --- */
main {
    position: relative;
    z-index: 1; /* 헤더 아래에 위치하도록 z-index 설정 */
	background-color: var(--bg-color);
}

/* --- 메인 정보 섹션 --- */
#lotto-info {
    background-color: var(--bg-color);
}

/* --- 카드 내부 직전회차 당첨번호 --- */
.card-prev-winners {
    background-color: var(--bg-color);
    border-radius: 10px;
    padding: 12px;
    margin: 20px 0;
}

.card-prev-winners-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.card-prev-winners-title h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
}

/* --- ✨ 새로운 뱃지 스타일 --- */
.special-badge {
    color: #fff;
    font-weight: 700;
    padding: 0px 5px;
    font-size: 1rem;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 당첨 (별 모양) */
.badge-star {
	padding: 25px 25px; /* 텍스트에 맞는 패딩으로 조정 */
    background-color: #f59e0b; /* 골드 색상 */
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
/* 이월 (물결/햇살 모양 뱃지 - 이미지와 동일하게) */
.badge-hibiscus {
    background-color: #f59e0b; /* 이미지와 동일한 노란색 계열 */
    color: #1a202c; /* 어두운 글자색 */
    font-weight: 800;
    padding: 15px 13px; /* 텍스트 크기에 맞게 패딩 조정 */
    line-height: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    
    /* ✨ 이미지와 거의 동일한 물결/햇살 모양 clip-path */
    clip-path: polygon(
       
    );
    
    border: 1px solid rgba(245, 158, 11, 0.6);
   
    transition: all 0.2s ease-in-out;
}
.badge-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 38px;
    border-radius: 50%; /* 원형으로 만듦 */
    background-color: #6366f1;
    color: #00000;
    font-weight: 800;
    font-size: 1rem;
}
.badge-hibiscus:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 15px rgba(245, 158, 11, 0.4);
}
.card-prev-number-balls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.prev-ball {
    width: 45px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-family-display);
    background-color: #ffffff;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.dark-mode .prev-ball {
    background-color: var(--surface-color);
}

.prev-ball.bonus {
    background-color: #f59e0b;
    color: #1e293b;
    border: none;
}
/* 여기 */

.grid-container {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.lotto-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.lotto-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/*
.lotto-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px var(--shadow-color);
}
일단제외 호버기능
*/

.lotto-logo img {
    max-height: 80px;
    margin-bottom: 3px;
}

.draw-info {
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 16px;
	color: #001a97;
}
.dark-mode .draw-info { color: #a5b4fc; }

.lotto-card h2 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin: 16px 0 4px;
    font-weight: 500;
}

.prize-amount {
    font-family: var(--font-family-display);
    font-weight: 700;
    font-size: 3.6rem;
    margin-bottom: 8px;
    line-height: 1.1;
}
.prize-amount.mega { color: #e11d48; margin-top: 0px; }
.prize-amount.power { color: #be123c; 
    margin-top: 0px;
}

.prize-amount .unit {
    font-family: var(--font-family-base);
    font-size: 1.6rem;
    font-weight: 700;
    margin-left: 8px;
    color: var(--text-color);
}

.prize-details {
    color: var(--text-color);
    margin: 0 0 16px;
    font-size: 1.3rem;
}

.multiplier-info {
    background-color: var(--bg-color);
    border: 1px dashed var(--border-color);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-color);
    margin: 0 auto 20px;
    max-width: 320px;
}

.countdown {
    background-color: var(--bg-color);
    padding: 16px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
}

.countdown-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.rollover-badge {
    background-color: #f59e0b;
    color: #1e2-93b;
    font-weight: 700;
    padding: 8px 16px; /* ✨ 패딩을 늘려 전체 크기 확보 */
    font-size: 0.85rem; /* ✨ 폰트 크기 미세 조정 */
    line-height: 1;
    clip-path: polygon(50% 0%, 61% 32%, 98% 35%, 72% 58%, 81% 91%, 50% 75%, 19% 91%, 28% 58%, 2% 35%, 39% 32%);
}

.previous-number-balls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.prev-ball {
    width: 33px;
    height: 33px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-family-display);
    background-color: #ffffff;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.dark-mode .prev-ball {
    background-color: var(--surface-color);
}


.prev-ball.bonus {
    background-color: #f59e0b;
    color: #1e293b;
    border: none;
}

.prev-ball.power {
    background-color: #db2777;
    color: #ffffff;
    border: none;
}

.time-box { display: flex; flex-direction: column; }
.time-value { font-family: var(--font-family-display); font-size: 2rem; font-weight: 700; color: var(--text-color); line-height: 1; }
.time-label { font-size: 0.75rem; color: var(--text-color); text-transform: uppercase; }

.card-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn { padding: 16px 20px; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: all 0.2s ease; }
.btn-secondary { background-color: var(--surface-color); color: var(--text-color); border: 1px solid var(--border-color); }
.btn-secondary:hover { background-color: var(--bg-color); border-color: var(--primary-color); color: var(--primary-color); }
.btn-primary { background: #ffa027;  color: #fff; }
.btn-primary:hover {   border-color: var(--highlight-color); color: var(--text-color); }
.btn-primary.alt { border-color: var(--primary-color); background: linear-gradient(45deg, #f94848, var(--highlight-color)); }
.btn-primary.alt:hover {  border-color: var(--highlight-color); color: var(--text-color);  }


/* --- 사이드바 --- */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-box { background-color: var(--surface-color); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 24px; text-decoration: none; color: var(--text-color); box-shadow: 0 4px 15px var(--shadow-color); }

.today-stats h3 { text-align: center; font-family: var(--font-family-display); margin: 0 0 30px; font-size: 1.2rem; color: var(--text-muted-color); }
.stat-item { display: flex; justify-content: space-between; align-items: center; padding: 13px; border-radius: 10px; margin-bottom: 12px; }
.stat-item:last-child { margin-bottom: 0; }
.stat-item span { font-size: 0.95rem; font-weight: 500; }
.stat-item strong { font-size: 1.7rem; font-weight: 700; font-family: var(--font-family-display); }
.light-mode .stat-item:nth-child(2) { background-color: #f1f5f9; }
.light-mode .stat-item:nth-child(3) { background-color: #e2e8f0; }
.dark-mode .stat-item:nth-child(2) { background-color: #334155; }
.dark-mode .stat-item:nth-child(3) { background-color: #475569; }

.cs-box { text-align: center; background: linear-gradient(135deg, var(--primary-color), #fa8b8b); color: #fff; border: none; 
    padding-bottom: 12px;
    padding-top: 5px;

}
.phone-number { font-size: 2.5rem; font-weight: 700; font-family: var(--font-family-display); margin: 8px 0; }
.cs-hours { font-size: 0.8rem; opacity: 0.8; }

.promo-box { display: flex; align-items: center; justify-content: space-between; position: relative; overflow: hidden; transition: transform 0.3s ease, filter 0.3s ease; border: none; }
.promo-box:hover { transform: scale(1.03); filter: brightness(1.1); }
.promo-tag { position: absolute; top: 12px; left: -30px; background-color: rgba(255,255,255,0.2); transform: rotate(-45deg); padding: 4px 30px; font-size: 0.8rem; font-weight: 700; }
.promo-text h4 { margin: 0 0 8px; font-size: 1.2rem; font-weight: 700; }
.promo-text p { margin: 0; font-size: 0.9rem; opacity: 0.9; }
.promo-icon { font-size: 3rem; opacity: 0.2; }
.promo-box.purple { background: linear-gradient(135deg, #6b21a8, #a855f7); color: #fff; }
.promo-box.pink { background: linear-gradient(135deg, #9f1239, #f472b6); color: #fff; }

/* --- 퀵 네비게이션 섹션 --- */
#quick-navigation { background-color: var(--bg-color); border-top: 1px solid var(--border-color); }
.quick-nav-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.quick-nav-item { background-color: var(--surface-color); border-radius: var(--border-radius); padding: 24px; text-align: center; text-decoration: none; color: var(--text-color); border: 1px solid var(--border-color); box-shadow: 0 4px 15px var(--shadow-color); transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease; }
.quick-nav-icon-wrapper { width: 80px; height: 80px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; transition: all 0.3s ease; }
.quick-nav-title { font-weight: 700; font-size: 1rem; transition: color 0.3s ease; }
.quick-nav-icon-wrapper.color-mega { background-color: #fffbeb; color: #f59e0b; }
.quick-nav-icon-wrapper.color-power { background-color: #fee2e2; color: #ef4444; }
.quick-nav-icon-wrapper.color-cash { background-color: #ecfdf5; color: #22c55e; }
.quick-nav-icon-wrapper.color-result { background-color: #eff6ff; color: #3b82f6; }
.dark-mode .quick-nav-icon-wrapper.color-mega { background-color: #45331b; color: #fcd34d; }
.dark-mode .quick-nav-icon-wrapper.color-power { background-color: #4f2323; color: #fca5a5; }
.dark-mode .quick-nav-icon-wrapper.color-cash { background-color: #153829; color: #86efac; }
.dark-mode .quick-nav-icon-wrapper.color-result { background-color: #21304f; color: #93c5fd; }
.quick-nav-item:hover { transform: translateY(-8px); box-shadow: 0 10px 25px var(--shadow-color); color: var(--primary-color); }
.quick-nav-item:hover .quick-nav-icon-wrapper { transform: scale(1.1) rotate(10deg); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.quick-nav-item:hover .quick-nav-title { color: var(--primary-color); }


/* --- 당첨 복권 슬라이더 섹션 --- */
#winning-tickets-slider { background-color: var(--surface-color); padding: 4rem 0; overflow: hidden; }
#winning-tickets-slider .section-title { margin-bottom: 1rem; }
.congrats-title h2 .highlight { color: #e11d48; }

.swiper.mySwiperWinningTickets { width: 100%; height: 400px; padding: 50px 0; box-sizing: border-box; }
.swiper-slide { width: 300px; height: 100%; border-radius: 16px; background-size: cover; background-position: center; position: relative; overflow: hidden; transform: scale(0.8); opacity: 0.5; transition: transform 0.6s ease, opacity 0.6s ease; }
.swiper-slide-active { transform: scale(1); opacity: 1; box-shadow: 0 15px 40px rgba(0,0,0,0.2); }
.dark-mode .swiper-slide-active { box-shadow: 0 15px 40px rgba(0,0,0,0.4); }

.swiper-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 20px 20px; text-align: center; color: #fff; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 50%, transparent 100%); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; box-sizing: border-box; height: 50%; }
.caption-rank-wrapper { display: flex; align-items: baseline; gap: 6px; color: #FFD700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.7); }
.caption-rank { font-size: 2rem; font-weight: 700; line-height: 1; margin: 0 4px; }
.caption-rank-wrapper .fa-star { transition: transform 0.3s ease; }
.caption-rank-wrapper .star-inner { font-size: 1rem; animation: pulse-star 2s infinite ease-in-out; }
.caption-rank-wrapper .star-middle { font-size: 0.8rem; }
.caption-rank-wrapper .star-outer { font-size: 0.6rem; }
.caption-lotto { font-size: 1rem; font-weight: 400; opacity: 0.9; margin-top: 8px; }

@keyframes pulse-star { 0%, 100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.3); opacity: 1; } }

.swiper-button-next, .swiper-button-prev { color: #fff; --swiper-navigation-size: 24px; background-color: rgba(0, 0, 0, 0.2); border-radius: 50%; width: 50px; height: 50px; transition: background-color 0.3s; }
.swiper-button-next:hover, .swiper-button-prev:hover { background-color: rgba(0, 0, 0, 0.5); }
.swiper-pagination-wrapper { position: relative; margin-top: 1rem; text-align: center; }
.swiper-pagination-bullet { background-color: var(--text-muted-color); opacity: 0.5; transition: all 0.3s; width: 8px; height: 8px; }
.swiper-pagination-bullet-active { background-color: var(--primary-color); opacity: 1; width: 24px; border-radius: 5px; }


/* --- 추천 영상 섹션 --- */
#recommended-videos { background-color: var(--bg-color); padding: 4rem 0; }
.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.video-item { background-color: var(--surface-color); border-radius: var(--border-radius); overflow: hidden; box-shadow: 0 4px 15px var(--shadow-color); cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.video-item:hover { transform: translateY(-8px); box-shadow: 0 10px 25px var(--shadow-color); }
.video-thumbnail { position: relative; aspect-ratio: 16 / 9; background-size: cover; background-position: center; }
.video-thumbnail .play-button { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; background-color: rgba(255, 0, 0, 0.8); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; transition: transform 0.3s ease, background-color 0.3s ease; }
.video-item:hover .play-button { transform: translate(-50%, -50%) scale(1.1); background-color: rgba(255, 0, 0, 1); }
.video-title { padding: 16px; margin: 0; font-weight: 600; font-size: 0.95rem; color: var(--text-color); }

/* --- ✨ 이용가이드 섹션 (최종 수정) ✨ --- */
#usage-guide {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
}
.guide-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    gap: 10px;
}
.tab-btn {
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    border: 1px solid #ffa70059;
    background-color: var(--bg-color);
    color: var(--text-muted-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}
.tab-btn:hover {
    color: var(--text-color);
    background-color: var(--surface-color);
}
.tab-btn.active {
    background: #ff9309;
    color: #fff;
}
.guide-content-wrapper {
    position: relative;
    padding: 0 20px;
    box-sizing: border-box;
}
.guide-content {
    display: none;
    animation: fadeIn 0.5s ease;
}
.guide-content.active {
    display: flex;
    justify-content: center;
}
@media (max-width: 768px) {
	#usage-guide {
    display: none;
  }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.flowchart {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 20px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    max-width: 100%;
    box-sizing: border-box;
}
.flowchart::-webkit-scrollbar {
    display: none;
}
.flow-step {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px;
    width: 90px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: box-shadow 0.3s ease, border-color 0.3s ease; /* transform transition 제거 */
}
.flow-step:hover {
    /* transform: translateY(-5px); 이 부분을 제거하여 잘림 현상 원천 차단 */
    border-color: var(--primary-color);
    box-shadow: 0 12px 30px var(--shadow-color); /* 그림자 효과를 강화하여 피드백 제공 */
}
.flow-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    transition: all 0.3s ease;
}
.flow-step:hover .flow-icon {
    background-color: var(--primary-color);
    color: #fff;
    transform: scale(1.1);
}
.flow-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
}
.flow-arrow {
    font-size: 1.5rem;
    color: var(--border-color);
    margin: 0 8px;
    flex-shrink: 0;
}

/* --- 모달 공통 & 이미지 모달 --- */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.modal.active { opacity: 1; visibility: visible; }

@keyframes fadeInDown { from { opacity: 0; transform: translate3d(0, -30px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }

.modal-content { position: relative; background-color: var(--surface-color); padding: 15px; border-radius: 16px; max-width: 500px; width: 90%; max-height: 90vh; display: flex; flex-direction: column; align-items: center; box-shadow: 0 20px 40px rgba(0,0,0,0.3); animation: fadeInDown 0.4s ease both; }
.modal-image {
    max-width: 100%; /* ✨ 이 부분을 width에서 max-width로 수정 */
    max-height: 75vh;
    display: block;
    border-radius: 8px;
    object-fit: contain;
    margin-bottom: 15px;
}
.modal-caption { color: var(--text-color); text-align: center; padding: 10px 0; }
.modal-caption .caption-rank { font-size: 1.3rem; font-weight: 700; color: var(--primary-color); margin-right: 8px; }
.modal-caption .caption-lotto { font-size: 1.1rem; color: var(--text-color); }

.close-button { position: absolute; top: -40px; right: 0; width: 32px; height: 32px; font-size: 20px; color: rgba(255,255,255,0.7); background-color: rgba(0,0,0,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; }
.close-button:hover { color: #fff; background-color: var(--primary-color); transform: rotate(90deg); }

/* --- 비디오 모달 --- */
.modal-content-video { position: relative; background-color: #000; padding: 0; border: none; box-shadow: 0 20px 40px rgba(0,0,0,0.5); width: 90%; max-width: 960px; animation: fadeInDown 0.4s ease both; border-radius: var(--border-radius); overflow: hidden; }
.video-player-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.video-player-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.close-button.video-close { top: -35px; right: 0; color: #fff; background: none; text-shadow: 0 1px 5px rgba(0,0,0,0.7); }

/* --- 플로팅 메뉴 (모바일 터치 지원) --- */
.floating-menu {
    position: fixed;
    top: 80%;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
}

.floating-link {
    position: relative;
    width: 150px;
    height: 50px;
    pointer-events: none;
}

.link-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 45px;
    height: 100%;
    
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-right: none;
    padding: 0 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px 0 0 12px;
    box-shadow: -2px 2px 10px var(--shadow-color);
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    
    pointer-events: auto;
    cursor: pointer;
    transition: width 0.4s ease, background-color 0.4s ease, color 0.4s ease;
}

.link-content span {
    padding-left: 8px;
}

/* ✨ 수정: 데스크톱 hover와 모바일 touch(.expanded)에 동일한 스타일 적용 */
.floating-link:hover .link-content,
.floating-link.expanded .link-content {
    background-color: var(--primary-color);
    color: #fff;
    width: 150px;
}


/* --- ✨ 새로운 푸터 (가운데 정렬) ✨ --- */
.main-footer {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 3rem 0;
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: center; /* 수정: space-between -> center */
    align-items: flex-start;
    gap: 60px; /* 추가: 좌우 콘텐츠 간 간격 */
    flex-wrap: wrap; /* 화면이 좁을 때를 대비한 줄바꿈 */
}

.footer-info {
    display: flex;
    flex-direction: column;
}

.footer-top {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 1.5rem;
}

.footer-logo img {
    height: 32px;
    opacity: 0.5;
}

.footer-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap; /* 화면이 좁을 때를 대비한 줄바꿈 */
}

.footer-nav li {
    position: relative;
}

.footer-nav li:not(:last-child)::after {
    content: '|';
    color: var(--border-color);
    margin-left: 12px;
}


.footer-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}
.footer-nav a:hover {
    color: var(--text-color);
}

.footer-details p {
    margin: 4px 0;
    line-height: 1.6;
}

.copyright {
    margin-top: 1rem;
    font-weight: 600;
}

.footer-warning {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid #ef4444;
    border-radius: var(--border-radius);
    background-color: rgba(239, 68, 68, 0.05);
}

.footer-warning p {
    margin: 0;
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 600;
}

.footer-certification img {
    max-width: 100px;
    height: auto;
}

/* 푸터 반응형 */
@media (max-width: 1024px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px; /* 모바일에서 간격 조절 */
    }
    .footer-top {
        flex-direction: column;
        align-items: center;
    }
    .footer-nav ul {
        justify-content: center;
    }
    .footer-certification {
        margin-top: 2rem;
    }
}

/* --- 반응형 디자인 --- */
@media (max-width: 1024px) {
    .main-nav { display: none; }
    .grid-container, .video-grid { grid-template-columns: 1fr; }
    .lotto-cards-container { grid-template-columns: 1fr; }
    .section-title h2 { font-size: 2.2rem; }
    .quick-nav-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
}

@media (max-width: 768px) {
    .header-main .container { flex-direction: row; }
    .prize-amount { font-size: 3rem; }
    .prize-amount .unit { font-size: 1.3rem; }
    .lotto-card { padding: 24px; }
    
    #winning-tickets-slider .swiper-button-next, #winning-tickets-slider .swiper-button-prev { display: none; }
    .swiper.mySwiperWinningTickets { height: 320px; }
    .swiper-caption .caption-rank { font-size: 1.5rem; }
    .swiper-caption .caption-lotto { font-size: 0.8rem; }
    
    .modal-content { max-width: 95%; }
    .close-button { top: 10px; right: 10px; color: var(--text-color); background-color: var(--surface-color); }
    .close-button.video-close { top: 10px; right: 10px; color: #fff; background: rgba(0,0,0,0.5); }
    .footer-grid { grid-template-columns: 1fr; text-align: center;}
    .footer-column p { max-width: none; }
    .social-links { justify-content: center; }

    /* ✨ 모바일 가이드 디자인 개선 ✨ */
    .flowchart {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* 화면에 맞춰 자동 정렬 (더 작은 크기) */
        width: 100%;
        gap: 12px; /* 아이템 간 간격 */
        padding: 0;
        overflow-x: hidden;
    }
    .flow-step {
        width: auto; /* 너비를 자동으로 채움 */
        height: 85px; /* 높이 축소 */
        padding: 8px;
    }
    .flow-icon {
        width: 40px; /* 아이콘 배경 축소 */
        height: 40px;
        font-size: 1.3rem; /* 아이콘 폰트 축소 */
        margin-bottom: 6px;
    }
    .flow-label {
        font-size: 0.75rem; /* 라벨 폰트 축소 */
    }
    .flow-arrow {
        display: none;
    }
    .guide-content-wrapper {
        padding: 0;
    }
}

/* --- ✨ 고객센터 섹션 ✨ --- */
#customer-center {
    background-color: var(--bg-color);
}

.customer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); /* ✨ 핵심 수정 부분 */
    gap: 24px;
    margin-bottom: 24px;
}

.info-box {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 24px 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px var(--shadow-color);
    min-width: 0; /* ✨ 이 한 줄을 추가해주세요 */
}
.info-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.info-box-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.more-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
.more-link:hover {
    color: var(--primary-color);
}
.info-list {
    list-style: none; /* ✨ 이 한 줄을 추가해주세요 */
    padding: 0;
    margin: 0;
}

.info-list a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    
    /* ✨ 수정된 부분 ✨ */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    
    transition: color 0.3s ease;
}

.info-list li {
    margin-bottom: 0.8rem;
}
.info-list li:last-child {
    margin-bottom: 0;
}

.info-list a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}
.info-list a:hover {
    color: var(--text-color);
}
.info-list a i {
    color: #3b82f6;
    font-size: 0.8rem;
    margin-left: auto;
}

.label {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.label.notice {
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}
.label.popular {
    background-color: rgba(236, 72, 153, 0.1);
    color: var(--highlight-color);
}

.support-links-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.support-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    text-decoration: none;
    border-right: 1px solid var(--border-color);
}
.support-item:last-child {
    border-right: none;
}

.support-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.support-text h4 {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}
.support-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted-color);
}

/* 고객센터 섹션 반응형 */
@media (max-width: 1024px) {
    .customer-grid {
        grid-template-columns: 1fr;
    }
    .support-links-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
    .support-item:nth-child(2) {
        border-right: none;
    }
}

@media (max-width: 768px) {
    .support-links-wrapper {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    .support-item {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .support-item:last-child {
        border-bottom: none;
    }
}

/* --- ✨ 웰컴 팝업 스타일 (최종 수정) ✨ --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

@keyframes popup-bounce-in {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.popup-overlay.active .popup-content {
    animation: popup-bounce-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.popup-content {
    position: relative;
    background-color: var(--surface-color);
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    overflow: hidden;
    padding: 0;
}

.popup-image {
    width: 100%;
    height: 300px;
}

.popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.popup-body {
    padding: 1rem 2rem;
}

.popup-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0,0,0,0.3);
    color: #fff;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.popup-close-btn:hover {
    background-color: var(--primary-color);
    transform: rotate(90deg) scale(1.1);
}

.popup-body h2 {
    font-family: var(--font-family-display);
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0 1rem;
    line-height: 1.3;
    background: linear-gradient(45deg, var(--primary-color), var(--highlight-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.popup-body p {
    color: var(--text-muted-color);
    margin: 0 0 1.5rem;
    line-height: 1.6;
    font-size: 1.05rem;
}

.popup-cta-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    background: linear-gradient(45deg, var(--primary-color), #6366f1);
    border: none;
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
}
.popup-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.4);
}

.popup-footer {
    padding: 0 2rem 1.5rem;
    text-align: right; /* ✨ 수정: 오른쪽 정렬 추가 */
}
.popup-footer label {
    font-size: 0.9rem;
    color: var(--text-muted-color);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.popup-footer input[type="checkbox"] {
    accent-color: var(--primary-color);
}

/* 팝업 반응형 */
@media (max-width: 500px) {
    .popup-content {
        max-width: 90%;
    }
    .popup-image {
        height: 180px;
    }
    .popup-body {
        padding: 1rem 1.2rem;
    }
    .popup-body h2 {
        font-size: 1.6rem;
        margin-top: 0.2rem;
        margin-bottom: 0.8rem;
    }
    .popup-body p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    .popup-cta-btn {
        font-size: 1rem;
        padding: 14px;
    }
    .popup-footer {
        padding: 0 1.2rem 1rem;
        text-align: right;
    }
    .popup-footer label {
        font-size: 0.85rem;
    }
	.logo img { height: 25px; width: auto; }
}

/* --- ✨ 로그인 페이지 스타일 (수정) ✨ --- */
.login-section {
    background-color: var(--bg-color);
    padding: 5rem 0; /* 헤더와 푸터 사이의 여백 */
}

.login-section .container {
    display: flex;
    justify-content: center;
}

.login-box {
    background-color: var(--surface-color);
    padding: 2.5rem 3rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px var(--shadow-color);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-logo {
    margin-bottom: 2rem;
}
.login-logo img {
    height: 40px;
}

.input-group {
    position: relative;
    margin-bottom: 1.2rem;
}

.input-group i {
    position: absolute;
    top: 50%;
    left: 35px;
    transform: translateY(-50%);
    color: var(--text-muted-color);
}

.input-group input {
    width: 80%;
    padding: 14px 14px 14px 45px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.login-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.login-helpers {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}
.login-helpers a {
    color: var(--text-muted-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
.login-helpers a:hover {
    color: var(--primary-color);
}
.login-helpers span {
    color: var(--border-color);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted-color);
    margin: 2rem 0;
    font-size: 0.8rem;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}
.divider span {
    padding: 0 1rem;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.social-btn i {
    font-size: 1.2rem;
}

.social-btn.google {
    background-color: #fff;
    color: #444;
}
.social-btn.google:hover {
    background-color: #f8f8f8;
}

.social-btn.kakao {
    background-color: #FEE500;
    color: #191919;
    border-color: #FEE500;
}
.social-btn.kakao i {
    font-style: normal;
    font-weight: 700;
}
.social-btn.kakao:hover {
    background-color: #fddc00;
}

.prize-table-section {
    padding-top: 3rem;
}

.table-wrapper {
    overflow-x: auto; /* 모바일에서 좌우 스크롤 가능하도록 */
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--surface-color);
}

/* --- ✨ 모바일 헤더 스타일 ✨ --- */

/* 기본적으로 모바일 요소 숨기기 */
.mobile-header-right,
.mobile-nav {
    display: none;
}

/* 화면이 1024px 이하일 때 (태블릿 & 모바일) */
@media (max-width: 1024px) {
    /* 기존 데스크톱 메뉴 및 테마 스위처 숨기기 */
    .main-nav,
    .theme-switcher {
        display: none;
    }
    .user-nav {
        display: none; /* 상단 작은 메뉴도 숨김 */
    }

    /* 모바일용 요소 보이기 */
    .mobile-header-right,
    .mobile-nav {
        display: flex; /* mobile-header-right는 flex로 */
    }
    .mobile-nav {
        flex-direction: column; /* mobile-nav는 세로로 */
        background-color: var(--surface-color);
        border-top: 1px solid var(--border-color);
    }

    .mobile-header-right {
        align-items: center;
        gap: 1rem;
    }

    .mobile-login-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        border: 1px solid var(--border-color);
        padding: 6px 12px;
        border-radius: 50px;
        text-decoration: none;
        color: var(--text-muted-color);
        font-size: 0.9rem;
        font-weight: 600;
    }

    .hamburger-menu {
        background: none;
        border: none;
        font-size: 1.8rem;
        color: var(--text-color);
        cursor: pointer;
        padding: 0;
    }

    .mobile-nav-row {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .mobile-nav-row:first-child {
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-nav-row li {
        flex: 1; /* 1/4 너비 차지 */
        text-align: center;
        position: relative;
    }
    .mobile-nav-row li:not(:last-child) {
        border-right: 1px solid var(--border-color);
    }

    .mobile-nav-row a {
        display: block;
        padding: 1rem 0;
        text-decoration: none;
        color: var(--text-color);
        font-weight: 500;
        font-size: 0.9rem;
    }

    .badge.upgrade {
        position: absolute;
        top: -10px;
        left: 50%;
        transform: translateX(-50%);
        background: linear-gradient(45deg, #22c55e, #16a34a);
        color: #fff;
        padding: 3px 8px;
        border-radius: 50px;
        font-size: 0.7rem;
        font-weight: 700;
    }
}

.mobile-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

.mobile-nav.active {
    max-height: 500px; /* 메뉴가 들어갈 충분한 높이 */
}

/* --- 카운트다운 로딩 아이콘 스타일 --- */
.countdown-timer .time-value i.fa-spinner {
    font-size: 1.5rem; /* 아이콘 크기 조정 */
    color: var(--text-muted-color);
}

/* --- ✨ 추첨일 특별 정보 스타일 ✨ --- */
.special-draw-info {
    text-align: center;
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 1rem 1.3rem;
    margin: 16px 0;
	margin-top: 0px;
	margin-bottom: 0px;
    padding-bottom: 8px;

}
.special-draw-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted-color);
    margin: 0 0 0 0px;	
}
.special-draw-info .prize-amount {
    font-size: 1rem; /* 폰트 크기 조정 */
    margin-bottom: 2px;
}
.special-draw-info .prize-amount .unit {
    font-size: 1.2rem;
}
.special-draw-info .prize-details {
    margin-bottom: 1rem;
}
.special-draw-info h4:last-of-type {
    margin-top: 1rem;
}