/* css/style.css */

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

:root {
    /* 글로벌 Z세대 픽: 애시드 네온 컬러 & 딥 다크 우주 */
    --primary-color: #FF007F; /* 핫핑크 (도파민 뿜뿜) */
    --secondary-color: #7000FF; /* 딥 네온 퍼플 */
    --accent-color: #00F0FF; /* 일렉트릭 시안 (형광 하늘색) */
    --acid-green: #CCFF00; /* Y2K 감성 형광 연두 (S랭크용) */
    
    --bg-dark: #09090E;
    --text-main: #FFFFFF;
    --card-bg: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent; /* 모바일 터치 시 파란 배경 제거 */
}

body {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    /* 움직이는 우주 그라데이션 배경 */
    background: linear-gradient(-45deg, #09090e, #1a0b2e, #0d001a, #001122);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#app {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section {
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.95) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* --- 1. Language Toggle (사이버틱한 캡슐 형태) --- */
#language-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 5px;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

#language-toggle button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 900;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#language-toggle button.active {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 15px var(--accent-color);
}

/* --- 2. Typography (시선 강탈 타이틀 & 질문 여백) --- */
.main-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    filter: drop-shadow(0 0 10px rgba(255, 0, 127, 0.5));
}

.sub-title {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent-color);
    -webkit-text-fill-color: var(--accent-color);
}

.description {
    line-height: 1.6;
    margin: 15px 0 30px;
    color: #d1d1e0;
    font-size: 1rem;
}

/* 캡처본 피드백 반영: 질문 제목과 버튼 사이 여백 추가 */
#q-title {
    margin-bottom: 30px;
    line-height: 1.4;
    font-size: 1.5rem;
    font-weight: 900;
}

/* --- 3. Buttons (쫀득한 터치감 & 네온 글로우) --- */
.primary-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 0, 127, 0.5);
    transition: all 0.2s;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.primary-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(255, 0, 127, 0.8), 0 0 20px var(--accent-color);
}

.primary-btn:active {
    transform: translateY(2px) scale(0.98); /* 누를 때 쫀득하게 들어가는 효과 */
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    padding: 15px 25px;
    border-radius: 30px;
    margin-top: 20px;
    font-weight: 900;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
}

.secondary-btn:hover {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 20px var(--accent-color);
}

/* --- 4. Inputs & Glassmorphism Cards --- */
.input-container, .result-card, .about-container {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 30px 20px;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.birth-select-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.birth-select {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--glass-border);
    color: white;
    padding: 15px 10px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    flex: 1;
    outline: none;
    transition: all 0.3s;
}

.birth-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.birth-select option { background: #1a0b2e; }

/* --- 5. Zodiac Grid (홀로그램 아이콘 느낌) --- */
.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.zodiac-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px 5px;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
}

.zodiac-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.zodiac-item.selected {
    border-color: var(--primary-color);
    background: rgba(255, 0, 127, 0.2);
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.4);
    transform: scale(1.05);
}

.zodiac-icon { font-size: 1.8rem; display: block; }
.zodiac-name { font-size: 0.75rem; margin-top: 8px; font-weight: 700; }

/* --- 6. Results (도파민 터지는 결과창) --- */
.idol-group {
    font-size: 1.3rem;
    color: var(--accent-color);
    font-weight: 900;
    letter-spacing: 1px;
}

.idol-name {
    font-size: 3rem;
    font-weight: 900;
    margin: 5px 0 20px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.chemistry-tag {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 900;
    font-size: 1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.chemistry-tag.S { background: var(--acid-green); color: #000; box-shadow: 0 0 20px var(--acid-green); }
.chemistry-tag.A { background: var(--accent-color); color: #000; box-shadow: 0 0 20px var(--accent-color); }
.chemistry-tag.B { background: var(--primary-color); color: #fff; box-shadow: 0 0 20px var(--primary-color); }

.chemistry-desc { line-height: 1.6; font-size: 1.1rem; font-weight: 700; }

/* --- 7. Mascot Animations --- */
.haetae-mascot-img {
    width: 200px;
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0, 240, 255, 0.4));
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

.spin-animation { animation: magicSpin 2.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite; }

@keyframes magicSpin {
    0% { transform: rotate(0deg) scale(1); filter: hue-rotate(0deg); }
    50% { transform: rotate(180deg) scale(1.1); filter: hue-rotate(180deg); }
    100% { transform: rotate(360deg) scale(1); filter: hue-rotate(360deg); }
}

/* --- 8. Utilities & Footers --- */
.hidden { display: none !important; }

#main-footer {
    width: 100%;
    margin-top: auto;
    padding: 30px 20px;
    text-align: center;
}
.footer-links a { color: var(--accent-color); font-weight: 700; text-decoration: none; font-size: 0.85rem; }
.copyright { font-size: 0.75rem; color: rgba(255, 255, 255, 0.4); margin-top: 10px; }