/* =========================================================
   common.css  –  Light Pocket Tools 공통 스타일
   적용 페이지: 전역 레이아웃(base.html) 및 각 도구 페이지
   ========================================================= */

/* ── 1. Base (기본 설정) ────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa; /* Jasypt에서 가져옴 */
}

code, pre, textarea, input[type="text"] {
    font-family: 'JetBrains Mono', 'D2Coding', 'Courier New', monospace;
}

/* ── 2. Layout (헤더, 메인, 푸터) ────────────────────────── */
.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.main-content {
    min-height: calc(100vh - 140px);
}

.site-footer {
    background: #2c3e50;
    color: white;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.site-footer .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-copyright {
    color: #ecf0f1;
    font-size: 0.9rem;
    margin: 0;
}

/* ── 3. Components (공통 요소) ─────────────────────────── */

/* 언어 선택기 */
.lang-selector { display: flex; align-items: center; gap: 6px; }
.lang-icon { font-size: 1rem; color: rgba(255,255,255,0.85); }
.lang-select {
    background: rgba(255,255,255,0.15); color: white; border: 1px solid rgba(255,255,255,0.35);
    border-radius: 6px; padding: 5px 10px; font-size: 0.85rem; cursor: pointer;
    outline: none; transition: background 0.2s; -webkit-appearance: none; appearance: none;
    padding-right: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,255,255,0.7)'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center;
}
.lang-select:hover { background-color: rgba(255,255,255,0.25); }
.lang-select option { background: #4a5568; color: white; }

/* 광고 슬롯 */
.ad-slot {
    background: #f3f4f6; border: 2px dashed #e5e7eb; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 13px;
}
.ad-slot-horizontal { height: 90px; margin-bottom: 2rem; }
.ad-slot-bottom     { height: 90px; margin-top: 3rem; }

/* 공통 컨테이너 및 헤더 */
.tool-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 50px 20px;
}

/* Diff 페이지용 와이드 컨테이너 */
.tool-container-wide {
    max-width: 1400px;
    padding: 40px 24px 80px;
}

.tool-header { text-align: center; margin-bottom: 2rem; }
.tool-header h1 { font-size: 2.5rem; color: #667eea; margin-bottom: 0.5rem; }
.tool-header p  { color: #666; font-size: 1.1rem; }

.card {
    background: white; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb; border-radius: 15px; padding: 28px; margin-bottom: 1.5rem;
}

/* 사용 가이드 & 피처 리스트 */
.usage-guide {
    padding: 2rem; background: white; border-radius: 15px;
    border: 1px solid #e5e7eb; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}
.usage-guide h2 { color: #667eea; margin-bottom: 1.5rem; font-size: 1.8rem; }
.usage-guide h3 { color: #333; margin-top: 1.5rem; margin-bottom: 1rem; font-size: 1.3rem; }
.usage-guide ul, .usage-guide ol { padding-left: 1.5rem; }
.usage-guide li { margin-bottom: 0.5rem; line-height: 1.8; }
.usage-guide code { background: #f8f9fa; padding: 2px 6px; border-radius: 3px; color: #e74c3c; }

.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-top: 1rem; }
.feature-item { padding: 1rem; background: #f8f9fa; border-radius: 8px; border-left: 4px solid #667eea; }

/* ── 4. Forms & Result (Jasypt 등에서 사용) ──────────────── */
.result-box {
    background-color: #e9ecef;
    min-height: 80px;
    padding: 15px;
    border-radius: 5px;
    font-family: 'JetBrains Mono', 'D2Coding', 'Courier New', monospace;
    word-break: break-all;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white; /* Bootstrap을 사용하더라도 명시적으로 색상 지정 */
}
.btn-primary:hover { opacity: 0.9; }

/* ── 5. Utilities (유틸리티 및 반응형) ────────────────────── */
.visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (max-width: 768px) {
    .site-logo { font-size: 1.2rem; }
    .lang-select { font-size: 0.8rem; padding: 4px 22px 4px 8px; }
    /* 모바일에서는 컨테이너 패딩 축소 */
    .tool-container { padding: 30px 15px; }
}