/* assets/css/style.css */

html, body, div, span, p, a, address,img, dl, dt, dd, ol, ul, li, h1, h2, h3, h4, h5, h6{
	margin:0px;
	padding:0px;
    text-decoration: none;
	border:none;
    box-sizing: border-box;
}

html{
	font-family: 'Noto Sans JP', sans-serif;
    text-shadow: 0px 0px 1px rgba(255,255,255,0.8), 0px 0px 2px rgba(255,255,255,0.6);
    color: #FFF;
}

a{
    color: #FFF; 
}

body{
    margin: 0;
    background-color: #000;
}

:root {
  --header-height: 80px;
}

@media (max-width: 768px) { /* タブレット以下のサイズ */
  :root {
    --header-height: 60px; /* 小さい画面では高さを縮小 */
  }
}

header {
  position: fixed;
  width: 100%;
  height: var(--header-height); /* 変数で高さを管理 */
  margin: 0;
    background-color: rgba(0,0,0,0.8);
    z-index: 1000; /* ヘッダーが他のコンテンツの上に表示されるように */
}

#usr_main_table {
  padding-top: var(--header-height);
}

.usr_home{
  font-size: clamp(18px, 2vw, 32px); /* 最小18px, 最大32px, 画面幅で調整 */
  line-height: var(--header-height); /* 行の高さをヘッダーの高さに合わせる */
}


header p.usr_glitch-text{
    font-size: calc(12px + 1.2vw);
    font-weight: 600;
    line-height: var(--header-height); /* 行の高さをヘッダーの高さに合わせる */
}


header p.usr_glitch-text {
  position: absolute;
  left: 50%;
  transform: translateX(-50%); /* 完全に中央に配置 */
  text-align: center;
}

/* 既存の .usr_nav スタイルを維持しつつ、検索フォームとの連携を考慮 */
.usr_nav {
  position: relative; /* 親要素として基準を設定 */
  display: flex;
  justify-content: space-between; /* 左右の要素を端に */
  align-items: center;
  height: 100%; /* 親要素（header）の高さいっぱいに広げる */
  padding:0 20px;
}

.usr_glitch-text{
    text-decoration: none; /* <a>タグのデフォルトの下線を消す */
    color: inherit; /* 親要素の文字色を継承させる（アニメーションの色に影響させる） */
    /* ここに既存の.usr_glitch-text のアニメーション設定が適用される */
    /* アニメーション設定 */
    animation-name: color-glitch;
    animation-duration: 3s; /* 1サイクルを3秒とする */
    animation-timing-function: steps(1, end); /* カクカク切り替え */
    animation-iteration-count: infinite; /* 無限に繰り返す */
    /* animation-delay: 0s; ←デフォルトで0なので記述不要 */
}

.usr_glitch-text a {
    text-decoration: none; /* <a>タグのデフォルトの下線を消す */
    color: inherit; /* 親要素（.usr_glitch-text）の色を継承させる */
    /* これにより、親要素のカラーアニメーションが<a>タグのテキストに適用される */
    display: inline-block; /* <a>タグがブロック要素のように振る舞い、グリッチアニメーションの視覚的影響を最大化 */
}

@keyframes color-glitch {
    0% { color: #FFF; }      /* アニメーション開始は白 */
    4% { color: #ff0033; }   /* ごく一瞬で赤 */
    6% { color: #00ffcc; }   /* ごく一瞬で緑 */
    8% { color: #FFF; }      /* すぐに白に戻る */
    100% { color: #FFF; }    /* 残りの97%は白のまま維持 */
}

/*選択範囲の色指定*/
h2::selection { background: red; color: white;
transition: background 0.2s ease-in-out; 
    transform: skewX(40deg); 

} 

/* --- 新規追加: ヘッダー検索フォーム関連スタイル --- */

/* 検索フォーム全体を囲むラッパー */
.usr_search_wrapper {
    position: relative; /* PCではこのposition:relativeが必要 */
    display: flex;
    align-items: center;
}

/* 虫眼鏡アイコン（PCでは非表示、モバイルで表示） */
.usr_search_icon {
    cursor: pointer;
    font-size: 28px; /* アイコンサイズ */
    color: #FFF; /* アイコン色を白に */
    display: none !important; /* PCでは確実に非表示に */
    padding: 5px; /* クリックしやすいようにパディング */
    border-radius: 50%; /* 丸くする */
    transition: background-color 0.3s ease;
    line-height: var(--header-height); /* アイコンの行の高さをヘッダーに合わせる */
}

.usr_search_icon:hover {
    background-color: rgba(255, 255, 255, 0.1); /* ホバー効果を白系統に */
}

/* 検索フォームのコンテナ（PCでは表示、モバイルで非表示） */
.usr_search_form_container {
    display: block; /* デフォルトで表示 */
    transition: all 0.3s ease-out; /* 表示/非表示のアニメーション用 */
    overflow: hidden; /* はみ出しを隠す */
    
    width: auto; /* コンテンツに合わせて幅を調整 */
}

/* カスタム検索フォームのスタイル調整（functions.phpで生成されるHTMLに合わせて） */
.usr_search_form_container form {
    display: flex; /* inputとbuttonを横並びにする */
    gap: 5px; /* 要素間の隙間 */
    align-items: center;
}

.usr_search_form_container input[type="search"] {
    flex-grow: 1; /* 入力欄が幅いっぱいに広がるように */
    padding: 8px 12px;
    border: 1px solid #FFF; /* 緑色の枠線を白に */
    background-color: #1a1a1a; /* 背景色は暗いまま */
    color: #FFF; /* テキスト色を白に */
     width: clamp(160px, 20vw, 320px);
    font-size: 0.9em;
    border-radius: 5px;
    box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.3); /* シャドウを白系統に */
    outline: none; /* フォーカス時のアウトラインを消す */
}

.usr_search_form_container input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.5); /* プレースホルダーの色を白系統に */
}

.usr_search_form_container button[type="submit"] {
    padding: 5px 15px;
    background-color: #FFF; /* ボタンの背景色を白に */
    color: #0a0a0a; /* ボタンのテキスト色を黒に */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    vertical-align: middle;
    line-height: 1;
    font-size: 0.9em;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(255, 255, 255, 0.4); /* シャドウを白系統に */
    transition: all 0.3s ease;
    flex-shrink: 0; /* ボタンが縮まないように */
    box-sizing: border-box;
}

.usr_search_form_container button[type="submit"]:hover {
    background-color: #e0e0e0; /* ホバー効果を少し暗めの白に */
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.6); /* シャドウを白系統に */
    transform: translateY(-1px);
}

.usr_search_form_container button[type="submit"]:active {
    background-color: #cccccc; /* クリック効果をさらに暗めの白に */
    box-shadow: 0 1px 3px rgba(255, 255, 255, 0.2); /* シャドウを白系統に */
    transform: translateY(0);
}


/* --- レスポンシブ対応: タブレット以下 (767px未満) --- */
@media (max-width: 767px) {
    /* .usr_nav のパディングを上下0に調整 */
    .usr_nav {
        padding: 0px 15px; /* 上下0px、左右15pxに調整 */
    }

    /* サイトタイトルを少し小さくする可能性があれば */
    .usr_glitch-text {
        font-size: 1.8em; /* 例: モバイルでのフォントサイズ */
    }

    /* 検索フォーム全体を囲むラッパー */
    .usr_search_wrapper {
        /* PCでのposition: relativeをここでリセットし、
         * usr_search_form_container が usr_nav を基準に絶対位置指定できるようにする */
        position: static;
        /* モバイルでの配置調整 */
        display: flex; /* アイコンをflexで中央寄せなどする場合 */
        justify-content: flex-end; /* 右端に寄せる */
        align-items: center;
        flex-grow: 1; /* 親要素内で利用可能なスペースを埋める */
        max-width: content-box; /* 幅がコンテンツに合わせられるように */
    }

    /* 虫眼鏡アイコンをモバイルで表示 */
    .usr_search_icon {
        display: block !important; /* モバイルでは確実に表示 */
        font-size: 24px; /* モバイルでのアイコンサイズを少し小さく */
        line-height: var(--header-height); /* アイコンの行の高さをヘッダーに合わせる */
    }

    /* 検索フォームのコンテナをモバイルで非表示（JSで切り替え） */
    .usr_search_form_container {
        position: absolute; /* このposition: absolute は usr_nav を基準にする */
        top: 100%; /* ナビゲーション（.usr_nav）のすぐ下に配置 */
        right: 0;  /* 右端に固定 */
        width: 100%; /* 親要素の幅いっぱいに広げる */
        
        background-color: rgba(0, 0, 0, 0.95); /* フォームが開いた時の背景色（より濃く） */
        padding: 10px 15px; /* フォームのパディング */
        box-sizing: border-box; /* パディングを幅に含める */
        z-index: 999; /* 他のコンテンツの上に表示 */
        opacity: 0; /* 初期は透明 */
        visibility: hidden; /* 初期は非表示 */
        pointer-events: none; /* 非表示時はクリックイベントを無効に */
        transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
        box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2); /* シャドウを白系統に */
    }

    /* 検索フォームのコンテナが開いた時のスタイル (JSで `is-open` クラスを追加) */
    .usr_search_form_container.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto; /* 表示時はクリックイベントを有効に */
    }

    .usr_search_form_container form {
        flex-direction: row; /* モバイルでも横並びを維持 */
        flex-wrap: nowrap; /* 折り返さない (inputとbuttonが必ず横並びになるように) */
        justify-content:flex-end; /* 中央寄せ */
        width: 100%;
    }

    .usr_search_form_container input[type="search"] {
        /* モバイルでinputの幅を調整 */
        width: clamp(160px, 60vw, 320px);
        
    }

    .usr_search_form_container button[type="submit"] {
        flex-shrink: 0; /* 縮まないように */
    }
}

/* ------------------------------------ */
/* 404ページ専用のスタイル */
/* ------------------------------------ */
#usr_main_404 {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px); /* ヘッダーとフッターの高さを考慮して調整 */
    background-color: #0a0a0a; /* 暗い背景色 */
    color: #e0e0e0;
    font-family: 'Noto Sans JP', sans-serif;
    padding: 20px;
    box-sizing: border-box;

}

.usr_404_container {
    text-align: center;
    background-color: rgba(10, 10, 10, 0.8); /* 半透明の暗い背景 */
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.4); /* 緑色の光る影 */
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-sizing: border-box;
}

.usr_404_title {
    font-family: 'DotGothic16', monospace;
    font-size: 3em;
    color: #ff0000; /* 赤色 */
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8); /* 赤色の光る影 */
    margin-bottom: 20px;
}

.usr_countdown_number {
    font-family: 'DotGothic16', monospace;
    font-size: 6em; /* 大きな数字 */
    color: #00ff00; /* 緑色 */
    text-shadow: 0 0 25px rgba(0, 255, 0, 0.9); /* 強めの緑色の光る影 */
    margin-bottom: 20px;
    transition: color 0.5s ease-in-out, text-shadow 0.5s ease-in-out; /* 色と影のトランジション */
}

.usr_404_message {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 10px;
    color: #e0e0e0;
}

.usr_404_sub_message {
    font-size: 1em;
    color: #aaaaaa;
    margin-bottom: 30px;
}

.usr_404_home_button {
    /* 既存の .usr_button スタイルを継承 */
    display: inline-block; /* ボタンが中央に配置されるように */
    margin-top: 20px;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .usr_404_title {
        font-size: 2.5em;
    }
    .usr_countdown_number {
        font-size: 5em;
    }
    .usr_404_container {
        padding: 30px;
    }
}

/* ------------------------------------ */
/* 検索結果ページ専用のスタイル */
/* ------------------------------------ */
#usr_main_search {
    background-color: #000000; /* 暗い背景色 */
    color: #e0e0e0;
    font-family: 'Noto Sans JP', sans-serif;
    padding: 20px;
    /*min-height: calc(100vh - 80px); ヘッダーとフッターの高さを考慮 */
    box-sizing: border-box;
}

.usr_search_container {
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(10, 10, 10, 0.8);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.4);
    padding: 30px;
    box-sizing: border-box;
}

.usr_search_query_title {
    
    font-size: 2em;
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.6);
    margin-bottom: 20px;
    text-align: center;
}

.usr_query_text {
    color: #ff0000; /* 検索キーワードを赤色に */
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.6);
}

.usr_osoi_message {
    font-size: 1.1em;
    color: #00ff00;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.6;
}

.usr_search_results_list {
    display: flex;
    flex-direction: column;
    gap: 20px; /* 各検索結果アイテム間のスペース */
}

.usr_search_result_item {
    background-color: rgba(20, 20, 20, 0.9);
    border: 1px solid #00ff00;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.usr_search_result_item:hover {
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.6);
    transform: translateY(-3px);
}

.usr_result_link {
    display: flex;
    align-items: center;
    padding: 15px;
    text-decoration: none;
    color: inherit; /* 親要素の色を継承 */
}

.usr_result_thumbnail {
    flex-shrink: 0; /* 縮小しない */
    width: 80px; /* サムネイルの固定幅 */
    height: 80px; /* サムネイルの固定高さ */
    margin-right: 15px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 0, 0.3);
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.2);
}

.usr_result_thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像をボックスに収める */
    display: block;
}

.usr_result_content {
    flex-grow: 1; /* 残りのスペースを占める */
}

.usr_result_title {
    font-family: 'DotGothic16', monospace;
    font-size: 1.3em;
    color: #00ff00;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    margin-bottom: 5px;
    line-height: 1.4;
}

.usr_result_date {
    font-size: 0.9em;
    color: #aaaaaa;
    font-family: 'Noto Sans JP', sans-serif;
}

.usr_no_results_message {
    font-family: 'DotGothic16', monospace;
    font-size: 1.1em;
    color: #ff0000;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
    text-align: center;
    margin-top: 50px;
    line-height: 1.6;
}

/* ページネーションのスタイル */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    list-style: none;
    padding: 0;
}

.pagination .page-numbers {
    display: block;
    padding: 8px 15px;
    margin: 0 5px;
    background-color: rgba(30, 30, 30, 0.8);
    color: #00ff00;
    border: 1px solid #00ff00;
    border-radius: 5px;
    text-decoration: none;
    font-family: 'DotGothic16', monospace;
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover {
    background-color: #00ff00;
    color: #0a0a0a;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.6);
}

.pagination .current {
    background-color: #00ff00;
    color: #0a0a0a;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}

/* モバイル対応 */
@media (max-width: 768px) {
    .usr_search_container {
        padding: 20px;
    }
    .usr_search_query_title {
        font-size: 1.5em;
    }
    .usr_osoi_message {
        font-size: 1em;
    }
    /* モバイル対応 */

    .usr_result_link {
        /* flex-direction: column; /* モバイルでは縦並び */ /* ← これを削除 */
        align-items: flex-start;
    }
    .usr_result_thumbnail {
        width: 30%; /* ★変更: 幅を30%に★ */
        height: auto;
        /* max-height: 150px; /* モバイルでの最大高さ */ /* ← これを削除 */
        margin-right: 20px; /* ★追加: 右余白20px★ */
        /* margin-bottom: 10px; /* ← これを削除 */
    }
    .usr_result_title {
        font-size: 1.1em;
    }
    .usr_result_date {
        font-size: 0.8em;
    }
    .pagination .page-numbers {
        padding: 6px 10px;
        font-size: 0.9em;
    }
}

footer{
    text-align: center;
    margin: 50px auto;
}

.usr_SP_img {
    display: none;
}
