/* common.css : 변수, 폰트, 공통 컴포넌트 */

:root {
    --primary: #4F46E5;       /* 메인 컬러 (보라빛 파랑) */
    --primary-hover: #4338ca; /* 버튼 마우스 올렸을 때 */
    --bg: #F3F4F6;            /* 전체 배경색 */
    --text: #1F2937;          /* 글자색 */
    --white: #ffffff;
    --gray: #9ca3af;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    text-align: center;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

/* 공통: 제목 스타일 */
h1 { color: var(--primary); margin-bottom: 5px; letter-spacing: -1px; }
h2 { font-size: 1.2rem; margin-bottom: 20px; color: #374151; }
p { color: #4b5563; font-size: 0.95rem; }

/* 공통: 입력창 스타일 */
input[type="text"],
input[type="number"],
input[type="file"] {
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    transition: 0.2s;
    width: 90%; /* 모바일 대응 */
    max-width: 400px;
}
input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* 공통: 액션 버튼 (핵심) */
.action-btn {
    background: var(--primary);
    color: var(--white);
    padding: 14px 0;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    transition: background 0.2s;
}
.action-btn:hover { background: var(--primary-hover); }
.action-btn:disabled { background: var(--gray); cursor: not-allowed; }

/* 공통: 로그 메시지 */
.log {
    margin-top: 15px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 600;
    background: #f9fafb;
    padding: 10px;
    border-radius: 8px;
    display: none; /* 내용 없으면 숨김 */
}
.log:not(:empty) { display: block; } /* 내용 있으면 보임 */
