/* 基本設定 */
body {
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background-color: #fcfcfc;
    color: #333;
    line-height: 1.8;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ヘッダー */
.story-header {
    text-align: center;
    margin-bottom: 50px;
}

.story-header h1 {
    font-size: 2.2rem;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

/* 動画の親枠：16:9の比率を維持する設定 */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9の比率を作る */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px 8px 0 0; /* 上の角だけ丸める（任意） */
}

/* iframeを枠いっぱいに広げる設定 ★これが足りていませんでした */
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* メイン動画エリア（画像リンク） */
.main-video {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 80px;
}

.main-video-link {
    text-decoration: none;
    display: block;
}

.video-placeholder {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.main-video-link:hover img {
    opacity: 0.7;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-button {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: bold;
    border: 2px solid #fff;
    transition: all 0.3s;
}

.main-video-link:hover .play-button {
    background: #c5a36b;
    border-color: #c5a36b;
    transform: scale(1.1);
}

.video-info {
    padding: 30px;
}

.episode-label {
    display: inline-block;
    background: #c5a36b;
    color: #fff;
    padding: 2px 12px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* グリッドエリア */
.list-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.episode-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.episode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.thumb-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 0.8rem;
}

.card-content {
    padding: 15px;
}

.episode-number {
    font-size: 0.75rem;
    color: #c5a36b;
    font-weight: bold;
    display: block;
}

.episode-card h3 {
    margin: 5px 0 10px 0;
    font-size: 1.05rem;
}

.description {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* フッター */
.story-footer {
    text-align: center;
    margin-top: 60px;
}

.btn-back {
    display: inline-block;
    padding: 12px 40px;
    border: 1px solid #333;
    text-decoration: none;
    color: #333;
    transition: 0.3s;
}

.btn-back:hover {
    background: #333;
    color: #fff;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .episode-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .video-info h2 { font-size: 1.4rem; }
    .description { -webkit-line-clamp: 2; }
}

@media (max-width: 480px) {
    .episode-grid { grid-template-columns: 1fr; }
}
