/*
Theme Name: Novel Archive Vespellar Edition
Author: Antigravity
Version: 2.0
Description: Vespellar 블로그의 사이버펑크 감성을 녹여내면서도, 소설 읽기에 편안하도록 명암비와 자간을 최적화한 딥 다크 모드 테마입니다.
*/

:root {
    /* 눈이 편안한 소프트 다크 베이스 */
    --bg-color: #08090b; 
    --surface-color: rgba(255, 255, 255, 0.025);
    
    /* 텍스트 컬러 최적화 (대비 줄이기) */
    --text-primary: #cbd5e1; /* 소설 본문 은색 */
    --text-heading: #f8fafc; /* 헤딩 완전 화이트 */
    --text-dim: #64748b;     /* 보조 텍스트 */
    
    /* Vespellar 오리지널 포인트 컬러 */
    --acc-indigo: #818cf8;
    --acc-rose: #f43f5e;
    --accent-grad: linear-gradient(135deg, #a5b4fc 0%, #fb7185 100%);
    
    /* 폰트 */
    --font-serif: 'Noto Serif KR', serif;          /* 한글 소설 본문용 */
    --font-display: 'Playfair Display', serif;     /* 메인 타이틀(영문)용 */
    --font-ui: 'Pretendard', sans-serif;           /* UI 버튼 및 네비게이션용 */
}

body { 
    background-color: var(--bg-color); 
    background-image: radial-gradient(circle at 50% 0%, rgba(129, 140, 248, 0.04) 0%, rgba(8, 9, 11, 1) 70%);
    color: var(--text-primary); 
    font-family: var(--font-serif); 
    margin: 0; 
    line-height: 1.95; 
    font-size: 1.1rem;
}

::selection { background: var(--acc-rose); color: white; }
a { color: inherit; text-decoration: none; transition: color 0.3s; }

/* ═════════════════════════════════════════════════════
   상단 네비게이션 (Glassmorphism 적용)
   ═════════════════════════════════════════════════════ */
#main-nav { 
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 9, 11, 0.7); 
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 1.2rem 0;
}

.nav-container { 
    max-width: 900px; 
    margin: 0 auto; 
    padding: 0 2rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

/* 로고 애니메이션 (Vespellar Style 이식) */
.logo { display: flex; align-items: center; gap: 1rem; }
.logo-icon { 
    width: 2.2rem; height: 2.2rem; background: white; border-radius: 35%; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='black'%3E%3Cpath d='M 50 82 L 85 20 Q 50 40 15 20 Z' /%3E%3C/svg%3E");
    background-size: 55%; background-repeat: no-repeat; background-position: center; 
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); 
}
.logo:hover .logo-icon { transform: scale(1.1) rotate(360deg); box-shadow: 0 0 20px rgba(255,255,255,0.2); }

.logo-text { 
    font-family: var(--font-display); 
    font-style: italic; 
    font-weight: 800; 
    font-size: 1.6rem; 
    background: var(--accent-grad); 
    -webkit-background-clip: text; 
    background-clip: text; 
    -webkit-text-fill-color: transparent; 
}

.nav-link { 
    font-family: var(--font-ui); 
    font-size: 10px; 
    letter-spacing: 0.3em;
    font-weight: 700; 
    text-transform: uppercase;
    color: var(--text-dim); 
    transition: color 0.3s;
}

.nav-link:hover { color: var(--acc-indigo); }

/* 레이아웃 컨테이너 */
.container { max-width: 760px; margin: 5rem auto 8rem auto; padding: 0 2rem; }

/* ═════════════════════════════════════════════════════
   목차 페이지 (Archive List)
   ═════════════════════════════════════════════════════ */
.archive-header {
    text-align: center; 
    margin-bottom: 5rem;
}

.archive-label {
    font-family: var(--font-ui); 
    font-size: 9px; 
    letter-spacing: 0.5em; 
    color: var(--acc-rose); 
    font-weight: 800; 
    text-transform: uppercase; 
    display: block; 
    margin-bottom: 1.2rem;
}

.archive-title {
    font-size: 3.5rem; 
    margin: 0 0 1rem 0; 
    font-family: var(--font-display); 
    font-style: italic; 
    color: var(--text-heading);
}

.archive-desc {
    color: var(--text-dim); 
    font-family: var(--font-ui); 
    font-size: 0.95rem; 
    letter-spacing: 0.02em;
}

.chapter-list { 
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chapter-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 1.6rem 2.2rem; 
    background: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.03); 
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chapter-item:hover { 
    background: rgba(129, 140, 248, 0.03); 
    border-color: rgba(129, 140, 248, 0.2);
    /* 호버 시 목차가 Vespellar처럼 살짝 떠오르는 느낌 */
    transform: translateX(6px) translateY(-2px);
    box-shadow: -8px 12px 24px rgba(0,0,0,0.2);
}

.chapter-title { 
    font-size: 1.15rem; 
    font-weight: 400; /* 명조체는 얇은 것이 시크함 */
    color: var(--text-heading);
}

.chapter-date { 
    color: var(--acc-indigo); 
    font-family: var(--font-ui); 
    font-size: 9px; 
    letter-spacing: 0.3em;
    font-weight: 800;
    opacity: 0.8;
}

/* ═════════════════════════════════════════════════════
   소설 읽기 화면 (Single Novel Reading View)
   ═════════════════════════════════════════════════════ */
.novel-header { text-align: center; margin-bottom: 5rem; }

.novel-series { 
    color: var(--acc-indigo); 
    font-family: var(--font-ui); 
    font-size: 9px;
    letter-spacing: 0.5em;
    font-weight: 800; 
    text-transform: uppercase;
    display: inline-block;
    padding: 0.4rem 1.4rem;
    background: rgba(129, 140, 248, 0.06);
    border: 1px solid rgba(129, 140, 248, 0.15);
    border-radius: 100px;
    margin-bottom: 2.5rem; 
}

.novel-title { 
    font-family: var(--font-serif);
    font-size: 2.6rem; 
    font-weight: 600; 
    color: var(--text-heading);
    margin: 0; 
    line-height: 1.35;
}

.novel-meta-date {
    color: var(--text-dim); 
    font-family: var(--font-ui); 
    font-size: 10px; 
    letter-spacing: 0.3em;
    margin-top: 2rem;
    opacity: 0.6;
}

.novel-content { 
    font-size: 1.125rem; 
    line-height: 2.2; /* 소설은 행간이 중요함 */
    letter-spacing: -0.015em; 
    color: var(--text-primary);
}

/* 문단 사이 간격 최적화 */
.novel-content p { 
    margin-bottom: 2rem; 
    text-indent: 0.8rem; /* 문단 첫 글자 들여쓰기 */
}

/* ═════════════════════════════════════════════════════
   이전 화 / 다음 화 네비게이션 버튼
   ═════════════════════════════════════════════════════ */
.novel-nav { 
    display: flex; 
    justify-content: space-between; 
    margin-top: 6rem; 
    padding-top: 3rem; 
    border-top: 1px solid rgba(255, 255, 255, 0.05); 
    font-family: var(--font-ui);
}

.nav-btn a { 
    display: inline-flex; 
    align-items: center;
    padding: 1.2rem 2.5rem; 
    background: var(--surface-color); 
    border: 1px solid rgba(255, 255, 255, 0.06); 
    border-radius: 100px; 
    font-size: 9px;
    letter-spacing: 0.4em;
    font-weight: 800; 
    color: var(--text-dim);
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn a:hover { 
    background: var(--accent-grad); 
    color: white; 
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(129, 140, 248, 0.25);
    transform: translateY(-2px);
}

/* ═════════════════════════════════════════════════════
   좋아요 버튼 (Like Button)
   ═════════════════════════════════════════════════════ */
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 3rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-family: var(--font-ui);
    font-size: 10px;
    letter-spacing: 0.3em;
    font-weight: 800;
    color: var(--text-heading);
    cursor: pointer;
    transition: all 0.4s ease;
}
.like-btn:hover {
    background: rgba(244, 63, 94, 0.05);
    border-color: rgba(244, 63, 94, 0.4);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.15);
    transform: translateY(-2px);
}
.like-btn.liked {
    background: rgba(244, 63, 94, 0.1);
    border-color: var(--acc-rose);
    color: white;
}

/* ═════════════════════════════════════════════════════
   댓글 시스템 (Comments)
   ═════════════════════════════════════════════════════ */
.comments-section {
    margin-top: 8rem;
    padding-top: 5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.comments-count-label {
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4em;
    color: var(--acc-indigo);
    text-transform: uppercase;
}
.comment-list, .comment-list ol { list-style: none; margin: 0; padding: 0; }
.novel-comment { margin-top: 3rem; }
.comment-body-inner {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    transition: all 0.3s ease;
}
.comment-body-inner:hover {
    border-color: rgba(129, 140, 248, 0.2);
    background: rgba(129, 140, 248, 0.02);
}
.comment-avatar img { border-radius: 50%; border: 1px solid rgba(129, 140, 248, 0.3); }
.comment-meta-row { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.5rem; }
.comment-author-name { font-family: var(--font-ui); font-size: 11px; font-weight: 800; color: white; letter-spacing: 0.1em; }
.comment-date { font-family: var(--font-ui); font-size: 9px; color: var(--text-dim); }
.comment-text p { font-size: 1rem; line-height: 1.8; margin-bottom: 0; }
.comment-list .children { padding-left: 3rem; }

/* 댓글 폼 */
#respond {
    margin-top: 5rem;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 20px;
}
.comment-form-title { display: block; font-family: var(--font-ui); font-size: 10px; font-weight: 800; letter-spacing: 0.4em; color: var(--acc-rose); margin-bottom: 2rem; }
.novel-comment-form label { display: block; font-family: var(--font-ui); font-size: 9px; font-weight: 800; color: var(--text-dim); margin-bottom: 0.5rem; letter-spacing: 0.2em; }
.novel-comment-form input, .novel-comment-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1rem;
    color: white;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.3s;
}
.novel-comment-form input:focus, .novel-comment-form textarea:focus { outline: none; border-color: var(--acc-indigo); background: rgba(129, 140, 248, 0.05); }
.novel-submit {
    margin-top: 1rem;
    padding: 1rem 3rem;
    background: var(--accent-grad);
    border: none;
    border-radius: 100px;
    font-family: var(--font-ui);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.4em;
    color: white;
    cursor: pointer;
}
.comment-form-author, .comment-form-email { display: inline-block; width: calc(50% - 1rem); }
.comment-form-author { margin-right: 1.5rem; }
/* ═════════════════════════════════════════════════════
   모바일 최적화 (오밀조밀하고 꽉 찬 화면)
   ═════════════════════════════════════════════════════ */
@media (max-width: 600px) {
    /* 네비게이션: 공간 활용을 위해 가로 여백 축소 */
    .nav-container { flex-direction: column; gap: 0.6rem; padding: 0 1rem; }
    .logo-icon { width: 1.8rem; height: 1.8rem; }
    .logo-text { font-size: 1.3rem; }
    .nav-links { gap: 0.8rem; flex-wrap: wrap; justify-content: center; }
    .nav-link { font-size: 9px; letter-spacing: 0.15em; }

    /* 화면 여백: 모바일 화면을 넓게 쓰도록 패딩/마진 축소 */
    .container { margin: 2rem auto 4rem auto; padding: 0 1rem; }

    /* 아카이브 목차 리스트: 여백을 줄여 한 화면에 많은 챕터가 보이도록 */
    .archive-header { margin-bottom: 2.5rem; }
    .archive-title { font-size: 2.2rem; }
    .chapter-list { gap: 0.5rem; }
    .chapter-item { padding: 1rem 1.2rem; border-radius: 8px; }
    .chapter-title { font-size: 1rem; }
    .chapter-date { font-size: 8px; }

    /* 소설 상세 (읽기 뷰): 화면 가득 글이 차도록 최적화 */
    .novel-header { margin-bottom: 2.5rem; }
    .novel-series { margin-bottom: 1.5rem; font-size: 8px; padding: 0.3rem 1rem; }
    .novel-title { font-size: 1.6rem; word-break: keep-all; }
    .novel-meta-date { margin-top: 1rem; font-size: 9px; }
    
    .novel-content { font-size: 0.95rem; line-height: 1.85; }
    .novel-content p { margin-bottom: 1.5rem; text-indent: 0.4rem; }

    /* 이전 다음 버튼: 모바일에 맞춰 더 콤팩트하게 */
    .novel-nav { margin-top: 4rem; padding-top: 2rem; gap: 0.8rem; }
    .nav-btn a { padding: 0.8rem 1rem; font-size: 8px; letter-spacing: 0.1em; text-align: center; }
}
