/* ==========================================
   全体設計とリセット
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: #000000;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
    overflow-y: auto; 
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none;
}
html, body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.version-tag {
    position: fixed;
    top: 0.6rem;   
    right: 0.8rem; 
    font-size: 0.62rem; 
    font-weight: 300; 
    letter-spacing: 0px; 
    color: rgba(255, 255, 255, 0.22); 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    z-index: 200; 
    transition: opacity 0.5s ease;
}
.version-tag.fade-out {
    opacity: 0;
}

/* 背景パネルコンテナ */
.panel {
    position: relative;
    width: 100vw;
    min-height: 100vh; 
    display: flex;
    flex-direction: column; 
    align-items: center;
    background: linear-gradient(-45deg, #060e1c, #141a26, #090d14, #1d2536);
    background-size: 400% 400%;
    animation: gradientMove 12s ease infinite;
    z-index: 100;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ★修正：スマホで見切れないよう、高さを100vhに保ちつつ要素を上に引き上げる */
.hero-section {
    width: 100%;
    height: 100vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; 
}

/* ★修正：各ブロック間の余白（gap）とマージンをギリギリまで詰めて見切れを防止 */
.center-content {
    text-align: center;
    width: 100%;
    max-width: 100vw; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: -3.5rem; /* カルーセル群を一行分まるまる上に持ち上げる */
}

.new-badge {
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: #06b6d4; 
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.6); 
    margin-bottom: -0.5rem; /* カルーセルとの距離を詰める */
    min-height: 12px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 20; 
}

/* ==========================================
   画像セレクトギミック
   ========================================== */
.slider-wrapper {
    width: 100%;
    height: 380px; /* ★修正：高さを420pxから380pxに縮小し全体の縦幅を圧縮 */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0rem; /* タイトルとの距離をゼロに */
    perspective: 1200px;
    overflow: visible; 
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-item {
    position: absolute;
    width: 210px;  /* 高さに合わせて少しスマートに調整 */
    height: 360px; /* 高さを400pxから360pxへ */
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.2); 
    border-radius: 12px; 
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.2, 1), 
                opacity 0.6s ease, 
                border-color 0.6s ease, 
                box-shadow 0.6s ease;
    user-select: none;
}

.slide-item span {
    font-size: 0.8rem; 
    font-weight: 200;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    transition: color 0.5s ease;
    text-align: center;
}

.slide-item.active {
    transform: translate3d(0, 0, 100px); 
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid rgba(6, 182, 212, 0.5); 
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.2); 
    z-index: 5;
}
.slide-item.active span {
    color: #ffffff;
    font-weight: 300;
}

.slide-item.prev-1 { transform: translate3d(-140px, 0, -50px) scale(0.85); opacity: 0.4; z-index: 4; }
.slide-item.next-1 { transform: translate3d(140px, 0, -50px) scale(0.85); opacity: 0.4; z-index: 4; }
.slide-item.prev-2 { transform: translate3d(-240px, 0, -120px) scale(0.7); opacity: 0.1; z-index: 3; }
.slide-item.next-2 { transform: translate3d(240px, 0, -120px) scale(0.7); opacity: 0.1; z-index: 3; }

/* ==========================================
   タイピング・シャッフルテキストエリア
   ========================================== */
.top-title {
    font-size: 0.68rem; 
    font-weight: 200;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.35); 
    min-height: 12px;
    margin-top: 0rem;   
    margin-bottom: -0.2rem; /* ★修正：徹底的に行間を近づける */
    transition: opacity 0.3s ease;
}

#scramble-text {
    font-size: 1.5rem; 
    font-weight: 200;
    letter-spacing: 4px; 
    min-height: 35px;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
}

.dud {
    color: #71717a !important; 
    opacity: 0.6;
}

.sub-text {
    font-size: 0.85rem;
    font-weight: 300;
    color: #52525b;
    letter-spacing: 2px;
    margin-top: -0.2rem; /* ★修正：行間を近づける */
}

/* ENTERボタン */
.scroll-arrow {
    display: flex;
    background: none;
    border: none;
    margin-top: 0.6rem; /* ★修正：公式サイトの文字との距離をギリギリまで引き締める */
    cursor: pointer;
    outline: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px; 
    transition: transform 0.3s ease, opacity 0.3s;
    animation: bounceY 2s infinite;
}

.scroll-arrow.locked .enter-text {
    color: #ef4444; 
    text-shadow: 0 0 4px rgba(239, 68, 68, 0.4);
}

.arrow-icon {
    color: #ffffff;
    font-size: 1.4rem; /* 少し小ぶりにしてシャープに */
    font-family: "Arial Black", "Impact", sans-serif;
    font-weight: 900;
    line-height: 1; 
}

.enter-text {
    color: #06b6d4; 
    font-size: 0.62rem;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.scroll-arrow.fade-out {
    opacity: 0;
    pointer-events: none;
}

@keyframes bounceY {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-3px); opacity: 1; } 
}

/* ==========================================
   各サイトの説明セクション
   ========================================= */
.content-section {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem 5rem 1.5rem; /* 下のフッターとのバランス調整 */
    background-color: transparent; 
}

/* 説明枠と戻るボタンを並べるラッパー */
.content-area-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem; /* 枠と戻るボタンの隙間 */
    width: 100%;
}

.main-card {
    text-align: left; 
    width: 100%;
    max-width: 340px; 
    min-height: 400px; /* ★修正：15行向けに、520pxから400pxへと高さをスマートに最適化 */
    background: rgba(6, 182, 212, 0.02); 
    border: 1px solid rgba(6, 182, 212, 0.4); 
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.15); 
    border-radius: 16px; 
    padding: 2rem 1.8rem;
    transition: opacity 0.3s ease; 
}

.main-card h2 {
    font-size: 1.4rem;
    font-weight: 200;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-align: center; 
    border-bottom: 1px solid rgba(6, 182, 212, 0.2); 
    padding-bottom: 0.6rem;
}

.scroll-text-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem; 
}

.scroll-text-container p {
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.7;
    color: #cbd5e1; 
    letter-spacing: 0.5px;
}

/* ★新設：BACK TO SELECT（戻るボタン）のサイバーデザイン */
.back-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 2px;
    padding: 0.6rem 1.8rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}
.back-btn:hover {
    border-color: rgba(6, 182, 212, 0.6);
    color: #06b6d4;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

/* ポータルフッター */
.portal-footer {
    width: 100%;
    text-align: center;
    padding: 2.5rem 0;
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.15); 
    background-color: transparent;
    margin-top: auto; 
}

/* ==========================================
   Matrix背景のスクロールブロック問題を解決
   ========================================== */
canvas, #canvas, .matrix-canvas { /* ※もしJS側で特定のIDやクラスが作られている場合はそれも指定 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1; /* カルーセルやテキスト（z-index: 100）より背面に配置 */
    
    /* ★超重要：この要素に対するクリックやスクロール操作を完全に無効化し、後ろにスルーさせる */
    pointer-events: none !important; 
}

/* ==========================================
   ★大改修：最上部で妖しくシアン色に光るトップヘッダー
   ========================================= */
.top-header {
    position: absolute;
    top: 0.2rem;            /* 画面の一番上ギリギリに配置 */
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.80rem;     /* ENTERのテキストと同じ小ぶりなサイズ */
    font-weight: 500;       /* 綺麗でスマートな細字体 */
    
    /* ★ENTERボタンと全く同じシアンカラー＆発光エフェクト */
    color: #06b6d4; 
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.6); 
    
    letter-spacing: 11px;    /* 文字と文字の間隔をグッと広く空ける */
    text-transform: uppercase;
    text-align: center;
    z-index: 150;           /* デジタル雨の背景よりも手前に表示 */
    white-space: nowrap;
}
