@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

/* 산돌 국대떡볶이 폰트 */
@font-face {
    font-family: 'Gukdae';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2205@1.0/Gukdae.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

:root {
    /* 라이트 모드 변수 */
    --base-color: #F8F5F0;
    --point-color: #2C3E50;
    --accent-color: #C0392B;
    --text-main: #34495E;
    --card-bg: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius: 8px;
    --footer-bg: #eee;
    --nav-active: #C0392B;
}

/* 다크 모드 설정 (시스템 설정 반영) */
@media (prefers-color-scheme: dark) {
    :root {
        --base-color: #1A1A1A;     /* 다크 그레이 배경 */
        --point-color: #E0E0E0;    /* 밝은 그레이 텍스트 */
        --accent-color: #E74C3C;   /* 조금 더 밝은 레드 */
        --text-main: #E0E0E0;
        --card-bg: #2D2D2D;        /* 진한 회색 카드 */
        --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        --footer-bg: #111111;
        --nav-active: #E74C3C;
    }
}

/* 수동 다크 모드 클래스 (JS로 제어 가능) */
body.dark-mode {
    --base-color: #1A1A1A;
    --point-color: #E0E0E0;
    --accent-color: #E74C3C;
    --text-main: #E0E0E0;
    --card-bg: #2D2D2D;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --footer-bg: #111111;
    --nav-active: #E74C3C;
}

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

body {
    font-family: 'Gukdae', 'Pretendard', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--base-color);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

header {
    background-color: #2C3E50; /* 헤더는 다크톤 유지 */
    color: #ffffff;
    padding: 2rem 0 1.5rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

header h1 {
    font-family: 'Gukdae', sans-serif;
    font-size: 2.5rem;
    font-weight: normal;
    margin-bottom: 0.8rem;
    color: #ffffff;
}

.search-container {
    margin-bottom: 1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

#search-input {
    font-family: 'Gukdae', sans-serif;
    width: 100%;
    padding: 12px 20px;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1rem;
}

#search-input:focus {
    outline: none;
    background-color: #ffffff;
    color: #2C3E50;
    border-color: var(--accent-color);
}

nav a {
    font-family: 'Gukdae', sans-serif;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: var(--radius);
    font-size: 1.1rem;
}

nav a:hover, nav a.active {
    color: #ffffff;
    background-color: var(--nav-active);
}

main {
    padding: 2rem 0;
}

h2 {
    font-family: 'Gukdae', sans-serif;
    color: var(--point-color);
    font-size: 2rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 5px;
    margin-bottom: 25px;
    display: inline-block;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card h3 {
    font-family: 'Gukdae', sans-serif;
    color: var(--point-color);
    font-size: 1.6rem;
    margin-bottom: 15px;
    border-left: 6px solid var(--accent-color);
    padding-left: 15px;
}

.card h4 {
    font-family: 'Gukdae', sans-serif;
    color: var(--point-color);
    margin: 15px 0 10px;
    font-size: 1.3rem;
}

.recipe-content p, .recipe-content li {
    font-size: 1.1rem;
}

footer {
    font-family: 'Gukdae', sans-serif;
    text-align: center;
    padding: 3rem 0;
    color: #888;
    background-color: var(--footer-bg);
    margin-top: 2rem;
}

/* 테마 토글 버튼 스타일 */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--point-color);
    color: var(--base-color);
    border: none;
    padding: 10px 15px;
    border-radius: 50px;
    font-family: 'Gukdae', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1001;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-section { display: none; }
.content-section.active { display: block; animation: fadeIn 0.3s ease-out; }
