/* Hero Section */
.hero {
    margin-top: 60px;
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    background-color: #000;
    /* フォールバック画像は削除（JSで制御） */
}

/* WebGL非対応時のみ背景画像を表示 */
.no-webgl .hero,
.hero.fallback {
    background-image: url('../../assets/images/hero-fallback.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Loading State */
.hero.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero.loading::after {
    content: '読み込み中...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    z-index: 21;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* WebGL非対応時のスタイル */
.no-webgl .hero {
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-webgl #hero-canvas,
.no-webgl .clean-btn {
    display: none;
}

/* Canvas */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    background-color: #000; /* 黒背景で初期化 */
    /* 読み込み完了まで非表示 */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.hero.loaded #hero-canvas {
    opacity: 1;
}

/* Hero Content */
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    pointer-events: none;
}

.hero-subtitle {
    font-size: 36px;
    font-weight: 300;
    margin-bottom: 30px;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    letter-spacing: 2px;
    line-height: 1.4;
    color: white;
}

.hero-japanese {
    font-size: 18px;
    font-weight: 300;
    opacity: 0.9;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
}

/* Clean Button */
.clean-btn {
    position: absolute;
    bottom: 20px;
    left: 25px;
    z-index: 10;
    font-family: sans-serif;
    font-size: 15px;
    color: white;
    text-shadow: 0 0 10px #000000;
    user-select: none;
    cursor: pointer;
    text-decoration: underline;
    opacity: .5;
    transition: opacity 0.3s;
    background: none;
    border: none;
    padding: 0;
}

.clean-btn:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        height: 500px;
    }
    
    .hero-subtitle {
        font-size: 24px;
        letter-spacing: 1px;
    }
    
    .hero-japanese {
        font-size: 14px;
    }
}