/* 基本設定 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #000000; /* グラデーションのフォールバック */
    color: #ffffff; /* 本文のデフォルトカラーを明るいホワイトに */
    overflow-x: hidden;
    position: relative;
}

/* 背景グラデーションの深化 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #000010 0%, #080820 25%, #150530 50%, #250040 75%, #000010 100%); /* より複雑でリッチな階調 */
    z-index: -2;
}

/* 星空コンテナ */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    background: transparent;
}

/* 星の生成とアニメーション */
/* 星レイヤー1: 最も遠く、小さく、ゆっくり瞬き、ゆっくり流れる */
.stars::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%; /* 垂直方向に長くして連続的に流れるように */
    background-image: 
        /* 白い星 */
        radial-gradient(0.5px 0.5px at 10% 10%, #ffffff, rgba(0,0,0,0)),
        radial-gradient(0.7px 0.7px at 30% 20%, #ffffff, rgba(0,0,0,0)),
        radial-gradient(0.4px 0.4px at 50% 30%, #ffffff, rgba(0,0,0,0)),
        radial-gradient(0.6px 0.6px at 70% 40%, #ffffff, rgba(0,0,0,0)),
        radial-gradient(0.8px 0.8px at 90% 50%, #ffffff, rgba(0,0,0,0)),
        radial-gradient(0.5px 0.5px at 5% 60%, #ffffff, rgba(0,0,0,0)),
        radial-gradient(0.7px 0.7px at 25% 70%, #ffffff, rgba(0,0,0,0)),
        radial-gradient(0.4px 0.4px at 45% 80%, #ffffff, rgba(0,0,0,0)),
        radial-gradient(0.6px 0.6px at 65% 90%, #ffffff, rgba(0,0,0,0)),
        radial-gradient(0.8px 0.8px at 85% 5%, #ffffff, rgba(0,0,0,0)),
        /* 青白い星 */
        radial-gradient(0.5px 0.5px at 15% 15%, #e0f2f7, rgba(0,0,0,0)),
        radial-gradient(0.7px 0.7px at 35% 25%, #e0f2f7, rgba(0,0,0,0)),
        radial-gradient(0.4px 0.4px at 55% 35%, #e0f2f7, rgba(0,0,0,0)),
        radial-gradient(0.6px 0.6px at 75% 45%, #e0f2f7, rgba(0,0,0,0)),
        radial-gradient(0.8px 0.8px at 95% 55%, #e0f2f7, rgba(0,0,0,0)),
        /* 黄色がかった星 */
        radial-gradient(0.5px 0.5px at 20% 20%, #fffacd, rgba(0,0,0,0)),
        radial-gradient(0.7px 0.7px at 40% 30%, #fffacd, rgba(0,0,0,0)),
        radial-gradient(0.4px 0.4px at 60% 40%, #fffacd, rgba(0,0,0,0)),
        radial-gradient(0.6px 0.6px at 80% 50%, #fffacd, rgba(0,0,0,0)),
        radial-gradient(0.8px 0.8px at 100% 60%, #fffacd, rgba(0,0,0,0));
    background-size: 200px 200px;
    animation: twinkleSmall 4s infinite alternate, moveStars 300s linear infinite;
    animation-delay: -150s;
}

/* 星レイヤー2: 中間、中くらい、通常の瞬き、中くらいの速さで流れる */
.stars::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    background-image: 
        /* 白い星 */
        radial-gradient(1px 1px at 15% 45%, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1.2px 1.2px at 70% 15%, #ffffff, rgba(0,0,0,0)),
        radial-gradient(0.9px 0.9px at 35% 85%, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1.1px 1.1px at 5% 60%, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1.3px 1.3px at 95% 75%, #ffffff, rgba(0,0,0,0)),
        /* 青白い星 */
        radial-gradient(1px 1px at 25% 55%, #e0f2f7, rgba(0,0,0,0)),
        radial-gradient(1.2px 1.2px at 80% 25%, #e0f2f7, rgba(0,0,0,0)),
        radial-gradient(0.9px 0.9px at 45% 95%, #e0f2f7, rgba(0,0,0,0)),
        /* 黄色がかった星 */
        radial-gradient(1px 1px at 10% 30%, #fffacd, rgba(0,0,0,0)),
        radial-gradient(1.2px 1.2px at 60% 60%, #fffacd, rgba(0,0,0,0));
    background-size: 300px 300px;
    animation: twinkleMedium 3s infinite alternate, moveStars 200s linear infinite;
    animation-delay: -80s;
}

/* 天の川の表現（密集した星々、ぼかしあり） */
.milky-way {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(0.8px 0.8px at 20% 20%, #ffffff, rgba(0,0,0,0)),
                      radial-gradient(0.6px 0.6px at 40% 30%, #f0f8ff, rgba(0,0,0,0)),
                      radial-gradient(1px 1px at 60% 40%, #fffacd, rgba(0,0,0,0)),
                      radial-gradient(0.7px 0.7px at 80% 50%, #ffffff, rgba(0,0,0,0)),
                      radial-gradient(0.9px 0.9px at 10% 60%, #f0f8ff, rgba(0,0,0,0)),
                      radial-gradient(0.5px 0.5px at 30% 70%, #fffacd, rgba(0,0,0,0)),
                      radial-gradient(1.1px 1.1px at 50% 80%, #ffffff, rgba(0,0,0,0)),
                      radial-gradient(0.8px 0.8px at 70% 90%, #f0f8ff, rgba(0,0,0,0)),
                      radial-gradient(1.2px 1.2px at 90% 10%, #fffacd, rgba(0,0,0,0)),
                      /* さらに多くの星を追加して密度を上げる */
                      radial-gradient(0.6px 0.6px at 15% 5%, #ffffff, rgba(0,0,0,0)),
                      radial-gradient(0.9px 0.9px at 85% 95%, #f0f8ff, rgba(0,0,0,0)),
                      radial-gradient(0.7px 0.7px at 5% 80%, #fffacd, rgba(0,0,0,0)),
                      radial-gradient(1.0px 1.0px at 75% 25%, #ffffff, rgba(0,0,0,0)),
                      radial-gradient(0.4px 0.4px at 30% 100%, #f0f8ff, rgba(0,0,0,0)),
                      radial-gradient(0.8px 0.8px at 40% 5%, #fffacd, rgba(0,0,0,0)),
                      radial-gradient(0.6px 0.6px at 60% 95%, #ffffff, rgba(0,0,0,0));
    background-size: 150px 150px; /* 少し大きめにして天の川の帯感を出す */
    animation: twinkleLarge 5s infinite alternate, moveStars 400s linear infinite;
    animation-delay: -200s;
    opacity: 0.8;
    filter: blur(0.8px); /* ぼかしを少し強めにする */
    z-index: -1; 
}

/* 瞬きアニメーション */
@keyframes twinkleSmall {
    0% { opacity: 0.1; transform: scale(0.6); }
    50% { opacity: 0.7; transform: scale(0.9); }
    100% { opacity: 0.1; transform: scale(0.6); }
}

@keyframes twinkleMedium {
    0% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 0.9; transform: scale(1.1); }
    100% { opacity: 0.2; transform: scale(0.8); }
}

@keyframes twinkleLarge {
    0% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0.3; transform: scale(1); }
}

/* 星が流れるアニメーション（奥行き感を出すため速度を調整） */
@keyframes moveStars {
    from { transform: translateY(0); }
    to { transform: translateY(-100%); }
}

/* 流れ星のアニメーション（新しい実装） */
.shooting-star-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 100;
}

.shooting-star-layer::before {
    content: '';
    position: absolute;
    top: -100px; /* 画面外から開始 */
    left: -100px; /* 画面外から開始 */
    width: 200px; /* 流れ星の長さ */
    height: 2px; /* 流れ星の太さ */
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, #ffffff 50%, rgba(255, 255, 255, 0) 100%);
    border-radius: 50%;
    box-shadow: 0 0 10px #ffffff, 0 0 20px #e0f2f7; /* ぼかしと光彩 */
    animation: shootStar 7s linear infinite;
    animation-delay: 2s; /* 最初の一つ目の流れ星の遅延 */
}

.shooting-star-layer::after {
    content: '';
    position: absolute;
    top: -200px; 
    left: -200px;
    width: 150px;
    height: 1.5px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, #fffacd 50%, rgba(255, 255, 255, 0) 100%);
    border-radius: 50%;
    box-shadow: 0 0 8px #fffacd, 0 0 15px #ffddaa;
    animation: shootStar 5s linear infinite;
    animation-delay: 5s; /* 二つ目の流れ星の遅延 */
}

@keyframes shootStar {
    0% {
        transform: translate(0vw, 0vh) rotate(-45deg);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    100% {
        transform: translate(120vw, 120vh) rotate(-45deg); /* 画面を斜めに横切る */
        opacity: 0;
    }
}

/* コンテンツコンテナ（星空の上に重ねて配置される） */
.container {
    width: 85%;
    max-width: 1000px; /* 少し狭くしてコンテンツを中央にまとめる */
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
    position: relative; /* 星空の上に配置 */
    z-index: 2;
}

/* ヘッダー */
header {
    background: rgba(5, 5, 30, 0.7); /* 半透明の濃い紺色 */
    color: #e0e0e0;
    padding: 15px 0;
    min-height: 60px;
    border-bottom: 2px solid #0f3460; 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6); /* 影を強調 */
    position: sticky;
    top: 0;
    z-index: 1000;
    border-radius: 0 0 15px 15px; /* 下部のみ角丸 */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.8em;
    font-weight: bold; /* フォントを太く */
    /* グラデーションテキスト */
    background: linear-gradient(to right, #e0b0ff, #ffd700); /* 明るいラベンダーから金色 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 5px rgba(255,255,255,0.7), 0 0 10px rgba(224,176,255,0.5); /* 発光するような影 */
}

header nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

header nav ul li {
    display: inline;
    margin-left: 25px;
}

header nav a {
    /* グラデーションテキスト */
    background: linear-gradient(to right, #e0b0ff, #ffd700); /* 明るいラベンダーから金色 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 600; /* フォントを太く */
    transition: all 0.3s ease;
    text-shadow: 0 0 3px rgba(255,255,255,0.5), 0 0 8px rgba(224,176,255,0.3); /* 発光するような影 */
}

header nav a:hover {
    transform: scale(1.05); /* ホバーで少し拡大 */
    opacity: 0.9; /* 少し明るく */
}

/* メインビジュアル */
.hero {
    min-height: 500px;
    background: transparent; 
    color: #ffffff; /* 本文のデフォルトカラーを明るいホワイトに */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 20px 0; /* 上下のパディングを追加 */
}

.hero .container {
    background: rgba(5, 5, 30, 0.85); /* 半透明の非常に濃い紺色 */
    padding: 40px; /* 内側のパディングを増やす */
    border-radius: 15px; /* 角を丸く */
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.7), 0 0 40px rgba(5, 5, 30, 0.5); /* 影とぼかし */
    border: 1px solid rgba(255,255,255,0.1); /* 微妙なボーダー */
    backdrop-filter: blur(8px); /* ぼかしを強調 */
}

.hero h2 {
    font-size: 3.8em;
    margin-bottom: 20px;
    font-weight: bold; /* フォントを太く */
    /* グラデーションテキスト */
    background: linear-gradient(to right, #e0b0ff, #ffd700); /* 明るいラベンダーから金色 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 8px rgba(255,255,255,0.9), 0 0 15px rgba(224,176,255,0.7); /* 強い発光するような影 */
}

/* セクション共通スタイル */
.profile, .about, .youtube-gallery, .contact {
    padding: 60px 0;
    background: transparent; /* 背景はコンテナ内で処理 */
    color: #ffffff; /* 本文のデフォルトカラーを明るいホワイトに */
    margin-bottom: 25px; 
}

.profile .container, .about .container, .youtube-gallery .container, .contact .container {
    background: rgba(5, 5, 30, 0.85); /* 半透明の非常に濃い紺色 */
    padding: 40px; /* 内側のパディングを増やす */
    border-radius: 15px; /* 角を丸く */
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.7), 0 0 40px rgba(5, 5, 30, 0.5); /* 影とぼかし */
    border: 1px solid rgba(255,255,255,0.1); /* 微妙なボーダー */
    backdrop-filter: blur(8px); /* ぼかしを強調 */
}

.profile h2, .about h2, .youtube-gallery h2, .contact h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.8em;
    font-weight: bold; /* フォントを太く */
    /* グラデーションテキスト */
    background: linear-gradient(to right, #e0b0ff, #ffd700); /* 明るいラベンダーから金色 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 7px rgba(255,255,255,0.8), 0 0 12px rgba(224,176,255,0.6); /* 発光するような影 */
}

.profile h3 {
    text-align: center;
    font-size: 2em;
    font-weight: 600; /* フォントを太く */
    /* グラデーションテキスト */
    background: linear-gradient(to right, #e0b0ff, #ffd700); /* 明るいラベンダーから金色 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    text-shadow: 0 0 5px rgba(255,255,255,0.6), 0 0 10px rgba(224,176,255,0.4); /* 発光するような影 */
}

.profile p, .about p, .youtube-gallery p {
    text-align: center;
    max-width: 800px; /* 幅を少し広げる */
    margin: 0 auto;
    font-size: 1.15em;
    color: #ffffff; /* 明るいホワイト */
    font-weight: 400; /* フォントの太さを調整 */
    text-shadow: 0 0 2px rgba(255,255,255,0.4); /* 最小限の影 */
    line-height: 1.8; /* 行の高さを調整 */
}

/* YouTubeギャラリー */
.youtube-gallery .container {
    background: rgba(5, 5, 30, 0.88); /* 少し濃い目の背景色 */
}

.video-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px; /* 上部の余白を追加 */
}

.video-item {
    flex: 1 1 300px;
    background: rgba(10, 10, 40, 0.95); /* ビデオアイテムの背景も調整 */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8), 0 0 30px rgba(10, 10, 40, 0.6);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.video-item:hover {
    transform: translateY(-12px) scale(1.03); /* ホバー効果を強調 */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 1), 0 0 45px rgba(10, 10, 40, 0.8);
}

/* 動画のアスペクト比を維持するためのラッパー */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 のアスペクト比 */
    height: 0;
    overflow: hidden;
    border-radius: 12px 12px 0 0; /* 上部のみ角丸 */
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 12px 12px 0 0; /* 上部のみ角丸 */
}

.video-item p {
    text-align: center;
    padding: 15px;
    font-size: 1.1em;
    color: #ffffff; /* 明るいホワイト */
    font-weight: 400; /* フォントの太さを調整 */
    margin: 0;
    text-shadow: 0 0 2px rgba(255,255,255,0.4);
}

/* お問い合わせボタン */
.button {
    display: inline-block;
    /* グラデーションボタン */
    background: linear-gradient(to right, #e0b0ff, #ffd700); /* 明るいラベンダーから金色 */
    color: #333333; /* ボタン内のテキストは濃い色で視認性確保 */
    padding: 14px 30px;
    text-decoration: none;
    border-radius: 35px;
    margin-top: 35px;
    font-size: 1.2em;
    font-weight: bold; /* フォントを太く */
    transition: all 0.4s ease;
    box-shadow: 0 6px 15px rgba(224, 176, 255, 0.7), 0 0 20px rgba(255, 215, 0, 0.5); /* 発光するような影 */
    border: none; 
    text-shadow: none; /* ボタン内のテキスト影は削除 */
}

.button:hover {
    background: linear-gradient(to right, #ffd700, #e0b0ff); /* ホバー時のグラデーション反転 */
    transform: translateY(-7px) scale(1.05);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.9), 0 0 30px rgba(224, 176, 255, 0.7);
}

.contact .container {
    text-align: center;
}

/* フッター */
footer {
    padding: 30px;
    margin-top: 25px; /* 上部の余白を調整 */
    color: #ffffff; /* 明るいホワイト */
    background-color: rgba(5, 5, 30, 0.7); /* 半透明の濃い紺色 */
    text-align: center;
    border-top: 2px solid #0f3460;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.6);
    border-radius: 15px 15px 0 0; /* 上部のみ角丸 */
    font-weight: 500; /* フォントを少し太く */
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 0 10px;
    }

    header .container {
        flex-direction: column;
        text-align: center;
    }

    header h1 {
        margin-bottom: 10px;
        font-size: 1.5em;
    }

    header nav ul li {
        margin: 0 8px;
    }

    header nav a {
        font-size: 1em;
    }

    .hero h2 {
        font-size: 28px; /* スマホでのキャッチコピーのフォントサイズ調整 */
    }

    .hero .container {
        padding: 30px;
    }

    .profile h2, .about h2, .youtube-gallery h2, .contact h2 {
        font-size: 2em;
    }

    .profile h3 {
        font-size: 1.7em;
    }

    .profile p, .about p, .youtube-gallery p {
        font-size: 1em;
        line-height: 1.6;
    }

    .profile .container, .about .container, .youtube-gallery .container, .contact .container {
        padding: 30px;
    }

    .video-grid {
        flex-direction: column;
        align-items: center;
    }

    .video-item {
        width: 95%;
        max-width: 350px;
    }

    /* 動画のアスペクト比維持のためのラッパーのレスポンシブ調整 */
    .video-responsive {
        padding-bottom: 56.25%; /* 16:9 のアスペクト比を維持 */
    }

    .video-item iframe {
        height: 100%; /* 親要素の高さに合わせる */
    }

    .button {
        padding: 10px 20px;
        font-size: 1em;
        margin-top: 20px;
    }
}
