/* ===== 空也999の数秘術 ダーク・神秘テーマ ===== */

:root {
    --bg: #0a0a12;
    --bg-surface: #12121e;
    --accent: #9b6dff;
    --accent-light: #b48eff;
    --accent-pale: rgba(155,109,255,0.15);
    --accent-dark: #7a4de0;
    --gold: #d4a843;
    --gold-pale: rgba(212,168,67,0.15);
    --text: #e2dff0;
    --text-sub: #9a96b0;
    --white: #fff;
    --card-bg: rgba(18,18,30,0.82);
    --card-border: rgba(155,109,255,0.12);
    --karma: #e07a4a;
    --master: #b48eff;
    --glow: rgba(155,109,255,0.25);
}

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

body {
    font-family: 'Noto Serif JP', 'Zen Maru Gothic', serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    font-size: 27.8px;
}

.page-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(155,109,255,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(212,168,67,0.06) 0%, transparent 60%),
        var(--bg);
}

/* ===== NAV ===== */
nav {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 100;
    padding: 14px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10,10,18,0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--card-border);
}

.nav-logo {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent-light);
    letter-spacing: 0.12em;
    font-family: 'Noto Serif JP', serif;
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.nav-links a {
    color: var(--text-sub);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--accent-light); }

/* ハンバーガーボタン（PC非表示） */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 110;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--accent-light);
    margin: 5px 0;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== HERO = CALCULATOR ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 20px 40px;
}

.hero-character {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    margin-bottom: 16px;
    border: 2px solid rgba(155,109,255,0.3);
    box-shadow: 0 0 40px rgba(155,109,255,0.2), 0 0 80px rgba(155,109,255,0.08);
    animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 40px rgba(155,109,255,0.2), 0 0 80px rgba(155,109,255,0.08); }
    50% { box-shadow: 0 0 50px rgba(155,109,255,0.3), 0 0 100px rgba(155,109,255,0.12); }
}

.hero h1 {
    font-size: 1.7rem;
    font-weight: 500;
    color: var(--accent-light);
    letter-spacing: 0.18em;
    margin-bottom: 4px;
    text-shadow: 0 0 30px rgba(155,109,255,0.3);
}

.hero-sub {
    font-size: 0.95rem;
    color: var(--text-sub);
    margin-bottom: 20px;
    letter-spacing: 0.15em;
}

/* ===== CALC CARD ===== */
.calc-card {
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    border-radius: 28px;
    padding: 36px 32px;
    border: 1px solid var(--card-border);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 60px rgba(155,109,255,0.05);
    width: 100%;
    max-width: 520px;
}

.calc-card h2 {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 20px;
    letter-spacing: 0.08em;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.input-label {
    font-size: 0.88rem;
    color: var(--text-sub);
    text-align: left;
    margin-bottom: 4px;
    padding-left: 4px;
}

.name-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: flex-start;
}

.name-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.name-field input {
    width: 100%;
}

.input-note {
    font-size: 0.82rem;
    color: var(--karma);
    text-align: left;
    padding-left: 4px;
    margin-top: -4px;
}

.date-inputs {
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
}

.date-inputs span {
    color: var(--text-sub);
    font-size: 1rem;
    font-weight: 500;
}

input[type="number"], input[type="text"] {
    padding: 12px 14px;
    border: 1px solid rgba(155,109,255,0.2);
    border-radius: 14px;
    font-size: 1rem;
    text-align: center;
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-family: 'Noto Serif JP', serif;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(155,109,255,0.15);
}

input::placeholder { color: rgba(154,150,176,0.5); }

.year-input, .month-day-input { width: 110px; }

.btn {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--white);
    border: none;
    padding: 14px 48px;
    font-size: 1.05rem;
    font-weight: 500;
    font-family: 'Noto Serif JP', serif;
    border-radius: 50px;
    cursor: pointer;
    letter-spacing: 0.12em;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(155,109,255,0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(155,109,255,0.45);
}

.btn:active { transform: translateY(0); }

/* ===== RESULT ===== */
#result {
    display: none;
    margin-top: 32px;
    animation: fadeIn 0.7s ease-out forwards;
}

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

.result-row {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.result-card {
    flex: 1;
    max-width: 160px;
    background: rgba(155,109,255,0.06);
    border-radius: 20px;
    padding: 20px 12px 16px;
    border: 1px solid var(--card-border);
    text-align: center;
}

.result-card-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.result-card .num {
    font-size: 1.9rem;
    font-weight: 500;
    color: var(--gold);
    line-height: 1.2;
    white-space: nowrap;
    text-shadow: 0 0 20px rgba(212,168,67,0.3);
}

.result-card .num-slash {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.5;
}

.result-card .num.is-master {
    color: var(--master);
}

.result-card .num.is-karma {
    color: var(--karma);
}

.result-card .keyword {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-sub);
    margin-top: 4px;
}

/* Badge for Master / Karma */
.badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
    letter-spacing: 0.04em;
}

.badge-master {
    background: rgba(180,142,255,0.15);
    color: var(--master);
}

.badge-karma {
    background: rgba(224,122,74,0.15);
    color: var(--karma);
}

/* Result description */
.result-desc {
    margin-top: 24px;
    font-size: 0.95rem;
    color: var(--text-sub);
    line-height: 1.8;
    text-align: left;
    padding: 16px 20px;
    background: rgba(155,109,255,0.04);
    border-radius: 16px;
    border: 1px solid var(--card-border);
}

.result-desc h4 {
    font-size: 0.95rem;
    color: var(--accent-light);
    margin-bottom: 6px;
}

.result-desc p {
    margin-bottom: 12px;
}

.result-desc p:last-child {
    margin-bottom: 0;
}

.result-cta {
    margin-top: 24px;
    padding: 20px;
    background: var(--accent-pale);
    border-radius: 12px;
    text-align: center;
}
.result-cta p {
    margin-bottom: 12px;
    font-weight: 500;
    color: var(--text);
}
.result-cta .btn-outline {
    display: inline-block;
    margin-top: 0;
}

/* ===== SECTION COMMON ===== */
.section-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 24px;
    text-align: center;
}

.section-label {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 12px;
    font-weight: 500;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--accent-light);
    letter-spacing: 0.12em;
    margin-bottom: 32px;
}

.divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 2px;
    margin: 0 auto;
}

/* ===== NOTE導線 ===== */
.note-intro {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 28px;
    line-height: 1.8;
}

.note-cards {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.note-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    padding: 32px 24px;
    border-radius: 24px;
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    max-width: 220px;
    width: 100%;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(155,109,255,0.15);
    border-color: rgba(155,109,255,0.25);
}

.note-card-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.note-card-img {
    width: 100%;
    border-radius: 14px;
    margin-bottom: 12px;
}

.note-card h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent-light);
    margin-bottom: 10px;
}

.note-card p {
    font-size: 0.92rem;
    color: var(--text-sub);
    line-height: 1.7;
}

/* ===== SNS LINKS ===== */
.sns-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.sns-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid var(--accent);
    background: rgba(155,109,255,0.18);
    color: var(--white);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: all 0.3s;
}

.sns-link:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
}

.sns-note {
    margin-top: 20px;
    font-size: 0.82rem;
    color: var(--text-sub);
    letter-spacing: 0.04em;
}

.sns-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ===== PROFILE ===== */
.profile-icon {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 2px solid rgba(155,109,255,0.3);
    margin-bottom: 24px;
    object-fit: cover;
    background: var(--bg-surface);
    box-shadow: 0 0 40px rgba(155,109,255,0.15);
}

.profile-text {
    max-width: 520px;
    margin: 0 auto;
    line-height: 2.2;
    text-align: center;
    font-size: 1rem;
    color: var(--text-sub);
}

.note-link { margin-top: 36px; }

.note-link p {
    font-size: 0.78rem;
    color: var(--text-sub);
    margin-bottom: 14px;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(155,109,255,0.3);
    padding: 12px 36px;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Noto Serif JP', serif;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(155,109,255,0.3);
}

/* ===== GALLERY ===== */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 720px;
    margin: 0 auto;
}

.gallery-item {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--card-border);
}

.gallery-item-wide {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: brightness(0.85) saturate(0.9);
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(1) saturate(1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(10,10,18,0.4) 100%);
    pointer-events: none;
}

.rainbow-section { position: relative; overflow: hidden; }

footer {
    padding: 48px 24px;
    text-align: center;
    border-top: 1px solid var(--card-border);
}

footer small {
    color: var(--text-sub);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
}

.footer-links {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer-links a {
    color: var(--text-sub);
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-light);
}

.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    /* ハンバーガー表示 */
    .hamburger { display: block; }

    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0; right: 0;
        width: 200px;
        height: 100vh;
        background: rgba(10,10,18,0.97);
        backdrop-filter: blur(16px);
        padding: 80px 28px 40px;
        gap: 0;
        box-shadow: -4px 0 20px rgba(0,0,0,0.3);
    }
    .nav-links.open { display: flex; }
    .nav-links li { border-bottom: 1px solid rgba(155,109,255,0.1); }
    .nav-links a {
        font-size: 0.9rem;
        display: block;
        padding: 14px 0;
    }

    /* オーバーレイ */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 99;
    }
    .nav-overlay.open { display: block; }

    nav { padding: 12px 16px; }
    .hero { padding: 72px 16px 28px; }
    .hero h1 { font-size: 1.15rem; }
    .hero-character { width: 120px; height: 120px; }
    .calc-card { padding: 28px 20px; border-radius: 22px; }
    .name-inputs { gap: 8px; }
    .name-field .input-label { font-size: 0.65rem; }
    .year-input, .month-day-input { width: 80px; }
    .note-cards { flex-direction: column; align-items: center; gap: 14px; }
    .note-card { max-width: 280px; padding: 24px 20px; }
    .result-row { gap: 8px; }
    .result-card { padding: 14px 8px 12px; border-radius: 16px; }
    .result-card .num { font-size: 1.5rem; }
    .result-card-label { font-size: 0.6rem; }
    .section-wrap { padding: 60px 16px; }
    .sns-links { gap: 10px; }
    .sns-link { padding: 8px 14px; font-size: 0.78rem; }
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .gallery-item { border-radius: 12px; }
    .gallery-item-wide { grid-column: span 2; }
    .profile-icon { width: 110px; height: 110px; }
}
