.hero {
    position: fixed;
    /* 全画面に固定してスプラッシュ化 */
    inset: 0;
    /* top:0; right:0; bottom:0; left:0; と同じ */
    width: 100%;
    height: 100vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: heroSplashFade 2s ease 5s forwards;
    /* 3秒表示 → 1秒かけてフェードアウト（数値は好みで調整） */
    z-index: 9999;
    /* 最前面での固定 */
}

/* 既存の .hero-background などはそのままで OK */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/user/themes/ama2026/assets/img/poster.gif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 1.5s ease-out 0.3s forwards;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    color: #ffffff;
    text-shadow:
        3px 3px 6px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 255, 255, 0.3);
    letter-spacing: 0.1em;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.15em;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1.5s ease-out 0.8s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* スプラッシュ用のフェードアウトアニメーション */
@keyframes heroSplashFade {
    to {
        opacity: 0;
        visibility: hidden;
        /* 見えない＋クリックも通す */
    }
}

/* タブレット対応 */
@media (max-width: 768px) {
    .hero {
        height: 100vh;
        /* スプラッシュとしては常に全画面で良いので 100vh 固定でも良い */
        min-height: 400px;
    }

    .hero-title {
        letter-spacing: 0.05em;
    }

    .hero-subtitle {
        letter-spacing: 0.1em;
    }
}

/* スマートフォン対応 */
@media (max-width: 480px) {
    .hero {
        height: 100vh;
        min-height: 350px;
    }

    .hero-background {
        background-image: url('/user/themes/ama2026/assets/img/poster_v.gif');
    }

    .hero-content {
        padding: 0 15px;
    }

    .hero-title {
        letter-spacing: 0.03em;
    }
}

/* 横向き画面対応 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        min-height: 100vh;
    }

    .hero-title {
        font-size: clamp(2rem, 6vw, 4rem);
    }
}