/* カスタムスタイル */
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    overflow-x: hidden; /* 横スクロールを防止 */
    padding-top: 64px; /* 固定ヘッダー分の余白 */
    font-size: 1.1rem; /* 全体の文字サイズを少し大きくする */
}

/* デスクトップ表示用のズーム設定（スマホ表示には影響しません） */
@media (min-width: 1024px) {
    body {
        zoom: 1.9;
    }
}

/* カラフルな背景 */
.colorful-bg {
    background: linear-gradient(135deg, #e73c7e, #23a6d5, #ee7752);
}

/* フローティングシェイプのアニメーションコンテナ */
.shapes-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

/* フローティングシェイプの基本スタイル */
.shape {
    position: absolute;
    display: block;
    list-style: none;
    animation: float 25s linear infinite;
    bottom: -200px;
    border-radius: 50%;
}

.colorful-bg .shape { background: rgba(255, 255, 255, 0.15); }
.light-bg-section .shape { background: rgba(236, 72, 153, 0.1); }
.light-bg-section .shape:nth-child(2n) { background: rgba(59, 130, 246, 0.1); }
.light-bg-section .shape:nth-child(3n) { background: rgba(238, 119, 82, 0.15); }
.light-bg-section .shape:nth-child(4n) { background: rgba(35, 166, 213, 0.1); }

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-120vh) rotate(720deg); opacity: 0; }
}

.shape.s1 { width: 20px; height: 20px; left: 10%; animation-duration: 28s; animation-delay: 1s; }
.shape.s2 { width: 80px; height: 80px; left: 20%; animation-duration: 25s; animation-delay: 0s; }
.shape.s3 { width: 50px; height: 50px; left: 35%; animation-duration: 32s; animation-delay: 3s; }
.shape.s4 { width: 30px; height: 30px; left: 50%; animation-duration: 26s; animation-delay: 5s; }
.shape.s5 { width: 100px; height: 100px; left: 65%; animation-duration: 22s; animation-delay: 2s; }
.shape.s6 { width: 40px; height: 40px; left: 80%; animation-duration: 35s; animation-delay: 6s; }
.shape.s7 { width: 60px; height: 60px; left: 90%; animation-duration: 29s; animation-delay: 4s; }
.shape.s8 { width: 25px; height: 25px; left: 5%; animation-duration: 24s; animation-delay: 8s; }
.shape.s9 { width: 45px; height: 45px; left: 55%; animation-duration: 31s; animation-delay: 7s; }
.shape.s10 { width: 70px; height: 70px; left: 75%; animation-duration: 27s; animation-delay: 9s; }

/* 汎用フェードイン（下から） */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ズームインアニメーション */
.zoom-in {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}
.zoom-in.in-view {
    opacity: 1;
    transform: scale(1);
}

/* カードがポップアップするアニメーション */
.popup-card {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.problem-cards.in-view .popup-card {
    opacity: 1;
    transform: scale(1);
}
.problem-cards.in-view .popup-card:nth-child(1) { transition-delay: 0.2s; }
.problem-cards.in-view .popup-card:nth-child(2) { transition-delay: 0.3s; }
.problem-cards.in-view .popup-card:nth-child(3) { transition-delay: 0.4s; }
.problem-cards.in-view .popup-card:nth-child(4) { transition-delay: 0.5s; }

/* グラフが伸びるアニメーション */
.graph-bar {
    height: 0;
    transition: height 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}
.comparison-graph.in-view .graph-bar {
    height: var(--bar-height);
}

/* コミコミ項目が左からスライドイン */
.included-item {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.included-items.in-view .included-item {
    opacity: 1;
    transform: translateX(0);
}
.included-items.in-view .included-item:nth-child(1) { transition-delay: 0.1s; }
.included-items.in-view .included-item:nth-child(2) { transition-delay: 0.2s; }
.included-items.in-view .included-item:nth-child(3) { transition-delay: 0.3s; }
.included-items.in-view .included-item:nth-child(4) { transition-delay: 0.4s; }
.included-items.in-view .included-item:nth-child(5) { transition-delay: 0.5s; }
.included-items.in-view .included-item:nth-child(6) { transition-delay: 0.6s; }

/* 車種紹介ギャラリーのカードに適用 */
.car-gallery-item {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.car-gallery.in-view .car-gallery-item {
    opacity: 1;
    transform: scale(1) translateY(0);
}
.car-gallery.in-view .car-gallery-item:nth-child(1) { transition-delay: 0.1s; }
.car-gallery.in-view .car-gallery-item:nth-child(2) { transition-delay: 0.2s; }
.car-gallery.in-view .car-gallery-item:nth-child(3) { transition-delay: 0.3s; }
.car-gallery.in-view .car-gallery-item:nth-child(4) { transition-delay: 0.4s; }

/* ボタンのホバーエフェクト */
.cta-button {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

#back-to-top {
    position: fixed;
    bottom: 80px; /* フローティングCTAとの衝突を避ける */
    right: 20px;
    display: none;
    z-index: 100;
}
