/* base.css - Remind Planet */
@import url('https://fonts.googleapis.com/css2?family=Jua&display=swap');

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

body {
    font-family: 'Jua', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    min-width: 380px;
    background: #000000;
    overflow-x: hidden;
    color: #fff;
}

.container {
    position: relative;
    z-index: 2;
    max-width: 500px;
    min-width: 380px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* 별 배경 */
.stars {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.stars .star {
    position: absolute;
    width: 2px; height: 2px;
    background: #fff;
    border-radius: 50%;
    animation: twinkle var(--duration, 3s) ease-in-out infinite;
    opacity: 0;
}
@keyframes twinkle {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.8; }
}

/* ==============================
   인트로 화면
   ============================== */
.intro-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 40px 24px;
    position: relative;
    z-index: 2;
}

.intro-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0;
}

.intro-title__remind {
    height: clamp(54px, 15vw, 78px);
    width: auto;
    filter: drop-shadow(0 0 15px rgba(150,160,255,0.4));
}

.intro-title__planet {
    height: clamp(48px, 13vw, 70px);
    width: auto;
    margin-top: -4px;
    margin-left: clamp(140px, 38vw, 210px);
    filter: drop-shadow(0 0 15px rgba(170,140,255,0.4));
}

.intro-planets {
    width: 100%;
    max-width: 480px;
    margin: 24px auto 36px;
}

.intro-planets img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(200,100,50,0.15));
}

.intro-desc {
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 30px;
    text-align: center;
}

.intro-input-wrap {
    width: 100%;
    max-width: 320px;
    margin-bottom: 44px;
}

.intro-input {
    width: 100%;
    padding: 13px 22px;
    background: transparent;
    border: 1.5px solid #ffffff;
    border-radius: 0;
    color: #fff;
    font-size: 24px;
    font-weight: 400;
    font-family: inherit;
    text-align: center;
    outline: none;
    transition: border-color 0.3s ease;
}

.intro-input::placeholder {
    color: rgba(255,255,255,0.3);
}

.intro-input:focus {
    border-color: #ffffff; border-width: 2.5px;
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.intro-start-btn {
    margin-top: 28px;
    width: 100%;
    max-width: 440px;
    padding: 16px 0;
    background: linear-gradient(180deg, #d4c0ff 0%, #b99cf7 30%, #9b80ef 70%, #b496ff 100%);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-size: 30px;
    font-weight: 400;
    font-family: inherit;
    letter-spacing: 3px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.35), 0 0 20px rgba(167,139,250,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(124,92,224,0.35);
}

.intro-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124,92,224,0.5);
}

.intro-start-btn:active {
    transform: scale(0.97);
}

.intro-start-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==============================
   퀴즈 화면
   ============================== */
.quiz-section {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 36px 20px 32px;
    position: relative;
    z-index: 2;
}

.quiz-header {
    position: relative;
    margin-bottom: 24px;
}

.quiz-header__title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.quiz-header__remind {
    height: clamp(32px, 8.5vw, 44px);
    width: auto;
    filter: drop-shadow(0 0 10px rgba(150,160,255,0.35));
}

.quiz-header__planet {
    height: clamp(28px, 7.5vw, 38px);
    width: auto;
    margin-top: -2px;
    margin-left: clamp(85px, 22vw, 120px);
    filter: drop-shadow(0 0 10px rgba(170,140,255,0.35));
}

.quiz-header__planets {    position: fixed;    top: 50%;    left: 50%;    transform: translate(-50%, -50%);    width: clamp(488px, 117vw, 683px);    opacity: 0.12;    z-index: 0;    pointer-events: none;}

.quiz-header__planets img {
    width: 100%;
    height: auto;
}

.quiz-progress {
    text-align: center;
    font-size: 15px;
    color: #ffffff;
    font-weight: 500;
    margin: 16px 0 40px;
    letter-spacing: 2px;
}

.quiz-question {
    text-align: center;
    font-size: clamp(19px, 5.2vw, 24px);
    font-weight: 400;
    line-height: 1.55;
    color: #fff;
    margin-bottom: 96px;
    padding: 0 8px;
    animation: fadeIn 0.4s ease;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-10px); }
}

.quiz-option-btn {
    width: 80%; margin: 0 auto;
    padding: 16px 20px;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 14px;
    color: #fff;
    font-size: clamp(16px, 4.2vw, 19px);
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    line-height: 1.4;
}

.quiz-option-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: #ffffff;
}

.quiz-option-btn:active {
    transform: scale(0.97);
}

.quiz-option-btn.selected {
    background: rgba(255,255,255,0.1);
    border-color: #ffffff; border-width: 2.5px;
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

/* ==============================
   로딩 화면
   ============================== */
.loading-section {
    display: none;
    flex-direction: column;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 36px 20px 32px;
    min-height: 100vh;
    min-height: 100dvh;
}
.loading-section.active { display: flex; }
.loading-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.loading-planet {
    width: 140px; height: 140px;
    border-radius: 50%;
    animation: planetFloat 3s ease-in-out infinite;
    position: relative;
    margin-bottom: 32px;
}
.loading-planet-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    position: absolute;
    top: 0; left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.loading-planet-img.active {
    opacity: 1;
}
@keyframes planetFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
@keyframes resultPlanetFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.loading-text {
    font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 8px;
}
.loading-subtext {
    font-size: 14px; color: rgba(255,255,255,0.45); margin-bottom: 24px;
}
.loading-progress {
    width: 180px; height: 4px;
    background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden;
}
.loading-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, #e08040, #f0b060);
    border-radius: 2px;
    animation: loadingBar 3.5s ease-in-out infinite;
}
@keyframes loadingBar {
    0% { width: 0%; }
    60% { width: 75%; }
    100% { width: 100%; }
}

/* ==============================
   결과 화면
   ============================== */
.result-section {
    display: none;
    flex-direction: column;
    position: relative;
    z-index: 2;
    padding: 36px 20px 32px;
    animation: fadeIn 0.5s ease;
    overflow: visible;
}
.result-section.active { display: flex; }

.result-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    overflow: visible;
    padding-bottom: 60px;
}

.result-planet-name {
    font-size: 36px;
    font-weight: 400;
    color: #ffffff;
    text-align: center;
    margin-bottom: 0;
}

.result-planet-image-wrap {
    position: relative;
    width: 100%;
    height: auto; aspect-ratio: 1;
    margin: -140px auto -60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.result-orbit {
    position: absolute;
    width: 90%;
    height: 90%;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    transform: rotateX(60deg) rotateZ(-20deg);
}
.result-planet-image {
    width: 97%;
    height: 97%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 30px rgba(255,200,100,0.3));
    animation: resultPlanetFloat 8s ease-in-out infinite;
}
.result-info-card {
    position: relative;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    background: #3B3C3F;
    border: 1.5px solid #ffffff;
    border-radius: 28px;
    padding: 36px 20px 24px;
    margin-bottom: 20px;
    margin-top: 20px;
    text-align: center;
    overflow: visible;
}
.result-astronaut {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 120px;
    height: auto;
    z-index: 3;
    transform: translate(30%, 50%);
}

.result-nickname-box {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-block;
    background: #3B3C3F;
    border: 1.5px solid #ffffff;
    border-radius: 50px;
    padding: 8px 28px;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    z-index: 2;
}

.result-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}
.result-trait {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

.result-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8), 0 0 2px rgba(0,0,0,0.6);
    text-align: left;
    margin-bottom: 8px;
}

.result-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    text-align: left;
}
.result-features-list li {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8), 0 0 2px rgba(0,0,0,0.6);
    padding-left: 14px;
    position: relative;
    margin-bottom: 4px;
}
.result-features-list li::before {
    content: '·';
    position: absolute;
    left: 0;
    font-weight: 700;
}

.result-conclusion-text {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    text-align: left;
    margin: 0;
}

.share-section {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 5px;
}
.share-title {
    font-size: 15px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}
.share-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
}
.share-btn.share-single {
    background: transparent;
    border: 1.5px solid #ffffff;
    color: #ffffff;
    padding: 8px 36px;
    font-size: 18px;
}
.share-btn:hover {
    opacity: 0.85;
}

/* Toast */
.toast {
    position: fixed; bottom: 60px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0,0,0,0.85); color: #fff;
    padding: 12px 24px; border-radius: 12px;
    font-size: 14px; z-index: 9999;
    opacity: 0; transition: all 0.3s ease;
    pointer-events: none; backdrop-filter: blur(10px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 반응형 */
@media (max-width: 380px) {
    .intro-title__remind { height: 42px; }
    .intro-title__planet { height: 38px; }
    .intro-start-btn { font-size: 22px; padding: 14px 0; }
    .quiz-option-btn { padding: 14px 16px; font-size: 13px; }
}

@media (max-height: 700px) {
    .intro-planets { max-width: 360px; margin: 10px auto 16px; }
    .intro-desc { margin-bottom: 12px; font-size: 16px; }
    .intro-input-wrap { margin-bottom: 20px; }
    .intro-start-btn { font-size: 24px; }
}

/* 행성 뒤 방사형 오로라 효과 */
.intro-planets {
    position: relative;
}
.intro-planets::before {    content: '';    position: absolute;    top: 10%;    left: 50%;    transform: translate(-50%, -50%);    width: 100%;    height: 140%;    background: radial-gradient(circle at 50% 55%, rgba(200,235,255,1) 0%, rgba(120,190,255,0.5) 12%, rgba(50,140,255,0.1) 25%, transparent 45%);    border-radius: 40% 55% 45% 50%;    z-index: -1;    filter: blur(15px);    animation: auroraGlow 14s cubic-bezier(0.4,0,0.6,1) infinite;    pointer-events: none;}.intro-planets::after {    content: '';    position: absolute;    top: 5%;    left: 50%;    transform: translate(-50%, -50%);    width: 170%;    height: 170%;    background: radial-gradient(circle at 48% 52%, rgba(100,180,255,0.18) 0%, rgba(50,140,255,0.08) 20%, transparent 40%);    border-radius: 55% 42% 50% 45%;    z-index: -1;    filter: blur(20px);    animation: auroraGlowOuter 18s cubic-bezier(0.4,0,0.6,1) infinite 3s;    pointer-events: none;}
/* Remind-Planet 사이 반짝이는 별 */
.intro-title {
    position: relative;
}
.title-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}
.title-star {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: var(--s);
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 3px 1px rgba(255,255,255,0.5);
    animation: titleStarTwinkle 3s ease-in-out infinite var(--d);
    opacity: 0;
}

@keyframes titleStarTwinkle {    0%, 100% {        opacity: 0.1;        transform: scale(0.5);        box-shadow: 0 0 2px 1px rgba(255,255,255,0.3);    }    50% {        opacity: 0.9;        transform: scale(1);        box-shadow: 0 0 4px 1px rgba(255,255,255,0.6), 0 0 8px 2px rgba(200,180,255,0.3);    }}


@keyframes auroraGlow {
    0%, 100% {
        opacity: 0.45;
        transform: translate(-50%, -50%) scale(0.92);
        filter: blur(15px);
        border-radius: 42% 54% 46% 51%;
    }
    8% {
        opacity: 0.52;
        transform: translate(-50.3%, -50.8%) scale(0.95);
        filter: blur(14.5px);
        border-radius: 43% 53% 47% 50%;
    }
    16% {
        opacity: 0.62;
        transform: translate(-50.7%, -51.5%) scale(0.99);
        filter: blur(13.8px);
        border-radius: 45% 51% 45% 52%;
    }
    25% {
        opacity: 0.75;
        transform: translate(-51%, -52.5%) scale(1.05);
        filter: blur(13px);
        border-radius: 47% 49% 50% 48%;
    }
    33% {
        opacity: 0.85;
        transform: translate(-51.2%, -53.2%) scale(1.12);
        filter: blur(12px);
        border-radius: 49% 46% 52% 47%;
    }
    42% {
        opacity: 0.93;
        transform: translate(-50.8%, -54%) scale(1.18);
        filter: blur(11px);
        border-radius: 48% 44% 54% 45%;
    }
    50% {
        opacity: 1;
        transform: translate(-49.5%, -55%) scale(1.22);
        filter: blur(10px);
        border-radius: 45% 52% 50% 44%;
    }
    58% {
        opacity: 0.93;
        transform: translate(-49.2%, -54.2%) scale(1.18);
        filter: blur(11px);
        border-radius: 46% 53% 47% 46%;
    }
    67% {
        opacity: 0.82;
        transform: translate(-49.8%, -53%) scale(1.12);
        filter: blur(12.2px);
        border-radius: 49% 50% 44% 51%;
    }
    75% {
        opacity: 0.7;
        transform: translate(-50.2%, -52%) scale(1.05);
        filter: blur(13.2px);
        border-radius: 51% 47% 46% 53%;
    }
    83% {
        opacity: 0.58;
        transform: translate(-50.3%, -51.2%) scale(0.99);
        filter: blur(14px);
        border-radius: 48% 50% 48% 52%;
    }
    92% {
        opacity: 0.48;
        transform: translate(-50.1%, -50.5%) scale(0.94);
        filter: blur(14.8px);
        border-radius: 44% 53% 47% 51%;
    }
}

@keyframes auroraGlowOuter {
    0%, 100% {
        opacity: 0.2;
        transform: translate(-50%, -50%) scale(0.95);
        filter: blur(20px);
        border-radius: 53% 44% 48% 46%;
    }
    12% {
        opacity: 0.3;
        transform: translate(-50.5%, -51.5%) scale(1.0);
        filter: blur(19.2px);
        border-radius: 50% 46% 50% 45%;
    }
    25% {
        opacity: 0.45;
        transform: translate(-51.2%, -53%) scale(1.08);
        filter: blur(18px);
        border-radius: 46% 49% 47% 50%;
    }
    37% {
        opacity: 0.58;
        transform: translate(-51.5%, -54%) scale(1.15);
        filter: blur(17px);
        border-radius: 44% 51% 45% 53%;
    }
    50% {
        opacity: 0.7;
        transform: translate(-49.5%, -55.2%) scale(1.25);
        filter: blur(15.5px);
        border-radius: 48% 44% 52% 48%;
    }
    62% {
        opacity: 0.72;
        transform: translate(-48.5%, -55%) scale(1.28);
        filter: blur(15px);
        border-radius: 46% 50% 48% 45%;
    }
    75% {
        opacity: 0.5;
        transform: translate(-49.2%, -53.5%) scale(1.15);
        filter: blur(17px);
        border-radius: 50% 46% 44% 50%;
    }
    87% {
        opacity: 0.3;
        transform: translate(-49.8%, -51.5%) scale(1.04);
        filter: blur(19px);
        border-radius: 52% 45% 47% 48%;
    }
}

/* 퀴즈 헤더 반짝이는 별 */
.quiz-header__title {
    position: relative;
}
.quiz-title-stars {
    position: absolute;
    top: 100%;
    left: 0%;
    width: 100%;
    height: 120px;
    z-index: -1;
    pointer-events: none;
}

/* 퀴즈 진행 숫자 강조 */
.quiz-progress__current {
    font-size: 24px;
    font-weight: 700;
}

/* === 앱 다운로드 버튼 (결과 화면 우측 상단) === */
.app-download-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.app-download-btn:active {
    transform: scale(0.9);
}
.app-download-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: block;
}
.app-download-arrow {
    width: 20px;
    height: 20px;
}

/* 결론 리스트 (· 점 - 특징과 동일) */
.result-conclusion-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    text-align: left;
}
.result-conclusion-list li {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8), 0 0 2px rgba(0,0,0,0.6);
    padding-left: 14px;
    position: relative;
    margin-bottom: 4px;
}
.result-conclusion-list li::before {
    content: '·';
    position: absolute;
    left: 0;
    font-weight: 700;
}

/* 워크북 추천 + 스토어 버튼 래퍼 */
.result-workbook-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
.result-workbook {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 14px;
    border: none;
    border-radius: 20px;
    background: #ffffff;
}
.workbook-text {
    font-size: clamp(11px, 3vw, 13px);
    /* color set inline per planet */
    white-space: nowrap;
    font-weight: 400;
}
.workbook-dl-icon {
    /* color set inline per planet */
    flex-shrink: 0;
}
.store-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: background 0.2s;
}
.store-btn:hover {
    background: rgba(255,255,255,0.25);
}
.store-icon {
    width: 22px;
    height: 22px;
}
