:root {
    --primary-color: #0ea5e9; /* Sky Blue */
    --primary-hover: #0284c7;
    --text-color: #334155;
    --text-light: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.6);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f1f5f9; /* Fallback */
    overflow-x: hidden;
}

/* --- 背景（生画像をエモくする魔法） --- */
.dynamic-bg {
    position: fixed;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* 生画像の荒さやリアルさを消し、幻想的な風景に変える魔法 */
    filter: blur(8px) brightness(0.9) contrast(1.1);
    z-index: -1;
    transition: background-image 1s ease-in-out;
}

/* --- レイアウト --- */
.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ユーザーの要望通り、画面の7割幅を基準にする */
.container {
    width: 70%;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .container { width: 85%; }
}

@media (max-width: 768px) {
    .container { width: 95%; }
}

/* --- Glassmorphism (すりガラス) --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

/* --- ヘッダー & フッター --- */
.glass-header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.glass-footer {
    margin-top: auto;
    padding: 2rem 0;
    text-align: center;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* --- メインコンテンツ --- */
.main-content {
    flex: 1;
    padding: 3rem 0;
}

.page-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

/* --- 記事一覧 (index) --- */
.post-grid {
    display: grid;
    gap: 1.5rem;
}

.post-card {
    padding: 1.5rem;
    margin-bottom: 0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(14, 165, 233, 0.15); /* スカイブルーの影 */
    border-color: rgba(14, 165, 233, 0.3);
}

.post-card .post-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.post-card .post-title a {
    color: var(--text-color);
    text-decoration: none;
}

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

.post-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* --- 記事詳細 (post) --- */
.single-post .post-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.single-post .post-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.markdown-content h1, 
.markdown-content h2, 
.markdown-content h3 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.markdown-content h2 {
    border-bottom: 2px solid rgba(14, 165, 233, 0.2);
    padding-bottom: 0.5rem;
}

.markdown-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.markdown-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.post-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    text-align: center;
}

.back-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 99px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.back-link:hover {
    background: var(--primary-hover);
}
