@charset "utf-8";

/* 1. 기본 설정 및 변수 */
:root {
    --bg-color: #fdfaf5;       /* 전체 배경색 */
    --primary-orange: #f5a623; /* 활성 탭 및 포인트 색 */
    --light-yellow: #fcebc7;   /* 비활성 탭 배경 */
    --border-color: #e0e0e0;   /* 카드 테두리 */
    --dark-bar: #545454;       /* 정보 띠 배경 */
    --text-main: #333333;
    --text-sub: #888888;
    --slider-blue: #2684ff;    /* 슬라이더 색상 */
}

body {
    margin: 0; padding: 0;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex; flex-direction: column; align-items: center;
    font-family: 'Noto Sans KR', sans-serif;
}

/* 2. 헤더 및 입력창 */
header {
    text-align: center;
    width: 100%;
    margin-bottom: 10px;

    /* 배경 이미지 설정 */
    background-image: url('https://cacidsign.imghost.cafe24.com/2025/font/title.png');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover; 
    
    padding-top: 80px;    
    padding-bottom: 25px; 
}

h1 {
    font-size: 3.5rem;
    margin: 0 0 10px 0;
    color: #222;
    text-shadow: 0 1px 3px rgba(255,255,255,0.8);
}

.subtitle {
    font-size: 1.0rem;
    color: #111;
    margin-bottom: 40px;
    font-weight: bold;
}

.input-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 10px;
}

input[type="text"] {
    width: 800px;
    max-width: 90%;
    padding: 20px;
    font-size: 1.2rem;
    border: 1px solid #ddd;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-align: center;
    outline: none;
    color: var(--text-main);
}

input[type="text"]:focus {
    border-color: var(--primary-orange);
}

.input-note {
    font-size: 0.8rem;
    color: #888;
    margin-top: 10px;
    margin-bottom: 5px;
}

/* 3. 정보 띠 및 화살표 */
.info-bar-container {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.info-bar {
    width: 100%;
    background-color: var(--dark-bar);
    color: #fff;
    text-align: center;
    padding: 10px 0;
    font-size: 0.85rem;
}

.arrow-down {
    width: 0; height: 0; 
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--primary-orange);
    position: absolute;
    bottom: -10px;
    z-index: 10;
}

/* 4. 컨트롤러 (슬라이더, 탭) */
.controls {
    width: 100%;
    max-width: 1000px;
    text-align: center;
    margin-bottom: 30px;
}

.slider-wrapper {
    display: flex; align-items: center; justify-content: center;
    gap: 20px; margin-bottom: 30px;
    color: var(--text-sub); font-weight: bold; font-size: 0.9rem;
}

input[type=range] {
    -webkit-appearance: none;
    width: 300px; height: 6px;
    background: #e0e0e0; border-radius: 5px; outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--slider-blue); cursor: pointer;
    border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tabs {
    display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
    padding: 0 10px;
}

.tab-btn {
    padding: 10px 25px;
    border-radius: 50px;
    border: none;
    background-color: var(--light-yellow);
    color: #666;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.tab-btn.active {
    background-color: var(--primary-orange);
    color: white;
    box-shadow: 0 4px 10px rgba(245, 166, 35, 0.3);
}

.tab-btn:hover:not(.active) {
    background-color: #ffe082;
}

/* 5. 폰트 그리드 레이아웃 */
.font-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px 60px 20px;
    box-sizing: border-box;
}

.font-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    height: 220px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.font-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--primary-orange);
}

/* 카드 헤더: 숫자와 이름을 위한 스타일 */
.card-header {
    background: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 폰트 번호 강조 스타일 */
.font-id-number {
    font-size: 1.6rem;  /* 숫자를 아주 크게 키움 */
    font-weight: 900;   /* 가장 굵게 */
    color: #f5a623;     /* 포인트 오렌지색 적용 */
    line-height: 1;
}

/* 폰트 이름 스타일 */
.font-name-text {
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
}

.card-preview {
    flex-grow: 1;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-break: break-all;
    overflow: hidden;
    color: #222;
}

/* ----------------------------------------------------------- */
/* [수정] 라이선스 폰트보기 버튼 스타일 (연한 색상 적용) */
/* ----------------------------------------------------------- */

/* a태그(링크)가 기존 버튼과 동일한 레이아웃을 갖도록 설정 */
a.tab-btn {
    text-decoration: none;      /* 링크 밑줄 제거 */
    display: inline-flex;       /* 플렉스 박스 내 정렬 */
    align-items: center;        /* 수직 중앙 정렬 */
    justify-content: center;    /* 수평 중앙 정렬 */
    box-sizing: border-box;     /* 패딩 포함 크기 계산 */
}

/* 라이선스 버튼 전용 색상 (아주 연한 회색) */
.tab-btn.license-btn {
    background-color: #f0f0f0;  /* 밝고 연한 회색 */
    color: #666;                /* 너무 진하지 않은 회색 글자 */
    border: 1px solid #dcdcdc;  /* 은은한 테두리 */
}

/* 라이선스 버튼 마우스 올렸을 때 효과 */
.tab-btn.license-btn:hover {
    background-color: #e2e2e2;  /* 호버 시 약간만 진해짐 */
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 그림자도 연하게 */
}

/* ----------------------------------------------------------- */
/* [반응형 처리] 태블릿 및 모바일 환경 최적화 */
/* ----------------------------------------------------------- */

/* 1. 태블릿 & 넓은 스마트폰 (768px 이하) */
@media (max-width: 768px) {
    header {
        padding-top: 50px;
        padding-bottom: 30px;
        background-position: center top; 
    }
    h1 { font-size: 2.2rem; }
    .subtitle {
        font-size: 0.9rem;
        padding: 0 20px;
        word-break: keep-all;
        line-height: 1.5;
    }
    .font-grid { grid-template-columns: repeat(2, 1fr); }
    input[type=range] { width: 200px; }
}

/* 2. 작은 스마트폰 (480px 이하) */
@media (max-width: 480px) {
    h1 { 
        font-size: 1.8rem; 
        margin-bottom: 15px;
    }
    input[type="text"] { 
        font-size: 1rem; 
        padding: 15px; 
    }
    .tab-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        margin-bottom: 5px;
    }
    a.tab-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        margin-bottom: 5px;
    }
    .font-grid { grid-template-columns: 1fr; }
    input[type=range] { width: 150px; }
    .slider-wrapper {
        gap: 10px;
        font-size: 0.8rem;
    }
}