/* ==========================================
   全体設定 & 変数（上質な夜空とゴールド）
   ========================================== */
:root {
    --deep-night: #0a0a1a;
    --midnight: #12122e;
    --twilight: #1e1e4a;
    --royal-purple: #4a3c8c;
    --soft-purple: #6b5b9a;
    --silver: #c0c0d8;
    --light-silver: #e8e8f4;
    --star-gold: #d4af37;
    --star-white: #f8f8ff;
    --chat-user-bg: rgba(74, 60, 140, 0.4);
    --chat-system-bg: rgba(30, 30, 74, 0.8);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Shippori Mincho', 'Noto Serif JP', serif;
    background: linear-gradient(180deg, var(--deep-night) 0%, var(--midnight) 100%);
    color: var(--light-silver);
    line-height: 1.8;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 星空背景 */
.stars-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.star { position: absolute; background: var(--star-white); border-radius: 50%; animation: starTwinkle 3s ease-in-out infinite; }
@keyframes starTwinkle { 0%, 100% { opacity: 0.2; transform: scale(1); } 50% { opacity: 0.8; transform: scale(1.2); } }

/* ヘッダー */
header {
    position: fixed; top: 0; left: 0; width: 100%; padding: 1.5rem 3rem;
    display: flex; justify-content: space-between; align-items: center; z-index: 100;
    background: linear-gradient(to bottom, rgba(10, 10, 26, 0.95), transparent);
}
.logo { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
.logo-icon { color: var(--star-gold); font-size: 1.5rem; text-shadow: 0 0 15px var(--star-gold); }
.logo-text { font-size: 1.3rem; font-weight: 500; letter-spacing: 0.15em; color: var(--light-silver); }

nav { display: flex; gap: 2rem; }
nav a { color: var(--silver); text-decoration: none; font-size: 0.95rem; letter-spacing: 0.1em; transition: color 0.3s; }
nav a:hover { color: var(--star-gold); }

main { position: relative; z-index: 1; }
section { padding: 8rem 1.5rem; max-width: 1000px; margin: 0 auto; }

/* ==========================================
   ヒーローセクション
   ========================================== */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 100vh; justify-content: center; }
.hero-badge {
    color: var(--star-gold); font-size: 0.9rem; letter-spacing: 0.2em;
    margin-bottom: 2rem; border-bottom: 1px solid var(--star-gold); padding-bottom: 0.5rem;
}
.hero-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 400; letter-spacing: 0.1em; line-height: 1.5; margin-bottom: 2rem; color: var(--star-white); }
.hero-desc { font-size: 1.1rem; color: var(--silver); margin-bottom: 4rem; line-height: 2; max-width: 700px; }

/* 落ち着いたチャットUIデモ */
.chat-container {
    width: 100%; max-width: 600px; margin-bottom: 4rem;
    display: flex; flex-direction: column; gap: 1.5rem; text-align: left;
}
.chat-bubble {
    padding: 1.5rem 2rem; border-radius: 15px; font-size: 0.95rem; line-height: 1.8;
    animation: popIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; opacity: 0; transform: translateY(10px);
}
.chat-user {
    background: var(--chat-user-bg); color: var(--light-silver); border: 1px solid rgba(107, 91, 154, 0.3);
    align-self: flex-end; border-bottom-right-radius: 0; animation-delay: 0.2s; max-width: 85%;
}
.chat-system {
    background: var(--chat-system-bg); color: var(--star-white); border: 1px solid rgba(212, 175, 55, 0.2);
    align-self: flex-start; border-bottom-left-radius: 0; animation-delay: 1.5s; max-width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.chat-system.typing { animation-delay: 0.8s; width: 100px; text-align: center; padding: 1rem; }

@keyframes popIn { to { opacity: 1; transform: translateY(0); } }

.typing-indicator { display: flex; justify-content: center; gap: 5px; }
.typing-indicator span { width: 6px; height: 6px; background: var(--star-gold); border-radius: 50%; animation: pulse 1.5s infinite; opacity: 0.3; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } }

.system-name { font-size: 0.8rem; color: var(--star-gold); margin-bottom: 0.5rem; letter-spacing: 0.1em; display: block; }

/* CTAボタン */
.cta-btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--royal-purple), var(--twilight));
    color: var(--star-white); text-decoration: none; padding: 1.2rem 3.5rem;
    border: 1px solid var(--star-gold); border-radius: 5px;
    font-size: 1.1rem; letter-spacing: 0.15em; transition: all 0.4s ease;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}
.cta-btn:hover { background: rgba(212, 175, 55, 0.1); box-shadow: 0 0 30px rgba(212, 175, 55, 0.3); transform: translateY(-3px); }

/* ==========================================
   カテゴリ（読み解ける因縁）
   ========================================== */
.section-header { text-align: center; margin-bottom: 4rem; }
.section-title { font-size: 2rem; font-weight: 400; letter-spacing: 0.15em; color: var(--star-white); margin-bottom: 1rem; }
.section-divider { width: 40px; height: 1px; background: var(--star-gold); margin: 0 auto; opacity: 0.5; }

.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.cat-card {
    background: rgba(30, 30, 74, 0.3); border: 1px solid rgba(107, 91, 154, 0.2);
    border-radius: 10px; padding: 3rem 2rem; text-align: center; transition: all 0.4s ease;
}
.cat-card:hover { transform: translateY(-5px); border-color: var(--star-gold); background: rgba(30, 30, 74, 0.6); }
.cat-icon { font-size: 2rem; margin-bottom: 1.5rem; color: var(--star-gold); }
.cat-title { font-size: 1.2rem; font-weight: 500; margin-bottom: 1rem; color: var(--light-silver); letter-spacing: 0.1em; }
.cat-desc { font-size: 0.95rem; color: var(--silver); line-height: 1.8; text-align: left; }

/* ==========================================
   安全の誓い（アジールの掟）
   ========================================== */
.safety-box {
    background: linear-gradient(145deg, rgba(18, 18, 46, 0.8), rgba(10, 10, 26, 0.9));
    border: 1px solid rgba(212, 175, 55, 0.3); border-radius: 5px; padding: 4rem 3rem;
    margin-top: 2rem; position: relative;
}
.safety-box::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, transparent, var(--star-gold), transparent);
}

.safety-intro { text-align: center; margin-bottom: 3rem; font-size: 1.05rem; color: var(--silver); line-height: 2; }

.safety-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; }
.safety-item { text-align: left; }
.safety-num { color: var(--star-gold); font-size: 0.9rem; letter-spacing: 0.2em; margin-bottom: 0.5rem; display: block; }
.safety-text h4 { font-size: 1.15rem; margin-bottom: 1rem; color: var(--star-white); letter-spacing: 0.05em; font-weight: 500; }
.safety-text p { font-size: 0.95rem; color: var(--silver); line-height: 1.8; }

/* ==========================================
   フッター
   ========================================== */
footer { 
    text-align: center; 
    padding: 4rem 2rem; 
    border-top: 1px solid rgba(107, 91, 154, 0.2); 
    margin-top: 4rem; 
    background: var(--deep-night); /* ← 途切れていた部分を補完 */
}
.footer-logo {
    color: var(--star-gold);
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}
.footer-copyright {
    color: var(--silver);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}


/* ==========================================
   料金体系（アジールの入場規定）
   ========================================== */
#pricing {
    margin-top: 2rem;
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    align-items: stretch;
}
.pricing-card {
    background: rgba(30, 30, 74, 0.4);
    border: 1px solid rgba(107, 91, 154, 0.3);
    border-radius: 10px;
    padding: 2.5rem 2rem;
    position: relative;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}
.pricing-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(30, 30, 74, 0.7);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* 中央の推奨プランを少し目立たせる */
.pricing-card.popular {
    border-color: rgba(212, 175, 55, 0.6);
    background: rgba(30, 30, 74, 0.6);
    transform: scale(1.02);
}
.pricing-card.popular:hover {
    transform: scale(1.02) translateY(-5px);
}
.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--star-gold), #b8962e);
    color: var(--deep-night);
    padding: 0.3rem 1.5rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* VIPプラン（遁甲）の装飾 */
.pricing-card.vip {
    border: 1px solid rgba(212, 175, 55, 0.2);
    background: linear-gradient(180deg, rgba(30, 30, 74, 0.4) 0%, rgba(20, 20, 50, 0.8) 100%);
}

.plan-name {
    font-size: 1.4rem;
    color: var(--star-white);
    letter-spacing: 0.1em;
    text-align: center;
    margin-bottom: 0.5rem;
}
.plan-target {
    font-size: 0.85rem;
    color: var(--silver);
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
}
.plan-price {
    font-size: 2.5rem;
    color: var(--star-gold);
    text-align: center;
    margin-bottom: 2rem;
    font-family: 'Noto Serif JP', serif;
}
.price-period {
    font-size: 1rem;
    color: var(--silver);
}

.plan-features {
    list-style: none;
    margin-bottom: 2rem;
    flex-grow: 1;
}
.plan-features li {
    font-size: 0.95rem;
    color: var(--light-silver);
    padding: 1rem 0;
    border-bottom: 1px dashed rgba(107, 91, 154, 0.4);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.plan-features li span {
    color: var(--silver);
    font-size: 0.85rem;
}
.plan-features li b {
    color: var(--star-gold);
    font-weight: 500;
}

.plan-desc {
    font-size: 0.85rem;
    color: var(--silver);
    line-height: 1.8;
    background: rgba(10, 10, 26, 0.5);
    padding: 1rem;
    border-radius: 5px;
}

/* 回数消費に関する注釈 */
.pricing-notes {
    margin-top: 4rem;
    background: rgba(10, 10, 26, 0.6);
    border-left: 3px solid var(--star-gold);
    padding: 2rem;
    border-radius: 0 5px 5px 0;
}
.pricing-notes h4 {
    color: var(--star-gold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
}
.pricing-notes p {
    color: var(--silver);
    font-size: 0.95rem;
    line-height: 1.8;
}
.pricing-notes b {
    color: var(--star-white);
    font-weight: 500;
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    .pricing-card.popular {
        transform: none;
    }
    .pricing-card.popular:hover {
        transform: translateY(-5px);
    }
}