/* Work detail page styles */
.work-header {
    position: relative;
    margin-bottom: 2rem;
}

.work-title {
    padding-right: 3rem;
}

.favorite-button {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s ease;
}

.favorite-button:hover {
    transform: scale(1.1);
}

.favorite-button:active {
    transform: scale(0.95);
}

.favorite-icon {
    color: var(--color-accent);
    stroke-width: 2;
}

.favorite-button.is-favorited .favorite-icon {
    fill: var(--color-accent);
}

.work-main-image {
    margin: 2rem 0;
    text-align: center;
}

.work-main-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.fanza-credit {
    text-align: right;
    margin-top: 3rem;
    padding-bottom: 1rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.fanza-credit:hover {
    opacity: 1;
}

.fanza-credit a {
    display: inline-block;
    line-height: 0;
}

.fanza-credit img {
    display: block;
}

.article-navigation {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 2rem;
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
}

.article-nav-prev,
.article-nav-next {
    flex: 1;
    max-width: 48%;
}

.article-nav-next {
    margin-left: auto;
}

.article-nav-prev:empty,
.article-nav-next:empty {
    display: none;
}

.article-nav-link {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background-color: var(--color-bg-surface);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.3s, box-shadow 0.3s, opacity 0.3s ease;
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.article-nav-link:hover {
    background-color: var(--color-bg-hover);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.article-nav-label {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.article-nav-prev .article-nav-label::before {
    content: '← ';
}

.article-nav-next .article-nav-label::after {
    content: ' →';
}

.article-nav-next {
    text-align: right;
}

.article-nav-title {
    font-size: 1.5rem;
    line-height: 1.4;
    font-weight: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-nav-category {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .article-navigation {
        flex-direction: column;
        gap: 1.5rem;
    }

    .article-nav-prev,
    .article-nav-next {
        max-width: 100%;
    }

    .article-nav-next {
        margin-left: 0;
        text-align: left;
    }
}

.related-works-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--color-border);
}

.related-works-title {
    font-size: 2.4rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-primary);
}

.related-works-container .loading-message {
    text-align: center;
    color: var(--color-text-secondary);
    padding: 2rem;
}

.related-works-container .no-related {
    text-align: center;
    color: var(--color-text-muted);
    padding: 3rem;
}

.related-works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.related-work-card {
    background-color: var(--color-bg-surface);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: background-color 0.3s, box-shadow 0.3s ease;
}

.related-work-card:hover {
    background-color: var(--color-bg-hover);
    box-shadow: var(--shadow-lg);
}

.related-work-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.related-work-link:hover {
    text-decoration: none;
}

.related-work-image {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background-color: var(--color-bg-secondary);
}

.related-work-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-work-card:hover .related-work-image img {
    transform: scale(1.08);
}

.related-work-info {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem;
}

.related-work-title {
    font-size: 1.4rem;
    font-weight: normal;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-work-circle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin: 0;
    margin-top: auto;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-work-date {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin: 0;
    text-align: right;
}

@media (max-width: 1024px) {
    .related-works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .related-works-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .related-works-title {
        font-size: 2rem;
    }
}

