/* ===========================
   기본 설정
   =========================== */
:root {
    --primary-color: #4A90E2;
    --secondary-color: #7B68EE;
    --accent-color: #FF6B6B;
    --dark-color: #2C3E50;
    --light-color: #F8F9FA;
    --text-color: #333;
    --border-color: #E0E0E0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

/* ===========================
   헤더
   =========================== */
.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 2rem;
}

/* 모바일 메뉴 토글 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* 네비게이션 */
.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

.nav-link i {
    font-size: 1.1rem;
}

/* ===========================
   메인 컨텐츠
   =========================== */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* ===========================
   푸터
   =========================== */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-menu {
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    list-style: none;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-info {
    text-align: center;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 2rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.footer-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.data-source {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

/* ===========================
   상단으로 이동 버튼
   =========================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* ===========================
   반응형 디자인 (모바일)
   =========================== */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    /* 모바일 헤더 */
    .mobile-menu-toggle {
        display: block;
    }

    .nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        transition: left 0.3s;
        overflow-y: auto;
    }

    .nav.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 1rem;
    }

    .nav-link {
        width: 100%;
        padding: 1rem;
        border-radius: 8px;
        justify-content: flex-start;
    }

    .logo a {
        font-size: 1.2rem;
    }

    .logo i {
        font-size: 1.5rem;
    }

    /* 모바일 푸터 */
    .footer-links {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-stats {
        flex-direction: column;
        gap: 0.5rem;
    }

    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* ===========================
   태블릿
   =========================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .nav-list {
        gap: 1.5rem;
    }
}

/* ===========================
   유틸리티 클래스
   =========================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none;
}
