@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    --gold: #d4af37; --gold-bright: #f1c40f; --dark: #0a0e14; --light: #f4f7f6;
    --card-gray: #161b22; --text-gray: #8b949e; --text-main: #eeeeee; --border-gold: rgba(212, 175, 55, 0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Pretendard', sans-serif; background: var(--dark); color: var(--text-main); line-height: 1.6; overflow-x: hidden; min-height: 100vh; word-break: keep-all; }

/* [Ticker & Background] */
.rolling-ticker { width: 100%; height: 32px; background: #000; border-bottom: 1px solid var(--border-gold); overflow: hidden; position: relative; z-index: 1001; }
.ticker-wrapper, .ticker-content { display: flex; align-items: center; height: 100%; }
.ticker-content { white-space: nowrap; animation: ticker-move 40s linear infinite; }
.ticker-item { color: var(--text-gray); font-size: 0.75rem; padding: 0 40px; }
.t-gold { color: var(--gold); margin-right: 5px; font-weight: 700; }
@keyframes ticker-move { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* [수정 포인트 1] z-index를 2001로 변경 (인트로 페이지 위에서도 금가루가 보이도록 수정) */
#dust-canvas { position: fixed; inset: 0; z-index: 2001; pointer-events: none; }
#quantum-bg { position: fixed; inset: 0; z-index: -1; background: radial-gradient(circle at center, rgba(16, 20, 50, 0.4) 0%, #0a0e14 100%), linear-gradient(var(--border-gold) 1px, transparent 1px), linear-gradient(90deg, var(--border-gold) 1px, transparent 1px); background-size: 100% 100%, 45px 45px, 45px 45px; }

/* [Intro System] */
/* [수정 포인트 2] background를 quantum-bg와 동일한 격자 무늬로 변경 */
#welcome-page { 
    position: fixed; 
    inset: 0; 
    background: radial-gradient(circle at center, rgba(16, 20, 50, 0.4) 0%, #0a0e14 100%), linear-gradient(var(--border-gold) 1px, transparent 1px), linear-gradient(90deg, var(--border-gold) 1px, transparent 1px); 
    background-size: 100% 100%, 45px 45px, 45px 45px;
    z-index: 2000; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 0 20px; 
    transition: opacity 1s; 
    overflow-y: auto; 
}
#seneca-quote { font-size: 1.2rem; text-align: center; position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%); width: 90%; transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1); }
#seneca-quote.moved { top: 40px; transform: translate(-50%, 0); font-size: 0.85rem; opacity: 0.6; }
#seneca-quote b { color: var(--gold); text-shadow: 0 0 10px rgba(212, 175, 55, 0.5); }
.intro-container { margin-top: 150px; width: 88%; max-width: 450px; padding-bottom: 80px; }
.intro-box { position: relative; margin-bottom: 25px; display: none; opacity: 0; transform: translateY(20px); transition: 0.6s; }
.intro-box.active { display: block; opacity: 1; transform: translateY(0); }
.intro-text-glow { background: rgba(255,255,255,0.03); border: 1px solid var(--border-gold); padding: 22px; border-radius: 18px; text-align: center; font-size: 0.95rem; backdrop-filter: blur(5px); }
.phase-label { display: block; font-weight: 800; color: var(--gold); font-size: 0.75rem; margin-bottom: 8px; letter-spacing: 2px; text-transform: uppercase; }
.fairy { position: absolute; top: 50%; transform: translateY(-50%); font-size: 1.2rem; opacity: 0; transition: 0.5s 0.3s; }
.intro-box.active .fairy-l { left: -35px; opacity: 1; }
.intro-box.active .fairy-r { right: -35px; opacity: 1; }
#start-btn { display: none; margin: 30px auto; padding: 16px 45px; border: 1px solid var(--gold); background: rgba(212,175,55,0.1); color: var(--gold); border-radius: 30px; cursor: pointer; font-weight: bold; transition: 0.3s; }
#start-btn:hover { background: rgba(212,175,55,0.2); box-shadow: 0 0 20px rgba(212, 175, 55, 0.4); }

/* [Header & Layout] */
header { text-align: center; padding: 12px 0; background: rgba(10,14,20,0.9); border-bottom: 1px solid var(--border-gold); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); position: sticky; top: 0; z-index: 1000; }
.header-flex { display: flex; justify-content: space-between; align-items: center; padding: 0 15px !important; }
.header-left, .header-right { flex: 1; display: flex; align-items: center; }
.header-right { justify-content: flex-end; }
.header-center, .header-center h2 { 
    flex: 2; 
    color: var(--gold) !important; 
    letter-spacing: 3px !important; 
    font-weight: 900 !important; 
    font-size: 1.6rem !important;
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.4), 0 2px 4px rgba(0,0,0,0.8) !important; 
    white-space: nowrap;
    text-align: center;
}
.btn-share { background: none; border: none; color: var(--text-gray); cursor: pointer; padding: 8px; transition: 0.3s; }
.btn-share:hover { color: var(--gold); transform: scale(1.1); }

#main-content { display: none; opacity: 0; transition: opacity 1s; }
.container { width: 92%; max-width: 500px; margin: 0 auto; padding: 20px 0; }
.input-section, .result-section { background: var(--card-gray); padding: 28px; border-radius: 24px; border: 1px solid #30363d; box-shadow: 0 15px 35px rgba(0,0,0,0.4); margin-bottom: 30px; position: relative; overflow: hidden; }
.input-section::before, .result-section::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* [New Guide Text Style] */
.input-guide-text { 
    font-size: 0.75rem; 
    color: var(--text-gray); 
    margin: -10px 0 20px 0; 
    display: flex; 
    align-items: flex-start; 
    gap: 5px; 
    line-height: 1.4;
}
.input-guide-text b { color: var(--gold); }

.security-notice {
    font-size: 0.72rem;
    color: var(--text-gray);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(255,255,255,0.05);
    text-align: center;
    line-height: 1.5;
}
.security-notice b { color: var(--gold); }

.input-row { display: flex; gap: 12px; }
.input-group { margin-bottom: 20px; flex: 1; }
.input-group label { color: var(--gold); font-size: 0.85rem; font-weight: bold; margin-bottom: 8px; display: block; }
.input-group input, .input-group select { background: #0d1117; border: 1px solid #30363d; color: var(--text-main); padding: 14px; border-radius: 10px; width: 100%; margin-top: 5px; outline: none; transition: 0.3s; font-size: 0.9rem; }
.input-group input:focus { border-color: var(--gold); box-shadow: 0 0 10px rgba(212,175,55,0.2); }

/* [Balls & Content Alignment] */
.saju-intro-text { text-align: center; padding: 25px 10px; color: var(--text-main); font-size: 0.95rem; line-height: 1.8; opacity: 0.8; }
.latest-draw, .lucky-draw-area { background: #000; padding: 25px 10px; border-radius: 24px; margin-bottom: 25px; border: 1px solid #222; text-align: center; overflow: hidden; }

.balls { 
    display: flex; 
    justify-content: center; 
    gap: 6px; 
    margin-top: 10px; 
    flex-wrap: nowrap !important; 
    width: 100%;
}

.ball { 
    width: 38px; 
    height: 38px; 
    line-height: 38px; 
    border-radius: 50%; 
    font-weight: 800; 
    color: #fff; 
    font-size: 0.9rem; 
    box-shadow: inset -3px -3px 5px rgba(0,0,0,0.3), 2px 2px 5px rgba(0,0,0,0.5); 
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 1 auto; 
    aspect-ratio: 1 / 1; 
    text-align: center;
}

.ball-1 { background: radial-gradient(circle at 30% 30%, #fbc400, #d9a300); }
.ball-11 { background: radial-gradient(circle at 30% 30%, #69c8f2, #2d91c2); }
.ball-21 { background: radial-gradient(circle at 30% 30%, #ff7272, #d33333); }
.ball-31 { background: radial-gradient(circle at 30% 30%, #aaaaaa, #666666); }
.ball-41 { background: radial-gradient(circle at 30% 30%, #b0d840, #5d9a05); }

/* [Premium Benefit - Centered] */
.premium-benefit-card { background: linear-gradient(145deg, #1c2128 0%, #0d1117 100%); border: 1px solid var(--gold); border-radius: 20px; padding: 22px; margin: 20px 0; box-shadow: 0 10px 30px rgba(0,0,0,0.5); text-align: center; display: flex; flex-direction: column; align-items: center; }
.benefit-tag { background: var(--gold); color: #000; font-size: 0.7rem; font-weight: 900; padding: 3px 8px; border-radius: 5px; margin-bottom: 12px; display: inline-block; }
.benefit-list { list-style: none; display: inline-block; text-align: left; }
.benefit-list li { font-size: 0.85rem; margin-bottom: 8px; opacity: 0.9; display: flex; align-items: center; justify-content: flex-start; }
.benefit-list li::before { content: '✦'; color: var(--gold); margin-right: 8px; font-size: 0.7rem; }

/* [Buttons] */
.btn-area { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.btn { width: 100%; padding: 18px; border-radius: 14px; font-weight: 800; cursor: pointer; border: none; font-size: 1rem; transition: 0.3s; text-align: center; }
.btn-gold { background: rgba(212,175,55,0.1) !important; border: 1px solid var(--gold) !important; color: var(--gold-bright) !important; text-shadow: 0 0 10px rgba(241,196,15,0.5); }
.btn-gold:hover { background: rgba(241,196,15,0.2) !important; box-shadow: 0 0 20px rgba(212,175,55,0.6); transform: translateY(-2px); }
.btn-premium { background: rgba(114,47,55,0.3) !important; border: 1px solid silver !important; color: #e0e0e0 !important; text-shadow: 0 0 8px rgba(255,255,255,0.4); }
.btn-premium:hover { background: rgba(114,47,55,0.5) !important; letter-spacing: 2px; box-shadow: 0 0 30px rgba(114,47,55,0.8); transform: scale(1.05); }

.btn-glass-store { width: 100%; padding: 14px; border-radius: 16px; background: rgba(255,255,255,0.03); backdrop-filter: blur(8px); border: 1px solid var(--border-gold); color: var(--gold); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: 0.3s; display: flex; justify-content: center; align-items: center; gap: 8px; }
.btn-glass-store:hover { background: rgba(212,175,55,0.08); border-color: rgba(212,175,55,0.5); transform: translateY(-2px); }

/* [Wheel & Overlay] */
#loadingOverlay { display: none; position: fixed; inset: 0; background: #000; z-index: 9999; flex-direction: column; justify-content: center; align-items: center; overflow: hidden; }
#matrixCanvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.loading-center { position: relative; z-index: 1; text-align: center; }
.loading-logo { font-size: 1.6rem; font-weight: 700; color: var(--gold); letter-spacing: 3px; margin-bottom: 18px; text-shadow: 0 0 20px rgba(212,175,55,.7); }
.loading-bar-wrap { width: 220px; height: 4px; background: rgba(212,175,55,.15); border-radius: 4px; margin: 0 auto 16px; overflow: hidden; }
.loading-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold), #fff8dc); border-radius: 4px; animation: loadFill 2.8s ease-in-out forwards; }
@keyframes loadFill { 0%{width:0%} 60%{width:80%} 90%{width:92%} 100%{width:97%} }
.loading-text { color: rgba(212,175,55,.85); font-size: .82rem; letter-spacing: 2px; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.4} }

.wheel-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 10001; justify-content: center; align-items: center; backdrop-filter: blur(10px); }
.wheel-box { background: #161b22; width: 90%; max-width: 340px; border-radius: 24px; border: 1px solid var(--border-gold); padding: 20px; }
.wheel-body { display: flex; height: 200px; position: relative; mask-image: linear-gradient(to bottom, transparent, black 40%, black 60%, transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, black 40%, black 60%, transparent); }
.wheel-col { flex: 1; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; }
.wheel-col::-webkit-scrollbar { display: none; }
.wheel-item { height: 40px; line-height: 40px; text-align: center; color: #555; scroll-snap-align: center; transition: 0.3s; }
.wheel-item.selected { color: var(--gold); font-weight: bold; font-size: 1.2rem; }
.wheel-selection-bar { position: absolute; top: 80px; inset: 0; height: 40px; background: rgba(212,175,55,0.05); border-top: 1px solid var(--border-gold); border-bottom: 1px solid var(--border-gold); pointer-events: none; }
.wheel-footer { display: flex; gap: 10px; margin-top: 25px; }
.wheel-btn { flex: 1; padding: 14px; border-radius: 12px; font-weight: bold; cursor: pointer; }
.wheel-btn.cancel { background: #30363d; color: #eee; }
.wheel-btn.confirm { background: var(--gold); color: #000; }

/* [Responsive] */
@media (max-width: 500px) {
    .header-center, .header-center h2 { font-size: 1.35rem !important; letter-spacing: 2px !important; } 
    .intro-container { width: 84%; }
    .ball { 
        width: clamp(28px, 8vw, 38px); 
        height: clamp(28px, 8vw, 38px); 
        line-height: normal; 
        font-size: 0.8rem; 
    }
    .input-section, .result-section { padding: 22px 18px; }
}
/* [Footer Section - Slim Version] */
footer { 
    text-align: center; 
    padding: 30px 20px 25px; 
    color: var(--text-gray); 
    font-size: 0.7rem; 
    border-top: 1px solid rgba(212, 175, 55, 0.1); 
    background: rgba(0, 0, 0, 0.2);
    margin-top: 10px; 
}
.footer-content { 
    max-width: 500px; 
    margin: 0 auto; 
    line-height: 1.6; 
}
.footer-logo { 
    color: var(--gold); 
    font-weight: 800; 
    letter-spacing: 1px; 
    margin-bottom: 10px; 
    display: block;
    font-size: 0.8rem;
}
.footer-disclaimer { 
    margin-bottom: 12px; 
    opacity: 0.6; 
    word-break: keep-all;
    font-size: 0.68rem; 
}
.footer-policy-links {
    margin-bottom: 12px;
    font-size: 0.68rem;
}
.footer-biz-info { 
    margin-bottom: 15px; 
    padding: 10px 15px; 
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    display: inline-block;
    text-align: left;
}
.footer-biz-info span { display: block; margin-bottom: 2px; }
.footer-copy { 
    margin-top: 5px; 
    display: block; 
    color: rgba(212, 175, 55, 0.25); 
    font-weight: 600;
}
/* [Official Banner - Full Transparent & Row Center] */
.official-banner-wrapper {
    width: 100%;
    max-width: 500px;
    margin: 20px auto 10px; 
}

.official-banner {
    display: flex !important;
    flex-direction: row !important; 
    align-items: center !important;  
    justify-content: flex-start;
    
    background: transparent !important; 
    border: 1px solid rgba(212, 175, 55, 0.3); 
    
    border-radius: 16px;
    height: 50px;           
    padding: 0 20px;
    text-decoration: none;
    box-sizing: border-box;
    transition: 0.3s;
}

.banner-logo {
    height: 40px;            
    width: auto;
    margin-right: 15px;      
    flex-shrink: 0;
    filter: none !important; 
}

.banner-text {
    color: #ffffff;          
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;     
}

.click-icon {
    margin-left: auto;       
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.official-banner:hover {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: var(--gold);
}

/* [Mobile Optimization - Center Aligned Text] */
@media (max-width: 480px) {
    .official-banner {
        padding: 0 12px;      
        height: auto;         
        min-height: 70px;     
        gap: 8px;             
        padding-top: 10px;    
        padding-bottom: 10px;
    }

    .banner-logo {
        height: 28px;         
        margin-right: 5px;
    }

    .banner-text {
        font-size: 0.9rem;
        line-height: 1.3;
        flex: 1;              
        text-align: center;   
        display: flex;
        justify-content: center; 
        align-items: center;     
        
        white-space: normal;  
        word-break: keep-all; 
    }

    .click-icon {
        font-size: 0.7rem;
        margin-left: 0;       
        white-space: nowrap;
        min-width: fit-content;
    }
}
/* [사이트 메인 로고 전용 스타일] */
.header-left {
    display: flex !important;
    align-items: center !important; 
    justify-content: flex-start;
}

.logo-link {
    display: flex;
    align-items: center;
}

.site-main-logo {
    height: 38px !important;    
    width: auto !important;     
    display: block !important;
    filter: none !important;    
    margin: 0;
}

@media (max-width: 480px) {
    .site-main-logo {
        height: 30px !important; 
    }
}

/* ── 사용자 페이지 반응형 1024px+ ── */
@media (min-width: 1024px) {
    .report-container,
    .main-wrapper,
    .content-wrapper {
        max-width: 900px;
        margin: 0 auto;
    }
    .combo-box {
        padding: 20px 24px;
    }
}
