/* ===============================================
   ページ全体の基本設定
   =============================================== */

/* 背景はhtmlに設定 */
html {
    background-image: url('../images/main-visual.jpg');
    background-color: #121212; /* 予備の背景色 */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Noto Sans JP', sans-serif;
}

/* 横スクロール防止などの基本設定 */
html, body {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* bodyの背景は透明にして、文字設定などを行う */
body {
    color: #e0e0e0;
    background-color: transparent; /* htmlの背景が見えるように透明にする */
}

/* ===============================================
   ヘッダー
   =============================================== */
header {
    background-color: rgba(18, 18, 18, 0.8); /* 少し透明な黒 */
    backdrop-filter: blur(10px); /* すりガラス効果 */
    -webkit-backdrop-filter: blur(10px);
    width: 100%;
    position: fixed; /* 画面上部に固定 */
    top: 0;
    left: 0;
    z-index: 1000; /* 他の要素より手前に表示 */
    border-bottom: 1px solid #333;
    transition: transform 0.3s;
}

header h1 {
    display: none; /* スクリーンリーダー用。画面には表示しない */
}

header nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between; /* 両端に配置 */
    align-items: center;
}

.logo img {
    height: 40px; /* ロゴの高さを指定 */
    vertical-align: middle;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    margin: 0 12px; /* リンク間の余白を少し狭くして、改行を防ぎます */
    font-weight: bold;
    transition: color 0.3s, transform 0.3s;
}

.nav-links a:hover {
    color: #00aaff;
    transform: translateY(-2px);
}

.nav-links .page-link {
    margin-left: 25px;
    padding-left: 25px;
    border-left: 1px solid #555;
}

/* ===============================================
   メインコンテンツ
   =============================================== */

/* --- ヒーローセクション (index.html) --- */
#hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#hero p {
    font-size: 1.2rem;
    margin-top: 10px;
}

/* --- コンテンツセクション共通 --- */
.content-section {
    max-width: 900px;
    margin: 0 auto; /* 中央揃え */
    padding: 80px 20px;
    text-align: center;
    background-color: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 15px;
    margin-top: 40px;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s, transform 0.8s;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 「このゲームについて」 (index.html) --- */
#about {
    text-align: left;
}

#about h2 {
    text-align: center;
}

#about .intro, #about .outro {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

#about h4 {
    font-size: 1.5rem;
    color: #00aaff;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #555;
}

.features-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.feature-item {
    background-color: #2a2a2a;
    padding: 25px;
    border-radius: 8px;
}

.goal-description {
    margin-bottom: 40px;
}

#about ul {
    list-style: none;
    padding-left: 0;
}

#about li {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.streaming-policy {
    background-color: rgba(0, 100, 150, 0.2);
    border-left: 5px solid #00aaff;
    padding: 20px;
    border-radius: 8px;
    margin: 40px 0;
}

/* --- メディア (index.html) --- */
.trailer-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    margin-bottom: 50px;
}

.trailer-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.gallery-container {
    margin-top: 50px;
}

.main-image-wrapper {
    margin-bottom: 15px;
}

#main-screenshot {
    width: 100%;
    border-radius: 8px;
    border: 2px solid #555;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.thumbnail-img {
    width: 100%;
    border-radius: 5px;
    border: 2px solid #555;
    cursor: pointer;
    opacity: 0.6; /* 通常は少し暗く */
    transition: opacity 0.3s, border-color 0.3s;
}

.thumbnail-img:hover {
    opacity: 1.0; /* ホバーで明るく */
    border-color: #fff;
}

.thumbnail-img.active {
    opacity: 1.0;
    border-color: #00aaff;
}

/* --- 登場人物 (index.html) --- */
.character-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    text-align: left;
}

.character-card {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    width: 250px;
}

.character-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

/* --- 動作環境 (index.html) --- */
#specs ul {
    list-style: none;
    padding: 0;
    display: inline-block;
    text-align: left;
}

#specs li {
    margin-bottom: 10px;
}

/* ===============================================
チームメンバー紹介の追加スタイル
   =============================================== */
.character-card .role {
    font-size: 0.9rem; /* 役割の文字を少し小さく */
    color: #00aaff; /* 少し目立つ色に */
    margin-top: -10px; /* 名前との間隔を詰める */
    margin-bottom: 15px;
}

.character-card .social-links {
    margin-top: 20px;
}

.character-card .social-links .social-icon {
    color: #fff;
    font-size: 1.5rem; /* アイコンのサイズ */
    margin: 0 10px; /* アイコン間の余白 */
    text-decoration: none;
    transition: color 0.3s;
}

.character-card .social-links .social-icon:hover {
    color: #00aaff; /* マウスを乗せた時の色 */
}

/* ===============================================
   ボタン類
   =============================================== */
.cta-button {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 30px;
    background-color: #007BFF;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #0056b3;
}

/* --- Steam CTAボタン --- */
.primary-cta {
    background-color: #4c8a23;
    color: #ffffff;
    padding: 20px 40px; /* サイズを大きく */
    font-size: 1.5rem; /* 文字を大きく */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); /* 影をつけて立体感を出す */
    transition: transform 0.2s, background-color 0.2s;
}

.primary-cta:hover {
    background-color: #60ac2e;
    transform: translateY(-3px);
}

.primary-cta .fa-steam {
    margin-right: 10px;
}

.cta-note {
    margin-top: 15px;
    font-size: 1rem;
    color: #cccccc;
}

.steam-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.steam-buttons .cta-button {
    margin-top: 0;
}

/* ===============================================
   チーム紹介ページ専用スタイル
   =============================================== */

/* ページ全体の背景は固定しないように設定 */
body.team-page-background {
    background-attachment: scroll;
}

/* --- ヒーローセクション (team.html / dev.html) --- */
#team-hero {
    height: 60vh; /* 画面の高さの60% */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    /* 背景画像の上に半透明の黒を重ねる */
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/team-hero-bg.jpg');
    background-size: cover;
    background-position: center;
}

#team-hero h1 {
    font-size: 4rem;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(0,0,0,0.7);
}

#team-hero p {
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(0,0,0,0.7);
}

#dev-hero {
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../images/dev-hero-bg.jpg');
    background-size: cover;
    background-position: center;
}

#dev-hero h1 { font-size: 4rem; text-shadow: 0 0 15px rgba(0,0,0,0.7); }
#dev-hero p { font-size: 1.5rem; text-shadow: 0 0 10px rgba(0,0,0,0.7); }

/* --- チームページ コンテンツセクション --- */
.team-content-section {
    padding: 80px 20px;
}

.container {
    max-width: 960px;
    margin: 0 auto;
}

/* セクションタイトル */
.team-content-section h2 {
    text-align: center;
    font-size: 2.5rem;
    display: inline-block;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 60px;
}

.team-content-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: #00aaff;
    border-radius: 2px;
}

#team-intro {
    max-width: 1200px;
    margin: 60px auto; /* ← 上下に60pxの余白を追加 */
    background-color: #1a1a1a;
    border-radius: 15px;
    padding: 60px 40px;
}

.team-story-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.team-text {
    flex: 2;
    text-align: left;
    line-height: 1.8;
    padding-left: 25px;
    border-left: 3px solid #555;
}

/* ===============================================
   チーム紹介ページのアニメーションを上書き
   =============================================== */
#team-page .content-section {
    opacity: 1;
    transform: translateY(0);
}

.team-list-container {
    display: flex;
    flex-direction: column;
    gap: 60px; /* 各メンバー間の余白 */
}

.team-member {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);

    background-color: rgba(42, 42, 42, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.team-member.reverse {
    flex-direction: row-reverse;
}

.team-member-photo {
    /* flex-basis: 250px; ← この幅を基準にするため、親要素でサイズを定義 */
    width: 250px; /* 写真を表示するボックスの幅 */
    height: 250px; /* 写真を表示するボックスの高さ */
    flex-shrink: 0;
    
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 5px solid #444;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.team-member-photo img {
    width: 100%;   /* 親要素の幅に合わせて画像を最大化 */
    height: 100%;  /* 親要素の高さに合わせて画像を最大化 */
    object-fit: cover; /* ★★★ これが重要: 画像の縦横比を保ちつつ、ボックスに合わせて拡大・切り抜き ★★★ */
    display: block; /* 不要な余白を消す */
}

.team-member-bio {
    flex-grow: 1;
    text-align: left;
}

.team-member-bio h3 {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 5px;
    color: #ffffff;
}

.team-member-bio .role {
    font-size: 1.1rem;
    color: #00aaff;
    margin-top: 0;
    margin-bottom: 20px;
}

.skill-tags {
    margin-top: 20px;
    margin-bottom: 20px;
}

.skill-tags span {
    display: inline-block;
    background-color: #555;
    color: #fff;
    padding: 5px 12px;
    margin: 3px;
    border-radius: 15px;
    font-size: 0.8rem;
    transition: transform 0.2s, background-color 0.2s;
}

.skill-tags span:hover {
    transform: scale(1.1);
    background-color: #00aaff;
}

.section-divider {
    border: 0;
    height: 2px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(255, 255, 255, 0.75), rgba(0, 0, 0, 0));
    margin: 60px 0;
}

.team-subtitle {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 40px;
    margin-top: 60px;
    color: #e0e0e0;
    background-color: rgba(18, 18, 18, 0.85);
    padding: 15px 30px;
    border-radius: 8px;
    display: inline-block;
    max-width: 90%;
}

/* ===============================================
   CTAセクション (team.html)
   =============================================== */
#game-cta {
    background-color: #1a1a1a;
    text-align: center;
}

.cta-lead {
    max-width: 600px;
    margin: 0 auto 30px auto; /* ボタンとの間に余白を追加 */
    line-height: 1.8;
}

/* ===============================================
   開発秘話ページ (development.html)
   =============================================== */
#timeline-section {
    padding: 80px 20px;
    background-color: #121212;
}

.timeline {
    position: relative;
    max-width: 960px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #555;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -12px;
    background-color: #555;
    border: 4px solid #00aaff;
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    padding: 20px 30px;
    background-color: #1a1a1a;
    position: relative;
    border-radius: 8px;
    text-align: left;
}

.timeline-content img {
    width: 100%;
    border-radius: 5px;
    margin-top: 15px;
}

.timeline-date {
    font-family: "DotGothic16", sans-serif;
    font-size: 1.2rem;
    color: #00aaff;
    margin-bottom: 10px;
}

/* ===============================================
   汎用スタイル
   =============================================== */

/* --- ツールチップ --- */
.social-icon[data-tooltip] {
    position: relative;
}

.social-icon[data-tooltip]::before {
    content: attr(data-tooltip); /* data-tooltip属性の内容を表示 */
    position: absolute;
    bottom: 150%; /* アイコンの上側に配置 */
    left: 50%;
    transform: translateX(-50%);
    
    background-color: #1a1a1a;
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #555;
    font-size: 0.9rem;
    font-family: 'Noto Sans JP', sans-serif;
    white-space: nowrap; /* 改行させない */
    
    /* 最初は非表示に */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 10;
}

.social-icon[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%) translateY(100%); /* 吹き出しの下にくっつける */
    
    border: 6px solid transparent;
    border-top-color: #1a1a1a;
    
    /* 最初は非表示に */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 10;
}

.social-icon[data-tooltip]:hover::before,
.social-icon[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* --- SNSアイコン --- */
.social-icon {
    color: #fff;
    font-size: 1.8rem;
    margin-left: 20px;
    transition: color 0.3s;
}

.social-icon:hover {
    color: #00aaff;
}

.team-member-bio .social-links .social-icon {
    color: #00aaff;
    font-size: 1.5rem;
}

.team-member-bio .social-links .social-icon:hover {
    color: #4dc4ff;
}

/* --- 仕事依頼テキスト --- */
.work-request-text {
    color: #e0e0e0;
    font-weight: normal;
    font-size: 0.9rem;
    margin: 0;
}

/* ===============================================
   見出し (h1-h6)
   =============================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: "DotGothic16", sans-serif;
    background: linear-gradient(to right, #ffffff, #c0c0c0);
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

/* ===============================================
   CONTACTセクション
   =============================================== */
.contact-email {
    color: #00aaff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    display: inline-block;
    margin-top: 10px;
    transition: color 0.3s;
}

.contact-email:hover {
    text-decoration: underline;
    color: #4dc4ff;
}

/* ===============================================
   フッター
   =============================================== */
footer {
  background-color: #111;
  color: #eee;
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
}

footer p {
  margin: 5px 0;
}

/* ===============================================
   スマートフォン用の表示調整 (レスポンシブ対応)
   =============================================== */
@media (max-width: 768px) {

    /* --- 全体・背景 --- */
    html {
        font-size: 90%; /* rem単位の基準となるフォントサイズを少し小さくする */
    }
    html {
        background-image: url('../images/background-mobile.jpg');
        background-color: #495060;
        background-attachment: scroll;
        background-size: 100% auto; /* containだと画像が小さくなりすぎる場合があるためautoに */
        background-position: top 80px;
        background-repeat: no-repeat;
        background-image: none; /* htmlの背景画像はリセット */
    }

    body {
        background-image: none; /* bodyの背景はリセット */
        background-image: url('../images/background-mobile.jpg'); /* bodyに背景画像を設定 */
        background-color: #495060; /* bodyにも背景色を設定し、transparentを上書き */
        background-attachment: scroll;
        background-size: 100% auto;
        background-position: top; /* 位置をtopに（padding-topで調整されるため） */
        background-repeat: no-repeat;
    }

    .content-section {
        padding: 40px 15px;
        margin: 30px auto;
    }

    /* --- ヘッダー --- */
    .nav-links {
        margin-top: 15px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        margin: 5px 10px;
        font-size: 0.9rem;
    }

    /* --- ヒーローセクション --- */
    #hero p {
        font-size: 1.1rem; /* 全体サイズを下げた分、少し戻してバランス調整 */
        padding: 0 10px;
    }

    .cta-button {
        font-size: 1rem;
        padding: 12px 24px;
    }

    /* --- 各ページのヒーローセクション --- */
    #team-hero h1,
    #dev-hero h1 {
        font-size: 2.5rem;
        word-break: break-all;
    }

    /* --- index.html --- */
    .features-container {
        grid-template-columns: 1fr;
    }

    /* --- team.html --- */
    .team-story-container,
    .team-member,
    .team-member.reverse {
        flex-direction: column;
        text-align: center;
    }
    .team-member-bio {
        text-align: center;
    }

    /* --- CONTACTセクション (team.html) --- */
    .contact-email {
        font-size: 1rem; /* メールアドレスのフォントサイズを調整 */
        word-break: break-all; /* 念のため残しておき、万が一はみ出る場合も改行する */
    }

    /* --- development.html --- */
    .timeline::after { left: 20px; }
    .timeline-item { width: 100%; padding-left: 50px; padding-right: 10px; left: 0 !important; }
    .timeline-item::after { left: 10px; }
    .timeline-item:nth-child(even)::after { left: 10px; } /* 右側も左に揃える */
}

/* ===============================================
   タブレット用の表示調整 (769px 〜 1024px)
   =============================================== */
@media (min-width: 769px) and (max-width: 1024px) {

    /* --- 背景設定を追加 --- */
    html {
        /* PC用の背景をリセット */
        background-image: none;
    }

    body {
        /* タブレット用の背景（スマホ用と同じもの）を設定 */
        background-image: url('../images/background-mobile.jpg');
        background-color: #495060;
        background-attachment: scroll;
        background-size: 100% auto;
        background-position: top;
        background-repeat: no-repeat;
    }


    /* --- 全体的な文字サイズや余白を調整 --- */
    .content-section {
        padding: 60px 20px; /* PC版(80px)より少し余白を狭くする */
    }

    h2 {
        font-size: 2.2rem;
    }

    #team-hero h1,
    #dev-hero h1 {
        font-size: 3.2rem; /* PC(4rem)とスマホ(2.5rem)の中間に調整 */
    }

    /* --- メディアセクション --- */
    .thumbnail-grid {
        /* PCでは5列だが、タブレットでは少し窮屈なため4列に変更 */
        grid-template-columns: repeat(4, 1fr);
    }

    /* --- チーム紹介ページ --- */
    .team-story-container,
    .team-member,
    .team-member.reverse {
        /* 画像とテキストを縦に並べる（スマホ版と同じレイアウト） */
        flex-direction: column;
        text-align: center;
    }

    .team-member-bio {
        text-align: center;
    }

}

/* ===============================================
   PC/スマホでの表示切り替え用クラス
   =============================================== */

/* PCでは.mobile-onlyを非表示 */
.team-content-section .mobile-only { display: none; }

@media (max-width: 768px) {
    /* スマホでは.desktop-onlyを非表示にし、.mobile-onlyを表示 */
    .team-content-section .desktop-only { display: none; }
    .team-content-section .mobile-only { display: block; }
}
