/* top_style.css (レスポンシブ対応版) */
:root {
    --bg-color: #0a0a0a;
    --text-color: #00ff41;
    --shadow-color: rgba(0, 255, 65, 0.5);
    --glitch-color-1: #ff00c1;
    --glitch-color-2: #00fff3;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.scanlines {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient( to bottom, rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50% );
    background-size: 100% 4px; z-index: 10; pointer-events: none; animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0%   { opacity: 0.2; }
    20%  { opacity: 1; }
    80%  { opacity: 0.7; }
    100% { opacity: 1; }
}

.container {
    width: 90vw;
    height: 90vh;
    max-width: 1400px;
    max-height: 800px;
    display: flex;
    border: 1px solid var(--text-color);
    box-shadow: 0 0 15px var(--shadow-color), inset 0 0 10px var(--shadow-color);
    background: rgba(10, 10, 10, 0.5);
}

.left-panel {
    width: 60%;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--text-color);
}

.top-image-area {
    height: 30%;
    background-color: #111;
    overflow: hidden;
    border-bottom: 1px solid var(--text-color);
}

.left-image-area {
    height: 70%;
    background-color: #000;
    overflow: hidden;
}

.top-image-area video, .left-image-area video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.right-panel {
    width: 40%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
}

header {
    margin-bottom: 40px;
}

h1 {
    font-size: 3rem;
    text-align: left;
    text-shadow: 0 0 5px var(--shadow-color);
    margin: 0;
}

nav ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

nav ul li {
    margin-bottom: 20px;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.8rem;
    transition: all 0.2s ease-in-out;
    display: inline-block;
}

nav ul li a:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    text-shadow: none;
    padding: 0 10px;
    transform: translateX(10px);
}

/* グリッチエフェクト */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; background: var(--bg-color); }
.glitch::before { left: 2px; text-shadow: -2px 0 var(--glitch-color-1); animation: glitch-anim 3s infinite linear alternate-reverse; }
.glitch::after { left: -2px; text-shadow: -2px 0 var(--text-color); animation: glitch-anim 2.5s infinite linear alternate-reverse; }
@keyframes glitch-anim {
    0%   { clip-path: inset(89% 0 1% 0); }
    100% { clip-path: inset(69% 0 18% 0); }
}


/* =============================================== */
/* ▼▼▼ ここからレスポンシブ対応のためのコード ▼▼▼ */
/* =============================================== */

/* 画面幅が768px以下の場合に適用されるスタイル */
@media (max-width: 768px) {
    body {
        /* スマホではスクロールできるようにする */
        overflow: auto;
        padding: 0; /* bodyの余白をなくす */
    }

    .container {
        /* パネルを横並びから縦積みに変更 */
        flex-direction: column;
        
        /* 高さと幅を画面に合わせ、スクロール可能にする */
        width: 100%;
        height: auto;
        min-height: 100vh;
        max-height: none;

        border: none; /* 画面いっぱいに表示するため枠線を消す */
    }

    .left-panel,
    .right-panel {
        /* 各パネルの横幅を100%にする */
        width: 100%;
        border: none; /* パネル間の線を消す */
    }

    .left-panel {
        /* スマホでの動画エリアの高さを設定 */
        height: 60vh;
    }

    .right-panel {
        height: auto; /* 高さをコンテンツに合わせる */
        padding: 30px;
        text-align: center; /* メニューを中央揃えに */
    }

    header {
        margin-bottom: 30px;
    }

    h1 {
        font-size: 2.5rem; /* 少し文字を小さく */
        text-align: center;
    }
    
    nav ul {
        text-align: center;
    }
    
    nav ul li a {
        font-size: 1.5rem; /* 少し文字を小さく */
    }

    nav ul li a:hover {
        transform: none; /* ホバー時の動きをなくす */
    }
}
