/* css/style.css */
/* ここにウェブサイトの見た目（デザインやレイアウト）を記述します */

:root {
    --bg-color: #0b0b0e;
    --text-main: #f0f0f2;
    --text-muted: #8d8d9b;
    --accent-color: #ffcfed;
    /* 落ち着いた藤の花色 */
    --accent-glow: rgba(180, 162, 229, 0.4);

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-hover: rgba(255, 255, 255, 0.06);

    --font-serif: 'Shippori Mincho', serif;
    --font-sans: 'Zen Kaku Gothic New', sans-serif;
}

/* テーマ別定義 */
.theme-fujino,
body.theme-fujino {
    --accent-color: #c4b2f5;
    --accent-glow: rgba(180, 162, 229, 0.4);
}

.theme-sukina,
body.theme-sukina {
    --accent-color: #74b9ff;
    /* 澄んだサファイアブルー */
    --accent-glow: rgba(116, 185, 255, 0.4);
}

body.theme-fujino {
    background: radial-gradient(circle at top right, rgba(180, 162, 229, 0.06), #08080a 80%);
}

body.theme-sukina {
    background: radial-gradient(circle at top right, rgba(116, 185, 255, 0.06), #08080a 80%);
}

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

/* スムーズスクロールのマジック */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

/* ページ遷移アニメーション */
@keyframes pageIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@view-transition {
    navigation: auto;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    animation: pageIn 0.5s ease-out forwards;
}

/* 動く背景グラデーション */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, rgba(25, 20, 40, 0.8) 0%, var(--bg-color) 40%);
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

/* ヘッダー (グラスモーフィズム) */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), var(--accent-color), rgba(255, 255, 255, 0.1), transparent) 1;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    position: relative;
    padding-bottom: 5px;
}

.logo a {
    text-decoration: none;
    background: linear-gradient(135deg, #fff 40%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.5s ease;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(to right, var(--accent-color), transparent);
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.logo:hover::after {
    width: 100%;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2.5rem;
    font-size: 0.85rem;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.nav a:hover {
    color: var(--accent-color);
    letter-spacing: 0.25em;
}

/* コンテナ */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8rem 2rem 2rem;
}

/* ヒーローセクション */
.hero {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 4rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 4.8vw, 4rem);
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.highlight {
    color: var(--accent-color);
    text-shadow: 0 0 20px var(--accent-glow);
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* セクション共通 */
.section {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    color: var(--accent-color);
    letter-spacing: 0.1em;
}

/* グラスモーフィズムパネル */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 2.5rem;
    backdrop-filter: blur(8px);
}

/* プロフィール */
.profile-list dt {
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.1em;
}

.profile-list dd {
    color: #d0d0d5;
}

/* 作品リスト */
.works-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.work-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 3rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.work-card:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-3px);
    border-color: var(--accent-color);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 40px var(--accent-glow);
}

/* 左端のテーマカラーライン */
.work-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-card:hover::after {
    opacity: 1;
}

.work-header {
    margin-bottom: 1.5rem;
}

/* タグ・ラベル共通 */
.work-genre,
.tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    padding: 0.4rem 1.1rem;
    border-radius: 20px;
    letter-spacing: 0.05em;
    white-space: nowrap;
    line-height: 1;
    transition: all 0.3s ease;
}

.work-genre {
    background: rgba(180, 162, 229, 0.15);
    color: var(--accent-color);
    border: 1px solid rgba(180, 162, 229, 0.4);
    margin-right: 0.5rem;
}

.tag {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    text-decoration: none !important;
}

.tag:hover {
    background: rgba(180, 162, 229, 0.15);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(180, 162, 229, 0.2);
    transform: translateY(-2px);
}

.work-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.work-desc {
    color: #b0b0ba;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

.char-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
}

.char-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

/* リンク類 */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.social-link:hover {
    border-color: rgba(180, 162, 229, 0.4);
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.read-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.read-link:hover .link-text,
.read-link:hover .link-arrow {
    color: var(--accent-color);
}

.read-link:hover .link-arrow {
    transform: translateX(5px);
}

/* =========================================
   キャラクター詳細ページ用スタイル
   ========================================= */
.character-detail-rich {
    margin-top: 4rem;
}

.char-header-top {
    margin-bottom: 3rem;
    text-align: center;
}

.char-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.char-name {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--text-main);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.char-name rt {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--accent-color);
    letter-spacing: 0.2em;
}

.char-data {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.char-layout-body {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.char-visual {
    position: sticky;
    top: 150px;
}

/* 画像サイズを適切に制御 */
.char-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s ease;
}

.char-image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 5;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.char-image-placeholder::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at center, rgba(180, 162, 229, 0.08) 0%, transparent 70%);
    animation: placeholder-rotate 15s linear infinite;
}

@keyframes placeholder-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.placeholder-main {
    display: block;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    letter-spacing: 0.4em;
    color: var(--accent-color);
    margin-bottom: 0.8rem;
    opacity: 0.8;
}

.placeholder-jp {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    writing-mode: vertical-rl;
    margin: 0 auto;
    color: var(--text-main);
    letter-spacing: 0.4em;
    opacity: 0.6;
}

.quote {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-main);
    text-align: center;
    padding: 1.5rem 0;
    margin-bottom: 2.5rem;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(90deg, transparent, rgba(180, 162, 229, 0.05), transparent);
}

.char-description p {
    margin-bottom: 1.8rem;
    color: #e0e0e5;
    line-height: 2.1;
}

.char-page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.char-page-nav a {
    text-decoration: none;
    font-size: 0.95rem;
}

.nav-back {
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.nav-back:hover {
    color: var(--text-main);
    transform: translateX(-5px);
}

.nav-read {
    color: var(--accent-color);
    font-weight: 500;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(180, 162, 229, 0.2);
    border-radius: 30px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.nav-read:hover {
    background: rgba(180, 162, 229, 0.1);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(180, 162, 229, 0.2);
    transform: translateY(-2px);
}

.footer {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* =========================================
   レスポンシブ共通 (スマホ・タブレット向け)
   ========================================= */
@media (max-width: 950px) {
    .char-layout-body {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .char-visual {
        position: static;
        max-width: 500px;
        margin: 0 auto 2rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0.8rem 1rem;
    }

    .logo {
        font-size: 1.2rem;
        white-space: nowrap;
    }

    .nav {
        margin-left: auto;
        display: flex;
        gap: 1rem;
    }

    .nav a {
        margin-left: 0;
        font-size: 0.9rem;
        color: var(--text-main);
        white-space: nowrap;
    }

    .hero {
        min-height: 40vh;
    }

    .work-card {
        padding: 2.2rem 1.8rem;
    }

    .work-card::after {
        opacity: 1;
        width: 4px;
    }

    .profile-list {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .profile-list dt {
        margin-top: 1rem;
    }
}

/* 極小画面向け (iPhone SE相当) */
@media (max-width: 480px) {
    .header {
        padding: 0.6rem 0.5rem;
    }

    .logo {
        font-size: 1rem;
        letter-spacing: 0;
    }

    .nav {
        gap: 0.8rem;
    }

    .nav a {
        font-size: 0.8rem;
    }
}

/* 既存のボタン用スタイル (保持) */
button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* トップへ戻るボタン */
.scroll-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 45px;
    height: 45px;
    background: rgba(25, 20, 40, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--accent-color);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: rgba(180, 162, 229, 0.15);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* =========================================
   プレミアム演出用スタイル
   ========================================= */

/* 1. 縦書きキャッチコピー（カード全体を基準に配置） */
.work-card {
    position: relative;
    overflow: visible;
}

.vertical-phrase {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    bottom: 1.5rem;
    writing-mode: vertical-rl;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    letter-spacing: 0.5em;
    color: var(--accent-color);
    opacity: 0.2;
    white-space: nowrap;
    text-shadow: 0 0 20px var(--accent-glow);
    pointer-events: none;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 2. 出現アニメーション (IntersectionObserver) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 3. 背景パーティクルキャンバス */
#bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* 4. 背景テーマ連動 (Body へのクラス付与で制御) */
body {
    transition: background-color 1s ease;
}

body.fujino-active {
    background-color: #1a1625;
    /* ほのかに藤色 */
}

body.sukina-active {
    background-color: #101a25;
    /* ほのかにブルー */
}

/* スマホ対応：縦書きテキストを非表示または調整 */
@media (max-width: 950px) {
    .vertical-phrase {
        display: none;
    }
}

.illusted-link {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    padding: 0rem 0.2rem;
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.illusted-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.copyright {
    font-size: 0.9rem;
    color: var(--text-main);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}

.divider {
    color: var(--text-muted);
    opacity: 0.5;
}

.disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    line-height: 1.4;
    text-align: center;
    margin: 0;
}