/**
 * 미니멀 테마 - 전사이트 공통 스타일
 * cosmos 페이지 기준으로 제작된 일관된 디자인 시스템
 */

/* 기본 변수 및 테마 정의 */
:root {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border: #e5e5e5;
    --accent: #2563eb;
    --accent-light: #eff6ff;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --radius: 8px;
}

/* 다크 테마 (기본) */
body {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    --border: #374151;
    --accent: #06b6d4;
    --accent-light: #0e7490;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* 라이트 테마 */
body.theme-light {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border: #e5e5e5;
    --accent: #2563eb;
    --accent-light: #eff6ff;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 세피아 테마 */
body.theme-sepia {
    --bg-primary: #f4f0e8;
    --bg-secondary: #faf7f2;
    --text-primary: #5b4636;
    --text-secondary: #70594a;
    --text-tertiary: #856f61;
    --border: #d4c4a8;
    --accent: #8b4513;
    --accent-light: #f4e5d3;
    --shadow: 0 1px 3px rgba(139,69,19,0.2);
}

/* 기본 리셋 및 베이스 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 헤더 및 네비게이션 */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.logo-icon {
    width: 30px;
    height: 30px;
    border: 2px solid var(--accent);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-links a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* 메인 컨텐츠 */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* 섹션 스타일 */
.section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* 폼 요소 */
.form-control {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    width: 100%;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* 버튼 */
.btn {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    color: var(--text-primary);
}

/* 카드 */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 리스트 */
.list-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease;
}

.list-item:hover {
    background: var(--bg-primary);
    text-decoration: none;
    color: inherit;
}

.list-item:last-child {
    border-bottom: none;
}

/* 푸터 */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-info {
    flex: 0 0 40%;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-nav {
    flex: 0 0 25%;
}

.footer-heading {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-contact {
    flex: 0 0 25%;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.contact-icon {
    margin-right: 0.6rem;
    color: var(--accent);
}

.theme-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 1rem 0;
}

.theme-button {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.theme-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-button.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.footer-bottom {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* 유틸리티 클래스 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* 반응형 디자인 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-info,
    .footer-nav,
    .footer-contact {
        flex: none;
    }
    
    .theme-switcher {
        justify-content: center;
    }
    
    .container {
        padding: 0 0.5rem;
    }
}

/* 하이라이트 */
mark {
    background: #fef3c7;
    color: #92400e;
    padding: 0.1em 0.2em;
    border-radius: 0.25em;
}