/* 全ページ共通のスタイル（ヘッダー・メニュー・フッター・トップへ戻るボタン） */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "游ゴシック", "Yu Gothic", sans-serif;
    color: #333;
    background: #fff;
    line-height: 1.7;
}

/* スムーススクロール */
html {
    scroll-behavior: smooth;
}

/* ヘッダー */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 20px 40px;
    border-bottom: 1px solid #f0f0f0;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 16px;
    letter-spacing: 0.08em;
    font-weight: normal;
    text-decoration: none;
    color: #333;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.6;
}

/* デスクトップナビゲーション */
nav {
    display: flex;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    margin-left: 30px;
    position: relative;
    transition: color 0.3s ease;
}

/* ホバーアニメーション */
nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: #333;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* 現在のページをハイライト */
nav a.current {
    font-weight: 500;
}

nav a.current::after {
    width: 100%;
}

/* モバイルメニューボタン */
.mobile-menu-btn {
    display: none;
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
    z-index: 101;
}

.mobile-menu-btn span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: #333;
    transition: all 0.3s ease;
}

.mobile-menu-btn span:nth-child(1) {
    top: 0;
}

.mobile-menu-btn span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-btn span:nth-child(3) {
    bottom: 0;
}

/* メニュー開いた時のアニメーション */
.mobile-menu-btn.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* モバイルメニュー */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 99;
    transition: right 0.3s ease;
    padding: 80px 20px 40px;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: opacity 0.3s ease;
}

.mobile-menu a:hover {
    opacity: 0.6;
}

.mobile-menu a.current {
    font-weight: 500;
}

/* ページトップへ戻るボタン */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 90;
    transition: all 0.3s ease;
}

.scroll-to-top.show {
    display: flex;
}

.scroll-to-top:hover {
    background: #333;
    border-color: #333;
}

.scroll-to-top::before {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 2px solid #333;
    border-right: 2px solid #333;
    transform: rotate(-45deg);
    margin-top: 5px;
}

.scroll-to-top:hover::before {
    border-color: white;
}

/* フッター */
footer {
    text-align: center;
    padding: 40px 20px;
    font-size: 12px;
    color: #999;
    border-top: 1px solid #f0f0f0;
}

/* 写真の拡大表示（作品・実験で共通） */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-close::before,
.lightbox-close::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background: white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* ライトボックス ナビゲーション */
.lightbox-nav {
    position: fixed;
    z-index: 2001;   /* 写真の上に重ねて、スマホでも押せるようにする */
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav[hidden] {
    display: none;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-nav::before {
    content: '';
    width: 15px;
    height: 15px;
    border-top: 2px solid white;
    border-right: 2px solid white;
}

.lightbox-prev::before {
    transform: rotate(-135deg);
    margin-left: 5px;
}

.lightbox-next::before {
    transform: rotate(45deg);
    margin-right: 5px;
}

/* レスポンシブ */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }

    nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}
