/* 직딩 공감 앱 - Minimal, Neutral, Calm 디자인 */

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

:root {
    /* Warm Off-White 배경 */
    --bg-color: #faf9f6;
    --bg-card: #ffffff;
    
    /* Neutral 텍스트 */
    --text-primary: #2c2c2c;
    --text-secondary: #6b6b6b;
    --text-light: #9a9a9a;
    
    /* Border */
    --border-color: #e8e8e8;
    
    /* Transition */
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.app-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* 화면 전환 애니메이션 */
.screen {
    display: none;
    animation: fadeIn 0.4s ease;
}

.screen.active {
    display: block;
}

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

/* 메인 감정 선택 화면 */
.emotion-selection-screen {
    text-align: center;
}

.screen-title {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 400;
    letter-spacing: -0.3px;
}

.emotion-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.emotion-item-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.emotion-button {
    background: none;
    border: none;
    font-size: 3.5rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emotion-button:hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, 0.03);
}

.emotion-button:active {
    transform: scale(0.95);
}

.emotion-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.3rem;
}

/* 세부 감정 선택 화면 */
.sub-emotion-screen {
    text-align: center;
}

.sub-emotion-title {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.sub-emotion-group-name {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sub-emotion-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.sub-emotion-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.sub-emotion-item:hover {
    border-color: var(--text-light);
    background-color: rgba(0, 0, 0, 0.02);
}

.sub-emotion-item .emoji {
    font-size: 1.8rem;
}

/* 문장 공감 화면 */
.sentence-screen {
    text-align: center;
}

.sentence-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.sentence-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: left;
    transition: var(--transition);
    position: relative;
}

.sentence-item:not(.clicked):hover {
    border-color: var(--text-light);
    background-color: rgba(0, 0, 0, 0.02);
}

.sentence-item.clicked {
    border-color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.03);
}

.sentence-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

.sentence-ratio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.ratio-bar {
    flex: 1;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.ratio-bar-fill {
    height: 100%;
    background-color: var(--text-primary);
    transition: width 0.4s ease;
    border-radius: 2px;
}

.ratio-label {
    min-width: 60px;
    text-align: right;
    font-size: 0.8rem;
}

.sentence-item.clicked .clicked-message {
    display: block;
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

.clicked-message {
    display: none;
}

/* 뒤로가기 버튼 */
.back-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    margin-bottom: 2rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-button:hover {
    color: var(--text-primary);
}

/* 공유 버튼 */
.share-button {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 2rem;
    width: 100%;
}

.share-button:hover {
    border-color: var(--text-light);
    background-color: rgba(0, 0, 0, 0.02);
}

/* 반응형 */
@media (max-width: 480px) {
    body {
        padding: 1rem;
    }
    
    .emotion-button {
        font-size: 3rem;
        width: 70px;
        height: 70px;
    }
    
    .emotion-label {
        font-size: 0.75rem;
    }
    
    .sub-emotion-title {
        font-size: 3rem;
    }
    
    .sentence-text {
        font-size: 1rem;
    }
}

/* 조용한 애니메이션 */
@keyframes subtlePulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.sentence-item.clicked .ratio-bar-fill {
    animation: subtlePulse 1s ease;
}

/* 공유 알림 */
.share-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--text-primary);
    color: var(--bg-card);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 90%;
    text-align: center;
}

.share-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 앱 푸터 */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    text-align: center;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    z-index: 100;
}

.footer-text {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0;
}

/* 푸터가 콘텐츠를 가리지 않도록 여백 추가 */
body {
    padding-bottom: 4rem;
}
