@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 20px 80px;
    line-height: 1.7;
    color: #1a1a1a;
    background: #fafafa;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Header */
.site-header {
    text-align: center;
    padding: 32px 0 24px;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 32px;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.site-subtitle {
    font-size: 13px;
    color: #888;
    margin-top: 6px;
}

.back-link {
    display: inline-block;
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}

.back-link:hover {
    color: #1a1a1a;
}

/* Index: Novel cards */
.novel-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.novel-card-wrap {
    position: relative;
}

.novel-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px 22px;
    transition: all 0.15s ease;
    display: block;
}

.novel-card:hover {
    border-color: #1a1a1a;
    transform: translateY(-1px);
}

.like-btn {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 2;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.like-btn:hover {
    transform: scale(1.15);
}

.like-btn:active {
    transform: scale(0.95);
}

.like-btn svg {
    width: 22px;
    height: 22px;
    stroke: #c0c0c0;
    stroke-width: 1.8;
    fill: none;
    transition: all 0.2s ease;
}

.like-btn.liked svg {
    stroke: #ff4d6d;
    fill: #ff4d6d;
}

.novel-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 12px;
}

.novel-title {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.novel-progress {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
}

.novel-genre {
    display: inline-block;
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.novel-synopsis {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* Novel page: chapter list */
.novel-info {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px 22px;
    margin-bottom: 24px;
}

.novel-info .novel-title {
    font-size: 22px;
    margin-bottom: 8px;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chapter-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease;
}

.chapter-item:hover {
    border-color: #1a1a1a;
}

.chapter-num {
    font-size: 12px;
    color: #888;
    margin-right: 12px;
    flex-shrink: 0;
}

.chapter-title {
    font-size: 15px;
    font-weight: 500;
    flex-grow: 1;
}

.chapter-arrow {
    color: #ccc;
    font-size: 16px;
}

/* Chapter page: reading view */
.chapter-header {
    text-align: center;
    padding: 16px 0 32px;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 32px;
}

.chapter-header .work-title {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.chapter-header h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.chapter-content {
    font-size: 17px;
    line-height: 1.95;
    color: #1a1a1a;
}

.chapter-content p {
    margin-bottom: 1.4em;
}

.scene-break {
    border: none;
    text-align: center;
    margin: 2.5em 0;
    color: #bbb;
    letter-spacing: 0.5em;
    font-size: 14px;
}

.scene-break::before {
    content: '* * *';
}

/* Chapter navigation */
.chapter-nav {
    display: flex;
    gap: 12px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e8e8e8;
}

.chapter-nav a {
    flex: 1;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
    font-size: 14px;
    transition: all 0.15s ease;
}

.chapter-nav a:hover {
    border-color: #1a1a1a;
    background: #1a1a1a;
    color: #fff;
}

.chapter-nav .nav-disabled {
    background: #f5f5f5;
    color: #ccc;
    pointer-events: none;
}

.chapter-nav .nav-list {
    flex: 0.6;
}

.nav-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 2px;
}

.chapter-nav a:hover .nav-label {
    color: #ccc;
}

.nav-title {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Footer */
.site-footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid #e8e8e8;
    font-size: 12px;
    color: #999;
}

@media (max-width: 600px) {
    body {
        padding: 16px 16px 60px;
    }

    .chapter-content {
        font-size: 16px;
    }

    .novel-title {
        font-size: 17px;
    }

    .chapter-header h1 {
        font-size: 19px;
    }
}
