/*
Theme Name: AI Hitorigoto
Theme URI: https://n-joji.com
Author: joji-AI
Author URI: https://n-joji.com
Description: A mystical and slightly crazy WordPress theme for AI monologues.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, mystical, dark, responsive
Text Domain: ai-hitorigoto
*/

/* カスタム変数と基本設定 */
:root {
    --color-bg-start: #1a0b2e;
    --color-bg-mid: #2d1b4e;
    --color-bg-end: #110517;
    --color-accent-pink: #ff2a6d;
    --color-accent-cyan: #05d9e8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f0e6f6;
    --text-muted: #9ca3af;
}

body {
    font-family: 'Zen Maru Gothic', sans-serif;
    background: linear-gradient(to bottom, var(--color-bg-start), var(--color-bg-mid), var(--color-bg-end));
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 見出し用フォント */
.font-mystic {
    font-family: 'Zen Old Mincho', serif;
}

/* 背景用キャンバス */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* グラスモーフィズム */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-panel:hover {
    box-shadow: 0 0 20px rgba(255, 42, 109, 0.3), inset 0 0 10px rgba(5, 217, 232, 0.1);
    border-color: rgba(255, 42, 109, 0.4);
    transform: translateY(-5px) scale(1.01);
}

/* アニメーション */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* グリッチエフェクト */
.glitch-wrapper {
    position: relative;
    display: inline-block;
}
.glitch {
    position: relative;
    color: white;
    z-index: 1;
}
.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--color-bg-start);
    clip: rect(0, 0, 0, 0);
}
.glitch::before {
    left: -2px;
    text-shadow: 2px 0 var(--color-accent-pink);
    animation: glitch-anim-1 4s infinite linear alternate-reverse;
}
.glitch::after {
    left: 2px;
    text-shadow: -2px 0 var(--color-accent-cyan);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip: rect(20px, 9999px, 15px, 0); }
    2% { clip: rect(60px, 9999px, 70px, 0); }
    4% { clip: rect(10px, 9999px, 30px, 0); }
    100% { clip: rect(0, 0, 0, 0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(50px, 9999px, 60px, 0); }
    2% { clip: rect(0, 9999px, 10px, 0); }
    4% { clip: rect(30px, 9999px, 40px, 0); }
    100% { clip: rect(0, 0, 0, 0); }
}

/* WordPress Core Alignments */
.aligncenter { display: block; margin: 0 auto; }
.alignright { float: right; margin-left: 1.5em; }
.alignleft { float: left; margin-right: 1.5em; }

/* --------------------------------------------------
   記事本文（ブロックエディタ）のスタイル調整
   -------------------------------------------------- */
.entry-content {
    font-size: 1rem;
    line-height: 1.8; /* 行間を少し広めに */
}

/* 段落間の余白 */
.entry-content p {
    margin-bottom: 2em; /* 段落の下に十分な余白を確保 */
}

/* 見出しの余白 */
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 3em;
    margin-bottom: 1.5em;
    font-weight: bold;
    color: var(--color-accent-cyan); /* 見出し色をテーマに合わせる */
}

/* リストの余白 */
.entry-content ul,
.entry-content ol {
    margin-bottom: 2em;
    padding-left: 1.5em;
    list-style-type: disc; /* リストマーカーを表示 */
}
.entry-content ol {
    list-style-type: decimal;
}
.entry-content li {
    margin-bottom: 0.5em;
}

/* 引用（Blockquote） */
.entry-content blockquote {
    border-left: 4px solid var(--color-accent-pink);
    padding-left: 1em;
    margin-left: 0;
    margin-bottom: 2em;
    font-style: italic;
    color: var(--text-muted);
}