/* 전역 스타일 초기화 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

body {
    background-color: #f8fafc;
    color: #0f172a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 헤더 영역 (트렌디한 그라데이션 background) */
header {
    background: linear-gradient(135deg, #e0e7ff 0%, #eef2ff 100%);
    padding: 60px 20px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.header-container {
    max-width: 800px;
    margin: 0 auto;
}

.sub-title {
    display: inline-block;
    background-color: #4f46e5;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e1b4b;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

header p {
    color: #475569;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* 힙한 검색창 */
.search-box {
    position: relative;
    max-width: 550px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 16px 24px;
    padding-right: 50px;
    font-size: 1rem;
    border: 2px solid transparent;
    border-radius: 30px;
    background-color: white;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.1), 0 8px 10px -6px rgba(79, 70, 229, 0.1);
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #4f46e5;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.2);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    cursor: pointer;
}

/* 메인 컨텐츠 영역 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    flex: 1;
    width: 100%;
}

/* 카테고리 가로 스크롤 태그 바 */
.category-tags {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 15px;
    margin-bottom: 30px;
    white-space: nowrap;
    -ms-overflow-style: none; /* IE 스크롤바 숨기기 */
    scrollbar-width: none; /* 파이어폭스 스크롤바 숨기기 */
}

.category-tags::-webkit-scrollbar {
    display: none; /* 크롬 스크롤바 숨기기 */
}

.tag {
    background-color: white;
    border: 1px solid #e2e8f0;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #475569;
}

.tag:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.tag.active {
    background-color: #4f46e5;
    color: white;
    border-color: #4f46e5;
    font-weight: 600;
}

/* 누리집 그리드 레이아웃 */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* 개별 누리집 카드 디자인 (토스/애플 스타일) */
.card {
    background-color: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #c7d2fe;
}

.card-top {
    margin-bottom: 16px;
}

.card-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4f46e5;
    background-color: #e0e7ff;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 12px;
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.card p {
    font-size: 0.88rem;
    color: #64748b;
    word-break: break-all;
}

.card-bottom {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4f46e5;
    margin-top: 12px;
}

.card-bottom span {
    transition: transform 0.2s ease;
}

.card:hover .card-bottom span {
    transform: translateX(4px);
}

/* 하단 푸터 */
footer {
    text-align: center;
    padding: 30px 20px;
    color: #94a3b8;
    font-size: 0.9rem;
    border-top: 1px solid #e2e8f0;
    background-color: white;
}