/* モダンブログテンプレート スタイルシート */

/* ========== リセット・基本設定 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3B82F6;
    --secondary: #8B5CF6;
    --accent: #EC4899;
    --background: #fafafa;
    --surface: #ffffff;
    --text: #2c2c2c;
    --text-light: #666666;
    --text-lighter: #999999;
    --border: rgba(0, 0, 0, 0.05);
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

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

/* ========== ナビゲーション ========== */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 12px 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-bottom: 1px solid rgba(0, 0, 0, 0);
}

.nav.scrolled {
    padding: 8px 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--text);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    transition: left 0.8s ease;
}

.logo:hover::before {
    left: 100%;
}

.logo:hover {
    transform: translateY(-1px);
    color: var(--primary);
}

/* ========== ナビゲーションメニュー ========== */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.main-navigation a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    padding: 8px 0;
}

.main-navigation a:hover,
.main-navigation .active a {
    color: var(--text);
    transform: translateY(-2px);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 1px;
}

.main-navigation a:hover::after,
.main-navigation .active a::after {
    width: 100%;
}

/* ========== ドロップダウンメニュー ========== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    min-width: 220px;
    max-width: 280px;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1001;
    margin-top: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 8px 0;
    max-height: 400px;
    overflow-y: auto;
}

/* カスタムスクロールバー */
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* ドロップダウンメニュー内のリンク */
.dropdown-menu a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    border: none;
    position: relative;
}

.dropdown-menu a::after {
    content: '';
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
}

.dropdown-menu a:last-child::after {
    display: none;
}

.dropdown-menu a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    padding-left: 25px;
}

/* カテゴリー名と記事数 */
.dropdown-menu .category-name {
    font-weight: 500;
    flex: 1;
}

.dropdown-menu .category-count {
    font-size: 12px;
    color: var(--text-lighter);
    margin-left: 8px;
}

.dropdown-menu a:hover .category-count {
    color: var(--primary);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-arrow {
    margin-left: 5px;
    font-size: 10px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-block;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

/* ========== ヒーローセクション ========== */
.hero {
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--gradient-1);
    position: relative;
    overflow: hidden;
    margin-top: 0;
    padding-top: 60px; /* ナビゲーションの高さ分の内側余白 */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="0.5" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="0.3" fill="white" opacity="0.08"/><circle cx="50" cy="10" r="0.4" fill="white" opacity="0.06"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 40px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 200;
    color: white;
    margin-bottom: 20px;
    letter-spacing: -2px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

.hero p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.8s forwards;
}

/* ヒーローロゴ */
.hero-logo {
    max-width: 300px;
    max-height: 200px;
    width: auto;
    height: auto;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.hero-title {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 200;
    color: white;
    margin-bottom: 20px;
    letter-spacing: -2px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

.hero-catchphrase {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    letter-spacing: 2px;
    margin-top: 20px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.8s forwards;
}

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

/* ========== スクロールインジケーター ========== */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    letter-spacing: 2px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ========== ヘッダーウィジェットエリア ========== */
.header-widget-area {
    margin-top: 60px; /* ナビゲーションの高さ分 */
    padding: 20px 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

/* コンテンツが空の場合は非表示 */
.header-widget-area .container:empty {
    display: none;
}

.header-widget-area:has(.container:empty) {
    display: none;
}

/* レガシーブラウザ対応 */
.header-widget-area {
    min-height: 0;
}

.header-widget-area .container:empty + * {
    margin-top: 0;
}

/* ========== メインコンテンツ ========== */
.main-content {
    padding: 0;
    min-height: calc(100vh - 60px); /* ナビゲーションの高さを除く */
}

/* トップページのメインコンテンツ */
.home-page .main-content {
    padding: 0;
}

/* 記事ページのメインコンテンツ */
.article-page .main-content {
    padding-top: 100px; /* ナビゲーション + 余白 */
    padding-bottom: 80px;
}

/* セクション間の余白 */
.main-content > .container {
    padding: 80px 40px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 200;
    color: var(--text);
    margin-bottom: 60px;
    letter-spacing: -1px;
}

/* ========== 記事グリッド ========== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 60px;
    margin-bottom: 80px;
}

.article-card {
    background: var(--surface);
    border-radius: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--shadow);
    position: relative;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.post-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(45deg, #f0f2f5, #e8ebf0);
    position: relative;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .post-image img {
    transform: scale(1.05);
}

.post-image .image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.post-image .placeholder-text {
    font-size: 24px;
    font-weight: 200;
    color: rgba(102, 126, 234, 0.5);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.post-content {
    padding: 40px;
}

.article-meta {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: var(--text-lighter);
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.article-card .article-card-title {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.4;
    letter-spacing: -0.5px;
}

.article-card .article-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-card .article-card-title a:hover {
    color: var(--primary);
}

.excerpt {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
}

.read-more::after {
    content: '→';
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--text);
}

.read-more:hover::after {
    transform: translateX(5px);
}

/* ========== CTA セクション ========== */
.cta-section {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin: 100px -40px 0;
    border-radius: 20px;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--text);
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.cta-button::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;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(44, 44, 44, 0.3);
}

/* ========== 記事ページ ========== */
.article-single {
    background: var(--surface);
    max-width: 800px;
    margin: 0 auto;
    padding: 60px;
    box-shadow: var(--shadow);
}

.article-header {
    text-align: center;
    margin-bottom: 60px;
}

.article-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 200;
    margin-bottom: 20px;
    line-height: 1.3;
    letter-spacing: -1px;
}

.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    letter-spacing: 0.02em;
}

.article-content h2 {
    font-size: 2rem;
    font-weight: 300;
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 2.5rem 0 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin: 0 0 1.5rem 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--background);
    border-left: 4px solid var(--primary);
    font-style: italic;
}

/* ========== パンくずリスト ========== */
.breadcrumb {
    margin-bottom: 40px;
    color: var(--text-light);
    font-size: 14px;
    letter-spacing: 0.5px;
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary);
}

/* ========== 記事フッター ========== */
.article-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.article-share {
    text-align: center;
    margin-bottom: 40px;
}

.article-share h3 {
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 20px;
    color: var(--text-light);
}

.share-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.share-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.share-twitter {
    background: #000000;
    color: white;
}

.share-twitter:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.share-facebook {
    background: #1877F2;
    color: white;
}

.share-facebook:hover {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(24, 119, 242, 0.3);
}

.share-buttons a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.share-buttons a:hover::before {
    width: 100%;
    height: 100%;
}

/* ========== 前後の記事リンク ========== */
.prev-next-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
}

.prev-link,
.next-link {
    flex: 1;
    padding: 20px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.prev-link {
    text-align: left;
}

.next-link {
    text-align: right;
}

.prev-link:hover,
.next-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.prev-link::before,
.next-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.05), transparent);
    transition: left 0.5s ease;
}

.prev-link:hover::before,
.next-link:hover::before {
    left: 100%;
}

/* フリースペース */
.free-space {
    margin: 2rem 0;
    padding: 1.5rem;
    background: transparent;
    border: none;
}

.free-space.top-free-space {
    margin-top: 0;
    margin-bottom: 3rem;
}

.free-space.bottom-free-space {
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.free-space.article-free-space {
    margin-top: 3rem;
    margin-bottom: 3rem;
    background: transparent;
    border: none;
}

/* フリースペース内の要素調整 */
.free-space p:last-child {
    margin-bottom: 0;
}

.free-space img {
    max-width: 100%;
    height: auto;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .prev-next-links {
        flex-direction: column;
    }
    
    .free-space {
        padding: 1rem;
    }
    
    .free-space.top-free-space,
    .free-space.bottom-free-space,
    .free-space.article-free-space {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
}

/* ========== 関連記事 ========== */
.related-articles {
    margin-top: 80px;
    padding: 40px;
    background: var(--background);
    border-radius: 12px;
}

.related-articles h3 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 30px;
}

.related-articles ul {
    list-style: none;
}

.related-articles li {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.related-articles li:last-child {
    border-bottom: none;
}

.related-articles a {
    color: var(--text);
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.related-articles a:hover {
    color: var(--primary);
    padding-left: 10px;
}

/* ========== 前後の記事リンク ========== */
.prev-next-links {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.prev-link,
.next-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 400;
    max-width: 45%;
    transition: all 0.3s ease;
}

.prev-link:hover,
.next-link:hover {
    color: var(--text);
}

.next-link {
    text-align: right;
}

/* ========== ウィジェットエリア ========== */
.header-widget-area {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 40px 0;
    margin-top: 60px;
    min-height: 200px;
}

.footer-widget-area {
    background: #f8f9fa;
    padding: 80px 0;
    border-top: 1px solid var(--border);
}

.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.widget h3 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: var(--text);
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 8px 0;
}

.widget a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: var(--primary);
}

/* ========== カテゴリーリスト ========== */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: var(--surface);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.category-list a:hover {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
}

/* ========== タグクラウド ========== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud .tag-item {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

/* カテゴリーアイテム（リンク付き） */
.tag-cloud .tag-category {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    text-decoration: none;
}

.tag-cloud .tag-category:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* タグアイテム（リンクなし） */
.tag-cloud .tag-only {
    background: rgba(139, 69, 19, 0.1); /* ブラウン系 */
    color: #8B4513;
    cursor: default;
}

/* 既存の古いスタイル（後方互換性のため保持） */
.tag-cloud a {
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.tag-cloud a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ========== カテゴリーページ ========== */
/* カテゴリーとアーカイブのヒーローセクションはトップページと同じスタイルを使用 */
.category-hero,
.archive-hero {
    /* .heroクラスと同じスタイルを継承 */
}

.category-title,
.archive-title {
    font-size: 2.5rem;
    font-weight: 200;
    color: white;
    margin-bottom: 10px;
    letter-spacing: -1px;
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

.category-count,
.archive-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    letter-spacing: 1px;
    font-weight: 300;
    opacity: 0;
    animation: fadeInUp 1s ease 0.8s forwards;
}

.category-articles {
    padding: 80px 0;
}

.category-articles .article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ========== アーカイブページ ========== */
.archive-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 40px;
}

.archive-month {
    margin-bottom: 40px;
}

.archive-month h3 {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.archive-list {
    list-style: none;
}

.archive-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.archive-list a {
    color: var(--text);
    text-decoration: none;
    flex: 1;
    transition: color 0.3s ease;
}

.archive-list a:hover {
    color: var(--primary);
}

.archive-list .date {
    color: var(--text-lighter);
    font-size: 13px;
    margin-left: 20px;
}

/* ========== フッター ========== */
.site-footer {
    background: var(--text);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-content p {
    margin-bottom: 10px;
}

.powered-by {
    font-size: 14px;
    opacity: 0.7;
}

/* ========== バックトゥトップボタン ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    font-size: 20px;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--text);
    transform: translateY(-5px);
}

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

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

/* ========== レスポンシブ対応 ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .nav-container {
        padding: 0 20px;
    }
    
    .main-navigation ul {
        gap: 20px;
    }
    
    .hero {
        height: 60vh;
    }
    
    .hero-content {
        padding: 0 20px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .post-content {
        padding: 30px;
    }
    
    .article-single {
        padding: 40px 20px;
    }
    
    .widget-grid {
        grid-template-columns: 1fr;
    }
    
    .prev-next-links {
        flex-direction: column;
        gap: 20px;
    }
    
    .prev-link,
    .next-link {
        max-width: 100%;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 16px;
    }
    
    .main-navigation {
        font-size: 12px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .article-card .article-card-title {
        font-size: 1.2rem;
    }
}

/* ========== フリースペース要素の改行処理 ========== */
/* 生成されたサイトでの長い文字列対応 */

/* フリースペースコンテナ */
.free-space,
.free-space-container,
.top-free-space,
.bottom-free-space,
.article-free-space,
.article-upper-free-space {
    /* 長い単語の改行 */
    word-wrap: break-word !important;
    word-break: break-all !important;
    overflow-wrap: break-word !important;
    
    /* 最大幅とオーバーフロー */
    max-width: 100% !important;
    overflow-x: auto !important;
    
    /* ボックスモデル */
    box-sizing: border-box !important;
    
    /* パディング */
    padding: 20px 0;
}

/* フリースペース内の全要素 */
.free-space *,
.free-space-container *,
.top-free-space *,
.bottom-free-space *,
.article-free-space *,
.article-upper-free-space * {
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* フリースペース内のテーブル */
.free-space table,
.free-space-container table {
    table-layout: fixed !important;
    width: 100% !important;
}

/* フリースペース内の画像 */
.free-space img,
.free-space-container img {
    max-width: 100% !important;
    height: auto !important;
}

/* フリースペース内のiframe */
.free-space iframe,
.free-space-container iframe {
    max-width: 100% !important;
}

/* コードブロックやpreタグ */
.free-space pre,
.free-space code,
.free-space-container pre,
.free-space-container code {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-x: auto !important;
    max-width: 100% !important;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .free-space,
    .free-space-container,
    .top-free-space,
    .bottom-free-space,
    .article-free-space,
    .article-upper-free-space {
        padding: 15px 10px !important;
        font-size: 14px !important;
    }
}

/* ========== 新しい背景アニメーション ========== */

/* マトリックスレイン */
.bg-animation-matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(to bottom, var(--anim-color1, #0d0d0d), var(--anim-color2, #1a1a1a));
}

.matrix-rain {
    position: absolute;
    width: 2px;
    animation: matrix-fall var(--anim-speed, 3s) linear infinite;
    color: var(--anim-color1, #00ff00);
    text-shadow: 0 0 5px currentColor;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

@keyframes matrix-fall {
    0% { transform: translateY(-100vh); opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

/* コズミックダスト */
.bg-animation-cosmic-dust {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at center, var(--anim-color1, #1a1a2e), var(--anim-color2, #16213e));
    overflow: hidden;
}

.cosmic-dust {
    position: absolute;
    border-radius: 50%;
    animation: cosmic-float var(--anim-speed, 8s) ease-in-out infinite;
    box-shadow: 0 0 6px var(--anim-color1, #ffffff);
}

@keyframes cosmic-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 1; }
}

/* ネオンパルス */
.bg-animation-neon-pulse {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--anim-color2, #0a0a0a);
    overflow: hidden;
}

.neon-pulse {
    position: absolute;
    border-radius: 50%;
    animation: neon-pulse-anim var(--anim-speed, 4s) ease-in-out infinite;
    background: radial-gradient(circle, var(--anim-color1, #ff006e), transparent 70%);
}

@keyframes neon-pulse-anim {
    0%, 100% { transform: scale(0.5); opacity: 0.3; }
    50% { transform: scale(1.5); opacity: 0.8; }
}

/* クリスタルグリッド */
.bg-animation-crystal-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, var(--anim-color1, #1e3c72), var(--anim-color2, #2a5298));
    overflow: hidden;
}

.crystal-grid {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 1px solid var(--anim-color1, #ffffff);
    animation: crystal-rotate var(--anim-speed, 6s) linear infinite;
    background: rgba(255, 255, 255, 0.1);
}

@keyframes crystal-rotate {
    0% { transform: rotate(0deg) scale(1); opacity: 0.3; }
    50% { transform: rotate(180deg) scale(1.2); opacity: 0.7; }
    100% { transform: rotate(360deg) scale(1); opacity: 0.3; }
}

/* ギャラクシースパイラル */
.bg-animation-galaxy-spiral {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at center, var(--anim-color1, #2c1810), var(--anim-color2, #0f0f23));
    overflow: hidden;
}

.galaxy-spiral {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--anim-color1, #ffffff);
    animation: galaxy-spiral-anim var(--anim-speed, 12s) linear infinite;
    box-shadow: 0 0 3px var(--anim-color1, #ffffff);
}

@keyframes galaxy-spiral-anim {
    0% { transform: rotate(0deg) translateX(100px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: rotate(360deg) translateX(200px) rotate(-360deg); opacity: 0; }
}

/* Custom Design Settings */

/* Header Design Settings */
.hero {
  height: 70vh;
  color: #ffffff;
  background: #000040;
}

/* Rainbow Animation */
@keyframes rainbow-wave {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.hero::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; right: -100%; height: 100%;
    background: linear-gradient(90deg, 
        rgba(255,0,0,0.2), rgba(255,127,0,0.2), rgba(255,255,0,0.2), 
        rgba(0,255,0,0.2), rgba(0,0,255,0.2), rgba(75,0,130,0.2), rgba(148,0,211,0.2));
    animation: rainbow-wave 5s infinite linear;
}

.hero h1, .hero-title, .hero p { color: #ffffff !important; }
:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --accent-color: #28a745;
  --text-color: #333333;
  --link-color: #007bff;
  --link-hover-color: #0056b3;
}

body { color: var(--text-color); }
a { color: var(--link-color); }
a:hover { color: var(--link-hover-color); }
.btn-primary { background-color: var(--primary-color); border-color: var(--primary-color); }
.btn-primary:hover { background-color: var(--link-hover-color); border-color: var(--link-hover-color); }

body {
  background-color: #ffffff;
}

/* Background Animation: aurora */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(60deg, 
        transparent 0%, 
        #c4ccf722 20%, 
        #c4ccf744 40%, 
        #c4ccf722 60%, 
        transparent 100%);
    animation: bg-aurora-wave 6s ease-in-out infinite;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    right: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(-60deg, 
        transparent 0%, 
        #34214711 30%, 
        #34214733 50%, 
        #34214711 70%, 
        transparent 100%);
    animation: bg-aurora-wave-reverse 6s ease-in-out infinite;
    opacity: 0.7;
    z-index: -1;
}

@keyframes bg-aurora-wave {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(50%) translateY(-50px); }
}

@keyframes bg-aurora-wave-reverse {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(-50%) translateY(50px); }
}

.article-content, .post-content {
  background-color: #ffffff;
}

/* Heading Styles Debug */
/* heading_styles data: {"h1_style":"none","h1_color":"#333333","h2_style":"filled","h2_color":"#000080","h3_style":"underline","h3_color":"#800000","h4_style":"checkmark","h4_color":"#000080"} */

/* H2 Style: filled */

.article-page .article-content h2,
.article-page .post-content h2 {
  background-color: #000080 !important;
  color: #ffffff !important;
  padding: 10px 15px !important;
  border-radius: 4px !important;
}

/* H3 Style: underline */

.article-page .article-content h3,
.article-page .post-content h3 {
  color: #800000 !important;
  border-bottom: 3px solid #800000 !important;
  padding-bottom: 5px !important;
}

/* H4 Style: checkmark */

.article-page .article-content h4,
.article-page .post-content h4 {
  color: #000080 !important;
  position: relative !important;
  padding-left: 30px !important;
}
.article-content h4::before,
.post-content h4::before,
article h4::before {
  content: '✓' !important;
  position: absolute !important;
  left: 0 !important;
  font-weight: bold !important;
  font-size: 1.2em !important;
  color: #000080 !important;
}

/* List Styles */

.article-content ul,
.post-content ul,
article ul {
    list-style: none !important;
    padding-left: 30px !important;
}

.article-content ul li,
.post-content ul li,
article ul li {
    position: relative !important;
    padding-left: 25px !important;
    margin-bottom: 0.5em !important;
}

.article-content ul li::before,
.post-content ul li::before,
article ul li::before {
    content: '✓' !important;
    position: absolute !important;
    left: 0 !important;
    color: #800000 !important;
    font-size: 1.1em !important;
    line-height: 1.6 !important;
}

.article-page .article-content li,
.article-page .post-content li {
    animation: listSlideIn 0.5s ease-in-out forwards;
    transform: translateX(-20px);
    opacity: 0;
}

@keyframes listSlideIn {
    to { 
        transform: translateX(0);
        opacity: 1;
    }
}

.article-page .article-content li:nth-child(1),
.article-page .post-content li:nth-child(1) { animation-delay: 0.1s; }
.article-page .article-content li:nth-child(2),
.article-page .post-content li:nth-child(2) { animation-delay: 0.2s; }
.article-page .article-content li:nth-child(3),
.article-page .post-content li:nth-child(3) { animation-delay: 0.3s; }
.article-page .article-content li:nth-child(4),
.article-page .post-content li:nth-child(4) { animation-delay: 0.4s; }
.article-page .article-content li:nth-child(5),
.article-page .post-content li:nth-child(5) { animation-delay: 0.5s; }
.article-page .article-content li:nth-child(6),
.article-page .post-content li:nth-child(6) { animation-delay: 0.6s; }
.article-page .article-content li:nth-child(7),
.article-page .post-content li:nth-child(7) { animation-delay: 0.7s; }
.article-page .article-content li:nth-child(8),
.article-page .post-content li:nth-child(8) { animation-delay: 0.8s; }
.article-page .article-content li:nth-child(9),
.article-page .post-content li:nth-child(9) { animation-delay: 0.9s; }
.article-page .article-content li:nth-child(10),
.article-page .post-content li:nth-child(10) { animation-delay: 1s; }


/* Responsive Images */
.article-content img,
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
}

.article-content figure,
.post-content figure {
    max-width: 100%;
    margin: 1.5rem 0;
}

.article-content figcaption,
.post-content figcaption {
    text-align: center;
    font-size: 0.9em;
    color: #666;
    margin-top: 0.5rem;
}

/* DMM Image Gallery */
.dmm-image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.dmm-image-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dmm-image-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.dmm-image-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .dmm-image-gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
    }
}


/* Pagination Styles */

.pagination-nav {
    margin: 40px 0;
    text-align: center;
}

.pagination {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-item {
    margin: 0 2px;
}

.page-item:first-child .page-link {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.page-item:last-child .page-link {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.page-link {
    display: block;
    padding: 8px 12px;
    color: #007bff;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.page-link:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.page-item.active .page-link {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
    cursor: default;
}

.page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.5;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 576px) {
    .pagination {
        font-size: 14px;
    }
    
    .page-link {
        padding: 6px 10px;
    }
}