: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;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Shippori Mincho', 'Noto Serif JP', serif;
    background: var(--deep-night);
    color: var(--light-silver);
    line-height: 1.8;
    overflow-x: hidden;
}

/* ローディングアニメーション */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--deep-night);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-constellation {
    width: 120px;
    height: 120px;
    position: relative;
}

.loader-star {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--star-white);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--star-white), 0 0 40px var(--soft-purple);
    animation: twinkle 1.5s ease-in-out infinite;
}

.loader-star:nth-child(1) { top: 10%; left: 50%; animation-delay: 0s; }
.loader-star:nth-child(2) { top: 30%; left: 20%; animation-delay: 0.2s; }
.loader-star:nth-child(3) { top: 30%; left: 80%; animation-delay: 0.4s; }
.loader-star:nth-child(4) { top: 60%; left: 10%; animation-delay: 0.6s; }
.loader-star:nth-child(5) { top: 60%; left: 90%; animation-delay: 0.8s; }
.loader-star:nth-child(6) { top: 85%; left: 35%; animation-delay: 1s; }
.loader-star:nth-child(7) { top: 85%; left: 65%; animation-delay: 1.2s; }

.loader-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--silver), transparent);
    height: 1px;
    animation: drawLine 2s ease-in-out infinite;
}

.loader-line:nth-child(8) { top: 18%; left: 30%; width: 40%; transform: rotate(25deg); animation-delay: 0.1s; }
.loader-line:nth-child(9) { top: 18%; left: 50%; width: 30%; transform: rotate(-25deg); animation-delay: 0.3s; }
.loader-line:nth-child(10) { top: 45%; left: 15%; width: 35%; transform: rotate(60deg); animation-delay: 0.5s; }
.loader-line:nth-child(11) { top: 45%; left: 55%; width: 35%; transform: rotate(-60deg); animation-delay: 0.7s; }
.loader-line:nth-child(12) { top: 72%; left: 22%; width: 25%; transform: rotate(-30deg); animation-delay: 0.9s; }
.loader-line:nth-child(13) { top: 72%; left: 55%; width: 25%; transform: rotate(30deg); animation-delay: 1.1s; }

@keyframes twinkle {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.4); opacity: 1; }
}

@keyframes drawLine {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.8; }
}

.loader-text {
    margin-top: 40px;
    font-size: 1.1rem;
    letter-spacing: 0.3em;
    color: var(--silver);
    animation: fadeText 2s ease-in-out infinite;
}

@keyframes fadeText {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* 星空背景 */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star {
    position: absolute;
    background: var(--star-white);
    border-radius: 50%;
    animation: starTwinkle 3s ease-in-out infinite;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; 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);
    transition: background 0.3s ease;
}

header.scrolled {
    background: rgba(10, 10, 26, 0.98);
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo-icon {
    width: 45px;
    height: 45px;
    position: relative;
}

.logo-icon::before {
    content: '✦';
    font-size: 2.5rem;
    color: var(--star-gold);
    text-shadow: 0 0 20px var(--star-gold);
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { text-shadow: 0 0 20px var(--star-gold); }
    50% { text-shadow: 0 0 40px var(--star-gold), 0 0 60px var(--soft-purple); }
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    background: linear-gradient(135deg, var(--light-silver), var(--star-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-mascot {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--soft-purple);
    box-shadow: 0 0 15px rgba(107, 91, 154, 0.4);
    margin-left: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-mascot:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(107, 91, 154, 0.6);
}

.mascot-container {
    position: relative;
    display: flex;
    align-items: center;
}

.mascot-tooltip {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, rgba(30, 30, 74, 0.95), rgba(18, 18, 46, 0.98));
    border: 1px solid var(--soft-purple);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.mascot-tooltip::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--soft-purple);
}

.mascot-container:hover .mascot-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
}

.tooltip-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--star-gold);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.tooltip-message {
    display: block;
    font-size: 0.9rem;
    color: var(--light-silver);
    line-height: 1.6;
}

nav {
    display: flex;
    gap: 2.5rem;
}

nav a {
    color: var(--silver);
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--star-gold);
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--star-white);
}

nav a:hover::after {
    width: 100%;
}

/* メインコンテンツ */
main {
    position: relative;
    z-index: 1;
}

/* ヒーローセクション */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(74, 60, 140, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: heroGlow 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.hero-content {
    max-width: 900px;
    animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: 1rem;
    letter-spacing: 0.4em;
    color: var(--soft-purple);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1.2s ease-out 0.2s backwards;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 400;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--star-white), var(--silver), var(--star-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1.2s ease-out 0.4s backwards;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--silver);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 2;
    animation: fadeInUp 1.2s ease-out 0.6s backwards;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--soft-purple);
    border-radius: 30px;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    color: var(--soft-purple);
    margin-bottom: 3rem;
    animation: fadeInUp 1.2s ease-out 0.8s backwards;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 3rem;
    background: linear-gradient(135deg, var(--royal-purple), var(--soft-purple));
    color: var(--star-white);
    text-decoration: none;
    font-size: 1.05rem;
    letter-spacing: 0.15em;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 10px 40px rgba(74, 60, 140, 0.4);
    animation: fadeInUp 1.2s ease-out 1s backwards;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(74, 60, 140, 0.6);
}

.cta-button::after {
    content: '→';
    transition: transform 0.3s ease;
}

.cta-button:hover::after {
    transform: translateX(5px);
}

/* スクロールインジケーター */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    animation: fadeInUp 1.2s ease-out 1.2s backwards;
}

.scroll-indicator span {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--silver);
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--silver), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: scaleY(1); opacity: 0.5; }
    50% { transform: scaleY(1.2); opacity: 1; }
}

/* セクション共通 */
section {
    padding: 8rem 2rem;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-label {
    font-size: 0.85rem;
    letter-spacing: 0.4em;
    color: var(--soft-purple);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--star-white);
}

.section-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--star-gold), transparent);
    margin: 2rem auto;
}

/* コンセプトセクション */
.concept {
    background: linear-gradient(180deg, var(--deep-night) 0%, var(--midnight) 50%, var(--deep-night) 100%);
}

.concept-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.concept-text {
    font-size: 1.2rem;
    line-height: 2.2;
    color: var(--silver);
    margin-bottom: 2rem;
}

.concept-text strong {
    color: var(--star-gold);
    font-weight: 500;
}

/* ストーリーへの導線ボタン */
.story-link-container {
    margin-top: 3rem;
    text-align: center;
}

.story-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--star-gold);
    color: var(--star-gold);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    letter-spacing: 0.1em;
    font-size: 0.95rem;
}

.story-button:hover {
    background: var(--star-gold);
    color: var(--deep-night);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.concept-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.concept-link {
    color: var(--soft-purple);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.concept-link:hover {
    color: var(--star-gold);
    border-bottom-color: var(--star-gold);
}

/* サブセクション */
.concept-subsection {
    max-width: 900px;
    margin: 4rem auto 0;
    text-align: center;
}

.subsection-title {
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--star-gold);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.subsection-title::before,
.subsection-title::after {
    content: '✦';
    font-size: 0.8rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--soft-purple);
}

.subsection-title::before {
    left: -2rem;
}

.subsection-title::after {
    right: -2rem;
}

/* プロフィールセクション */
.profile-section {
    max-width: 900px;
    margin: 5rem auto 0;
    text-align: center;
}

.profile-card {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    margin-top: 2rem;
    padding: 2.5rem;
    background: linear-gradient(145deg, rgba(30, 30, 74, 0.3), rgba(18, 18, 46, 0.5));
    border: 1px solid rgba(107, 91, 154, 0.2);
    border-radius: 20px;
    text-align: left;
}

.profile-image {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--soft-purple);
    box-shadow: 0 0 30px rgba(107, 91, 154, 0.3);
    background: var(--star-white);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-content {
    flex: 1;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--star-white);
    margin-bottom: 0.3rem;
}

.profile-reading {
    font-size: 1rem;
    color: var(--silver);
    margin-left: 0.5rem;
}

.profile-realname {
    font-size: 0.9rem;
    color: var(--soft-purple);
    margin-bottom: 1.2rem;
    letter-spacing: 0.1em;
}

.profile-text {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--silver);
    margin-bottom: 1rem;
}

.profile-text:last-child {
    margin-bottom: 0;
}

/* 機能セクション */
.features {
    background: var(--deep-night);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: linear-gradient(145deg, rgba(30, 30, 74, 0.4), rgba(18, 18, 46, 0.6));
    border: 1px solid rgba(107, 91, 154, 0.2);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--star-gold), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(107, 91, 154, 0.4);
    box-shadow: 0 20px 60px rgba(74, 60, 140, 0.2);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-number {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--soft-purple);
    margin-bottom: 1.5rem;
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--star-gold);
    position: relative;
}

.feature-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    animation: iconGlow 3s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--star-white);
    margin-bottom: 1rem;
}

.feature-description {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--silver);
}

/* CTAセクション */
.cta-section {
    background: linear-gradient(180deg, var(--deep-night), var(--twilight), var(--deep-night));
    text-align: center;
    padding: 10rem 2rem;
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(74, 60, 140, 0.2) 0%, transparent 60%);
    transform: translate(-50%, -50%);
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--star-white);
    margin-bottom: 1.5rem;
}

.cta-description {
    font-size: 1.05rem;
    color: var(--silver);
    margin-bottom: 3rem;
    line-height: 1.9;
}

.cta-note {
    font-size: 0.85rem;
    color: var(--soft-purple);
    margin-top: 1.5rem;
    letter-spacing: 0.1em;
}

/* フッター */
footer {
    background: rgba(10, 10, 26, 0.95);
    padding: 4rem 2rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(107, 91, 154, 0.1);
}

.footer-logo {
    font-size: 1.3rem;
    letter-spacing: 0.2em;
    color: var(--star-white);
    margin-bottom: 1rem;
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--silver);
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--silver);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--star-gold);
}

.footer-copyright {
    font-size: 0.8rem;
    color: var(--soft-purple);
    letter-spacing: 0.1em;
}

/* アニメーション用クラス */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* レスポンシブ */
@media (max-width: 768px) {
    header {
        padding: 1rem 1.5rem;
    }

    nav {
        display: none;
    }

    .hero {
        padding: 6rem 1.5rem 4rem;
    }

    .concept-links {
        flex-direction: column;
        gap: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding: 2rem 1.5rem;
    }

    section {
        padding: 5rem 1.5rem;
    }

    .profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
        padding: 2rem 1.5rem;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .subsection-title::before,
    .subsection-title::after {
        display: none;
    }
}