@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Roboto:wght@500;700&display=swap');

/* === リセット・変数 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --ps-blue: #0070d1;
    --ps-blue-hover: #005bb5;
    --amz-orange: #FF9900;
    --rakuten-red: #bf0000;
    --price-red: #d32f2f;
    --radius-s: 8px;
}

body {
    font-family: "Roboto", "Noto Sans JP", sans-serif;
    background-color: #121212;
    color: #f5f5f5;
    margin: 0;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ps-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* === ページレイアウト === */
.game-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 0;
}

/* === サイトヘッダー === */
.site-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    border-bottom: 1px solid rgba(0, 112, 209, 0.3);
    box-shadow: 0 2px 12px rgba(0, 112, 209, 0.15);
    padding: 12px 0;
    margin-bottom: 20px;
}
.site-header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}
.site-header-logo {
    height: 32px;
    width: auto;
    display: block;
    transition: opacity 0.2s;
}
.site-header-logo:hover {
    opacity: 0.8;
}

.game-breadcrumb {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}
.game-breadcrumb a {
    color: var(--ps-blue);
    text-decoration: none;
}
.game-breadcrumb a:hover {
    text-decoration: underline;
}

/* === ヘッダー（画像＋情報の2カラム） === */
.game-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.game-image-area {
    flex: 0 0 420px;
}

.game-main-img {
    width: 100%;
    border-radius: var(--radius-s);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: opacity 0.2s;
}
.game-main-img:hover {
    opacity: 0.85;
}

/* ★ライトボックス */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.lightbox-overlay.active {
    display: flex;
}
.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--radius-s);
    object-fit: contain;
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 10000;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 40px;
    width: 50px;
    height: 70px;
    border-radius: var(--radius-s);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;
    z-index: 10000;
}
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #aaa;
    font-size: 13px;
}

.game-info-area {
    flex: 1;
    min-width: 0;
}

/* === ジャンルタグ === */
.game-genre {
    display: inline-block;
    background: rgba(0, 112, 209, 0.15);
    color: var(--ps-blue);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}

/* === タイトル === */
.game-title {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

/* === メタ情報テーブル === */
.game-meta-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.game-meta-table th {
    text-align: left;
    color: #888;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px 8px 0;
    width: 100px;
    border-bottom: 1px solid #2a2a2a;
}
.game-meta-table td {
    color: #ddd;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid #2a2a2a;
}

/* === セールバナー === */
.game-sale-banner {
    background: linear-gradient(135deg, #fff5f5, #ffe8e8);
    border: 1px solid #ffcccc;
    border-radius: var(--radius-s);
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}
.game-sale-badge {
    display: inline-block;
    background: linear-gradient(135deg, #e60012, #ff4444);
    color: white;
    font-size: 13px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 8px;
}
.game-sale-prices {
    font-size: 16px;
    color: #333;
}
.game-sale-prices s {
    color: #999;
    font-size: 14px;
}
.game-sale-prices .arrow {
    color: var(--price-red);
    font-weight: bold;
    margin: 0 8px;
}
.game-sale-prices .current {
    color: var(--price-red);
    font-size: 22px;
    font-weight: 800;
    font-family: 'Roboto', sans-serif;
}
.game-sale-end {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

/* === 価格比較テーブル === */
.price-compare {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}
.price-compare th {
    text-align: left;
    color: #888;
    font-size: 12px;
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 2px solid #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.price-compare td {
    padding: 12px;
    border-bottom: 1px solid #2a2a2a;
    font-size: 14px;
    color: #ddd;
}
.price-compare tr.best-price td {
    background: rgba(0, 112, 209, 0.08);
}
.price-val {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 700;
    position: relative;
    display: inline-block;
}
.price-val.is-best {
    color: var(--ps-blue);
}
.crown {
    position: absolute;
    left: -22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}
.price-num {
    display: inline-block;
}

/* ショップ名リンク */
.shop-name-link {
    color: #ddd;
    text-decoration: none;
}
.shop-name-link:hover {
    color: var(--ps-blue);
    text-decoration: underline;
}
.price-link {
    text-decoration: none;
    color: inherit;
}
.price-link:hover {
    text-decoration: underline;
}

/* === ショップボタン === */
.game-shop-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 30px;
}

.shop-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: var(--radius-s);
    font-size: 13px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}
.shop-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-ps      { background: var(--ps-blue); }
.btn-amz     { background: var(--amz-orange); }
.btn-rakuten { background: var(--rakuten-red); }

.btn-disabled {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: var(--radius-s);
    font-size: 13px;
    font-weight: 700;
    background: #333;
    color: #666;
    cursor: default;
}

/* === 説明文 === */
.game-description {
    background: #1a1a2e;
    border-radius: var(--radius-s);
    padding: 24px;
    margin-bottom: 30px;
}
.game-description h2 {
    font-size: 16px;
    color: #fff;
    margin: 0 0 12px 0;
}
.game-description p {
    font-size: 14px;
    line-height: 1.8;
    color: #bbb;
    white-space: pre-wrap;
    margin: 0;
}

/* === 戻るリンク === */
.back-link {
    display: inline-block;
    color: var(--ps-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 30px;
}
.back-link:hover {
    text-decoration: underline;
}

/* === フッター === */
.site-footer {
    text-align: center;
    padding: 24px 16px;
    margin-top: 40px;
    border-top: 1px solid #333;
    color: #888;
    font-size: 12px;
    line-height: 1.8;
}
.footer-links {
    margin-top: 8px;
}
.footer-links a {
    color: #888;
    text-decoration: none;
    margin: 0 6px;
}
.footer-links a:hover {
    color: #fff;
}
.footer-links span {
    color: #555;
}

/* ★シェアボタン追加 */
.share-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid rgba(128, 128, 128, 0.15);
}
.share-label {
    font-size: 12px;
    color: #888;
    flex-shrink: 0;
}
.share-buttons {
    display: flex;
    gap: 8px;
}
.share-btn-sns {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.15s ease;
    padding: 0;
}
.share-btn-sns:hover { transform: scale(1.08); }
.share-btn-sns:active { transform: scale(0.95); }
.share-btn-sns svg { width: 18px; height: 18px; }
.share-btn--x    { background: #000; }
.share-btn--line { background: #06C755; }
.share-btn--fb   { background: #1877F2; }
.share-btn--hatena { background: #00A4DE; }
.share-btn--copy {
    background: #f0f0f0;
    border: 1px solid rgba(128, 128, 128, 0.2) !important;
}
.share-toast {
    font-size: 12px;
    color: #06C755;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}
.share-toast.show { opacity: 1; }
/* ★シェアボタン追加ここまで */

/* ★価格推移グラフ */
.price-history-section {
    background: #1a1a2e;
    border-radius: var(--radius-s);
    padding: 24px;
    margin-bottom: 30px;
}
.price-history-section h2 {
    font-size: 16px;
    color: #fff;
    margin: 0 0 16px 0;
}
.price-history-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.ph-btn {
    background: rgba(0, 112, 209, 0.15);
    color: var(--ps-blue);
    border: none;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.ph-btn:hover {
    background: rgba(0, 112, 209, 0.3);
}
.ph-btn.active {
    background: var(--ps-blue);
    color: #fff;
}
.price-history-chart-wrap {
    position: relative;
    height: 300px;
}
.price-history-note {
    font-size: 13px;
    color: #888;
    text-align: center;
    margin-top: 12px;
}

/* ★関連アクセサリー広告 */
.related-accessories {
    background: #1a1a2e;
    border-radius: var(--radius-s);
    padding: 24px;
    margin-bottom: 30px;
    overflow: hidden;
}
.related-accessories h2 {
    font-size: 16px;
    color: #fff;
    margin: 0 0 16px 0;
}
.acc-carousel {
    position: relative;
}
.acc-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 112, 209, 0.85);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 2;
    transition: background 0.15s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.acc-scroll-btn:hover {
    background: rgba(0, 112, 209, 1);
    transform: translateY(-50%) scale(1.1);
}
.acc-scroll-left {
    left: -16px;
}
.acc-scroll-right {
    right: -16px;
}
.acc-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0 28px 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.acc-grid::-webkit-scrollbar {
    height: 6px;
}
.acc-grid::-webkit-scrollbar-track {
    background: transparent;
}
.acc-grid::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}
.acc-card {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-s);
    padding: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s, transform 0.15s;
    border: 1px solid rgba(255,255,255,0.05);
    scroll-snap-align: start;
}
.acc-card:hover {
    background: rgba(255,255,255,0.07);
    transform: translateY(-2px);
    text-decoration: none;
}
.acc-img-wrap {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    background: #222;
    margin-bottom: 8px;
}
.acc-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.acc-name {
    font-size: 11px;
    color: #ccc;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    flex: 1;
}
.acc-price {
    font-size: 14px;
    font-weight: 700;
    color: #4fc3f7;
    font-family: 'Roboto', sans-serif;
}

/* === モバイル対応 === */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    .game-header {
        flex-direction: column;
    }
    .game-image-area {
        flex: none;
        width: 100%;
    }
    .game-title {
        font-size: 20px;
    }
    .game-shop-btns {
        grid-template-columns: 1fr;
    }
    /* ★シェアボタン モバイル対応 */
    .share-btn-sns { width: 34px; height: 34px; }
    .share-btn-sns svg { width: 16px; height: 16px; }
    .game-description {
        padding: 16px;
    }
    .price-history-section {
        padding: 16px;
    }
    .price-history-chart-wrap {
        height: 240px;
    }
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 56px;
        font-size: 32px;
    }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .acc-card { flex: 0 0 140px; }
    .related-accessories { padding: 16px; }
    .acc-scroll-btn { width: 34px; height: 34px; font-size: 16px; }
    .acc-scroll-left { left: -8px; }
    .acc-scroll-right { right: -8px; }
    .acc-grid { padding: 0 20px 8px; }
}
/* ========================================
   家電量販店ボタンスタイル（v11追加）
   ======================================== */
.btn-yamada {
    background: linear-gradient(135deg, #4caf50, #43a047) !important;
    color: #fff !important;
}
.btn-yamada:hover {
    background: linear-gradient(135deg, #43a047, #388e3c) !important;
}
.btn-bic {
    background: linear-gradient(135deg, #0068b7, #005a9e) !important;
    color: #fff !important;
}
.btn-bic:hover {
    background: linear-gradient(135deg, #005a9e, #004c87) !important;
}
.btn-yodobashi {
    background: linear-gradient(135deg, #ff6600, #e55b00) !important;
    color: #fff !important;
}
.btn-yodobashi:hover {
    background: linear-gradient(135deg, #e55b00, #cc5000) !important;
}
/* ========================================
   セール履歴サマリー
   ======================================== */
.sale-history-summary {
    background: rgba(233, 69, 96, 0.06);
    border: 1px solid rgba(233, 69, 96, 0.2);
    border-radius: var(--radius-s);
    padding: 16px;
    margin-top: 16px;
}
.sale-summary-header {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}
.sale-summary-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sale-summary-stats strong {
    color: #e94560;
}
.sale-summary-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sale-summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #ccc;
    padding: 6px 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 4px;
}
.sale-dates {
    color: #aaa;
    min-width: 180px;
}
.sale-discount {
    color: #e94560;
    font-weight: 700;
    min-width: 70px;
}
.sale-price {
    color: #4fc3f7;
    font-weight: 700;
    font-family: 'Roboto', sans-serif;
}
@media (max-width: 768px) {
    .sale-summary-stats {
        flex-direction: column;
        gap: 4px;
    }
    .sale-summary-item {
        flex-wrap: wrap;
        gap: 4px 8px;
    }
    .sale-dates {
        min-width: auto;
        width: 100%;
    }
}