/* --- Simplewoody 2026 Premium Minimalist CSS (V9.3) --- */

:root {
    --primary: #007aff;
    --primary-soft: #e5f1ff;
    --success: #34c759;
    --bg: #f5f5f7;
    --card: #ffffff;
    --text-main: #1d1d1f;
    --text-sub: #86868b;
    --border: #d2d2d7;
    --shadow: 0 8px 30px rgba(0,0,0,0.04);
    --radius: 18px;
}

/* 기초 초기화 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }
body { background-color: var(--bg); color: var(--text-main); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif; line-height: 1.5; padding: 16px; }
.container { max-width: 480px; margin: 10px auto 60px; }

/* [1] 글로벌 내비게이션 (브랜드 바) */
.global-nav-bar { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.nav-home { font-size: 14px; font-weight: 800; color: var(--text-main); text-decoration: none; letter-spacing: 0.5px; text-transform: uppercase; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.btn-support { background-color: transparent; color: var(--text-sub); border: 1px solid var(--border); padding: 7px 12px; border-radius: 50px; font-size: 12px; font-weight: 700; cursor: pointer; }
.btn-all-tools { background-color: var(--primary-soft); color: var(--primary); border: none; padding: 8px 14px; border-radius: 50px; font-size: 12px; font-weight: 700; cursor: pointer; }

/* [2] 히어로 섹션 & 헤더 */
header { text-align: center; margin-bottom: 24px; padding-top: 20px; }
header h1 { font-size: 26px; font-weight: 800; letter-spacing: -1px; }
.emoji-header { font-size: 32px; display: block; margin-bottom: 8px; }
.hero-section { padding: 40px 0 30px; text-align: center; }
.hero-section h1 { font-size: 34px; line-height: 1.2; letter-spacing: -1.2px; font-weight: 800; }
.hero-section h1 strong { color: var(--primary); display: block; }
.hero-section p { font-size: 15px; color: var(--text-sub); font-weight: 500; margin-top: 12px; }

/* [3] 메인 전용: 검색창 & 카테고리 (여백 미세 조정) */
.search-box { margin-bottom: 24px; position: relative; }
.search-box input { 
    width: 100%; padding: 16px 20px; border-radius: 12px; 
    background-color: #fff; border: 1px solid var(--border); 
    box-shadow: var(--shadow); font-size: 15px; font-weight: 500; 
    outline: none; transition: 0.2s ease; 
}

#category-bar { 
    display: flex; flex-wrap: wrap; justify-content: flex-start; 
    gap: 8px; padding: 0; margin-bottom: 32px !important; width: 100%; 
}
.category-chip { 
    padding: 8px 16px; background-color: var(--card); 
    color: var(--text-main); border-radius: 8px; 
    font-size: 12px; font-weight: 600; cursor: pointer; 
    border: 1px solid var(--border); transition: 0.2s ease; 
}

/* [4] 메인 전용: 도구 그리드 */
#tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 0; width: 100%; }
.tool-card { background: var(--card); padding: 14px 12px; border-radius: 12px; text-decoration: none; color: inherit; box-shadow: 0 2px 10px rgba(0,0,0,0.03); transition: 0.2s ease; display: flex; flex-direction: row; align-items: center; gap: 10px; border: 1px solid var(--border); min-width: 0; overflow: hidden; }
.tool-card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.card-emoji { font-size: 24px; flex-shrink: 0; margin-bottom: 0; }
.card-info { display: flex; flex-direction: column; overflow: hidden; min-width: 0; flex: 1; }
.card-info h3 { font-size: 14px; font-weight: 700; margin-bottom: 2px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-info p { display: block; font-size: 11px; color: var(--text-sub); line-height: 1.2; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 모바일 대응 (아이폰 SE 가로 스크롤 방지 적용) */
@media (max-width: 480px) {
    #tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
    .tool-card { padding: 10px; gap: 8px; }
    .card-emoji { font-size: 20px; }
    .card-info h3 { font-size: 13px; }
    .card-info p { font-size: 10px; }
}
#related-tools-section { margin: 48px 0; padding-top: 32px; border-top: 1px solid var(--border); } .compact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }


/* [5] 상세 전용: 계산기 컴포넌트 */
.quick-guide { text-align: center; color: var(--text-sub); font-size: 14px; margin-bottom: 24px; padding: 0 20px; }
.calc-card { background: var(--card); padding: 32px 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.input-group { position: relative; margin-bottom: 24px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text-sub); }
input:not(.search-box input) { width: 100%; padding: 16px; background-color: #f2f2f7; border: 2px solid transparent; border-radius: 14px; font-size: 16px; font-weight: 600; outline: none; transition: 0.2s; }
input:not(.search-box input):focus { background-color: #fff; border-color: var(--primary); }
.clear-btn { position: absolute; right: 12px; bottom: 14px; width: 22px; height: 22px; background: #d2d2d7; color: #fff; border: none; border-radius: 50%; display: none; align-items: center; justify-content: center; font-size: 10px; cursor: pointer; }
.input-group.has-value .clear-btn { display: flex; }

.result-area { margin: 32px 0; padding: 24px; background-color: var(--primary-soft); border-radius: 16px; text-align: center; }
.result-value { font-size: 36px; font-weight: 800; color: var(--primary); margin-top: 4px; }

.table-wrapper { margin-top: 24px; border-top: 1px solid #f2f2f7; padding-top: 24px; }
table { width: 100%; border-collapse: collapse; }
table th { text-align: left; color: var(--text-sub); font-size: 13px; font-weight: 500; padding-bottom: 12px; }
table td { padding: 14px 0; border-bottom: 1px solid #f2f2f7; font-size: 15px; font-weight: 600; }
table tr:last-child td { border-bottom: none; }
table td:last-child { text-align: right; color: var(--primary); }

/* [6] 상세 전용: SEO 설명글 (Description) */
.faq-container { margin-top: 32px; background: #fff; padding: 20px; border-radius: 14px; border: 1px solid var(--border); } .faq-container h3 { font-size: 15px; margin-bottom: 16px; color: var(--text-main); } .faq-item { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px dashed var(--border); } .faq-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; } .faq-item strong { display: block; font-size: 13px; color: var(--text-main); margin-bottom: 4px; } .faq-item p { font-size: 13px; color: var(--text-sub); line-height: 1.5; }
.description { margin-top: 48px; padding: 0 4px; }
.description h2 { font-size: 18px; font-weight: 800; margin-bottom: 12px; color: var(--text-main); }
.description p { font-size: 14px; color: var(--text-sub); line-height: 1.7; margin-bottom: 16px; }
.description strong { color: var(--text-main); }

/* [7] 공통 요소: 광고 슬롯, 푸터, 버튼 */
.ad-slot { background: #f2f2f7; border-radius: 12px; margin: 28px 0; min-height: 100px; display: flex; align-items: center; justify-content: center; color: #d2d2d7; font-size: 10px; font-weight: 600; overflow: hidden; }

button:not(.btn-all-tools, .btn-support, .clear-btn, .category-chip) { width: 100%; padding: 18px; background-color: var(--text-main); color: #fff; border: none; border-radius: 16px; font-size: 16px; font-weight: 700; cursor: pointer; transition: 0.2s; margin-top: 10px; }
button:active { transform: scale(0.98); }

.lang-switcher { margin-bottom: 20px; padding: 10px 16px; background: #fff; border-radius: 10px; display: inline-block; border: 1px solid var(--border); font-size: 11px; } .lang-switcher a { text-decoration: none; color: var(--text-sub); margin: 0 4px; transition: 0.2s; } .lang-switcher a:hover { color: var(--primary); font-weight: 700; } footer { margin-top: 40px; text-align: center; font-size: 11px; color: var(--text-sub); padding-bottom: 100px; }

/* 반응형 */
@media (max-width: 380px) {
    #tool-grid { grid-template-columns: 1fr; }
    .result-value { font-size: 28px; }
    .nav-home { font-size: 12px; }
    .ad-slot { min-height: 100px; }
}

/* 프로모션 배너 스타일 (V14.0) */
.promo-banner {
    display: flex; align-items: center; padding: 16px; border-radius: 14px;
    color: #fff; position: relative; overflow: hidden; margin: 20px 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); transition: 0.3s;
}
.promo-banner:hover { transform: translateY(-2px); filter: brightness(1.1); }
.promo-tag {
    position: absolute; top: 0; right: 0; background: rgba(0,0,0,0.2);
    padding: 4px 12px; font-size: 10px; font-weight: 800; border-bottom-left-radius: 10px;
}
.promo-content { display: flex; align-items: center; gap: 12px; }
.promo-emoji { font-size: 28px; }
.promo-title { font-size: 15px; font-weight: 800; line-height: 1.2; }
.promo-desc { font-size: 12px; opacity: 0.9; margin-top: 2px; }
.promo-arrow { margin-left: auto; font-size: 20px; font-weight: 800; opacity: 0.7; }

/* 드롭다운(Select) 기본 스타일 초기화 및 재정의 */
select {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-main);
    background-color: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px; /* 둥글둥글한 심플우디 스타일 */
    cursor: pointer;
    appearance: none; /* OS 기본 화살표 제거 (핵심!) */
    -webkit-appearance: none;
    -moz-appearance: none;
    
    /* 커스텀 화살표 아이콘 주입 (SVG 사용) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* 포커스 시 강조 효과 */
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* 호버 시 배경색 미세 변경 */
select:hover {
    background-color: #f9f9fb;
}

/* 비활성화 상태 */
select:disabled {
    background-color: #f2f2f7;
    cursor: not-allowed;
    opacity: 0.6;
}