@charset "UTF-8";

/* --- 0. カラー変数の定義 --- */
:root {
    --theme-color: #00d2ff;
    --theme-glow: rgba(0, 210, 255, 0.8);
    --theme-bg: rgba(0, 210, 255, 0.1);
}

.theme-red {
    --theme-color: #ff4d4d;
    --theme-glow: rgba(255, 77, 77, 0.8);
    --theme-bg: rgba(255, 77, 77, 0.1);
}

.theme-red-dark {
    --theme-color: #b32d2d;             /* 深みのある赤 */
    --theme-glow: rgba(179, 45, 45, 0.6);
    --theme-bg: rgba(179, 45, 45, 0.15);
}

.theme-red-muted {
    --theme-color: #f07a7a;             /* 彩度を落としたピンクに近い赤 */
    --theme-glow: rgba(240, 122, 122, 0.6);
    --theme-bg: rgba(240, 122, 122, 0.1);
}

.theme-red-wine {
    --theme-color: #800020;             /* バーガンディ（ワイン色） */
    --theme-glow: rgba(128, 0, 32, 0.7);
    --theme-bg: rgba(128, 0, 32, 0.2);
}

.theme-white {
    --theme-color: #fff;             /* メインは真っ白 */
    --theme-glow: rgba(255, 255, 255, 0.5); /* 柔らかな白い光 */
    --theme-bg: rgba(255, 255, 255, 0.1);   /* ほのかな白の背景 */
}

/* --- 1. 全体レイアウト --- */
* {
    box-sizing: border-box; 
}

body, 
html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #1a1c23;
    color: #fff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
}

.site-wrapper {
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/*----------------------------------------------------
            サイドエリアの設定
------------------------------------------------------*/
.side-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    background-color: #1a1c23;
}

.side-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.deco-line {
    width: 1px;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--theme-color), transparent);
    box-shadow: 0 0 10px var(--theme-color);
}

.side-text {
    writing-mode: vertical-rl;
    font-size: 0.75rem;
    letter-spacing: 0.5em;
    color: var(--theme-color);
    opacity: 0.7;
}

/*-------------------------------------------
        ヘッダー・メニュー 
--------------------------------------------- */
.site-title {
    font-family: 'Dancing Script', cursive;
    color: var(--theme-color);
    font-size: 5rem;
    text-align: center;
    margin: 20px 0 5px 0;
    text-shadow: 0 0 15px var(--theme-glow);
}

.menu-list {
    display: flex;
    justify-content: center;
    gap: 12px;
    list-style: none;
    padding: 0;
}

.menu-item {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 160px;
    padding: 0 22px;
    border: 1px solid var(--theme-color);
    border-radius: 25px;
    background: rgba(0, 0, 0, 0.7);
    transition: 0.3s;
}

.menu-item:hover {
    background: var(--theme-bg);
    box-shadow: 0 0 15px var(--theme-color);
}

/*----------------------------------------------
                ドロップダウン 
----------------------------------------------- */
.dropdown { 
    position: relative; 
}

.dropdown-content {
    display: none;
    position: absolute;
    background: rgba(15, 15, 20, 0.98);
    border: 1px solid var(--theme-color);
    min-width: 100px;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 9999;
    border-radius: 8px;
    overflow: hidden;
}

.dropdown-content li a {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-content li a:hover {
    background: var(--theme-color);
    color: #000;
}

.dropdown:hover > .dropdown-content { 
    display: block; 
}

@media (max-width: 1250px) {
    .side-area { display: none; }
    .bg-fixed-mywk { width: 100%; }
}

.site-footer { 
    text-align: center; 
    padding: 0; 
    margin-top: 30px; /* マイナスの値を入れると上に上がります */
    position: relative;
    z-index: 10;
}

.since-text {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    color: var(--theme-color);
    opacity: 0.5;
    border-top: 1px solid var(--theme-bg);
    display: inline-block;
    padding-top: 10px;
}

/*---------------------------------------------------------------------
        My Works
----------------------------------------------------------------------*/

.mywk-content-area {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100vh;
    padding-bottom: 33vh; 
    box-sizing: border-box;
}

/* --- 3. タイトルエリア：水色ネオン --- */
.mywk-title-container {
    width: 850px; 
    margin-bottom: 20px;
    text-align: left;
}

.mywk-title-container h2 {
    color: var(--theme-color);
}

.mywk-section-title {
    font-size: 2.8rem;
    margin: 0;
    font-weight: bold;
    letter-spacing: 3px;
    text-shadow: 0 0 15px rgba(179, 45, 45, 0.6) /* 水色の光彩 */
}

/* --- 4. のぞき窓（ウィンドウ） --- */
.mywk-window {
    width: 850px;
    padding-bottom: 5px;
    background: transparent;
    overflow: visible;
    position: relative;
}

/* --- 5. 横に突き抜けるレール --- */
.mywk-rail {
    display: block;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    padding-top: 30px;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.mywk-rail::-webkit-scrollbar {
    height: 25px; /* ★ 6pxから12pxに倍増 */
}

.mywk-rail::-webkit-scrollbar-thumb {
    background: var(--theme-color);
    border-radius: 10px;
    border: 2px solid rgba(10, 15, 20, 0.9); 
    box-shadow: 0 0 15px var(--theme-color);
}

.mywk-rail::-webkit-scrollbar-track {
    background: rgba(0, 210, 255, 0.1); /* ほんのり水色の道にする */
    border-radius: 10px;
    margin: 0 20px; /* バーの端に少し余白を作る */
}

.mywk-rail::-webkit-scrollbar-thumb:hover {
    background: #00ffff;
    filter: brightness(1.4); 
    box-shadow: 0 0 20px var(--theme-glow);
}

/* --- 6. 各カードのデザイン：青系サイバー --- */
.mywk-card {
    display: inline-block;
    width: 300px;
    height: 350px;
    margin-right: 25px;
    background: rgba(10, 25, 40, 0.85); /* 濃紺の半透明 */
    border: 2px solid var(--theme-color); 
    border-radius: 15px;
    vertical-align: top;
    white-space: normal;
    overflow: hidden;
    scroll-snap-align: start;
    transition: transform 0.3s, box-shadow 0.3s;
}

.mywk-card a{
    text-decoration: none;
}

.mywk-card:hover {
    border: 2px solid #00ffff;
    transform: translateY(-30px);
    box-shadow: 0 0 25px rgba(0, 210, 255, 0.5); /* ホバー時の発光 */
}

/* カード内のアイコンエリア */
.mywk-card-img {
    height: 200px;
    background: rgba(0, 210, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* 画像が角丸からはみ出すのを防ぐ */
    border-bottom: 1px solid rgba(0, 210, 255, 0.3);
}

/* カード内のテキストエリア */
.mywk-card-info {
    padding: 20px;
}

.mywk-card-info h3 {
    color: var(--theme-color);
    margin: 0 0 10px 0;
    font-size: 1.4rem;
    text-align: center;

}

.mywk-card-info p {
    color: #b0e0e6;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.mywk-thumb {
    width: 100%;
    height: 100%;
    /* ★重要：画像の縦横比を保ったまま、枠いっぱいに収める設定 */
    object-fit: cover; 
    
    /* もし画像が明るすぎたら少し暗くしてサイバー感を出す */
    filter: brightness(0.8) contrast(1.1);
    transition: filter 0.3s;
}

/* ホバー時に画像を明るくする演出 */
.mywk-card:hover .mywk-thumb {
    filter: brightness(1.0) contrast(1.1);
}

/* --- 背景固定の共通設定 --- */
.bg-fixed-mywk {
    width: 1000px;
    min-height: 100vh;
    background-image: url('./img/esp32_back.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    flex-shrink: 0;
    z-index: 1;
}

/*半透明の黒い膜*/
.bg-fixed-mywk::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

/*----------------------------------------------------------*/
.nav-container{
    display: flex;
    justify-content: center; /* ボタン2つを画面の中央に寄せる */
    gap: 20px;               /* ボタンとボタンの間の隙間 */
    margin: 20px;
    font-size: 1.2em;
}

.nav-container a:active {
    color: #ff4d4d; /* クリックした瞬間に赤くするなど */
}

.nav-btn {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 120px;
    padding: 0 22px;
    border: 1px solid var(--theme-color);
    border-radius: 25px;
    background: rgba(0, 0, 0, 0.7);
    transition: 0.3s;
}

.nav-btn:hover {
    background: var(--theme-bg) !important;
    border-color: var(--theme-color) !important;
    box-shadow: 0 0 15px var(--theme-glow) !important;
    color: var(--theme-color);
    text-shadow: 0 0 10px var(--theme-glow);
    transform: translateY(-2px);
    text-decoration: none !important; /* 下線が出ないように念押し */
}

.nav-btn.disabled {
    opacity: 0.5;            /* 半透明にして無効感を出す */
    pointer-events: none;    /* クリックを物理的に無効化する */
    cursor: default;         /* カーソルをポインタにしない */
    filter: grayscale(1);    /* 必要であれば白黒にする */
}

/*----------------------------------------------------------*/
.nav-container{
    display: flex;
    justify-content: center; /* ボタン2つを画面の中央に寄せる */
    gap: 20px;               /* ボタンとボタンの間の隙間 */
    margin: 20px;
    font-size: 1.2em;
}

.nav-container a:active {
    color: #ff4d4d; /* クリックした瞬間に赤くするなど */
}

.nav-btn {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 120px;
    padding: 0 22px;
    border: 1px solid var(--theme-color);
    border-radius: 25px;
    background: rgba(0, 0, 0, 0.7);
    transition: 0.3s;
}

.nav-btn:hover {
    background: var(--theme-bg) !important;
    border-color: var(--theme-color) !important;
    box-shadow: 0 0 15px var(--theme-glow) !important;
    color: var(--theme-color);
    text-shadow: 0 0 10px var(--theme-glow);
    transform: translateY(-2px);
    text-decoration: none !important; /* 下線が出ないように念押し */
}

.nav-btn.disabled {
    opacity: 0.5;            /* 半透明にして無効感を出す */
    pointer-events: none;    /* クリックを物理的に無効化する */
    cursor: default;         /* カーソルをポインタにしない */
    filter: grayscale(1);    /* 必要であれば白黒にする */
}

/*--------------------------------------------------------
     準備中ボタンの親要素を相対位置に設定 
----------------------------------------------------------*/
.is-pending {
    position: relative;
    cursor: not-allowed; /* マウスカーソルを「禁止」マークにする */
}

.is-pending::after {
    content: attr(data-tips); /* HTMLのdata-tips属性の文字を表示 */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.8); /* 警告感のある赤系 */
    color: #fff;
    padding: 2px 8px;
    font-size: 0.7rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none; /* マウス反応を邪魔しない */
    z-index: 10;
    border: 1px solid #fff;
}

.is-pending:hover::after {
    opacity: 1;
}

.is-pending:hover {
    color: rgba(255, 255, 255, 0.3) !important;
}

/*----------------------------------------------------------
         hover   マウスがあるPC等に限定
------------------------------------------------------------*/
/* @media (hover: hover) で囲むと、マウスがあるPC等に限定できます */
@media (hover: hover) {
    .is-pending:hover::after {
        opacity: 1;
    }
    .is-pending:hover {
        color: rgba(255, 255, 255, 0.3) !important;
    }
}