/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Shippori Mincho', sans-serif;
    line-height: 1.6;
    color: #2D3047;
    background-color: #F5F7FA;
    position: relative;
}

/* SF風の背景パターン */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, rgba(67, 176, 241, 0.03) 1px, transparent 1px),
        linear-gradient(180deg, rgba(67, 176, 241, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: -1;
}

/* データフロー風のアニメーション要素 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        /* 水平データフロー */
        linear-gradient(90deg, transparent 0%, rgba(67, 176, 241, 0.1) 50%, transparent 100%),
        /* 垂直データフロー */
        linear-gradient(0deg, transparent 0%, rgba(10, 189, 227, 0.05) 50%, transparent 100%);
    background-size: 200px 100vh, 100vw 150px;
    animation: dataFlow 20s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes dataFlow {
    0% {
        background-position: -200px 0, 0 -150px;
    }
    100% {
        background-position: 100vw 0, 0 100vh;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3 {
    margin-bottom: 1rem;
    font-weight: 500;
}

h2 {
    font-size: 2.5rem;
    color: #2D3047;
}

h3 {
    font-size: 1.5rem;
    color: #2D3047;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Header and Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(245, 247, 250, 0.95);
    backdrop-filter: blur(15px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(45, 48, 71, 0.1);
    border-bottom: 1px solid rgba(67, 176, 241, 0.2);
}

.nav {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0 20px;
}

.nav-link {
    text-decoration: none;
    color: #2D3047;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(67, 176, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background-color: #43B0F1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(67, 176, 241, 0.3);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #2D3047 0%, #43B0F1 50%, #0ABDE3 100%);
    color: white;
    overflow: hidden;
    position: relative;
}

/* 派手なネットワーク背景効果 */
.hero-network-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    /* ネットワーク要素の視認性を向上させる背景オーバーレイ */
    background: 
        /* 右側（明るい領域）を暗くするグラデーション */
        radial-gradient(ellipse at 75% 50%, rgba(0, 0, 0, 0.4) 0%, transparent 60%),
        /* 左側（暗い領域）を少し明るくするグラデーション */
        radial-gradient(ellipse at 25% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 60%),
        /* 全体のコントラスト向上のための微細なオーバーレイ */
        linear-gradient(90deg, 
            rgba(0, 0, 0, 0.2) 0%, 
            rgba(0, 0, 0, 0.1) 30%, 
            rgba(0, 0, 0, 0.3) 70%, 
            rgba(0, 0, 0, 0.4) 100%
        );
}

/* ネットワークノード - 動的生成用 */
.network-node {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: radial-gradient(circle, var(--node-color) 0%, var(--node-color-fade) 60%, transparent 100%);
    box-shadow: 
        0 0 var(--glow-size) var(--node-color),
        0 0 calc(var(--glow-size) * 1.5) rgba(255, 255, 255, 0.4),
        inset 0 0 calc(var(--glow-size) * 0.5) rgba(255, 255, 255, 0.3);
    animation: var(--pulse-animation) var(--pulse-duration) ease-in-out infinite;
    animation-delay: var(--animation-delay);
}

/* ノードサイズバリエーション */
.node-small {
    width: 8px;
    height: 8px;
    --glow-size: 8px;
}

.node-medium {
    width: 12px;
    height: 12px;
    --glow-size: 12px;
}

.node-large {
    width: 16px;
    height: 16px;
    --glow-size: 16px;
}

.node-extra-large {
    width: 20px;
    height: 20px;
    --glow-size: 20px;
}

/* 接続線 - 動的生成用 */
.connection-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--line-color) 50%, transparent 100%);
    transform-origin: left center;
    opacity: var(--line-opacity);
    animation: connectionPulse var(--connection-duration) ease-in-out infinite;
    animation-delay: var(--connection-delay);
    /* 背景オーバーレイとの組み合わせで視認性向上 */
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.3);
}

/* データパケット - 動的生成用 */
.data-packet {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--packet-color);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--packet-color), 0 0 3px rgba(255, 255, 255, 0.4);
    animation-delay: var(--packet-delay);
}

/* パケット移動アニメーション */
@keyframes packetMove {
    0% {
        left: var(--packet-start-x);
        top: var(--packet-start-y);
        opacity: 0;
        transform: scale(0.5);
    }
    10% {
        opacity: 1;
        transform: scale(1);
    }
    90% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        left: var(--packet-target-x);
        top: var(--packet-target-y);
        opacity: 0;
        transform: scale(0.5);
    }
}



/* Node1(20%,15%) to Node2(30%,80%) */
.line-1-2 {
    top: 20%;
    left: 15%;
    width: 520px;
    transform: rotate(8deg) scaleX(0.7);
    animation-delay: 0s;
}

/* Node1(20%,15%) to Node3(60%,25%) */
.line-1-3 {
    top: 20%;
    left: 15%;
    width: 300px;
    transform: rotate(35deg) scaleX(0.8);
    animation-delay: 0.5s;
}

/* Node2(30%,80%) to Node4(75%,70%) */
.line-2-4 {
    top: 30%;
    left: 80%;
    width: 200px;
    transform: rotate(-25deg) scaleX(0.6);
    animation-delay: 1s;
}

/* Node2(30%,80%) to Node5(60%,60%) */
.line-2-5 {
    top: 30%;
    left: 80%;
    width: 150px;
    transform: rotate(-45deg) scaleX(0.5);
    animation-delay: 1.5s;
}

/* Node3(60%,25%) to Node5(60%,60%) */
.line-3-5 {
    top: 60%;
    left: 25%;
    width: 250px;
    transform: rotate(-15deg) scaleX(0.7);
    animation-delay: 2s;
}

/* Node4(75%,70%) to Node6(70%,85%) */
.line-4-6 {
    top: 75%;
    left: 70%;
    width: 120px;
    transform: rotate(35deg) scaleX(0.4);
    animation-delay: 2.5s;
}

/* Node5(60%,60%) to Node6(70%,85%) */
.line-5-6 {
    top: 60%;
    left: 60%;
    width: 180px;
    transform: rotate(45deg) scaleX(0.6);
    animation-delay: 3s;
}

/* Node1(20%,15%) to Node5(60%,60%) - 長距離接続 */
.line-1-5 {
    top: 20%;
    left: 15%;
    width: 400px;
    transform: rotate(25deg) scaleX(0.8);
    animation-delay: 3.5s;
}

/* Node3(60%,25%) to Node6(70%,85%) - クロス接続 */
.line-3-6 {
    top: 60%;
    left: 25%;
    width: 350px;
    transform: rotate(20deg) scaleX(0.7);
    animation-delay: 4s;
}

@keyframes connectionPulse {
    0%, 100% {
        opacity: 0.3;
        background: linear-gradient(90deg, transparent 0%, rgba(67, 176, 241, 0.3) 20%, rgba(10, 189, 227, 0.5) 50%, rgba(67, 176, 241, 0.3) 80%, transparent 100%);
    }
    50% {
        opacity: 0.9;
        background: linear-gradient(90deg, transparent 0%, rgba(67, 176, 241, 0.8) 20%, rgba(10, 189, 227, 1) 50%, rgba(67, 176, 241, 0.8) 80%, transparent 100%);
    }
}

/* データパルス */
.data-pulse {
    position: absolute;
    border-radius: 50%;
    animation-fill-mode: both;
}

.pulse-1 {
    top: 35%;
    left: 40%;
    width: 10px;
    height: 10px;
    background: #0ABDE3;
    animation: dataPulse1 2s ease-in-out infinite;
    box-shadow: 0 0 20px #0ABDE3, 0 0 30px rgba(10, 189, 227, 0.5);
}

.pulse-2 {
    bottom: 45%;
    right: 35%;
    width: 8px;
    height: 8px;
    background: #43B0F1;
    animation: dataPulse2 2.5s ease-in-out infinite 1s;
    box-shadow: 0 0 16px #43B0F1, 0 0 25px rgba(67, 176, 241, 0.5);
}

.pulse-3 {
    top: 50%;
    left: 70%;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.9);
    animation: dataPulse1 3s ease-in-out infinite 1.5s;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.4);
}

/* 流れるデータパケット */
.data-packet {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.packet-1 {
    top: 20%;
    left: 15%;
    animation: flowPath1 6s linear infinite;
}

.packet-2 {
    top: 30%;
    left: 80%;
    animation: flowPath2 5s linear infinite 1.5s;
}

.packet-3 {
    top: 60%;
    left: 25%;
    animation: flowPath3 7s linear infinite 3s;
}

.packet-4 {
    top: 20%;
    left: 15%;
    animation: flowPath4 8s linear infinite 4s;
}

/* データパケットの流れるパス */
@keyframes flowPath1 {
    0% {
        top: 20%;
        left: 15%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        top: 30%;
        left: 80%;
        opacity: 1;
    }
    90% {
        opacity: 0;
    }
    100% {
        top: 75%;
        left: 70%;
        opacity: 0;
    }
}

@keyframes flowPath2 {
    0% {
        top: 30%;
        left: 80%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        top: 60%;
        left: 60%;
        opacity: 1;
    }
    90% {
        opacity: 0;
    }
    100% {
        top: 70%;
        left: 85%;
        opacity: 0;
    }
}

@keyframes flowPath3 {
    0% {
        top: 60%;
        left: 25%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        top: 60%;
        left: 60%;
        opacity: 1;
    }
    90% {
        opacity: 0;
    }
    100% {
        top: 20%;
        left: 15%;
        opacity: 0;
    }
}

@keyframes flowPath4 {
    0% {
        top: 20%;
        left: 15%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    30% {
        top: 60%;
        left: 60%;
        opacity: 1;
    }
    70% {
        top: 70%;
        left: 85%;
        opacity: 1;
    }
    90% {
        opacity: 0;
    }
    100% {
        top: 30%;
        left: 80%;
        opacity: 0;
    }
}

/* アニメーション定義 */
@keyframes nodePulse1 {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

@keyframes nodePulse2 {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

@keyframes nodePulse3 {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.4);
        opacity: 0.9;
    }
}

@keyframes nodePulse4 {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.6);
        opacity: 1;
    }
}

@keyframes dataPulse1 {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(3);
        opacity: 0.3;
    }
}

@keyframes dataPulse2 {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(2.5);
        opacity: 0.2;
    }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 3;
}

.hero-text {
    animation: fadeInUp 0.8s ease-out;
}

.series-title {
    display: block;
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.work-title {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    /* レイアウトシフト防止のための固定高さ設定 */
    min-height: 3.6rem; /* 3行分の最小高さを確保してレイアウトシフトを防ぐ */
    /* 初期状態では透明だが高さは確保 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    /* GPU加速を利用してレンダリング性能を向上 */
    transform: translateZ(0);
    will-change: opacity, visibility;
}

/* JavaScript読み込み前のフォールバック表示 */
.js-disabled .work-title {
    opacity: 1;
    visibility: visible;
}

/* JavaScript読み込み後の状態（初期状態は変わらず） */
.work-title.js-loaded {
    /* 高さを維持したまま透明状態を継続 */
    opacity: 0;
    visibility: hidden;
}

/* タイプライター効果が開始された状態 */
.work-title.typewriter-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear; /* visibilityの遅延を削除 */
}

/* タイプライター効果完了後の状態 */
.work-title.typewriter-complete {
    opacity: 1;
    visibility: visible;
}

.work-title .word-line {
    display: block;
    margin-bottom: 0.2em;
}

.work-title .word-line:last-child {
    margin-bottom: 0;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

.hero-author {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    text-align: center;
    animation: fadeIn 1s ease-out 0.3s both;
}

.cover-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.cover-image:hover {
    transform: scale(1.05);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #0ABDE3 0%, #43B0F1 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0ABDE3 0%, #2D3047 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(10, 189, 227, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: #2D3047;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

/* Section Styles */
section {
    padding: 80px 0;
    position: relative;
}

/* セクション間のネットワーク接続線 */
section:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    width: 3px;
    height: 80px;
    background: linear-gradient(180deg, #43B0F1 0%, #0ABDE3 50%, transparent 100%);
    transform: translateX(-50%);
    z-index: 10;
}

/* ネットワークノード（各セクションの中央点） */
section:not(:last-child)::before {
    content: '';
    position: absolute;
    bottom: -46px;
    left: 50%;
    width: 16px;
    height: 16px;
    background: #0ABDE3;
    border: 3px solid #F5F7FA;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 11;
    box-shadow: 0 0 15px rgba(10, 189, 227, 0.6);
    animation: networkPulse 2s ease-in-out infinite;
}

@keyframes networkPulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 0 10px rgba(10, 189, 227, 0.5);
    }
    50% {
        transform: translateX(-50%) scale(1.2);
        box-shadow: 0 0 20px rgba(10, 189, 227, 0.8);
    }
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #43B0F1 0%, #0ABDE3 100%);
    margin: 1rem auto;
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(67, 176, 241, 0.3);
    position: relative;
    overflow: hidden;
}

/* データ転送風のアニメーション */
.section-title::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #0ABDE3 50%, transparent 100%);
    transform: translateX(-50%);
    animation: dataTransfer 3s ease-in-out infinite;
}

@keyframes dataTransfer {
    0%, 100% {
        width: 100px;
        opacity: 0.3;
    }
    50% {
        width: 200px;
        opacity: 0.8;
    }
}

/* About Section */
.about {
    background: linear-gradient(135deg, #F5F7FA 0%, rgba(67, 176, 241, 0.05) 100%);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, transparent 45%, rgba(67, 176, 241, 0.02) 50%, transparent 55%);
    background-size: 40px 40px;
    pointer-events: none;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text h3 {
    color: #2D3047;
    margin-bottom: 1.5rem;
    position: relative;
}

/* Preview Section */
.preview {
    background: linear-gradient(135deg, #faf8f3 0%, rgba(10, 189, 227, 0.03) 100%);
    position: relative;
}

.preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 35px,
            rgba(67, 176, 241, 0.02) 35px,
            rgba(67, 176, 241, 0.02) 70px
        );
    pointer-events: none;
}

/* Scene Carousel */
.scene-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    background: #fdf9f0; /* 文庫本のような淡いクリーム色 */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 3rem;
    border: 2px solid #e8dcc0; /* 淡いベージュの枠線 */
}

.scene-container {
    position: relative;
    min-height: 500px; /* 高さを維持 */
    /* 縦書きレイアウト用の調整 */
    overflow: hidden; /* 外側のスクロールバーを隠す */
}

.scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 2rem; /* パディングを調整 */
    display: flex;
    align-items: center; /* 縦書きでは中央配置 */
    justify-content: center;
    opacity: 0;
    transform: translateX(-100%); /* デフォルトの初期位置 */
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden; /* 縦書きでは基本的にスクロールバーを表示しない */
}

.scene.active {
    opacity: 1;
    transform: translateX(0);
}

/* 入場アニメーション - 右から入場（前進時） */
.scene.slide-in-left {
    opacity: 1;
    transform: translateX(0);
    animation: slideInFromRight 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 入場アニメーション - 左から入場（後退時） */
.scene.slide-in-right {
    opacity: 1;
    transform: translateX(0);
    animation: slideInFromLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 退場アニメーション - 左へ退場（前進時） */
.scene.slide-out-left {
    opacity: 0;
    transform: translateX(-100%);
}

/* 退場アニメーション - 右へ退場（後退時） */
.scene.slide-out-right {
    opacity: 0;
    transform: translateX(100%);
}

/* キーフレームアニメーション */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.scene-text {
    color: #2D3047; /* 暗い色のテキスト */
    max-width: 700px;
    padding: 1rem 2rem; /* 上下のパディングを追加 */
    width: 100%; /* 幅を100%に設定 */
    height: 100%; /* 縦書きのための高さ設定 */
    
    /* 縦書きスタイル */
    writing-mode: vertical-rl; /* 縦書き右から左 */
    text-orientation: mixed; /* 文字の向き */
    text-align: start; /* 縦書きでの開始位置揃え */
    overflow-y: hidden; /* 縦方向スクロール無効 */
    overflow-x: auto; /* 横方向スクロール有効（縦書きでは横にスクロール） */
}

.scene-title {
    display: none; /* タイトルを非表示にする */
}

.scene-quote {
    font-style: normal; /* 小説では通常体を使用 */
    font-size: 1.1rem; /* フォントサイズを少し小さく */
    line-height: 1.8; /* 縦書きに適した行間 */
    color: #2D3047; /* 読みやすい暗いグレー */
    margin: 0;
    
    /* 縦書き用の調整 */
    writing-mode: inherit; /* 親要素の縦書きを継承 */
    text-orientation: inherit; /* 親要素の文字向きを継承 */
    letter-spacing: 0.05em; /* 文字間隔を少し広く */
}

/* 縦書きでのp要素の調整 */
.scene-quote p {
    margin: 0 1em 0 0; /* 縦書きでは右側にマージン */
    text-indent: 1em; /* 段落の字下げ */
    writing-mode: inherit;
    text-orientation: inherit;
}

/* JavaScriptで .dialogue クラスが付けられた会話文のインデントを半分に */
.scene-quote p.dialogue {
    text-indent: 0.5em; /* 会話文のインデントを半分に */
}

.scene-quote p:last-child {
    margin-right: 0; /* 最後の段落は右マージンなし */
}

/* モバイル端末での縦書き調整 */
@media (max-width: 768px) {
    .scene-text {
        max-width: 100%;
        padding: 1rem;
        font-size: 0.95rem; /* モバイルでは少し小さく */
    }
    
    .scene-quote {
        font-size: 1rem;
        line-height: 1.7;
        letter-spacing: 0.03em;
    }
    
    .scene-container {
        min-height: 400px; /* モバイルでは高さを調整 */
    }
    
    .scene {
        padding: 1.5rem;
    }
}

/* 小さなモバイル端末での調整 */
@media (max-width: 480px) {
    .scene-text {
        padding: 0.8rem;
    }
    
    .scene-quote {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .scene-container {
        min-height: 350px;
    }
}

/* Carousel Navigation */
.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    background: rgba(232, 220, 192, 0.3); /* 淡いベージュの背景 */
    position: relative;
}

.nav-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #43B0F1;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: #43B0F1;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.nav-dot:hover {
    background: #43B0F1;
    border-color: #43B0F1;
    transform: scale(1.2);
}

.nav-dot:hover::before {
    width: 100%;
    height: 100%;
}

.nav-dot.active {
    background: #0ABDE3;
    border-color: #0ABDE3;
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(10, 189, 227, 0.5);
}

/* Carousel Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #2D3047 0%, #43B0F1 100%);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(45, 48, 71, 0.3);
}

.carousel-arrow:hover {
    background: linear-gradient(135deg, #43B0F1 0%, #0ABDE3 100%);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(67, 176, 241, 0.4);
}

.carousel-arrow.prev {
    left: 20px;
}

.carousel-arrow.next {
    right: 20px;
}

.preview-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    color: #555;
    line-height: 1.8;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Author Section */
.author {
    background: linear-gradient(135deg, rgba(245, 247, 250, 0.8) 0%, rgba(67, 176, 241, 0.1) 100%);
    position: relative;
}

.author::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(10, 189, 227, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(67, 176, 241, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.author-content {
    text-align: center;
}

.creator-info {
    display: flex;
    justify-content: center;
    gap: 4rem;
    max-width: 800px;
    margin: 0 auto;
}

.author-profile, .illustrator-profile {
    flex: 1;
}

.creator-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.creator-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem auto;
}

.creator-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e9ecef;
    transition: all 0.3s ease;
}

.creator-avatar:hover {
    transform: scale(1.05);
    border-color: #43B0F1;
    box-shadow: 0 4px 20px rgba(67, 176, 241, 0.3);
}

.creator-info h3 {
    color: #2D3047;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.social-link img {
    width: 20px;
    height: 20px;
    transition: filter 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-link.twitter {
    background-color: #000000;
    border-color: #000000;
}

.social-link.twitter img {
    filter: brightness(0) invert(1);
}

.social-link.twitter:hover {
    background-color: #333333;
    border-color: #333333;
}

.social-link.twitter:hover img {
    filter: brightness(0) invert(1);
}

.social-link.bluesky:hover {
    background-color: #0085ff;
    border-color: #0085ff;
}

.social-link.bluesky:hover img {
    filter: brightness(0) invert(1);
}

.author-info h3 {
    color: #2D3047;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* Distribution Section */
.distribution {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
}

/* ネットワーク構造風の背景 */
.distribution::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        /* 縦横のネットワーク線 */
        linear-gradient(90deg, transparent 49%, rgba(67, 176, 241, 0.1) 50%, transparent 51%),
        linear-gradient(0deg, transparent 49%, rgba(67, 176, 241, 0.1) 50%, transparent 51%),
        /* ノード点 */
        radial-gradient(circle at 25% 25%, #43B0F1 1px, transparent 2px),
        radial-gradient(circle at 75% 25%, #0ABDE3 1px, transparent 2px),
        radial-gradient(circle at 25% 75%, #0ABDE3 1px, transparent 2px),
        radial-gradient(circle at 75% 75%, #43B0F1 1px, transparent 2px);
    background-size: 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px;
    animation: networkGrid 25s linear infinite;
    pointer-events: none;
}

@keyframes networkGrid {
    0% {
        background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
    }
    100% {
        background-position: 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px;
    }
}

.distribution::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(60deg, transparent 40%, rgba(67, 176, 241, 0.03) 50%, transparent 60%);
    background-size: 100px 100px;
    pointer-events: none;
}

.distribution-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.circle-info {
    margin-bottom: 2rem;
}

.circle-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
}

.circle-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(67, 176, 241, 0.15);
}

.circle-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.circle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-logo {
    height: 50px;
    width: 50px;
    object-fit: contain;
    border-radius: 8px;
}

.circle-header h3 {
    color: #2D3047;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.event-info {
    margin-bottom: 2rem;
}

.event-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(67, 176, 241, 0.2);
}

.event-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.event-icon {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-header h3 {
    color: #2D3047;
    font-size: 1.8rem;
    margin: 0;
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #F5F7FA 0%, rgba(67, 176, 241, 0.05) 100%);
    border-radius: 12px;
    border-left: 4px solid #43B0F1;
    box-shadow: 0 2px 10px rgba(67, 176, 241, 0.1);
}

.detail-label {
    font-weight: 600;
    color: #2D3047;
    font-size: 1.1rem;
}

.detail-value {
    font-weight: 500;
    color: #0ABDE3;
    font-size: 1.2rem;
}

.detail-value.isdn {
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 1rem;
    color: #43B0F1;
    letter-spacing: 0.5px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.3s ease;
}

.detail-value.isdn:hover {
    color: #0ABDE3;
    text-decoration: underline;
}

.detail-value.commission-link {
    color: #43B0F1;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.detail-value.commission-link:hover {
    color: #0ABDE3;
    text-decoration: underline;
}

.distribution-note {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.distribution-note p {
    margin: 0;
    font-size: 1.1rem;
    color: #555;
}

/* Epigraph Section */
.epigraph-section {
    background: linear-gradient(135deg, #2D3047 0%, #43B0F1 50%, #0ABDE3 100%);
    color: white;
    padding: 60px 0;
    position: relative;
}

.epigraph-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(10, 189, 227, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.epigraph {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.epigraph blockquote {
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.epigraph-translation {
    margin: 1.5rem 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.epigraph cite {
    font-style: normal;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2D3047 0%, #1a1d2e 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, rgba(67, 176, 241, 0.05) 1px, transparent 1px),
        linear-gradient(180deg, rgba(67, 176, 241, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 100px 0 60px; /* モバイルでのパディング調整 */
    }
    
    .hero-container {
        padding: 0 15px; /* モバイルでのサイドパディング */
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .work-title {
        font-size: 2.2rem;
        line-height: 1.3;
        /* モバイルでのレイアウトシフト防止のためより正確な高さ計算 */
        min-height: 8.6rem; /* 2.2rem * 1.3 * 3行 = 約8.6rem */
    }
    
    .work-title.js-loaded {
        font-size: 2.2rem;
        /* レイアウトを維持 */
        opacity: 0;
        visibility: hidden;
    }
    
    .work-title .word-line {
        margin-bottom: 0.1em;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .about-content {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .nav-container {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Scene Carousel Mobile */
    .scene-carousel {
        margin: 0 15px 2rem 15px;
    }
    
    .scene {
        padding: 2rem 1.5rem;
    }
    
    .scene-text {
        padding: 0 1rem; /* モバイルでは左右の余白を縮小 */
    }
    
    .scene-title {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
    
    .scene-quote {
        font-size: 1.1rem;
    }
    
    .scene-container {
        min-height: 350px;
    }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .carousel-arrow.prev {
        left: 15px;
    }
    
    .carousel-arrow.next {
        right: 15px;
    }
    
    .preview-description {
        margin: 0 15px;
        padding: 1.5rem;
        font-size: 1.1rem;
    }
    
    /* Author Section Mobile */
    .creator-info {
        flex-direction: column;
        gap: 2.5rem;
    }
    
    .creator-icon {
        width: 70px;
        height: 70px;
    }
    
    .creator-avatar {
        width: 70px;
        height: 70px;
    }
    
    .creator-info h3 {
        font-size: 1.2rem;
    }
    
    /* Distribution Section Mobile */
    .circle-card {
        padding: 1.5rem;
    }
    
    .circle-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .circle-logo {
        height: 45px;
        width: 45px;
    }
    
    .circle-header h3 {
        font-size: 1.3rem;
    }
    
    .event-card {
        padding: 2rem 1.5rem;
    }
    
    .event-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .event-icon {
        font-size: 2rem;
    }
    
    .event-header h3 {
        font-size: 1.5rem;
    }
    
    .detail-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .detail-label {
        font-size: 1rem;
    }
    
    .detail-value {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .work-title {
        font-size: 1.8rem;
        line-height: 1.4;
        min-height: 2.5rem; /* 小さなモバイル向け3行分の最小高さ */
    }
    
    .work-title.js-loaded {
        font-size: 1.8rem;
        overflow: visible;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* Small screen carousel adjustments */
    .scene {
        padding: 1.5rem 1rem;
    }
    
    .scene-text {
        padding: 0 0.5rem; /* 小画面では更に余白を縮小 */
    }
    
    .scene-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .scene-quote {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .scene-quote p {
        text-indent: 1em; /* 小画面でもインデントを維持 */
    }
    
    .scene-container {
        min-height: 320px;
    }
    
    .carousel-nav {
        padding: 1.5rem;
        gap: 0.8rem;
    }
    
    .nav-dot {
        width: 14px;
        height: 14px;
    }
    
    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .carousel-arrow.prev {
        left: 10px;
    }
    
    .carousel-arrow.next {
        right: 10px;
    }
    
    .preview-description {
        padding: 1.2rem;
        font-size: 1rem;
    }
    
    /* Author Section Small Screen */
    .creator-info {
        gap: 2rem;
    }
    
    .creator-icon {
        width: 60px;
        height: 60px;
    }
    
    .creator-avatar {
        width: 60px;
        height: 60px;
    }
    
    .creator-info h3 {
        font-size: 1.1rem;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
    }
    
    /* Distribution Section Small Screen */
    .circle-card {
        padding: 1.2rem;
    }
    
    .circle-logo {
        height: 40px;
        width: 40px;
    }
    
    .circle-header h3 {
        font-size: 1.2rem;
    }
    
    .event-card {
        padding: 1.5rem 1rem;
    }
    
    .event-header h3 {
        font-size: 1.3rem;
    }
    
    .distribution-note {
        padding: 1.2rem;
    }
    
    .distribution-note p {
        font-size: 1rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Hover effects for sections */
.about, .preview, .author {
    transition: all 0.3s ease;
}

/* Loading animation for images */
.cover-image {
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.5s both;
}

/* Typewriter cursor blinking animation */
@keyframes blink {
    0%, 50% { border-right-color: #2D3047; }
    51%, 100% { border-right-color: transparent; }
}

/* Typewriter cursor styling */
.typewriter-cursor {
    border-right: 2px solid #2D3047;
    animation: blink 1s infinite;
    display: inline-block;
    height: 1em;
    vertical-align: baseline;
}

/* Enhanced mobile menu button animations */
.mobile-menu-btn {
    position: relative;
    overflow: hidden;
}

.mobile-menu-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(67, 176, 241, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.mobile-menu-btn:hover::before {
    width: 100%;
    height: 100%;
}

/* Improved focus styles for accessibility */
.nav-link:focus,
.btn:focus,
.mobile-menu-btn:focus {
    outline: 2px solid #43B0F1;
    outline-offset: 2px;
}

/* 現実世界接続要素のスタイル */

/* ゲートウェイノード - 現実世界との接続点 */
.gateway-node {
    box-shadow: 
        0 0 calc(var(--glow-size) * 2) var(--gateway-glow),
        0 0 calc(var(--glow-size) * 3) rgba(255, 215, 0, 0.6),
        inset 0 0 calc(var(--glow-size) * 0.5) rgba(255, 255, 255, 0.4) !important;
    border: 2px solid var(--gateway-glow) !important;
    animation: gatewayPulse 2s ease-in-out infinite !important;
}

@keyframes gatewayPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* 外部接続線 - ゲートウェイから現実世界への接続 */
.external-connection {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--external-color) 0%, 
        rgba(255, 215, 0, 0.8) 30%, 
        rgba(255, 215, 0, 0.4) 70%, 
        transparent 100%);
    transform-origin: left center;
    opacity: var(--external-opacity);
    animation: externalPulse var(--pulse-duration) ease-in-out infinite;
    animation-delay: var(--pulse-delay);
    box-shadow: 0 0 4px var(--external-color);
}

@keyframes externalPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ウインドウノード - 奥行き方向の現実世界接続点 */
.window-node {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 215, 0, 0.15);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 25px;
    padding: 8px 14px;
    backdrop-filter: blur(12px);
    animation: windowNodeFade 1.2s ease-in-out var(--fade-delay) both;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 
        0 0 15px rgba(255, 215, 0, 0.4),
        0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.window-node:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 25px rgba(255, 215, 0, 0.6),
        0 6px 30px rgba(0, 0, 0, 0.15);
}

/* 奥行きレベルによるスタイル差 */
.window-node.depth-near {
    --depth-scale: 1.0;
    --depth-opacity: 1.0;
    --depth-blur: 0px;
}

.window-node.depth-medium {
    --depth-scale: 0.85;
    --depth-opacity: 0.8;
    --depth-blur: 1px;
}

.window-node.depth-far {
    --depth-scale: 0.7;
    --depth-opacity: 0.6;
    --depth-blur: 2px;
}

.window-node-content {
    display: flex;
    align-items: center;
    gap: 8px;
    transform: scale(var(--depth-scale, 1));
    opacity: var(--depth-opacity, 1);
    filter: blur(var(--depth-blur, 0));
}

.window-icon {
    font-size: 1.4em;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.8));
}

.window-text {
    color: #FFD700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.depth-indicator {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #FFD700 0%, transparent 70%);
    border-radius: 50%;
    animation: depthPulse var(--pulse-duration, 2s) ease-in-out infinite;
}

@keyframes windowNodeFade {
    0% { 
        opacity: 0; 
        transform: scale(0.6) translateY(20px); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

@keyframes depthPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* ウインドウノードからゲートウェイノードへの接続線 */
.window-connection {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--connection-color) 0%, 
        rgba(255, 215, 0, 0.8) 20%, 
        rgba(255, 215, 0, 0.4) 60%, 
        rgba(255, 215, 0, 0.1) 80%,
        transparent 100%);
    transform-origin: left center;
    opacity: var(--connection-opacity);
    animation: windowConnectionPulse var(--pulse-duration) ease-in-out infinite;
    animation-delay: var(--pulse-delay);
    box-shadow: 0 0 3px rgba(255, 215, 0, 0.5);
}

@keyframes windowConnectionPulse {
    0%, 100% { 
        opacity: 0.3; 
        box-shadow: 0 0 2px rgba(255, 215, 0, 0.3);
    }
    50% { 
        opacity: 0.8; 
        box-shadow: 0 0 6px rgba(255, 215, 0, 0.7);
    }
}

/* 現実世界インジケーター（旧スタイル - 削除予定） */
.real-world-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--indicator-bg);
    border: 1px solid var(--indicator-border);
    border-radius: 20px;
    padding: 6px 12px;
    backdrop-filter: blur(10px);
    animation: indicatorFade 1s ease-in-out var(--fade-delay) both;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.indicator-icon {
    font-size: 1.2em;
    filter: drop-shadow(0 0 3px var(--indicator-color));
}

.indicator-text {
    color: var(--indicator-color);
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

@keyframes indicatorFade {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* 境界線エフェクト */
.network-boundary {
    animation: boundaryPulse var(--boundary-pulse) ease-in-out infinite;
    animation-delay: var(--boundary-delay);
}

@keyframes boundaryPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* 外部データフロー */
.external-data-flow {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--flow-color);
    border-radius: 50%;
    box-shadow: 
        0 0 8px var(--flow-color),
        0 0 4px rgba(255, 255, 255, 0.4);
    animation: var(--flow-animation) var(--flow-duration) linear infinite;
    animation-delay: var(--flow-delay);
}

@keyframes externalFlow1 {
    0% { transform: scale(0.5); opacity: 0; }
    10% { transform: scale(1); opacity: 1; }
    90% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(0.5); opacity: 0; }
}

@keyframes externalFlow2 {
    0% { transform: scale(0.8) rotate(0deg); opacity: 0; }
    20% { transform: scale(1.2) rotate(90deg); opacity: 1; }
    80% { transform: scale(1) rotate(270deg); opacity: 0.6; }
    100% { transform: scale(0.8) rotate(360deg); opacity: 0; }
}

@keyframes externalFlow3 {
    0% { transform: scale(1) translateX(0); opacity: 0; }
    25% { transform: scale(1.5) translateX(10px); opacity: 1; }
    75% { transform: scale(1.2) translateX(-10px); opacity: 0.8; }
    100% { transform: scale(1) translateX(0); opacity: 0; }
}

/* 現実世界からの情報入力 */
.real-world-input {
    font-size: var(--input-size, 0.8rem);
    font-weight: 600;
    text-shadow: 0 0 8px currentColor;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 4px 8px;
    border: 1px solid currentColor;
    backdrop-filter: blur(5px);
    animation: realWorldInput var(--input-duration) ease-out forwards;
    white-space: nowrap;
}

@keyframes realWorldInput {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    10% {
        opacity: 1;
        transform: scale(1.2);
    }
    20% {
        transform: scale(1);
    }
    80% {
        opacity: 1;
        left: var(--input-target-x);
        top: var(--input-target-y);
    }
    100% {
        opacity: 0;
        left: var(--input-target-x);
        top: var(--input-target-y);
        transform: scale(0.8);
    }
}

/* 現実世界への情報出力 */
.real-world-output {
    font-size: var(--output-size, 0.8rem);
    font-weight: 600;
    text-shadow: 0 0 8px currentColor;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 4px 8px;
    border: 1px solid currentColor;
    backdrop-filter: blur(5px);
    animation: realWorldOutput var(--output-duration) ease-out forwards;
    white-space: nowrap;
}

@keyframes realWorldOutput {
    0% {
        opacity: 0;
        transform: scale(0.5);
        left: var(--output-start-x);
        top: var(--output-start-y);
    }
    10% {
        opacity: 1;
        transform: scale(1.2);
        left: var(--output-start-x);
        top: var(--output-start-y);
    }
    20% {
        transform: scale(1);
        left: var(--output-start-x);
        top: var(--output-start-y);
    }
    80% {
        opacity: 1;
        left: var(--output-target-x);
        top: var(--output-target-y);
        transform: scale(1);
    }
    100% {
        opacity: 0;
        left: var(--output-target-x);
        top: var(--output-target-y);
        transform: scale(0.8);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    /* データフロー効果を無効化 */
    body::after,
    .hero-network-bg *,
    .distribution::before,
    .section-title::before,
    section::before {
        animation: none !important;
        opacity: 0.3 !important;
    }
    
    /* 新しい現実世界要素も無効化 */
    .gateway-node,
    .external-connection,
    .real-world-indicator,
    .network-boundary,
    .external-data-flow,
    .real-world-input,
    .real-world-output {
        animation: none !important;
        opacity: 0.6 !important;
    }
}
