@import url('https://fonts.googleapis.com/css2?family=Black+Han+Sans&family=Noto+Sans+KR:wght@300;400;700&display=swap');

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

html, body {
    width: 100%; min-height: 100%;
    /* overflow: hidden 제거 — 정적 콘텐츠 섹션 스크롤 접근 허용 */
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    background: #0d0221;
    color: #fff;
}

/* ===== BACKGROUND ===== */
#bg-layer {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: #0d0221;
    transition: background 1.8s ease;
    z-index: 0;
}

/* ===== NEURO CANVAS ===== */
#neuro-canvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ===== PROGRESS BAR ===== */
#progress-bar {
    position: fixed; top: 0; left: 0;
    height: 2px;
    background: linear-gradient(90deg, #9b5cf6, #e040fb);
    z-index: 300;
    width: 0%;
    transition: width 0.6s ease;
}


/* ===== SOUND TOGGLE ===== */
#sound-toggle {
    position: fixed; bottom: 1.5rem; right: 1.5rem;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; z-index: 200; transition: all 0.3s;
}
#sound-toggle:hover { background: rgba(255,255,255,0.09); color: rgba(255,255,255,0.8); }

/* ===== SLIDE SYSTEM ===== */
#slides-container {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10;
}

.slide {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 2rem 1.5rem;
    opacity: 0;
    transform: translateY(55px);
    transition: opacity 0.65s ease, transform 0.65s ease;
    pointer-events: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.slide.active      { opacity: 1; transform: translateY(0); pointer-events: all; }
.slide.exit-up     { opacity: 0; transform: translateY(-55px); pointer-events: none; }

/* ===== INTRO ===== */
#intro-slide { gap: 1.4rem; text-align: center; }

.intro-eyebrow {
    font-size: 0.72rem; letter-spacing: 0.4em;
    color: rgba(200,160,255,0.35); text-transform: uppercase;
}

.intro-title {
    font-family: 'Black Han Sans', sans-serif;
    font-size: clamp(1.7rem, 5.5vw, 2.8rem);
    line-height: 1.35;
    color: #fff;
    text-shadow: 0 0 50px rgba(155,92,246,0.6);
}
.intro-title em { color: #c77dff; font-style: normal; }

.intro-sub {
    font-size: 0.95rem; font-weight: 300;
    color: rgba(255,255,255,0.45);
    max-width: 360px; line-height: 1.7;
}

.intro-narrative {
    font-size: 0.88rem;
    color: rgba(210,190,255,0.6);
    max-width: 340px; line-height: 1.9;
    border-left: 2px solid rgba(155,92,246,0.35);
    padding-left: 1rem; text-align: left;
}

/* 인트로 페이지 링크 */
.intro-page-links {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.5rem;
    justify-content: center;
    align-items: center;
}

.intro-page-links a {
    color: rgba(200,160,255,0.35);
    text-decoration: none;
    font-size: 0.78rem;
    font-family: 'Noto Sans KR', sans-serif;
    transition: color 0.2s;
    letter-spacing: 0.02em;
}

.intro-page-links a:hover { color: rgba(200,160,255,0.75); }

.intro-sep {
    color: rgba(255,255,255,0.15);
    font-size: 0.75rem;
}

#start-btn {
    margin-top: 0.5rem;
    padding: 0.95rem 2.5rem;
    background: transparent;
    border: 1px solid rgba(200,160,255,0.35);
    border-radius: 50px;
    color: #c77dff;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.05rem;
    cursor: pointer;
    letter-spacing: 0.06em;
    transition: all 0.35s ease;
    position: relative; overflow: hidden;
}
#start-btn::before {
    content: '';
    position: absolute; top: 50%; left: 50%;
    width: 0; height: 0;
    background: rgba(200,160,255,0.08);
    border-radius: 50%;
    transform: translate(-50%,-50%);
    transition: width 0.6s, height 0.6s;
}
#start-btn:hover::before { width: 320px; height: 320px; }
#start-btn:hover {
    border-color: rgba(200,160,255,0.7);
    box-shadow: 0 0 25px rgba(200,160,255,0.18);
}

/* ===== QUESTION SLIDE ===== */
.question-slide { /* centered via .q-inner */ }

.q-inner {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}

.step-badge {
    font-size: 0.7rem; letter-spacing: 0.35em;
    color: rgba(255,255,255,0.25); text-transform: uppercase;
    align-self: flex-start;
}

.step-narrative {
    font-size: 0.82rem;
    color: rgba(200,175,255,0.55);
    letter-spacing: 0.04em;
    align-self: flex-start;
}

.question-text {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    font-size: clamp(1.2rem, 3.4vw, 1.7rem);
    line-height: 1.7; color: #fff; text-align: center;
}

/* ===== OPTION BUTTONS ===== */
.options-container { display: flex; flex-direction: column; gap: 0.7rem; width: 100%; }

.opt-btn {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: rgba(255,255,255,0.82);
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.97rem;
    cursor: pointer;
    display: flex; align-items: center; gap: 0.9rem;
    text-align: left; line-height: 1.5;
    transition: all 0.28s ease;
}

.opt-label {
    min-width: 1.7rem; height: 1.7rem; line-height: 1.7rem;
    text-align: center; border-radius: 50%;
    background: rgba(255,255,255,0.08);
    font-size: 0.78rem; font-weight: 400;
    flex-shrink: 0; color: rgba(255,255,255,0.6);
    transition: all 0.28s;
}

.opt-btn:hover:not(:disabled) {
    background: rgba(200,160,255,0.08);
    border-color: rgba(200,160,255,0.35);
    transform: translateX(5px);
}
.opt-btn:hover:not(:disabled) .opt-label {
    background: rgba(200,160,255,0.25); color: #fff;
}
.opt-btn.selected {
    background: rgba(200,120,255,0.12);
    border-color: rgba(200,120,255,0.5);
}
.opt-btn.selected .opt-label {
    background: #c77dff; color: #000;
}
.opt-btn.not-selected { opacity: 0.38; }

/* ===== VOTE GRAPH ===== */
.vote-section {
    width: 100%;
    padding: 1rem 1.1rem;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
}
.vote-title {
    font-size: 0.75rem; color: rgba(255,255,255,0.3);
    margin-bottom: 0.7rem; letter-spacing: 0.08em;
}
.vote-row {
    display: flex; align-items: center; gap: 0.7rem;
    margin-bottom: 0.45rem;
}
.vote-row:last-child { margin-bottom: 0; }
.vote-lbl {
    font-size: 0.75rem; font-weight: 400;
    color: rgba(255,255,255,0.35); min-width: 1rem;
}
.vote-bar-bg {
    flex: 1; height: 5px;
    background: rgba(255,255,255,0.07);
    border-radius: 3px; overflow: hidden;
}
.vote-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #9b5cf6, #e040fb);
    border-radius: 3px; width: 0%;
    transition: width 0.85s cubic-bezier(0.4,0,0.2,1);
}
.vote-row.faded .vote-bar-fill { background: rgba(255,255,255,0.15); }
.vote-pct {
    font-size: 0.82rem; font-weight: 400;
    color: #9b5cf6; min-width: 2.4rem; text-align: right;
}
.vote-row.faded .vote-pct { color: rgba(255,255,255,0.25); }

/* ===== NEXT BUTTON ===== */
.next-btn {
    width: 100%; padding: 0.85rem;
    background: transparent;
    border: 1px solid rgba(200,160,255,0.25);
    border-radius: 10px;
    color: rgba(200,160,255,0.7);
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.97rem; cursor: pointer;
    transition: all 0.3s; letter-spacing: 0.04em;
}
.next-btn:hover {
    background: rgba(200,160,255,0.08);
    border-color: rgba(200,160,255,0.55);
    color: #c77dff;
}

/* ===== ANALYZING ===== */
#analyzing-slide { gap: 1.8rem; text-align: center; }

.analyzing-orb {
    width: 90px; height: 90px; border-radius: 50%;
    background: radial-gradient(circle at 32% 32%, #c77dff, #3a0068);
    animation: orbPulse 2.2s ease-in-out infinite;
    box-shadow: 0 0 55px rgba(200,100,255,0.4);
    flex-shrink: 0;
}
@keyframes orbPulse {
    0%,100% { transform: scale(1);    box-shadow: 0 0 55px rgba(200,100,255,0.4); }
    50%      { transform: scale(1.12); box-shadow: 0 0 85px rgba(200,100,255,0.65); }
}

.analyzing-label {
    font-family: 'Black Han Sans', sans-serif;
    font-size: 1.4rem; color: #c77dff;
}
.analyzing-sub {
    font-size: 0.88rem; color: rgba(255,255,255,0.35);
    line-height: 1.7; max-width: 280px;
}


/* ===== RESULT ===== */
#result-slide {
    padding-top: 3rem; padding-bottom: 3rem;
}

.result-inner {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    text-align: center;
}

.result-eyebrow {
    font-size: 0.7rem; letter-spacing: 0.4em;
    color: rgba(255,255,255,0.25); text-transform: uppercase;
}
.result-title {
    font-family: 'Black Han Sans', sans-serif;
    font-size: clamp(1.45rem, 4vw, 2.1rem);
    color: #fff;
    text-shadow: 0 0 40px rgba(200,100,255,0.45);
}
.result-card {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(200,155,255,0.12);
    border-radius: 16px;
    padding: 1.5rem 1.4rem;
    text-align: left;
    font-size: 1.02rem; line-height: 1.95;
    color: rgba(255,255,255,0.82);
    min-height: 100px; width: 100%;
    white-space: pre-wrap;
}
.result-type-badge {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: rgba(155,92,246,0.1);
    border: 1px solid rgba(155,92,246,0.3);
    border-radius: 50px;
    font-size: 0.95rem; color: #c77dff; font-weight: 400;
}
.result-actions { display: flex; gap: 0.75rem; width: 100%; }

.result-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.6rem;
    justify-content: center;
    align-items: center;
    margin-top: 0.3rem;
}

.result-links a {
    color: rgba(200,160,255,0.4);
    text-decoration: none;
    font-size: 0.8rem;
    font-family: 'Noto Sans KR', sans-serif;
    transition: color 0.2s;
}

.result-links a:hover { color: rgba(200,160,255,0.75); }
.result-actions button {
    flex: 1; padding: 0.88rem;
    border-radius: 10px; border: none;
    cursor: pointer;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.97rem; font-weight: 400;
    transition: all 0.3s;
}
#share-btn { background: #9b5cf6; color: #fff; }
#share-btn:hover { background: #8b4fe0; }
#retry-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.13) !important;
    color: rgba(255,255,255,0.6);
}
#retry-btn:hover { background: rgba(255,255,255,0.09); }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }

/* typewriter cursor */
.typing::after {
    content: '▌';
    animation: blink 0.75s infinite;
    color: #c77dff;
}
@keyframes blink {
    0%,49% { opacity: 1; } 50%,100% { opacity: 0; }
}

/* hide scrollbar */
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }

/* ===== 정적 콘텐츠 (SEO / 크롤러) ===== */
#site-static-content {
    position: relative;
    z-index: 5;
    /* 게임 슬라이드(position:fixed, z-index:10) 뒤에 있어서 게임 중엔 보이지 않음 */
    /* 스크롤 시 또는 JS 비활성화 환경에서 접근 가능 */
    background: #050010;
    padding: 3rem 1.5rem 2rem;
    border-top: 1px solid rgba(155,92,246,0.1);
    margin-top: 100vh; /* 게임이 뷰포트를 차지하므로 그 아래에 위치 */
}

.static-content-inner {
    max-width: 720px;
    margin: 0 auto;
}

.static-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(155,92,246,0.1);
}

.static-nav a {
    color: rgba(200,160,255,0.55);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
    font-family: 'Noto Sans KR', sans-serif;
}

.static-nav a:hover { color: #c77dff; }

.static-about h2 {
    font-family: 'Black Han Sans', sans-serif;
    font-size: 1.3rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.8rem;
    font-weight: 400;
}

.static-about p {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.35);
    line-height: 1.85;
    margin-bottom: 0.8rem;
    font-family: 'Noto Sans KR', sans-serif;
}

.static-types {
    margin-top: 1.8rem;
}

.static-types h3 {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.92rem;
    color: rgba(200,160,255,0.5);
    margin-bottom: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.static-types ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.5rem;
}

.static-types li {
    font-size: 0.84rem;
    color: rgba(255,255,255,0.3);
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    padding: 0.4rem 0;
}

.static-types li strong {
    color: rgba(200,160,255,0.45);
}

.static-footer-links {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(155,92,246,0.08);
}

.static-footer-links p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.2);
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.7;
}

.static-footer-links a {
    color: rgba(200,160,255,0.3);
    text-decoration: none;
}

.static-footer-links a:hover {
    color: rgba(200,160,255,0.6);
}

/* ===== MOBILE ===== */
@media (max-width: 480px) {
    .slide { padding: 1.4rem 1rem; }
    .question-text { font-size: 1.12rem; }
    .opt-btn { font-size: 0.88rem; padding: 0.85rem 1rem; }
    .result-card { font-size: 0.95rem; }
}
