/*
 * ==============================================================================
 * 파일명: css/style.css
 * 설명: 환테크 계산기의 커스텀 디자인, Pretendard 폰트 및 모바일 최적화 스타일시트
 * ==============================================================================
 */

/* 1. 프리텐다드(Pretendard) 한글 웹폰트 적용 (토스 앱 스타일 가독성 극대화) */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    letter-spacing: -0.02em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 2. 모바일 터치 및 인터랙션 최적화 */
button, input, select {
    touch-action: manipulation;
}

/* 3. 모바일 화면에서 버튼 찌그러짐 원천 방지 및 여백 설정 */
.btn-no-shrink {
    flex-shrink: 0;
    white-space: nowrap;
}

/* 4. 부드러운 색상 전환 효과 */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.15s ease, box-shadow 0.15s ease;
}

/* 5. 숫자 입력창의 기본 증감 화살표(스피너) 숨김 처리 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* 6. 날짜 선택창(input[type="date"]) 스타일 통일 */
input[type="date"] {
    font-family: inherit;
    cursor: pointer;
}

/* 7. 토스 스타일의 은은한 카드 그림자 효과 */
.toss-card {
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
}

.toss-card-hover:hover {
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.03);
    transform: translateY(-1px);
}

/* 8. 환율 갱신 시 깜빡이는 펄스 애니메이션 */
@keyframes rateUpdateFlash {
    0% { background-color: rgba(59, 130, 246, 0.15); }
    100% { background-color: transparent; }
}

.rate-updated {
    animation: rateUpdateFlash 1s ease-out;
}

/* 9. 커스텀 스크롤바 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
