/* 글로벌 폰트 Pretendard 적용 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    --bg-base: #060b19;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --card-bg: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8)); 
    --border-color: rgba(255, 255, 255, 0.12); 
    --border-hover: rgba(99, 102, 241, 0.6);
    --accent-blue: #38bdf8;
    --accent-purple: #a78bfa;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg-base);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.bg_space_wrapper {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at bottom, #11224d 0%, var(--bg-base) 100%);
    overflow: hidden;
}

/* 더 세밀하고 불규칙한 진짜 별무리 패턴 (SVG 최적화) */
.stars_small {
    position: absolute;
    width: 200vw; height: 200vh;
    top: -50vh; left: -50vw;
    background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"><g fill="%23ffffff"><circle cx="23" cy="45" r="0.5" opacity="0.8"/><circle cx="150" cy="80" r="0.8" opacity="0.5"/><circle cx="320" cy="12" r="1" opacity="0.9"/><circle cx="85" cy="190" r="0.6" opacity="0.4"/><circle cx="260" cy="230" r="1.2" opacity="0.7"/><circle cx="390" cy="170" r="0.5" opacity="0.6"/><circle cx="50" cy="310" r="0.9" opacity="0.8"/><circle cx="180" cy="380" r="0.4" opacity="0.5"/><circle cx="290" cy="340" r="1" opacity="0.9"/><circle cx="110" cy="260" r="0.7" opacity="0.6"/><circle cx="340" cy="280" r="0.5" opacity="0.3"/><circle cx="210" cy="130" r="0.8" opacity="0.8"/><circle cx="10" cy="210" r="1.1" opacity="0.4"/><circle cx="370" cy="70" r="0.6" opacity="0.7"/></g></svg>') repeat;
    background-size: 250px 250px;
    animation: slow_rotate 150s linear infinite;
}

.stars_medium {
    position: absolute;
    width: 200vw; height: 200vh;
    top: -50vh; left: -50vw;
    background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500"><g fill="%23ffffff"><circle cx="45" cy="120" r="1.2" opacity="0.9"/><circle cx="250" cy="40" r="1.5" opacity="0.7"/><circle cx="410" cy="190" r="1" opacity="0.4"/><circle cx="110" cy="320" r="1.8" opacity="0.8"/><circle cx="360" cy="410" r="1.3" opacity="0.6"/><circle cx="190" cy="480" r="1" opacity="0.9"/><circle cx="480" cy="270" r="1.5" opacity="0.5"/><circle cx="80" cy="220" r="1.1" opacity="0.8"/></g></svg>') repeat;
    background-size: 400px 400px;
    animation: slow_rotate_reverse 200s linear infinite;
}

@keyframes slow_rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes slow_rotate_reverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

.glow_orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(180px);
    opacity: 0.35; 
    mix-blend-mode: screen;
}

.deep_blue_orb {
    width: 900px; height: 900px;
    background: #022069;
    top: -250px; left: -200px;
    animation: nebula_drift 30s infinite alternate ease-in-out;
}

.deep_purple_orb {
    width: 800px; height: 800px;
    background: #2b045e;
    bottom: -200px; right: -150px;
    animation: nebula_drift 35s infinite alternate-reverse ease-in-out;
}

@keyframes nebula_drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(80px, 60px) scale(1.1); }
}

/* --- 이하 컨텐츠 영역 --- */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

header {
    text-align: center;
    padding: 120px 0 80px;
}

.title_badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(56, 189, 248, 0.08);
    color: var(--accent-blue);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.text_gradient {
    background: linear-gradient(135deg, #7dd3fc, #c4b5fd, #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0px 0px 8px rgba(196, 181, 253, 0.3));
}

p.subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

.docs_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    padding-bottom: 120px;
}

.doc_card {
    background: var(--card-bg); 
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.03), 0 8px 32px -4px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
}

.doc_card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}

.doc_card:hover {
    transform: translateY(-6px);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.06), 0 24px 48px -8px rgba(0, 0, 0, 0.8);
    border-color: var(--border-hover);
    background: linear-gradient(145deg, rgba(37, 49, 70, 0.8), rgba(20, 30, 50, 0.9));
}

.card_icon {
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s ease, background 0.3s ease;
}

.doc_card:hover .card_icon {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.08);
}

.doc_card:nth-child(1) .card_icon { color: var(--accent-blue); box-shadow: 0 0 20px rgba(56, 189, 248, 0.15); }
.doc_card:nth-child(2) .card_icon { color: var(--accent-purple); box-shadow: 0 0 20px rgba(167, 139, 250, 0.15); }

.card_title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.card_desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 32px;
}

.card_footer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05rem;
    transition: color 0.3s ease;
}

.doc_card:nth-child(1):hover .card_footer { color: var(--accent-blue); }
.doc_card:nth-child(2):hover .card_footer { color: var(--accent-purple); }

.card_footer::after {
    content: '→';
    transition: transform 0.3s ease;
}

.doc_card:hover .card_footer::after {
    transform: translateX(6px);
}

@media (max-width: 768px) {
    .docs_grid { grid-template-columns: 1fr; }
    h1 { font-size: 2.5rem; }
    .doc_card { padding: 32px 24px; }
}

/* =========================================
   수정됨: 단 1개의 별똥별 JS 랜덤 연동 처리
   ========================================= */

.shooting_star_container {
    position: absolute;
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 1; 
    overflow: hidden;
}

.shooting_star {
    position: absolute;
    /* JS에서 주입하는 CSS 변수값을 받아옴 (없을 경우 대비 기본값 세팅) */
    top: var(--start-top, 15%);
    left: var(--start-left, 20%);
    --angle: 40deg; 
    
    height: 2px;
    background: linear-gradient(-45deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    border-radius: 999px;
    filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.8));
    opacity: 0; 
    animation: tail 20s ease-in-out infinite, shooting 20s ease-in-out infinite;
}

.shooting_star::before {
    content: '';
    position: absolute;
    top: 50%; right: 0;
    transform: translateY(-50%);
    width: 0; 
    height: 2px;
    background: linear-gradient(-45deg, rgba(0,0,0,0), rgba(255,255,255,1), rgba(0,0,0,0));
    border-radius: 100%;
    animation: shining 20s ease-in-out infinite;
}

/* 전체 20초 중 약 10%(2초) 동안만 발광/이동하고 나머지는 투명한 상태로 대기 */
@keyframes tail {
    0% { width: 0; }
    5% { width: 150px; }
    10% { width: 0; }
    100% { width: 0; }
}

@keyframes shining {
    0% { width: 0; }
    5% { width: 30px; }
    10% { width: 0; }
    100% { width: 0; }
}

/* JS에서 세팅된 --angle 변수를 바라보며 이동하므로 매번 궤적이 다름 */
@keyframes shooting {
    0% { transform: rotate(var(--angle)) translateX(0); opacity: 0; }
    2% { opacity: 1; }
    10% { transform: rotate(var(--angle)) translateX(1500px); opacity: 0; }
    100% { transform: rotate(var(--angle)) translateX(1500px); opacity: 0; }
}
