@font-face {
    font-family: 'SchoolSafeDictation';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-5@1.0/HakgyoansimBadasseugiTTF-L.woff2') format('woff2');
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Thin.woff') format('woff');
    font-weight: 100;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-ExtraLight.woff') format('woff');
    font-weight: 200;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Light.woff') format('woff');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Regular.woff') format('woff');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Medium.woff') format('woff');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-SemiBold.woff') format('woff');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Bold.woff') format('woff');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-ExtraBold.woff') format('woff');
    font-weight: 800;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Black.woff') format('woff');
    font-weight: 900;
    font-display: swap;
}

:root {
    /* shadcn Yellow theme colors */
    --background: 0 0% 100%;
    --foreground: 20 14.3% 4.1%;
    --card: 0 0% 100%;
    --card-foreground: 20 14.3% 4.1%;
    --popover: 0 0% 100%;
    --popover-foreground: 20 14.3% 4.1%;
    --primary: 47.9 95.8% 53.1%;
    --primary-foreground: 26 83.3% 14.1%;
    --secondary: 60 4.8% 95.9%;
    --secondary-foreground: 24 9.8% 10%;
    --muted: 60 4.8% 95.9%;
    --muted-foreground: 25 5.3% 44.7%;
    --accent: 60 4.8% 95.9%;
    --accent-foreground: 24 9.8% 10%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 60 9.1% 97.8%;
    --border: 20 5.9% 90%;
    --input: 20 5.9% 90%;
    --ring: 47.9 95.8% 53.1%;
    --radius: 0.5rem;
}

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: hsl(var(--foreground));
    background: hsl(var(--background));
    min-height: 100vh;
    padding: 0;
    margin: 0;
    letter-spacing: -0.02em;
}

/* GNB 스타일 */
.gnb {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: hsl(var(--background) / 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    box-shadow: none;
    z-index: 1000;
    transition: all 0.3s;
}

.gnb.scrolled {
    border-bottom: 1px solid hsl(var(--border));
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.gnb-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
}

.home-button {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: hsl(var(--foreground));
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    transition: all 0.2s;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.home-button:hover {
    background: hsl(var(--accent));
}

.logo-text {
    font-family: 'SchoolSafeDictation', 'Pretendard', sans-serif;
    font-size: 20px;
    font-weight: normal;
    letter-spacing: -0.01em;
    color: #3A4453;
}

.lang-button {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    color: hsl(var(--foreground));
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius);
    transition: all 0.2s;
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.9;
}

.lang-button:hover {
    background: hsl(var(--accent));
    opacity: 1;
}

.lang-button svg {
    width: 14px;
    height: 14px;
}

/* Main wrapper - 중앙 정렬 */
.main-wrapper {
    min-height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 220px 20px 20px;
}

.main-wrapper.has-results {
    display: block;
    padding-top: 80px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: hsl(var(--card));
    border-radius: 8px;
    box-shadow: 0 0 20px 0 rgb(0 0 0 / 0.08);
    overflow: hidden;
    border: 1px solid hsl(var(--border));
    width: 100%;
}

header {
    background: transparent;
    color: hsl(var(--foreground));
    padding: 40px 30px 25px;
    text-align: center;
    /* border-bottom: 1px solid hsl(var(--border) / 0.5); */
    margin-bottom: 15px;
}

header h1 {
    font-size: 14pt;
    font-weight: 600;
    margin-bottom: 2px;
    opacity: 0.9;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 0.9375rem;
    font-weight: 300;
    opacity: 0.9;
    letter-spacing: -0.02em;
}

main {
    padding: 30px 30px 20px;
}

.search-section {
    margin-bottom: 30px;
}

.search-box {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 15px;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#searchInput {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid hsl(var(--input));
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    transition: all 0.2s;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    height: 2.5rem;
}

#searchInput:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.search-type {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.search-type label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
}

.search-type input[type="radio"] {
    margin-right: 5px;
    cursor: pointer;
}

.btn-primary {
    width: auto;
    padding: 0.5rem 1.5rem;
    height: 2.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--primary-foreground));
    background: hsl(var(--primary));
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

.btn-primary:hover {
    background: hsl(var(--primary) / 0.9);
}

.btn-primary:active {
    background: hsl(var(--primary) / 0.8);
}

/* 검색 구분선 */
.search-divider {
    height: 1px;
    background: hsl(var(--border) / 0.5);
    margin: 2rem 0 2.5rem 0;
}

/* 검색 결과 페이지 다시하기 버튼 */
.search-results-section .btn-restart {
    margin-top: 2rem;
    margin-left: auto;
    display: flex;
}

.info-box {
    background: #e7f3ff;
    border-left: 4px solid #667eea;
    padding: 15px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.info-box p {
    margin-bottom: 5px;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-box {
    background: hsl(var(--destructive) / 0.1);
    border: 1px solid hsl(var(--destructive) / 0.3);
    border-left: 4px solid hsl(var(--destructive));
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 20px;
    color: hsl(var(--destructive));
}

.search-results-section {
    margin-bottom: 30px;
}

.search-results-section h2 {
    color: hsl(var(--foreground));
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.result-count {
    color: hsl(var(--muted-foreground));
    margin-bottom: 20px;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.result-item:hover {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 1px hsl(var(--ring) / 0.2);
}

.result-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
    line-height: 1.5;
    letter-spacing: -0.02em;
}

.result-authors {
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.result-info {
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.bottom-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-back {
    padding: 0.5rem 1rem;
    height: 2.25rem;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-back:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-restart {
    padding: 0.5rem 1rem;
    height: 2.25rem;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-restart:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.results-section h2 {
    color: hsl(var(--foreground));
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.metadata-box {
    background: hsl(var(--muted) / 0.5);
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 30px;
    border: 1px solid hsl(var(--border));
}

.metadata-box h3 {
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

#metadata {
    line-height: 1.8;
    font-weight: 400;
}

#metadata p {
    margin-bottom: 8px;
    display: flex;
}

#metadata strong {
    min-width: 100px;
    color: hsl(var(--foreground));
    font-weight: 500;
}

.citations-box h3 {
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.citation-item {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.citation-item:hover {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 1px hsl(var(--ring) / 0.2);
}

.citation-header {
    margin-bottom: 20px;
}

.citation-header h4 {
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.citation-section {
    margin-bottom: 1.25rem;
}

.citation-section:last-child {
    margin-bottom: 0;
}

.citation-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.citation-section h5 {
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: -0.01em;
}

.btn-copy {
    padding: 0.375rem 0.75rem;
    height: 2rem;
    font-size: 0.75rem;
    color: hsl(var(--primary-foreground));
    background: hsl(var(--primary));
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    margin-top: 0.5rem;
    display: inline-block;
}

.btn-copy:hover {
    background: hsl(var(--primary) / 0.9);
}

.btn-copy.copied {
    background: hsl(142 76% 36%);
}

.citation-content {
    padding: 1rem;
    background: hsl(var(--muted) / 0.3);
    border-radius: var(--radius);
    line-height: 1.7;
    font-size: 0.875rem;
    font-weight: 400;
    word-wrap: break-word;
    border: 1px solid hsl(var(--border));
}

.btn-copy-icon {
    padding: 0.25rem;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    color: hsl(var(--muted-foreground));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-copy-icon:hover {
    background: hsl(var(--muted) / 0.5);
    color: hsl(var(--foreground));
}

.btn-copy-icon.copied {
    color: hsl(142 76% 36%);
}

.btn-copy-icon svg {
    transition: all 0.2s;
}

/* Below the fold 안내 섹션 */
.info-section {
    background: hsl(var(--background));
    padding: 80px 20px 80px 20px;
    min-height: 100vh;
    margin-top: 200px;
}

.info-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 40px;
    background: rgb(248, 250, 252);
    border-radius: 8px;
}

.info-title {
    font-size: 1rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    opacity: 0.8;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.4;
}

.info-intro {
    font-size: 0.8rem;
    font-weight: 400;
    color: hsl(var(--muted-foreground));
    opacity: 0.8;
    line-height: 1.7;
    margin-bottom: 3rem;
}

.info-block {
    margin-bottom: 2.5rem;
}

.info-block:last-child {
    margin-bottom: 0;
}

.info-subtitle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    opacity: 0.8;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.info-subtitle svg {
    color: hsl(var(--primary));
    flex-shrink: 0;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 0.75rem;
    color: hsl(var(--foreground));
    opacity: 0.8;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.6;
}

.info-list li:before {
    content: "•";
    position: absolute;
    left: 0.75rem;
    color: hsl(var(--muted-foreground));
}

.info-list li:last-child {
    margin-bottom: 0;
}

.info-text {
    padding-left: 0;
    color: hsl(var(--foreground));
    opacity: 0.8;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.7;
    margin: 0;
}

footer {
    background: hsl(var(--muted) / 0.3);
    padding: 20px;
    text-align: center;
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    border-top: 1px solid hsl(var(--border));
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    main {
        padding: 20px;
    }

    .search-box {
        padding: 20px;
    }

    .citation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn-copy {
        width: 100%;
    }
}

/* Ad Banner */
.ad-banner-wrapper {
    width: 100%;
    max-width: 728px;
    margin: 50px auto;
    padding: 5px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-banner-wrapper .kakao_ad_area {
    display: block !important;
}

/* Footer */
.footer {
    background-color: #f8f9fa;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid #e9ecef;
    margin-top: 60px;
}

.footer p {
    margin: 2px 0;
    font-size: 6pt;
    color: #adb5bd;
    line-height: 1.1;
}
