/* past-life/style.css - 신비로운 전생 테마 (완전 정비 버전) */

:root {
    --primary-color: #4b0082;     /* 인디고 (신비) */
    --secondary-color: #6a11cb;   /* 보라 */
    --accent-color: #ffd700;      /* 골드 (전생의 영광) */
    --card-background: #ffffff;
    --text-color: #333;
    --dark-bg: linear-gradient(135deg, #1a1a2e, #2c3e50, #000000);
}

body {
    font-family: 'Pretendard', sans-serif;
    margin: 0;
    padding: 0;
    background: var(--dark-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}

/* ==================== 메인 카드 ==================== */
#app {
    width: 92%;
    max-width: 400px;
    background: var(--card-background);
    border-radius: 24px;
    margin: 40px auto 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

/* ==================== 화면 ==================== */
.screen {
    display: none;
    padding: 32px 24px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

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

h1 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin: 0 0 16px;
    line-height: 1.3;
    font-weight: 700;
}

h2 {
    font-size: 1.35rem;
    color: var(--text-color);
    margin: 0 0 20px;
}

p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 24px;
}

/* ==================== 버튼 (스크린샷과 동일한 보라색) ==================== */
button {
    background: linear-gradient(135deg, #6a11cb, #8e2de2);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 15px rgba(106, 17, 203, 0.4);
    width: 100%;
    max-width: 280px;
    margin: 10px auto;
    display: block;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(142, 45, 226, 0.5);
}

button:disabled {
    background: #666;
    cursor: not-allowed;
}

/* ==================== 메뉴 그리드 ==================== */
#menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 20px 0;
}

.menu-item {
    background: #f8f8f8;
    border: 2px solid #eee;
    border-radius: 16px;
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 118px;
    transition: all 0.3s;
    cursor: pointer;
}

.menu-item:hover {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.menu-item.selected {
    border-color: var(--accent-color);
    background: #fff9e6;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.menu-item img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    margin-bottom: 8px;
}

.menu-item span {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-color);
}

/* ==================== 결과 화면 ==================== */
#result-animal img {
    width: 100%;
    max-width: 210px;
    border-radius: 50%;
    margin: 20px 0 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 30px;
}

.share-buttons button {
    max-width: none;
    margin: 0;
}

/* ==================== 푸터 (항상 아래 고정 + 골드 링크) ==================== */
footer {
    width: 92%;
    max-width: 400px;
    margin-top: auto;
    padding: 40px 0 50px;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.footer-links a:hover {
    color: #ffe066;
    text-decoration: underline;
}

/* ==================== 모바일 최적화 ==================== */
@media (max-width: 480px) {
    #app {
        width: 94%;
        margin: 30px auto 20px;
        border-radius: 20px;
    }
    
    .screen {
        padding: 28px 20px;
    }
}

/* past-life/style.css */

/* 추가된 메인 배너 이미지 스타일 */
.main-banner {
    width: 100%;        /* 가로 너비를 부모 요소에 맞춤 */
    max-width: 300px;   /* 최대 너비 제한 (원하는 크기로 조절 가능) */
    height: auto;       /* 높이는 비율에 맞춰 자동 조절 */
    display: block;     /* 블록 요소로 만들어 가운데 정렬을 용이하게 함 */
    margin: 0 auto 20px; /* 위아래 마진 0, 좌우 마진 auto로 가운데 정렬, 아래쪽 마진 20px 추가 */
    border-radius: 12px; /* 모서리를 둥글게 (선택 사항) */
}