/*フェードアップ*/
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: 1s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* リンク */
a {
    color: var(--link-color-dark); 
    text-decoration: none;
    transition: 0.3s;
}

a:not(.btn):hover {
    opacity: 0.8; 
}

/* レイアウト */
.container {
    max-width: 900px; 
    margin: auto;
    padding: 0 20px;
}

.site-content {
    padding-top: 60px; 
    padding-bottom: 60px;
    position: relative; 
    z-index: 3;
}

/* Works -> Profile -> Eventへの三段階グラデーション */
#unified-ocean-container {
    position: relative;
    background: linear-gradient(to bottom, 
        var(--bg-color-works) 0%, 
        var(--bg-color-works) 30%, 
        var(--bg-color-profile) 50%, /* Profileの色の開始 */
        var(--bg-color-profile) 75%, /* Profileの色の中間点 */
        var(--bg-color-event) 100%  /* Eventの最深部の色 */
    ); 
    overflow: hidden; 
}

#works {
    background-color: transparent; 
    color: var(--text-color-dark);
    position: relative; 
    z-index: 2; 
}

/* Profile, Eventの背景を透明に */
#profile {
    background: transparent; 
    color: var(--text-color-light); 
    padding-top: 40px;
    position: relative; 
    z-index: 2; 
}

#event {
    background: transparent; 
    color: var(--text-color-light);
    padding-top: 40px;
    position: relative;
    z-index: 2;
    min-height: 80vh; /* 最深部セクションの長さを確保 */
}

/* 泡の移動コンテナの共通定義 */
.bubbles-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 400%; 
    z-index: 1; 
    pointer-events: none;
    transition: transform 0.05s linear; 
}

/* 動的に生成される泡のスタイル */
.bubble {
    position: absolute;
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);
    opacity: 0; 
    transition: opacity 0.5s linear; 
}

.bubble-works-color {
    background: rgba(255, 255, 255, 0.9); 
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
}

/* 深海セクションの泡の色 (Profile/Event共通) */
.bubble-profile-color {
    background: rgba(255, 255, 255, 0.2);
    /* 青白い発光を表現 */
    box-shadow: 0 0 5px 1px rgba(176, 201, 240, 0.3);
}

/* --- 生物発光 (Bioluminescence) アニメーション --- */
#bioluminescence-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2; 
}

.biolum-particle {
    position: absolute;
    background: #ffffff; /* 白い光の粒 */
    border-radius: 50%;
    box-shadow: 0 0 8px 2px rgba(176, 201, 240, 0.8); /* 強く光る影 */
    opacity: 0; /* JSでanimation-durationが設定されるまで透明 */
    
    /* 動きのアニメーション */
    animation: biolum-float 2s ease-out forwards; 
    /* slowFadeFlashはJSでdurationを設定して適用される */
}

/* 光の粒の微細な浮上 */
@keyframes biolum-float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

/* 【修正点】ゆっくり点滅させるキーフレーム */
@keyframes slowFadeFlash {
    0% { opacity: 0; }           /* 開始: 透明 */
    30% { opacity: 0.7; }        /* 30%までゆっくり光る (フェードイン) */
    70% { opacity: 0.7; }        /* 70%まで光を維持 */
    100% { opacity: 0; }         /* 70%から100%までゆっくり消える (フェードアウト) */
}


/* 深海セクション内の文字色、リンク色調整 (Profile/Event共通) */
#profile a:not(.btn), #event a:not(.btn) {
    color: var(--link-color-light); 
}

#profile .section-title, #event .section-title {
    border-left-color: var(--text-color-light); 
    color: var(--text-color-light);
}

#profile .member-name, #event .event-name {
    color: var(--link-color-light);
}

#profile .sns-title {
    color: var(--text-color-light);
    border-bottom-color: #aaa;
}

#profile p, #event p {
    color: var(--text-color-light);
}

#event .event-item {
    padding-left: 20px;
    border-left: 3px solid #ddd;
    margin-bottom: 20px;
    list-style-type: none;
}

#event .event-date, #event .event-detail {
    font-size: 0.95rem;
    color: #999;
}

#profile footer, #event footer {
    color: #999;
    position: relative;
    z-index: 3;
}


/* ナビゲーションバー (変更なし) */
#nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--bg-color-home);
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.3s;
}

#nav-bar.fixed {
    border-bottom: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.1em;
}

.nav-links a {
    margin-left: 30px;
    font-weight: 500;
    color: var(--text-color-dark);
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    transform: none; 
}

/* セクションタイトル (変更なし) */
.section-title {
    font-size: 1.8rem;
    border-left: 6px solid var(--accent-color);
    padding-left: 20px;
    margin-top: 80px;
    margin-bottom: 40px;
    color: var(--accent-color);
}

p { margin-bottom: 20px; text-align: justify; }

/* 波のセパレーター (変更なし) */
.wave-separator {
    width: 100%;
    line-height: 0;
    background-color: var(--bg-color-home); 
    position: relative; 
}

.wave-separator svg {
    display: block;
    width: 100%;
    height: auto;
}

/* 作品リスト (変更なし) */
.work-list { 
    list-style: none; 
    padding: 0; 
}
.work-item { 
    margin-bottom: 100px; 
    display: flex;
    align-items: center;
    gap: 40px;
}

.layout-left .work-media { order: 1; }
.layout-left .work-info { order: 2; }

.layout-right .work-media { order: 2; }
.layout-right .work-info { order: 1; }

.work-media {
    flex: 0 0 300px; 
}

.work-media img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 200px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: 0.3s ease-in-out;
}

.work-media a:hover img {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.work-info {
    flex: 1;
    min-width: 300px; 
}

.work-date { 
    font-size: .85rem; 
    color: #888; 
    margin-bottom: 5px; 
    display: block;
}

.work-trigger {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color-dark); 
    border-bottom: 1px solid transparent;
    display: inline-block;
    line-height: 1.4;
}

.work-trigger:hover {
    border-bottom: 1px solid var(--accent-color);
    transform: none; 
}

.work-info .description {
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color-dark);
}

/* プロフィール (変更なし) */
.member-list {
    margin-top: 40px;
}

.member-item {
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 3px solid #ddd;
}

.member-name {
    font-size: 1.2rem;
    color: var(--link-color-light); 
    margin: 0 0 10px 0;
}

.member-description {
    font-size: 0.95rem;
    line-height: 1.7;
}

.sns-title {
    font-size: 1.1rem;
    margin-top: 50px;
    margin-bottom: 20px;
    color: var(--text-color-light);
    border-bottom: 1px solid #aaa;
    padding-bottom: 5px;
}

/* ボタン (変更なし) */
.btn-area {
    margin-top: 60px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border: 1px solid;
    color: var(--text-color-dark); 
    border-color: var(--accent-color); 
    transition: .3s;
    display: inline-block;
    font-size: 1rem;
    line-height: 1; 
}

/* プロフィール・イベントセクションのボタン調整 */
#profile .btn, #event .btn {
    color: var(--text-color-light);
    border-color: var(--text-color-light);
}

#profile .btn:hover, #event .btn:hover {
    background: var(--text-color-light);
    color: var(--bg-color-profile); 
    transform: translateY(-2px);
    opacity: 1; 
}

.btn:hover {
    background: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
    opacity: 1; 
}

.btn-small,.btn-small1 {
    padding: 8px 20px;
    font-size: 0.9rem;
    line-height: 1;
}

.btn-share {
    background: #000;
    color: #fff;
    border-color: #000;
}

.btn-share:hover { background: #333; }

/* フッター (変更なし) */
footer {
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #999; 
}

/* モーダル (変更なし) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8); 
    color: var(--modal-text);
    opacity: 0;
    visibility: hidden;
    transition: opacity .6s, visibility .6s;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    z-index: 2000;
    /* モーダルコンテンツが中央に来るように設定 */
    align-items: flex-start; /* 上からコンテンツを配置 */
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 100%;
    max-width: 800px;
    padding: 80px 20px 100px;
    opacity: 0;
    transform: translateY(20px) scale(0.95); 
    transition: opacity .8s ease-out, transform .8s ease-out;
}

.modal-overlay.active .modal-content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.modal-spec {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.modal-text {
    margin-top: 40px;
    line-height: 1.8;
}

.close-modal-btn {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    background: none;
    border: none;
    cursor: pointer;
    opacity: .7;
    color: #fff; 
    z-index: 2001;
}

.close-modal-btn:hover { opacity: 1; }

/* レスポンシブ対応 (変更なし) */
@media (max-width: 900px) {
    
    .work-item {
        flex-direction: column; 
        text-align: center;
        margin-bottom: 60px;
        gap: 20px;
    }
    
    .work-media {
        flex: none;
        width: 60%; 
        margin: 0 auto;
    }
    
    .layout-left .work-media,
    .layout-right .work-media {
        order: 1; 
    }
    .layout-left .work-info,
    .layout-right .work-info {
        order: 2;
        text-align: center;
    }
    
    .work-info .description {
        text-align: center;
    }
    
    .nav-links a { margin-left: 20px; }
}

@media (max-width: 768px) {
    
    .work-media {
        width: 90%;
    }
}