
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --accent: deeppink;
    --accent-dark: #b0006e;
    --text-primary: #000000;
    --text-secondary: #000000;
    --border: rgba(255, 20, 147, 0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border-bottom: 2px solid var(--accent);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.site-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 1px;
    white-space: nowrap;
}

.site-title img {
    width: 200px;
}

/* main を削除して下記に置き換え */
.page-layout {
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 20px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 350px;
    flex-shrink: 0;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    text-decoration: underline;
}

.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.detail-thumbnail {
    width: 960px;
    height: 540px;
    object-fit: contain;
    display: block;
    background: #000;
    margin: 0 auto;
}

.detail-body {
    padding: 24px;
}

.detail-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 16px;
}

.detail-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.meta-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 16px;
}

.meta-label {
    min-width: 80px;
    color: var(--text-secondary);
    font-weight: 700;
}

.meta-value {
    color: var(--text-primary);
}

.meta-value a {
    color: var(--accent);
    text-decoration: none;
}

.meta-value a:hover {
    text-decoration: underline;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-item {
    font-size: 14px;
    background: rgba(255, 20, 147, 0.15);
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 4px;
}

.detail-description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding: 16px;
    background: #fafafa;
    border-radius: 6px;
}

.sample-video {
    margin-bottom: 24px;
}

.sample-video video {
    width: 100%;
    border-radius: 6px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 24px;
}

.gallery img {
    width: 100%;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.gallery img:hover {
    opacity: 0.8;
}

/* ============================
    アフィリエイトボタン
    ============================ */
.affiliate-btn-wrap {
    padding: 20px 24px;
    background: linear-gradient(180deg, #fff 0%, #fff5fa 100%);
    border-top: 1px solid var(--border);
    text-align: center;
}

.affiliate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 48px;
    background: linear-gradient(135deg, #ff1493 0%, #ff6b9d 50%, #ff1493 100%);
    background-size: 200% 200%;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.4), 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-position 0.3s ease;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.affiliate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.affiliate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.55), 0 3px 8px rgba(0, 0, 0, 0.12);
    background-position: 100% 100%;
}

.affiliate-btn:hover::before {
    left: 100%;
}

.affiliate-btn:active {
    transform: translateY(0);
}

.affiliate-btn .icon {
    font-size: 20px;
}

.affiliate-btn .arrow {
    transition: transform 0.2s ease;
}

.affiliate-btn:hover .arrow {
    transform: translateX(4px);
}

footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
    font-size: 12px;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

.review {
    margin-bottom: 24px;
}

.review-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.review-item {
    padding: 16px;
    margin-bottom: 12px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 14px;
}

.review-rating {
    color: #f5a623;
    letter-spacing: 2px;
}

.review-user {
    font-weight: 700;
}

.review-date {
    color: #888;
    margin-left: auto;
}

.review-body {
    font-size: 14px;
    line-height: 1.8;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
}

.modal.active {
    display: flex;
}

.modal-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 70%;
    max-height: 80vh;
    margin: auto;
}

.modal-image {
    max-width: 100%;
    max-height: calc(80vh - 50px);
    object-fit: contain;
    border-radius: 4px;
}

.modal-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.modal-close {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    color: #fff;
    line-height: 1;
}

.modal-close span:first-child {
    font-size: 36px;
    font-weight: 700;
}

.modal-close-text {
    font-size: 12px;
}

.modal-close:hover {
    color: var(--accent);
}

.tag-item a, a.tag-item {
    text-decoration: none;
    color: var(--accent);
}

a.tag-item:hover {
    background: var(--accent);
    color: #fff;
}

.live-feed {
    max-width: 60%;
    margin-left: 100px;
    padding: 20px;
}

.live-feed-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--accent);
}

.live-feed-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.live-feed-item {
    font-size: 13px;
    padding: 6px 12px;
    background: #fafafa;
    border-radius: 4px;
    border-left: 3px solid var(--accent);
    animation: slideUp 0.5s ease-out;
}

.live-feed-item .feed-time {
    color: #000;
    margin-right: 8px;
}

.live-feed-item .feed-site {
    color: var(--accent);
    font-weight: 700;
    margin-right: 8px;
}

.live-feed-item a {
    color: var(--text-primary);
    text-decoration: none;
}

.live-feed-item a:hover {
    text-decoration: underline;
}

/* ============================
    関連動画
    ============================ */
.related-works {
    margin-top: 24px;
    margin-bottom: 24px;
}

.related-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.related-item {
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: var(--bg-secondary);
    border-radius: 4px;
    display: block;
}

.related-item:hover img {
    opacity: 0.8;
}

.related-site-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 3px;
    line-height: 1.4;
}

.related-item-title {
    font-size: 14px;
    margin-top: 2px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.related-hidden {
    display: none;
}

.load-more-wrap {
    text-align: center;
    margin-top: 16px;
}

.load-more-btn {
    padding: 10px 32px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.load-more-btn:hover {
    background: var(--accent-dark);
}

.search-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.search-form input[type="text"] {
    padding: 8px 14px;
    width: 480px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.search-form input[type="text"]:focus {
    border-color: var(--accent);
}

.search-form button {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.search-form button:hover {
    background: var(--accent-dark);
}

@media (max-width: 900px) {
    .sidebar { width: 300px; }
}

@media (max-width: 600px) {
    .page-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .header-inner { flex-direction: column; align-items: stretch; }
    .site-title { text-align: center; }
    .detail-body { padding: 16px; }
    .detail-title { font-size: 18px; }
    .affiliate-btn {
        display: flex;
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
    }

    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}