/* ベースリセットとタイポグラフィ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* カスタムプロパティ（テーマカラー） */
:root {
    --primary-color: #39c5bb;
    --secondary-color: #ff6b9d;
    --accent-color: #ffd93d;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --miku-cyan: #39c5bb;
    --miku-pink: #ff69b4;
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ナビゲーション */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(57, 197, 187, 0.2);
    z-index: 1000;
    transition: var(--transition);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--miku-cyan);
}

.nav-logo i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--miku-cyan);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--miku-cyan);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* ハンバーガーメニュー */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* ヒーローセクション */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--miku-cyan) 0%, var(--miku-pink) 100%);
    z-index: -2;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.3)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.5)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.4)"/></svg>');
    animation: float 6s ease-in-out infinite;
}

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

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-image {
    text-align: center;
}

.miku-image {
    width: 400px;
    height: 600px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
}

.miku-image:hover {
    transform: scale(1.05) rotate(2deg);
}

.hero-text {
    color: var(--text-light);
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.title-line {
    display: block;
    background: linear-gradient(45deg, var(--accent-color), var(--text-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-subtitle {
    display: block;
    font-size: 2rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

.hero-description {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    background: linear-gradient(45deg, var(--accent-color), var(--miku-pink));
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-light);
}

.scroll-arrow {
    width: 2px;
    height: 30px;
    background: var(--text-light);
    margin: 0 auto;
    animation: bounce 2s infinite;
}

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

/* セクション共通スタイル */
section {
    padding: 5rem 0;
}

/* 基本的な可視性を確保（JavaScript無効時のフォールバック） */
.section-title,
.about-card,
.stat-item,
.fact-card,
.gallery-grid a,
.tech-item,
.timeline-item,
.resource-card,
.cta-button,
.hero-title,
.hero-description {
    opacity: 1 !important;
    visibility: visible !important;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-dark) !important;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, var(--miku-cyan), var(--miku-pink));
    border-radius: 2px;
}

/* Aboutセクション */
.about {
    background: var(--light-color);
    color: var(--text-dark);
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.about-card h3 {
    color: var(--miku-cyan);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.miku-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-item {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-3px);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--miku-cyan);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-dark);
    opacity: 0.7;
}

/* Factsセクション */
.facts {
    background: white;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.fact-card {
    background: linear-gradient(135deg, var(--miku-cyan), var(--miku-pink));
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.fact-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: var(--transition);
    opacity: 0;
}

.fact-card:hover::before {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

.fact-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.fact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.fact-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* ギャラリーセクション */
.gallery {
    background: var(--light-color);
    color: var(--text-dark);
}

.gallery .section-title {
    color: var(--text-dark) !important;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-grid a {
    display: block;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-grid a:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.gallery-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-grid a:hover img {
    transform: scale(1.1);
}

/* テクノロジーセクション */
.technology {
    background: white;
    color: var(--text-dark);
}

.technology .section-title {
    color: var(--text-dark) !important;
}

.tech-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.tech-item {
    text-align: center;
    padding: 2rem;
}

.tech-icon {
    font-size: 4rem;
    color: var(--miku-cyan);
    margin-bottom: 1.5rem;
}

.tech-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.tech-item p {
    line-height: 1.8;
    opacity: 0.8;
}

/* タイムライン */
.timeline {
    background: var(--light-color);
    color: var(--text-dark);
}

.timeline .section-title {
    color: var(--text-dark) !important;
}

.timeline-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--miku-cyan), var(--miku-pink));
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-date {
    background: linear-gradient(45deg, var(--miku-cyan), var(--miku-pink));
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 2rem;
    min-width: 100px;
    text-align: center;
    box-shadow: var(--shadow);
}

.timeline-content-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    flex: 1;
    transition: var(--transition);
}

.timeline-content-item:hover {
    transform: translateY(-5px);
}

.timeline-content-item h3 {
    color: var(--miku-cyan);
    margin-bottom: 1rem;
}

/* リソースセクション */
.resources {
    background: white;
    color: var(--text-dark);
}

.resources .section-title {
    color: var(--text-dark) !important;
}

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

.resource-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
    display: block;
}

.resource-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.resource-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.resource-card h3 {
    margin-bottom: 0.5rem;
}

.resource-card p {
    opacity: 0.8;
}

/* フッター */
.footer {
    background: var(--dark-color);
    color: var(--text-light);
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--miku-cyan);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 3rem;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .miku-image {
        width: 300px;
        height: 450px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .miku-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .facts-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .timeline-content::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        margin-left: 40px;
    }
    
    .timeline-date {
        margin: 0 1rem 0 0;
        min-width: 80px;
        font-size: 1rem;
        padding: 0.8rem 1rem;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 1rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .miku-image {
        width: 250px;
        height: 375px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .miku-stats {
        grid-template-columns: 1fr;
    }
}

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

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

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ロード時のアニメーション */
.hero-image {
    animation: heroImageFloat 3s ease-in-out infinite alternate;
}

@keyframes heroImageFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-10px); }
}

/* ホバーエフェクト強化 */
.about-card:hover,
.fact-card:hover,
.timeline-content-item:hover {
    box-shadow: 0 25px 50px rgba(57, 197, 187, 0.3);
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--miku-cyan), var(--miku-pink));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--miku-pink), var(--miku-cyan));
}