@charset "utf-8";

/* =========================================
   1. 基本設定
   ========================================= */
:root {
    /* マウスの位置を保存する変数（初期値） */
    --mouse-x: 0px;
    --mouse-y: 0px;
}

body {
    /* 背景色は画像があるので一旦黒に */
    background-color: #000;
    color: #00ffff;
    font-family: 'DotGothic16', sans-serif;
    text-shadow: 2px 2px 0px #ff00ff;
    margin: 0;
    padding: 0;
    height: 100vh; /* 画面の高さいっぱいに */
    overflow: hidden; /* スクロールさせない（ゲーム画面風） */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* リンクの基本設定 */
a { text-decoration: none; color: inherit; transition: 0.3s; }


/* =========================================
   2. パララックス背景の設定
   ========================================= */
.parallax-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* 一番奥へ */
    pointer-events: none; /* マウスの邪魔をしない */
}

.layer {
    position: absolute;
    top: -5%; left: -5%; /* 少し大きめに配置して端が見えないように */
    width: 110%;
    height: 110%;
    object-fit: cover;
    transition: transform 0.1s ease-out; /* 動きをなめらかに */
}

/* 各レイヤーの動くスピード設定 */
/* 手前ほど大きく動かす（数字を大きくする） */
.layer-bg { z-index: 1; } /* 動かないベース */

.layer-stars {
    z-index: 2;
    /* マウスの動きの 0.5倍 動く */
    transform: translate(calc(var(--mouse-x) * 0.5), calc(var(--mouse-y) * 0.5));
}
.layer-planets {
    z-index: 3;
    /* マウスの動きの 1.2倍 動く */
    transform: translate(calc(var(--mouse-x) * 1.2), calc(var(--mouse-y) * 1.2));
}
.layer-mountains {
    z-index: 4;
    top: auto; bottom: -10%; /* 山は下に配置 */
    /* マウスの動きの 2.5倍 大きく動く！ */
    transform: translate(calc(var(--mouse-x) * 2.5), calc(var(--mouse-y) * 1.5));
}


/* =========================================
   3. メインコンテンツのデザイン
   ========================================= */
.main-content {
    z-index: 10; /* 背景より手前 */
    text-align: center;
    margin-bottom: 80px; /* 下のドックとの隙間 */
}

h1 {
    font-size: 3.5rem;
    letter-spacing: 0.2em;
    margin-bottom: 40px; 
    margin-top: -30px; 
}

/* ふわふわ猫ちゃん */
.floating-cat {
    width: 160px;
    image-rendering: pixelated;
    animation: float 3s ease-in-out infinite;
    margin-bottom: 40px;
    /* 猫も少し動かす */
    transform: translate(calc(var(--mouse-x) * -1.5), calc(var(--mouse-y) * -1.5));
}

/* --- メインメニュー（ガラスのカード化） --- */
.main-menu {
    display: flex;
    justify-content: center; /* 真ん中に寄せる */
    gap: 20px; /* カード同士の隙間 */
    width: 90%;
    max-width: 1000px; /* 画面幅いっぱいに使う */
    margin: 0 auto;
    flex-wrap: wrap; /* スマホでは自動で折り返す */
}

.menu-btn {
    display: flex;
    flex-direction: column; 
    align-items: center;  
    justify-content: center;
    text-align: center; 
    width: 160px; /* カードの幅 */
    height: 120px; /* カードの高さ */
    
    background: rgba(255, 255, 255, 0.05); /* ほぼ透明な白 */
    backdrop-filter: blur(10px); /* 背景をぼかす！ */
    border: 1px solid rgba(255, 255, 255, 0.2); /* 薄いガラスの縁取り */
    border-radius: 15px; /* 角を丸く */
    
    color: #ffffff;
    text-decoration: none;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* バネのように動く */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* 浮いてる影 */
}

/* アイコンの設定 */
.btn-icon {
    font-size: 1.5rem;
    color: #00ffff;
    margin-right: 0 !important;  
    margin-bottom: 10px !important; 
    width: auto !important;    
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    transition: 0.3s;
}

/* メイン文字 */
.menu-btn {
    font-size: 1.2rem;
    letter-spacing: 0.1em;
}

/* サブ文字（小さく） */
.btn-sub {
    font-size: 0.7rem;
    color: #aaaaaa;
    margin-top: 5px;
}

/* ホバー時のアクション */
.menu-btn:hover {
    background: rgba(0, 255, 255, 0.1); /* 水色に光る */
    border-color: #00ffff;
    transform: translateY(-10px) scale(1.05); /* フワッと浮いて拡大 */
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4), inset 0 0 20px rgba(0, 255, 255, 0.1);
}

.menu-btn:hover .btn-icon {
    color: #ff00ff; /* アイコンがピンクに */
    transform: rotate(15deg) scale(1.2);
    text-shadow: 0 0 15px #ff00ff;
}

/* ボタンの左にある四角いアイコン */
.btn-icon { color: #00ffff; margin-right: 15px; font-size: 1rem; transition: 0.3s; }
/* 右側の小さい日本語 */
.btn-sub { font-size: 0.9rem; color: #cccccc; }

/* ホバー時のアクション */
.menu-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #ff00ff;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
    transform: scale(1.05); /* 少し大きくなる */
}
.menu-btn:hover .btn-icon {
    color: #ff00ff;
    transform: rotate(45deg); /* クルッと回る */
}


/* =========================================
   4. ソーシャルドック（画面下）
   ========================================= */
.social-dock {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%); /* ど真ん中に配置 */
    display: flex;
    gap: 30px;
    padding: 15px 30px;
    background: rgba(0, 0, 20, 0.7);
    border-radius: 50px; /* 丸っこくする */
    border: 2px solid rgba(0, 255, 255, 0.3);
    z-index: 20;
    backdrop-filter: blur(5px); /* すりガラス効果 */
    justify-content: center;
}

.dock-icon {
    font-size: 2rem;
    color: #ffffff;
    text-shadow: none;
    transition: 0.3s;
    width: 50px; height: 50px;
    display: flex; justify-content: center; align-items: center;
    border-radius: 50%;
}

/* 各アイコンのホバー色 */
.youtube:hover { color: #ff0000; background: #ffffff; box-shadow: 0 0 20px #ff0000; }
.niconico:hover { color: #252525; background: #ffffff; box-shadow: 0 0 20px #ffffff; }
.x-twitter:hover { color: #000000; background: #ffffff; box-shadow: 0 0 20px #ffffff; }
.instagram:hover { color: #E1306C; background: #ffffff; box-shadow: 0 0 20px #E1306C; }

.dock-icon:hover {
    transform: translateY(-10px) scale(1.2); /* 上に浮いて大きくなる */
}


/* =========================================
   5. アニメーション定義 & ノイズ
   ========================================= */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* 走査線ノイズ（他のページと同じ） */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
}

/* =========================================
   6. ローディング画面（システム起動演出）
   ========================================= */
   #loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000; /* 真っ黒な背景 */
    z-index: 9999; /* 何よりも一番手前に表示！ */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.5s ease-out; /* 1.5秒かけてゆっくり消える */
}

/* 文字のデザイン */
.loading-text {
    color: #00ffff;
    font-size: 2rem;
    letter-spacing: 0.2em;
    font-family: 'DotGothic16', sans-serif;
    /* 点滅アニメーション */
    animation: blink 0.8s infinite alternate;
}

/* 読み込み完了時（.loadedがついた時）の変化 */
.loaded #loading-screen {
    opacity: 0; /* 透明にする */
    pointer-events: none; /* マウスを通してクリックできるようにする */
}

/* 点滅アニメーションの定義（使い回しOK） */
@keyframes blink {
    0% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* ✨️ マウスから出る星屑のデザイン ✨️ */
.star-particle {
    position: absolute;
    background: radial-gradient(circle, #ffffff, transparent); /* 光る玉 */
    border-radius: 50%; /* 丸くする */
    pointer-events: none; /* クリックの邪魔をしない */
    transform: translate(-50%, -50%); /* 中心をマウスに合わせる */
    animation: star-fade 1s linear forwards; /* 1秒で消えるアニメ */
    box-shadow: 0 0 10px #00ffff; /* 青く光る */
    z-index: 9999;
}

/* 星が落ちながら消えるアニメ */
@keyframes star-fade {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, 50px) scale(0); /* 下に落ちながら消える */
    }
}

/* =========================================
   7. グリッチ＆回転
   ========================================= */

/* ⚡ タイトルのグリッチ演出 */
h1 {
    position: relative;
    color: #ffffff;
}

/* 文字の「影分身」を作って、青と赤に色ズレさせる */
h1::before, h1::after {
    content: attr(data-text); /* data-textの中身を表示 */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000; /* 背景色と同じにして元の文字を隠す */
    overflow: hidden;
    opacity: 0.7;
}

/* 左にズレる影（青緑） */
h1::before {
    left: 2px;
    text-shadow: -1px 0 #00ffff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-1 3s infinite linear alternate-reverse;
}

/* 右にズレる影（ピンク） */
h1::after {
    left: -2px;
    text-shadow: -1px 0 #ff00ff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

/* グリッチのアニメーション定義（ノイズの動き） */
@keyframes glitch-anim-1 {
    0% { clip: rect(30px, 9999px, 10px, 0); }
    20% { clip: rect(80px, 9999px, 90px, 0); }
    40% { clip: rect(10px, 9999px, 50px, 0); }
    60% { clip: rect(40px, 9999px, 20px, 0); }
    80% { clip: rect(70px, 9999px, 90px, 0); }
    100% { clip: rect(20px, 9999px, 60px, 0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(10px, 9999px, 80px, 0); }
    20% { clip: rect(90px, 9999px, 10px, 0); }
    40% { clip: rect(50px, 9999px, 30px, 0); }
    60% { clip: rect(20px, 9999px, 60px, 0); }
    80% { clip: rect(90px, 9999px, 40px, 0); }
    100% { clip: rect(60px, 9999px, 10px, 0); }
}


/* 猫の回転アニメーション */
.spin-action {
    animation: spin-jump 0.8s ease-in-out;
}

@keyframes spin-jump {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.5) rotate(180deg); } /* 大きくなって回る！ */
    100% { transform: scale(1) rotate(360deg); }
}

/* クリックできるよ！と分かるようにマウスカーソルを変える */
#neko {
    cursor: pointer;
    transition: 0.3s;
}
#neko:hover {
    filter: drop-shadow(0 0 10px #ff00ff); /* マウスが乗ると光る */
}

/* =========================================
   8. スマホ用レイアウト（レスポンシブ対応）
   ========================================= */
   @media screen and (max-width: 768px) {
    body {
        overflow-y: auto;      /* 縦スクロールを許可！ */
        height: auto;          /* 高さを固定しない */
        min-height: 100vh;     /* 最低でも画面いっぱいは確保 */
        padding-bottom: 120px; /* 一番下に余白を作る（下のアイコンと被らないように） */
    }
    
    /* 1. タイトル文字をスマホサイズに */
    h1 {
        font-size: 2rem; /* 3.5remだとデカすぎるので縮小 */
        letter-spacing: 0.1em; /* 文字間も少し詰める */
        margin-top: 20px; /* 位置調整 */
        margin-bottom: 20px;
    }

    /* 2. 猫ちゃんを少し小さく */
    .floating-cat {
        width: 120px;
        margin-bottom: 30px;
    }

    /* 3. メニューボタンを「横一列」に強制配置！ */
    .main-menu {
        display: flex;       /* フレックスボックス */
        flex-direction: row; /* 横並び */
        flex-wrap: nowrap;   /* ★重要：絶対に折り返さない！ */
        gap: 8px;            /* 隙間を少し狭くする */
        width: 98%;          /* 画面ギリギリまで使う */
        margin: 0 auto;      /* 真ん中揃え */
    }

    .menu-btn {
        flex: 1;             /* ★重要：3つのボタンを「均等」な幅にする */
        width: auto;         /* 幅の指定を解除（flex:1に任せる） */
        height: 90px;        /* 少し背を低くしてコンパクトに */
        padding: 5px;        /* 内側の隙間も減らす */
        font-size: 0.9rem;   /* 文字を少し小さく */
    }

    .btn-icon {
        font-size: 1.2rem;   /* アイコンも少し小さく */
        margin-bottom: 5px !important;
    }

    .btn-sub {
        font-size: 0.6rem;   /* 日本語部分はもっと小さく（はみ出し防止） */
    }

    /* 4. 下のソーシャルアイコンを調整 */
    .social-dock {
        width: 80%; /* 幅を調整 */
        gap: 20px;
        padding: 10px 20px;
        bottom: 20px;
    }
    .dock-icon {
        width: 40px; height: 40px; font-size: 1.5rem;
    }

    /* 5. ギャラリーページ（1列で見やすく） */
    .gallery-grid {
        grid-template-columns: 1fr; /* 強制的に1列にする */
        padding: 15px;
        gap: 20px;
    }
    
    /* 6. プロフィール画面も縦並びに */
    .status-window {
        flex-direction: column;
    }
    .col-left, .col-right {
        width: 100%;
    }
}

/* =========================================
   9. トップページのお知らせ（SYSTEM LOG）
   ========================================= */
   .system-log-box {
    width: 90%;
    max-width: 600px; /* メニューより少し広め */
    margin: 40px auto 0 auto; /* 上に少し隙間 */
    background: rgba(0, 0, 0, 0.6); /* 濃い黒背景 */
    border: 1px solid #00ffff;
    border-left: 5px solid #00ffff; /* 左だけ太線でアクセント */
    padding: 15px;
    font-family: 'DotGothic16', sans-serif;
    text-align: left; /* 文字は左揃え */
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}

/* ヘッダー部分 */
.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(0, 255, 255, 0.3);
    padding-bottom: 5px;
    margin-bottom: 10px;
    color: #00ffff;
    font-size: 1.1rem;
}

/* 「もっと見る」ボタン */
.log-more {
    font-size: 0.8rem;
    color: #aaaaaa;
    text-decoration: none;
    transition: 0.3s;
}
.log-more:hover {
    color: #ff00ff;
    letter-spacing: 0.1em;
}

/* リスト本体 */
.log-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.log-list li {
    display: flex;
    gap: 15px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #eeeeee;
    font-size: 0.9rem;
}

.log-date {
    color: #00ffff;
    opacity: 0.8;
}

/* スマホ対応（日付とタイトルを縦にする） */
@media screen and (max-width: 768px) {
    .log-list li {
        flex-direction: column; /* 縦並び */
        gap: 2px;
    }
    .log-date {
        font-size: 0.8rem;
    }
}

/* =========================================
   10. 戻るボタンの固定（全ページ共通）
   ========================================= */
   .back-button {
    position: absolute; /* 画面の定位置に固定！ */
    top: 20px;          /* 上から20px */
    left: 20px;         /* 左から20px */
    font-size: 1.2rem;
    color: #ffffff;
    text-decoration: none;
    z-index: 100;       /* 他のアイテムより手前に */
    transition: 0.3s;
}

.back-button:hover {
    color: #ff00ff;     /* マウスが乗ったらピンクに */
    transform: translateX(5px);
}